{"version":3,"sources":["jquery.js","bootstrap.min.js","bootstrap-dialog.min.js","jquery.slimscroll.min.js","jquery-ui.min.js","adminlte.min.js","selectize.min.js","select2.min.js","chosen.jquery.min.js","pako.min.js","flow.min.js","exif.js","jstz.min.js","csv.js","cropper.min.js","dragula.min.js","jquery.flex-images.min.js","jquery.waitforimages.min.js","bootstrap-datepicker.min.js","jquery-clockpicker.min.js","jquery.inputmask.bundle.js","codemirror.js","closetag.js","closebrackets.js","javascript.js","xml.js","css.js","htmlmixed.js","papaparse.min.js","c3.min.js","d3.min.js","pivot.min.js","d3_renderers.min.js","c3_renderers.min.js","export_renderers.min.js","list.min.js","lodash.min.js","moment.min.js","html.sortable.min.js","Chart.min.js","bootstrap-slider.min.js","canvas-to-blob.min.js","signature_pad.js","gmaps.min.js","fullcalendar.js","card.js","noty.min.js","toasted.js","paste-image.min.js","ajaxQueue.js","validator.js","progress_bar.js","jquery.canvasResize.js","jquery.exif.js","jquery.wiggle.js","lazy.js","admin.js","form-builder.min.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC59UA;AACA;AACA;AACA;AACA;AACA;ACLA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACZA;AACA;AACA;AACA;ACHA;AACA;ACDA;ACAA;AACA;ACDA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACniCA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;ACAA;AACA;AACA;ACFA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;AACA;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1nFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5pTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACh8BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC91BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;ACDA;AACA;AACA;ACFA;AACA;AACA;ACFA;AACA;AACA;ACFA;AACA;AACA;ACFA;AACA;AACA;ACFA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3IA;AACA;ACDA;AACA;AACA;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACPA;AACA;AACA;AACA;AACA;ACJA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClmBA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3ydA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3hIA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjWA;AACA","file":"site-247b563086.js","sourcesContent":["/*!\n * jQuery JavaScript Library v3.7.1\n * https://jquery.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-08-28T13:37Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar version = \"3.7.1\",\n\n\trhtmlSuffix = /HTML$/i,\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\n\t// Retrieve the text value of an array of DOM nodes\n\ttext: function( elem ) {\n\t\tvar node,\n\t\t\tret = \"\",\n\t\t\ti = 0,\n\t\t\tnodeType = elem.nodeType;\n\n\t\tif ( !nodeType ) {\n\n\t\t\t// If no nodeType, this is expected to be an array\n\t\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t\t// Do not traverse comment nodes\n\t\t\t\tret += jQuery.text( node );\n\t\t\t}\n\t\t}\n\t\tif ( nodeType === 1 || nodeType === 11 ) {\n\t\t\treturn elem.textContent;\n\t\t}\n\t\tif ( nodeType === 9 ) {\n\t\t\treturn elem.documentElement.textContent;\n\t\t}\n\t\tif ( nodeType === 3 || nodeType === 4 ) {\n\t\t\treturn elem.nodeValue;\n\t\t}\n\n\t\t// Do not include comment or processing instruction nodes\n\n\t\treturn ret;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tisXMLDoc: function( elem ) {\n\t\tvar namespace = elem && elem.namespaceURI,\n\t\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t\t// Assume HTML when documentElement doesn't yet exist, such as inside\n\t\t// document fragments.\n\t\treturn !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar pop = arr.pop;\n\n\nvar sort = arr.sort;\n\n\nvar splice = arr.splice;\n\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n// Note: an element does not contain itself\njQuery.contains = function( a, b ) {\n\tvar bup = b && b.parentNode;\n\n\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE doesn't have `contains` on SVG.\n\t\ta.contains ?\n\t\t\ta.contains( bup ) :\n\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t) );\n};\n\n\n\n\n// CSS string/identifier serialization\n// https://drafts.csswg.org/cssom/#common-serializing-idioms\nvar rcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g;\n\nfunction fcssescape( ch, asCodePoint ) {\n\tif ( asCodePoint ) {\n\n\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\tif ( ch === \"\\0\" ) {\n\t\t\treturn \"\\uFFFD\";\n\t\t}\n\n\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\treturn ch.slice( 0, -1 ) + \"\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t}\n\n\t// Other potentially-special ASCII characters get backslash-escaped\n\treturn \"\\\\\" + ch;\n}\n\njQuery.escapeSelector = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\n\n\n\nvar preferredDoc = document,\n\tpushNative = push;\n\n( function() {\n\nvar i,\n\tExpr,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\tpush = pushNative,\n\n\t// Local document vars\n\tdocument,\n\tdocumentElement,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\tmatches,\n\n\t// Instance-specific data\n\texpando = jQuery.expando,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|\" +\n\t\t\"loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" +\n\t\twhitespace + \"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\tID: new RegExp( \"^#(\" + identifier + \")\" ),\n\t\tCLASS: new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\tTAG: new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\tATTR: new RegExp( \"^\" + attributes ),\n\t\tPSEUDO: new RegExp( \"^\" + pseudos ),\n\t\tCHILD: new RegExp(\n\t\t\t\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\tbool: new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\tneedsContext: new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// https://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\tif ( nonHex ) {\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\treturn nonHex;\n\t\t}\n\n\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t// Support: IE <=11+\n\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t// surrogate pair\n\t\treturn high < 0 ?\n\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes; see `setDocument`.\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE/Edge.\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && nodeName( elem, \"fieldset\" );\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android <=4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = {\n\t\tapply: function( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t},\n\t\tcall: function( target ) {\n\t\t\tpushNative.apply( target, slice.call( arguments, 1 ) );\n\t\t}\n\t};\n}\n\nfunction find( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE 9 only\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tfind.contains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( !nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when\n\t\t\t\t\t// strict-comparing two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( newContext != context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = jQuery.escapeSelector( nid );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrimCSS, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties\n\t\t// (see https://github.com/jquery/sizzle/issues/157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by jQuery selector module\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn nodeName( elem, \"input\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\treturn ( nodeName( elem, \"input\" ) || nodeName( elem, \"button\" ) ) &&\n\t\t\telem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11+\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a jQuery selector context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [node] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nfunction setDocument( node ) {\n\tvar subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocumentElement = document.documentElement;\n\tdocumentIsHTML = !jQuery.isXMLDoc( document );\n\n\t// Support: iOS 7 only, IE 9 - 11+\n\t// Older browsers didn't support unprefixed `matches`.\n\tmatches = documentElement.matches ||\n\t\tdocumentElement.webkitMatchesSelector ||\n\t\tdocumentElement.msMatchesSelector;\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors\n\t// (see trac-13936).\n\t// Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,\n\t// all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.\n\tif ( documentElement.msMatchesSelector &&\n\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tpreferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t\tsubWindow.addEventListener( \"unload\", unloadHandler );\n\t}\n\n\t// Support: IE <10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocumentElement.appendChild( el ).id = jQuery.expando;\n\t\treturn !document.getElementsByName ||\n\t\t\t!document.getElementsByName( jQuery.expando ).length;\n\t} );\n\n\t// Support: IE 9 only\n\t// Check to see if it's possible to do matchesSelector\n\t// on a disconnected node.\n\tsupport.disconnectedMatch = assert( function( el ) {\n\t\treturn matches.call( el, \"*\" );\n\t} );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// IE/Edge don't support the :scope pseudo-class.\n\tsupport.scope = assert( function() {\n\t\treturn document.querySelectorAll( \":scope\" );\n\t} );\n\n\t// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only\n\t// Make sure the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter.ID = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find.ID = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find.TAG = function( tag, context ) {\n\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t// DocumentFragment nodes don't have gEBTN\n\t\t} else {\n\t\t\treturn context.querySelectorAll( tag );\n\t\t}\n\t};\n\n\t// Class\n\tExpr.find.CLASS = function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\trbuggyQSA = [];\n\n\t// Build QSA regex\n\t// Regex strategy adopted from Diego Perini\n\tassert( function( el ) {\n\n\t\tvar input;\n\n\t\tdocumentElement.appendChild( el ).innerHTML =\n\t\t\t\"<a id='\" + expando + \"' href='' disabled='disabled'></a>\" +\n\t\t\t\"<select id='\" + expando + \"-\\r\\\\' disabled='disabled'>\" +\n\t\t\t\"<option selected=''></option></select>\";\n\n\t\t// Support: iOS <=7 - 8 only\n\t\t// Boolean attributes and \"value\" are not treated correctly in some XML documents\n\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t}\n\n\t\t// Support: iOS <=7 - 8 only\n\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\trbuggyQSA.push( \"~=\" );\n\t\t}\n\n\t\t// Support: iOS 8 only\n\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t}\n\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\trbuggyQSA.push( \":checked\" );\n\t\t}\n\n\t\t// Support: Windows 8 Native Apps\n\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t// Support: IE 9 - 11+\n\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+\n\t\t// In some of the document kinds, these selectors wouldn't work natively.\n\t\t// This is probably OK but for backwards compatibility we want to maintain\n\t\t// handling them through jQuery traversal in jQuery 3.x.\n\t\tdocumentElement.appendChild( el ).disabled = true;\n\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t}\n\n\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t// Adding a temporary attribute to the document before the selection works\n\t\t// around the issue.\n\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\tinput = document.createElement( \"input\" );\n\t\tinput.setAttribute( \"name\", \"\" );\n\t\tel.appendChild( input );\n\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t}\n\t} );\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = function( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a === document || a.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b === document || b.ownerDocument == preferredDoc &&\n\t\t\t\tfind.contains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t};\n\n\treturn document;\n}\n\nfind.matches = function( expr, elements ) {\n\treturn find( expr, null, null, elements );\n};\n\nfind.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn find( expr, document, null, [ elem ] ).length > 0;\n};\n\nfind.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn jQuery.contains( context, elem );\n};\n\n\nfind.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (see trac-13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\tif ( val !== undefined ) {\n\t\treturn val;\n\t}\n\n\treturn elem.getAttribute( name );\n};\n\nfind.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\njQuery.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\t//\n\t// Support: Android <=4.0+\n\t// Testing for detecting duplicates is unpredictable so instead assume we can't\n\t// depend on duplicate detection in all browsers without a stable sort.\n\thasDuplicate = !support.sortStable;\n\tsortInput = !support.sortStable && slice.call( results, 0 );\n\tsort.call( results, sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tsplice.call( results, duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\njQuery.fn.uniqueSort = function() {\n\treturn this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) );\n};\n\nExpr = jQuery.expr = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\tATTR: function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || \"\" )\n\t\t\t\t.replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\tCHILD: function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" )\n\t\t\t\t);\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tfind.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\tPSEUDO: function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr.CHILD.test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\tTAG: function( nodeNameSelector ) {\n\t\t\tvar expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn nodeName( elem, expectedNodeName );\n\t\t\t\t};\n\t\t},\n\n\t\tCLASS: function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace + \")\" + className +\n\t\t\t\t\t\"(\" + whitespace + \"|$)\" ) ) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\tATTR: function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = find.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\tif ( operator === \"=\" ) {\n\t\t\t\t\treturn result === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"!=\" ) {\n\t\t\t\t\treturn result !== check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"^=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) === 0;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"*=\" ) {\n\t\t\t\t\treturn check && result.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"$=\" ) {\n\t\t\t\t\treturn check && result.slice( -check.length ) === check;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"~=\" ) {\n\t\t\t\t\treturn ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" )\n\t\t\t\t\t\t.indexOf( check ) > -1;\n\t\t\t\t}\n\t\t\t\tif ( operator === \"|=\" ) {\n\t\t\t\t\treturn result === check || result.slice( 0, check.length + 1 ) === check + \"-\";\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t};\n\t\t},\n\n\t\tCHILD: function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || ( parent[ expando ] = {} );\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\t\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnodeName( node, name ) :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\t\t\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\tPSEUDO: function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// https://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tfind.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as jQuery does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\tnot: markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrimCSS, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element\n\t\t\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\thas: markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn find( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\tcontains: markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// https://www.w3.org/TR/selectors/#lang-pseudo\n\t\tlang: markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tfind.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\ttarget: function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\troot: function( elem ) {\n\t\t\treturn elem === documentElement;\n\t\t},\n\n\t\tfocus: function( elem ) {\n\t\t\treturn elem === safeActiveElement() &&\n\t\t\t\tdocument.hasFocus() &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\tenabled: createDisabledPseudo( false ),\n\t\tdisabled: createDisabledPseudo( true ),\n\n\t\tchecked: function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\treturn ( nodeName( elem, \"input\" ) && !!elem.checked ) ||\n\t\t\t\t( nodeName( elem, \"option\" ) && !!elem.selected );\n\t\t},\n\n\t\tselected: function( elem ) {\n\n\t\t\t// Support: IE <=11+\n\t\t\t// Accessing the selectedIndex property\n\t\t\t// forces the browser to treat the default option as\n\t\t\t// selected when in an optgroup.\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\tempty: function( elem ) {\n\n\t\t\t// https://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t// but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\tparent: function( elem ) {\n\t\t\treturn !Expr.pseudos.empty( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\theader: function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\tinput: function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\tbutton: function( elem ) {\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"button\" ||\n\t\t\t\tnodeName( elem, \"button\" );\n\t\t},\n\n\t\ttext: function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn nodeName( elem, \"input\" ) && elem.type === \"text\" &&\n\n\t\t\t\t// Support: IE <10 only\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear\n\t\t\t\t// with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\tfirst: createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\tlast: createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\teq: createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\teven: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\todd: createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tlt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i;\n\n\t\t\tif ( argument < 0 ) {\n\t\t\t\ti = argument + length;\n\t\t\t} else if ( argument > length ) {\n\t\t\t\ti = length;\n\t\t\t} else {\n\t\t\t\ti = argument;\n\t\t\t}\n\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\tgt: createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos.nth = Expr.pseudos.eq;\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\nfunction tokenize( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rleadingCombinator.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrimCSS, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\tif ( parseOnly ) {\n\t\treturn soFar.length;\n\t}\n\n\treturn soFar ?\n\t\tfind.error( selector ) :\n\n\t\t// Cache the tokens\n\t\ttokenCache( selector, groups ).slice( 0 );\n}\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\tif ( skip && nodeName( elem, skip ) ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = outerCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tfind( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem, matcherOut,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed ||\n\t\t\t\tmultipleContexts( selector || \"*\",\n\t\t\t\t\tcontext.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems;\n\n\t\tif ( matcher ) {\n\n\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter\n\t\t\t// or preexisting results,\n\t\t\tmatcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t[] :\n\n\t\t\t\t// ...otherwise use results directly\n\t\t\t\tresults;\n\n\t\t\t// Find primary matches\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t} else {\n\t\t\tmatcherOut = matcherIn;\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tvar ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element\n\t\t\t// (see https://github.com/jquery/sizzle/issues/299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 )\n\t\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrimCSS, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find.TAG( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: iOS <=7 - 9 only\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching\n\t\t\t// elements by id. (see trac-14142)\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tpush.call( results, elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tjQuery.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\nfunction compile( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n}\n\n/**\n * A low-level selection function that works with jQuery's compiled\n * selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n * selector function built with jQuery selector compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nfunction select( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find.ID(\n\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\tcontext\n\t\t\t) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr.needsContext.test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) &&\n\t\t\t\t\t\ttestContext( context.parentNode ) || context\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n}\n\n// One-time assignments\n\n// Support: Android <=4.0 - 4.1+\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Android <=4.0 - 4.1+\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\njQuery.find = find;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.unique = jQuery.uniqueSort;\n\n// These have always been private, but they used to be documented as part of\n// Sizzle so let's maintain them for now for backwards compatibility purposes.\nfind.compile = compile;\nfind.select = select;\nfind.setDocument = setDocument;\nfind.tokenize = tokenize;\n\nfind.escape = jQuery.escapeSelector;\nfind.getText = jQuery.text;\nfind.isXML = jQuery.isXMLDoc;\nfind.selectors = jQuery.expr;\nfind.support = jQuery.support;\nfind.uniqueSort = jQuery.uniqueSort;\n\n\t/* eslint-enable */\n\n} )();\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to jQuery#find\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.error );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the error, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getErrorHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getErrorHook();\n\n\t\t\t\t\t\t\t\t// The deprecated alias of the above. While the name suggests\n\t\t\t\t\t\t\t\t// returning the stack, not an error instance, jQuery just passes\n\t\t\t\t\t\t\t\t// it directly to `console.warn` so both will work; an instance\n\t\t\t\t\t\t\t\t// just better cooperates with source maps.\n\t\t\t\t\t\t\t\t} else if ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.error = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\n// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error\n// captured before the async barrier to get the original error cause\n// which may otherwise be hidden.\njQuery.Deferred.exceptionHook = function( error, asyncError ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message,\n\t\t\terror.stack, asyncError );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t// - Node\n\t// - Node.ELEMENT_NODE\n\t// - Node.DOCUMENT_NODE\n\t// - Object\n\t// - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t// 1. No key was specified\n\t\t// 2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t// 1. The entire cache object\n\t\t// 2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t// 1. An object of properties\n\t\t// 2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", true );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, isSetup ) {\n\n\t// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !isSetup ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\tif ( !saved ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tdataPriv.set( this, type, false );\n\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering\n\t\t\t\t// the native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, jQuery.event.trigger(\n\t\t\t\t\tsaved[ 0 ],\n\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\tthis\n\t\t\t\t) );\n\n\t\t\t\t// Abort handling of the native event by all jQuery handlers while allowing\n\t\t\t\t// native handlers on the same element to run. On target, this is achieved\n\t\t\t\t// by stopping immediate propagation just on the jQuery event. However,\n\t\t\t\t// the native event is re-wrapped by a jQuery one on each level of the\n\t\t\t\t// propagation so the only way to stop it for jQuery is to stop it for\n\t\t\t\t// everyone via native `stopPropagation()`. This is not a problem for\n\t\t\t\t// focus/blur which don't bubble, but it does also stop click on checkboxes\n\t\t\t\t// and radios. We accept this limitation.\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.isImmediatePropagationStopped = returnTrue;\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\n\tfunction focusMappedHandler( nativeEvent ) {\n\t\tif ( document.documentMode ) {\n\n\t\t\t// Support: IE 11+\n\t\t\t// Attach a single focusin/focusout handler on the document while someone wants\n\t\t\t// focus/blur. This is because the former are synchronous in IE while the latter\n\t\t\t// are async. In other browsers, all those handlers are invoked synchronously.\n\n\t\t\t// `handle` from private data would already wrap the event, but we need\n\t\t\t// to change the `type` here.\n\t\t\tvar handle = dataPriv.get( this, \"handle\" ),\n\t\t\t\tevent = jQuery.event.fix( nativeEvent );\n\t\t\tevent.type = nativeEvent.type === \"focusin\" ? \"focus\" : \"blur\";\n\t\t\tevent.isSimulated = true;\n\n\t\t\t// First, handle focusin/focusout\n\t\t\thandle( nativeEvent );\n\n\t\t\t// ...then, handle focus/blur\n\t\t\t//\n\t\t\t// focus/blur don't bubble while focusin/focusout do; simulate the former by only\n\t\t\t// invoking the handler at the lower level.\n\t\t\tif ( event.target === event.currentTarget ) {\n\n\t\t\t\t// The setup part calls `leverageNative`, which, in turn, calls\n\t\t\t\t// `jQuery.event.add`, so event handle will already have been set\n\t\t\t\t// by this point.\n\t\t\t\thandle( event );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// For non-IE browsers, attach a single capturing handler on the document\n\t\t\t// while someone wants focusin/focusout.\n\t\t\tjQuery.event.simulate( delegateType, nativeEvent.target,\n\t\t\t\tjQuery.event.fix( nativeEvent ) );\n\t\t}\n\t}\n\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\tvar attaches;\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, true );\n\n\t\t\tif ( document.documentMode ) {\n\n\t\t\t\t// Support: IE 9 - 11+\n\t\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\t\tattaches = dataPriv.get( this, delegateType );\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t}\n\t\t\t\tdataPriv.set( this, delegateType, ( attaches || 0 ) + 1 );\n\t\t\t} else {\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\tteardown: function() {\n\t\t\tvar attaches;\n\n\t\t\tif ( document.documentMode ) {\n\t\t\t\tattaches = dataPriv.get( this, delegateType ) - 1;\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t\tdataPriv.remove( this, delegateType );\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.set( this, delegateType, attaches );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Return false to indicate standard teardown should be applied\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n\n\t// Support: Firefox <=44\n\t// Firefox doesn't have focus(in | out) events\n\t// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n\t//\n\t// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n\t// focus(in | out) events fire after focus & blur events,\n\t// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n\t// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\n\t//\n\t// Support: IE 9 - 11+\n\t// To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,\n\t// attach a single handler for both events in IE.\n\tjQuery.event.special[ delegateType ] = {\n\t\tsetup: function() {\n\n\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType );\n\n\t\t\t// Support: IE 9 - 11+\n\t\t\t// We use the same native handler for focusin & focus (and focusout & blur)\n\t\t\t// so we need to coordinate setup & teardown parts between those events.\n\t\t\t// Use `delegateType` as the key as `type` is already used by `leverageNative`.\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.addEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.addEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 );\n\t\t},\n\t\tteardown: function() {\n\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\tdataHolder = document.documentMode ? this : doc,\n\t\t\t\tattaches = dataPriv.get( dataHolder, delegateType ) - 1;\n\n\t\t\tif ( !attaches ) {\n\t\t\t\tif ( document.documentMode ) {\n\t\t\t\t\tthis.removeEventListener( delegateType, focusMappedHandler );\n\t\t\t\t} else {\n\t\t\t\t\tdoc.removeEventListener( type, focusMappedHandler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( dataHolder, delegateType );\n\t\t\t} else {\n\t\t\t\tdataPriv.set( dataHolder, delegateType, attaches );\n\t\t\t}\n\t\t}\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event ) dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Re-enable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase() !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew jQuery#find here for performance reasons:\n\t\t\t// https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"box-sizing:content-box;border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is `display: block`\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t// .css('filter') (IE 9 only, trac-12537)\n\t// .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\n\t\t// Support: IE <=9 - 11+\n\t\t// IE only supports `\"float\"` in `getPropertyValue`; in computed styles\n\t\t// it's only available as `\"cssFloat\"`. We no longer modify properties\n\t\t// sent to `.css()` apart from camelCasing, so we need to check both.\n\t\t// Normally, this would create difference in behavior: if\n\t\t// `getPropertyValue` returns an empty string, the value returned\n\t\t// by `.css()` would be `undefined`. This is usually the case for\n\t\t// disconnected elements. However, in IE even disconnected elements\n\t\t// with no styles return `\"none\"` for `getPropertyValue( \"float\" )`\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\tif ( isCustomProp && ret ) {\n\n\t\t\t// Support: Firefox 105+, Chrome <=105+\n\t\t\t// Spec requires trimming whitespace for custom properties (gh-4926).\n\t\t\t// Firefox only trims leading whitespace. Chrome just collapses\n\t\t\t// both leading & trailing whitespace to a single space.\n\t\t\t//\n\t\t\t// Fall back to `undefined` if empty string returned.\n\t\t\t// This collapses a missing definition with property defined\n\t\t\t// and set to an empty string but there's no standard API\n\t\t\t// allowing us to differentiate them without a performance penalty\n\t\t\t// and returning `undefined` aligns with older jQuery.\n\t\t\t//\n\t\t\t// rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" ) || undefined;\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0,\n\t\tmarginDelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\t// Count margin delta separately to only add it after scroll gutter adjustment.\n\t\t// This is needed to make negative margins work with `outerHeight( true )` (gh-3982).\n\t\tif ( box === \"margin\" ) {\n\t\t\tmarginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta + marginDelta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\tanimationIterationCount: true,\n\t\taspectRatio: true,\n\t\tborderImageSlice: true,\n\t\tcolumnCount: true,\n\t\tflexGrow: true,\n\t\tflexShrink: true,\n\t\tfontWeight: true,\n\t\tgridArea: true,\n\t\tgridColumn: true,\n\t\tgridColumnEnd: true,\n\t\tgridColumnStart: true,\n\t\tgridRow: true,\n\t\tgridRowEnd: true,\n\t\tgridRowStart: true,\n\t\tlineHeight: true,\n\t\topacity: true,\n\t\torder: true,\n\t\torphans: true,\n\t\tscale: true,\n\t\twidows: true,\n\t\tzIndex: true,\n\t\tzoom: true,\n\n\t\t// SVG-related\n\t\tfillOpacity: true,\n\t\tfloodOpacity: true,\n\t\tstopOpacity: true,\n\t\tstrokeMiterlimit: true,\n\t\tstrokeOpacity: true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t * - BEFORE asking for a transport\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\" ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t// documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this\n\t\t\t.on( \"mouseenter\", fnOver )\n\t\t\t.on( \"mouseleave\", fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","/*!\n * Bootstrap v3.4.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under the MIT license\n */\nif(\"undefined\"==typeof jQuery)throw new Error(\"Bootstrap's JavaScript requires jQuery\");!function(t){\"use strict\";var e=jQuery.fn.jquery.split(\" \")[0].split(\".\");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||3<e[0])throw new Error(\"Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4\")}(),function(n){\"use strict\";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one(\"bsTransitionEnd\",function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function o(){var t=document.createElement(\"bootstrap\"),e={WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"oTransitionEnd otransitionend\",transition:\"transitionend\"};for(var i in e)if(t.style[i]!==undefined)return{end:e[i]};return!1}(),n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(s){\"use strict\";var e='[data-dismiss=\"alert\"]',a=function(t){s(t).on(\"click\",e,this.close)};a.VERSION=\"3.4.1\",a.TRANSITION_DURATION=150,a.prototype.close=function(t){var e=s(this),i=e.attr(\"data-target\");i||(i=(i=e.attr(\"href\"))&&i.replace(/.*(?=#[^\\s]*$)/,\"\")),i=\"#\"===i?[]:i;var o=s(document).find(i);function n(){o.detach().trigger(\"closed.bs.alert\").remove()}t&&t.preventDefault(),o.length||(o=e.closest(\".alert\")),o.trigger(t=s.Event(\"close.bs.alert\")),t.isDefaultPrevented()||(o.removeClass(\"in\"),s.support.transition&&o.hasClass(\"fade\")?o.one(\"bsTransitionEnd\",n).emulateTransitionEnd(a.TRANSITION_DURATION):n())};var t=s.fn.alert;s.fn.alert=function o(i){return this.each(function(){var t=s(this),e=t.data(\"bs.alert\");e||t.data(\"bs.alert\",e=new a(this)),\"string\"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=a,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on(\"click.bs.alert.data-api\",e,a.prototype.close)}(jQuery),function(s){\"use strict\";var n=function(t,e){this.$element=s(t),this.options=s.extend({},n.DEFAULTS,e),this.isLoading=!1};function i(o){return this.each(function(){var t=s(this),e=t.data(\"bs.button\"),i=\"object\"==typeof o&&o;e||t.data(\"bs.button\",e=new n(this,i)),\"toggle\"==o?e.toggle():o&&e.setState(o)})}n.VERSION=\"3.4.1\",n.DEFAULTS={loadingText:\"loading...\"},n.prototype.setState=function(t){var e=\"disabled\",i=this.$element,o=i.is(\"input\")?\"val\":\"html\",n=i.data();t+=\"Text\",null==n.resetText&&i.data(\"resetText\",i[o]()),setTimeout(s.proxy(function(){i[o](null==n[t]?this.options[t]:n[t]),\"loadingText\"==t?(this.isLoading=!0,i.addClass(e).attr(e,e).prop(e,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(e).removeAttr(e).prop(e,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle=\"buttons\"]');if(e.length){var i=this.$element.find(\"input\");\"radio\"==i.prop(\"type\")?(i.prop(\"checked\")&&(t=!1),e.find(\".active\").removeClass(\"active\"),this.$element.addClass(\"active\")):\"checkbox\"==i.prop(\"type\")&&(i.prop(\"checked\")!==this.$element.hasClass(\"active\")&&(t=!1),this.$element.toggleClass(\"active\")),i.prop(\"checked\",this.$element.hasClass(\"active\")),t&&i.trigger(\"change\")}else this.$element.attr(\"aria-pressed\",!this.$element.hasClass(\"active\")),this.$element.toggleClass(\"active\")};var t=s.fn.button;s.fn.button=i,s.fn.button.Constructor=n,s.fn.button.noConflict=function(){return s.fn.button=t,this},s(document).on(\"click.bs.button.data-api\",'[data-toggle^=\"button\"]',function(t){var e=s(t.target).closest(\".btn\");i.call(e,\"toggle\"),s(t.target).is('input[type=\"radio\"], input[type=\"checkbox\"]')||(t.preventDefault(),e.is(\"input,button\")?e.trigger(\"focus\"):e.find(\"input:visible,button:visible\").first().trigger(\"focus\"))}).on(\"focus.bs.button.data-api blur.bs.button.data-api\",'[data-toggle^=\"button\"]',function(t){s(t.target).closest(\".btn\").toggleClass(\"focus\",/^focus(in)?$/.test(t.type))})}(jQuery),function(p){\"use strict\";var c=function(t,e){this.$element=p(t),this.$indicators=this.$element.find(\".carousel-indicators\"),this.options=e,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on(\"keydown.bs.carousel\",p.proxy(this.keydown,this)),\"hover\"==this.options.pause&&!(\"ontouchstart\"in document.documentElement)&&this.$element.on(\"mouseenter.bs.carousel\",p.proxy(this.pause,this)).on(\"mouseleave.bs.carousel\",p.proxy(this.cycle,this))};function r(n){return this.each(function(){var t=p(this),e=t.data(\"bs.carousel\"),i=p.extend({},c.DEFAULTS,t.data(),\"object\"==typeof n&&n),o=\"string\"==typeof n?n:i.slide;e||t.data(\"bs.carousel\",e=new c(this,i)),\"number\"==typeof n?e.to(n):o?e[o]():i.interval&&e.pause().cycle()})}c.VERSION=\"3.4.1\",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:\"hover\",wrap:!0,keyboard:!0},c.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},c.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(p.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(t){return this.$items=t.parent().children(\".item\"),this.$items.index(t||this.$active)},c.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e);if((\"prev\"==t&&0===i||\"next\"==t&&i==this.$items.length-1)&&!this.options.wrap)return e;var o=(i+(\"prev\"==t?-1:1))%this.$items.length;return this.$items.eq(o)},c.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(\".item.active\"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one(\"slid.bs.carousel\",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?\"next\":\"prev\",this.$items.eq(t))},c.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(\".next, .prev\").length&&p.support.transition&&(this.$element.trigger(p.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide(\"next\")},c.prototype.prev=function(){if(!this.sliding)return this.slide(\"prev\")},c.prototype.slide=function(t,e){var i=this.$element.find(\".item.active\"),o=e||this.getItemForDirection(t,i),n=this.interval,s=\"next\"==t?\"left\":\"right\",a=this;if(o.hasClass(\"active\"))return this.sliding=!1;var r=o[0],l=p.Event(\"slide.bs.carousel\",{relatedTarget:r,direction:s});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,n&&this.pause(),this.$indicators.length){this.$indicators.find(\".active\").removeClass(\"active\");var h=p(this.$indicators.children()[this.getItemIndex(o)]);h&&h.addClass(\"active\")}var d=p.Event(\"slid.bs.carousel\",{relatedTarget:r,direction:s});return p.support.transition&&this.$element.hasClass(\"slide\")?(o.addClass(t),\"object\"==typeof o&&o.length&&o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one(\"bsTransitionEnd\",function(){o.removeClass([t,s].join(\" \")).addClass(\"active\"),i.removeClass([\"active\",s].join(\" \")),a.sliding=!1,setTimeout(function(){a.$element.trigger(d)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(i.removeClass(\"active\"),o.addClass(\"active\"),this.sliding=!1,this.$element.trigger(d)),n&&this.cycle(),this}};var t=p.fn.carousel;p.fn.carousel=r,p.fn.carousel.Constructor=c,p.fn.carousel.noConflict=function(){return p.fn.carousel=t,this};var e=function(t){var e=p(this),i=e.attr(\"href\");i&&(i=i.replace(/.*(?=#[^\\s]+$)/,\"\"));var o=e.attr(\"data-target\")||i,n=p(document).find(o);if(n.hasClass(\"carousel\")){var s=p.extend({},n.data(),e.data()),a=e.attr(\"data-slide-to\");a&&(s.interval=!1),r.call(n,s),a&&n.data(\"bs.carousel\").to(a),t.preventDefault()}};p(document).on(\"click.bs.carousel.data-api\",\"[data-slide]\",e).on(\"click.bs.carousel.data-api\",\"[data-slide-to]\",e),p(window).on(\"load\",function(){p('[data-ride=\"carousel\"]').each(function(){var t=p(this);r.call(t,t.data())})})}(jQuery),function(a){\"use strict\";var r=function(t,e){this.$element=a(t),this.options=a.extend({},r.DEFAULTS,e),this.$trigger=a('[data-toggle=\"collapse\"][href=\"#'+t.id+'\"],[data-toggle=\"collapse\"][data-target=\"#'+t.id+'\"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(t){var e,i=t.attr(\"data-target\")||(e=t.attr(\"href\"))&&e.replace(/.*(?=#[^\\s]+$)/,\"\");return a(document).find(i)}function l(o){return this.each(function(){var t=a(this),e=t.data(\"bs.collapse\"),i=a.extend({},r.DEFAULTS,t.data(),\"object\"==typeof o&&o);!e&&i.toggle&&/show|hide/.test(o)&&(i.toggle=!1),e||t.data(\"bs.collapse\",e=new r(this,i)),\"string\"==typeof o&&e[o]()})}r.VERSION=\"3.4.1\",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){return this.$element.hasClass(\"width\")?\"width\":\"height\"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass(\"in\")){var t,e=this.$parent&&this.$parent.children(\".panel\").children(\".in, .collapsing\");if(!(e&&e.length&&(t=e.data(\"bs.collapse\"))&&t.transitioning)){var i=a.Event(\"show.bs.collapse\");if(this.$element.trigger(i),!i.isDefaultPrevented()){e&&e.length&&(l.call(e,\"hide\"),t||e.data(\"bs.collapse\",null));var o=this.dimension();this.$element.removeClass(\"collapse\").addClass(\"collapsing\")[o](0).attr(\"aria-expanded\",!0),this.$trigger.removeClass(\"collapsed\").attr(\"aria-expanded\",!0),this.transitioning=1;var n=function(){this.$element.removeClass(\"collapsing\").addClass(\"collapse in\")[o](\"\"),this.transitioning=0,this.$element.trigger(\"shown.bs.collapse\")};if(!a.support.transition)return n.call(this);var s=a.camelCase([\"scroll\",o].join(\"-\"));this.$element.one(\"bsTransitionEnd\",a.proxy(n,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[o](this.$element[0][s])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass(\"in\")){var t=a.Event(\"hide.bs.collapse\");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass(\"collapsing\").removeClass(\"collapse in\").attr(\"aria-expanded\",!1),this.$trigger.addClass(\"collapsed\").attr(\"aria-expanded\",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass(\"collapsing\").addClass(\"collapse\").trigger(\"hidden.bs.collapse\")};if(!a.support.transition)return i.call(this);this.$element[e](0).one(\"bsTransitionEnd\",a.proxy(i,this)).emulateTransitionEnd(r.TRANSITION_DURATION)}}},r.prototype.toggle=function(){this[this.$element.hasClass(\"in\")?\"hide\":\"show\"]()},r.prototype.getParent=function(){return a(document).find(this.options.parent).find('[data-toggle=\"collapse\"][data-parent=\"'+this.options.parent+'\"]').each(a.proxy(function(t,e){var i=a(e);this.addAriaAndCollapsedClass(n(i),i)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass(\"in\");t.attr(\"aria-expanded\",i),e.toggleClass(\"collapsed\",!i).attr(\"aria-expanded\",i)};var t=a.fn.collapse;a.fn.collapse=l,a.fn.collapse.Constructor=r,a.fn.collapse.noConflict=function(){return a.fn.collapse=t,this},a(document).on(\"click.bs.collapse.data-api\",'[data-toggle=\"collapse\"]',function(t){var e=a(this);e.attr(\"data-target\")||t.preventDefault();var i=n(e),o=i.data(\"bs.collapse\")?\"toggle\":e.data();l.call(i,o)})}(jQuery),function(a){\"use strict\";var r='[data-toggle=\"dropdown\"]',o=function(t){a(t).on(\"click.bs.dropdown\",this.toggle)};function l(t){var e=t.attr(\"data-target\");e||(e=(e=t.attr(\"href\"))&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\\s]*$)/,\"\"));var i=\"#\"!==e?a(document).find(e):null;return i&&i.length?i:t.parent()}function s(o){o&&3===o.which||(a(\".dropdown-backdrop\").remove(),a(r).each(function(){var t=a(this),e=l(t),i={relatedTarget:this};e.hasClass(\"open\")&&(o&&\"click\"==o.type&&/input|textarea/i.test(o.target.tagName)&&a.contains(e[0],o.target)||(e.trigger(o=a.Event(\"hide.bs.dropdown\",i)),o.isDefaultPrevented()||(t.attr(\"aria-expanded\",\"false\"),e.removeClass(\"open\").trigger(a.Event(\"hidden.bs.dropdown\",i)))))}))}o.VERSION=\"3.4.1\",o.prototype.toggle=function(t){var e=a(this);if(!e.is(\".disabled, :disabled\")){var i=l(e),o=i.hasClass(\"open\");if(s(),!o){\"ontouchstart\"in document.documentElement&&!i.closest(\".navbar-nav\").length&&a(document.createElement(\"div\")).addClass(\"dropdown-backdrop\").insertAfter(a(this)).on(\"click\",s);var n={relatedTarget:this};if(i.trigger(t=a.Event(\"show.bs.dropdown\",n)),t.isDefaultPrevented())return;e.trigger(\"focus\").attr(\"aria-expanded\",\"true\"),i.toggleClass(\"open\").trigger(a.Event(\"shown.bs.dropdown\",n))}return!1}},o.prototype.keydown=function(t){if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)){var e=a(this);if(t.preventDefault(),t.stopPropagation(),!e.is(\".disabled, :disabled\")){var i=l(e),o=i.hasClass(\"open\");if(!o&&27!=t.which||o&&27==t.which)return 27==t.which&&i.find(r).trigger(\"focus\"),e.trigger(\"click\");var n=i.find(\".dropdown-menu li:not(.disabled):visible a\");if(n.length){var s=n.index(t.target);38==t.which&&0<s&&s--,40==t.which&&s<n.length-1&&s++,~s||(s=0),n.eq(s).trigger(\"focus\")}}}};var t=a.fn.dropdown;a.fn.dropdown=function e(i){return this.each(function(){var t=a(this),e=t.data(\"bs.dropdown\");e||t.data(\"bs.dropdown\",e=new o(this)),\"string\"==typeof i&&e[i].call(t)})},a.fn.dropdown.Constructor=o,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=t,this},a(document).on(\"click.bs.dropdown.data-api\",s).on(\"click.bs.dropdown.data-api\",\".dropdown form\",function(t){t.stopPropagation()}).on(\"click.bs.dropdown.data-api\",r,o.prototype.toggle).on(\"keydown.bs.dropdown.data-api\",r,o.prototype.keydown).on(\"keydown.bs.dropdown.data-api\",\".dropdown-menu\",o.prototype.keydown)}(jQuery),function(a){\"use strict\";var s=function(t,e){this.options=e,this.$body=a(document.body),this.$element=a(t),this.$dialog=this.$element.find(\".modal-dialog\"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=\".navbar-fixed-top, .navbar-fixed-bottom\",this.options.remote&&this.$element.find(\".modal-content\").load(this.options.remote,a.proxy(function(){this.$element.trigger(\"loaded.bs.modal\")},this))};function r(o,n){return this.each(function(){var t=a(this),e=t.data(\"bs.modal\"),i=a.extend({},s.DEFAULTS,t.data(),\"object\"==typeof o&&o);e||t.data(\"bs.modal\",e=new s(this,i)),\"string\"==typeof o?e[o](n):i.show&&e.show(n)})}s.VERSION=\"3.4.1\",s.TRANSITION_DURATION=300,s.BACKDROP_TRANSITION_DURATION=150,s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},s.prototype.show=function(i){var o=this,t=a.Event(\"show.bs.modal\",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass(\"modal-open\"),this.escape(),this.resize(),this.$element.on(\"click.dismiss.bs.modal\",'[data-dismiss=\"modal\"]',a.proxy(this.hide,this)),this.$dialog.on(\"mousedown.dismiss.bs.modal\",function(){o.$element.one(\"mouseup.dismiss.bs.modal\",function(t){a(t.target).is(o.$element)&&(o.ignoreBackdropClick=!0)})}),this.backdrop(function(){var t=a.support.transition&&o.$element.hasClass(\"fade\");o.$element.parent().length||o.$element.appendTo(o.$body),o.$element.show().scrollTop(0),o.adjustDialog(),t&&o.$element[0].offsetWidth,o.$element.addClass(\"in\"),o.enforceFocus();var e=a.Event(\"shown.bs.modal\",{relatedTarget:i});t?o.$dialog.one(\"bsTransitionEnd\",function(){o.$element.trigger(\"focus\").trigger(e)}).emulateTransitionEnd(s.TRANSITION_DURATION):o.$element.trigger(\"focus\").trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=a.Event(\"hide.bs.modal\"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off(\"focusin.bs.modal\"),this.$element.removeClass(\"in\").off(\"click.dismiss.bs.modal\").off(\"mouseup.dismiss.bs.modal\"),this.$dialog.off(\"mousedown.dismiss.bs.modal\"),a.support.transition&&this.$element.hasClass(\"fade\")?this.$element.one(\"bsTransitionEnd\",a.proxy(this.hideModal,this)).emulateTransitionEnd(s.TRANSITION_DURATION):this.hideModal())},s.prototype.enforceFocus=function(){a(document).off(\"focusin.bs.modal\").on(\"focusin.bs.modal\",a.proxy(function(t){document===t.target||this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger(\"focus\")},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on(\"keydown.dismiss.bs.modal\",a.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off(\"keydown.dismiss.bs.modal\")},s.prototype.resize=function(){this.isShown?a(window).on(\"resize.bs.modal\",a.proxy(this.handleUpdate,this)):a(window).off(\"resize.bs.modal\")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass(\"modal-open\"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger(\"hidden.bs.modal\")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this,i=this.$element.hasClass(\"fade\")?\"fade\":\"\";if(this.isShown&&this.options.backdrop){var o=a.support.transition&&i;if(this.$backdrop=a(document.createElement(\"div\")).addClass(\"modal-backdrop \"+i).appendTo(this.$body),this.$element.on(\"click.dismiss.bs.modal\",a.proxy(function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:t.target===t.currentTarget&&(\"static\"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass(\"in\"),!t)return;o?this.$backdrop.one(\"bsTransitionEnd\",t).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):t()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass(\"in\");var n=function(){e.removeBackdrop(),t&&t()};a.support.transition&&this.$element.hasClass(\"fade\")?this.$backdrop.one(\"bsTransitionEnd\",n).emulateTransitionEnd(s.BACKDROP_TRANSITION_DURATION):n()}else t&&t()},s.prototype.handleUpdate=function(){this.adjustDialog()},s.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:\"\",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:\"\"})},s.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:\"\",paddingRight:\"\"})},s.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},s.prototype.setScrollbar=function(){var t=parseInt(this.$body.css(\"padding-right\")||0,10);this.originalBodyPad=document.body.style.paddingRight||\"\";var n=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css(\"padding-right\",t+n),a(this.fixedContent).each(function(t,e){var i=e.style.paddingRight,o=a(e).css(\"padding-right\");a(e).data(\"padding-right\",i).css(\"padding-right\",parseFloat(o)+n+\"px\")}))},s.prototype.resetScrollbar=function(){this.$body.css(\"padding-right\",this.originalBodyPad),a(this.fixedContent).each(function(t,e){var i=a(e).data(\"padding-right\");a(e).removeData(\"padding-right\"),e.style.paddingRight=i||\"\"})},s.prototype.measureScrollbar=function(){var t=document.createElement(\"div\");t.className=\"modal-scrollbar-measure\",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var t=a.fn.modal;a.fn.modal=r,a.fn.modal.Constructor=s,a.fn.modal.noConflict=function(){return a.fn.modal=t,this},a(document).on(\"click.bs.modal.data-api\",'[data-toggle=\"modal\"]',function(t){var e=a(this),i=e.attr(\"href\"),o=e.attr(\"data-target\")||i&&i.replace(/.*(?=#[^\\s]+$)/,\"\"),n=a(document).find(o),s=n.data(\"bs.modal\")?\"toggle\":a.extend({remote:!/#/.test(i)&&i},n.data(),e.data());e.is(\"a\")&&t.preventDefault(),n.one(\"show.bs.modal\",function(t){t.isDefaultPrevented()||n.one(\"hidden.bs.modal\",function(){e.is(\":visible\")&&e.trigger(\"focus\")})}),r.call(n,s,this)})}(jQuery),function(g){\"use strict\";var o=[\"sanitize\",\"whiteList\",\"sanitizeFn\"],a=[\"background\",\"cite\",\"href\",\"itemtype\",\"longdesc\",\"poster\",\"src\",\"xlink:href\"],t={\"*\":[\"class\",\"dir\",\"id\",\"lang\",\"role\",/^aria-[\\w-]*$/i],a:[\"target\",\"href\",\"title\",\"rel\"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:[\"src\",\"alt\",\"title\",\"width\",\"height\"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(t,e){var i=t.nodeName.toLowerCase();if(-1!==g.inArray(i,e))return-1===g.inArray(i,a)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(l));for(var o=g(e).filter(function(t,e){return e instanceof RegExp}),n=0,s=o.length;n<s;n++)if(i.match(o[n]))return!0;return!1}function n(t,e,i){if(0===t.length)return t;if(i&&\"function\"==typeof i)return i(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;var o=document.implementation.createHTMLDocument(\"sanitization\");o.body.innerHTML=t;for(var n=g.map(e,function(t,e){return e}),s=g(o.body).find(\"*\"),a=0,r=s.length;a<r;a++){var l=s[a],h=l.nodeName.toLowerCase();if(-1!==g.inArray(h,n))for(var d=g.map(l.attributes,function(t){return t}),p=[].concat(e[\"*\"]||[],e[h]||[]),c=0,f=d.length;c<f;c++)u(d[c],p)||l.removeAttribute(d[c].nodeName);else l.parentNode.removeChild(l)}return o.body.innerHTML}var m=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init(\"tooltip\",t,e)};m.VERSION=\"3.4.1\",m.TRANSITION_DURATION=150,m.DEFAULTS={animation:!0,placement:\"top\",selector:!1,template:'<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',trigger:\"hover focus\",title:\"\",delay:0,html:!1,container:!1,viewport:{selector:\"body\",padding:0},sanitize:!0,sanitizeFn:null,whiteList:t},m.prototype.init=function(t,e,i){if(this.enabled=!0,this.type=t,this.$element=g(e),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&g(document).find(g.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error(\"`selector` option must be specified when initializing \"+this.type+\" on the window.document object!\");for(var o=this.options.trigger.split(\" \"),n=o.length;n--;){var s=o[n];if(\"click\"==s)this.$element.on(\"click.\"+this.type,this.options.selector,g.proxy(this.toggle,this));else if(\"manual\"!=s){var a=\"hover\"==s?\"mouseenter\":\"focusin\",r=\"hover\"==s?\"mouseleave\":\"focusout\";this.$element.on(a+\".\"+this.type,this.options.selector,g.proxy(this.enter,this)),this.$element.on(r+\".\"+this.type,this.options.selector,g.proxy(this.leave,this))}}this.options.selector?this._options=g.extend({},this.options,{trigger:\"manual\",selector:\"\"}):this.fixTitle()},m.prototype.getDefaults=function(){return m.DEFAULTS},m.prototype.getOptions=function(t){var e=this.$element.data();for(var i in e)e.hasOwnProperty(i)&&-1!==g.inArray(i,o)&&delete e[i];return(t=g.extend({},this.getDefaults(),e,t)).delay&&\"number\"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=n(t.template,t.whiteList,t.sanitizeFn)),t},m.prototype.getDelegateOptions=function(){var i={},o=this.getDefaults();return this._options&&g.each(this._options,function(t,e){o[t]!=e&&(i[t]=e)}),i},m.prototype.enter=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data(\"bs.\"+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data(\"bs.\"+this.type,e)),t instanceof g.Event&&(e.inState[\"focusin\"==t.type?\"focus\":\"hover\"]=!0),e.tip().hasClass(\"in\")||\"in\"==e.hoverState)e.hoverState=\"in\";else{if(clearTimeout(e.timeout),e.hoverState=\"in\",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){\"in\"==e.hoverState&&e.show()},e.options.delay.show)}},m.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},m.prototype.leave=function(t){var e=t instanceof this.constructor?t:g(t.currentTarget).data(\"bs.\"+this.type);if(e||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data(\"bs.\"+this.type,e)),t instanceof g.Event&&(e.inState[\"focusout\"==t.type?\"focus\":\"hover\"]=!1),!e.isInStateTrue()){if(clearTimeout(e.timeout),e.hoverState=\"out\",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){\"out\"==e.hoverState&&e.hide()},e.options.delay.hide)}},m.prototype.show=function(){var t=g.Event(\"show.bs.\"+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);var e=g.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(t.isDefaultPrevented()||!e)return;var i=this,o=this.tip(),n=this.getUID(this.type);this.setContent(),o.attr(\"id\",n),this.$element.attr(\"aria-describedby\",n),this.options.animation&&o.addClass(\"fade\");var s=\"function\"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\\s?auto?\\s?/i,r=a.test(s);r&&(s=s.replace(a,\"\")||\"top\"),o.detach().css({top:0,left:0,display:\"block\"}).addClass(s).data(\"bs.\"+this.type,this),this.options.container?o.appendTo(g(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger(\"inserted.bs.\"+this.type);var l=this.getPosition(),h=o[0].offsetWidth,d=o[0].offsetHeight;if(r){var p=s,c=this.getPosition(this.$viewport);s=\"bottom\"==s&&l.bottom+d>c.bottom?\"top\":\"top\"==s&&l.top-d<c.top?\"bottom\":\"right\"==s&&l.right+h>c.width?\"left\":\"left\"==s&&l.left-h<c.left?\"right\":s,o.removeClass(p).addClass(s)}var f=this.getCalculatedOffset(s,l,h,d);this.applyPlacement(f,s);var u=function(){var t=i.hoverState;i.$element.trigger(\"shown.bs.\"+i.type),i.hoverState=null,\"out\"==t&&i.leave(i)};g.support.transition&&this.$tip.hasClass(\"fade\")?o.one(\"bsTransitionEnd\",u).emulateTransitionEnd(m.TRANSITION_DURATION):u()}},m.prototype.applyPlacement=function(t,e){var i=this.tip(),o=i[0].offsetWidth,n=i[0].offsetHeight,s=parseInt(i.css(\"margin-top\"),10),a=parseInt(i.css(\"margin-left\"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),t.top+=s,t.left+=a,g.offset.setOffset(i[0],g.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},t),0),i.addClass(\"in\");var r=i[0].offsetWidth,l=i[0].offsetHeight;\"top\"==e&&l!=n&&(t.top=t.top+n-l);var h=this.getViewportAdjustedDelta(e,t,r,l);h.left?t.left+=h.left:t.top+=h.top;var d=/top|bottom/.test(e),p=d?2*h.left-o+r:2*h.top-n+l,c=d?\"offsetWidth\":\"offsetHeight\";i.offset(t),this.replaceArrow(p,i[0][c],d)},m.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?\"left\":\"top\",50*(1-t/e)+\"%\").css(i?\"top\":\"left\",\"\")},m.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();this.options.html?(this.options.sanitize&&(e=n(e,this.options.whiteList,this.options.sanitizeFn)),t.find(\".tooltip-inner\").html(e)):t.find(\".tooltip-inner\").text(e),t.removeClass(\"fade in top bottom left right\")},m.prototype.hide=function(t){var e=this,i=g(this.$tip),o=g.Event(\"hide.bs.\"+this.type);function n(){\"in\"!=e.hoverState&&i.detach(),e.$element&&e.$element.removeAttr(\"aria-describedby\").trigger(\"hidden.bs.\"+e.type),t&&t()}if(this.$element.trigger(o),!o.isDefaultPrevented())return i.removeClass(\"in\"),g.support.transition&&i.hasClass(\"fade\")?i.one(\"bsTransitionEnd\",n).emulateTransitionEnd(m.TRANSITION_DURATION):n(),this.hoverState=null,this},m.prototype.fixTitle=function(){var t=this.$element;(t.attr(\"title\")||\"string\"!=typeof t.attr(\"data-original-title\"))&&t.attr(\"data-original-title\",t.attr(\"title\")||\"\").attr(\"title\",\"\")},m.prototype.hasContent=function(){return this.getTitle()},m.prototype.getPosition=function(t){var e=(t=t||this.$element)[0],i=\"BODY\"==e.tagName,o=e.getBoundingClientRect();null==o.width&&(o=g.extend({},o,{width:o.right-o.left,height:o.bottom-o.top}));var n=window.SVGElement&&e instanceof window.SVGElement,s=i?{top:0,left:0}:n?null:t.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},r=i?{width:g(window).width(),height:g(window).height()}:null;return g.extend({},o,a,r,s)},m.prototype.getCalculatedOffset=function(t,e,i,o){return\"bottom\"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:\"top\"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:\"left\"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},m.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var r=e.top-s-a.scroll,l=e.top+s-a.scroll+o;r<a.top?n.top=a.top-r:l>a.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;h<a.left?n.left=a.left-h:d>a.right&&(n.left=a.left+a.width-d)}return n},m.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr(\"data-original-title\")||(\"function\"==typeof e.title?e.title.call(t[0]):e.title)},m.prototype.getUID=function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},m.prototype.tip=function(){if(!this.$tip&&(this.$tip=g(this.options.template),1!=this.$tip.length))throw new Error(this.type+\" `template` option must consist of exactly 1 top-level element!\");return this.$tip},m.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".tooltip-arrow\")},m.prototype.enable=function(){this.enabled=!0},m.prototype.disable=function(){this.enabled=!1},m.prototype.toggleEnabled=function(){this.enabled=!this.enabled},m.prototype.toggle=function(t){var e=this;t&&((e=g(t.currentTarget).data(\"bs.\"+this.type))||(e=new this.constructor(t.currentTarget,this.getDelegateOptions()),g(t.currentTarget).data(\"bs.\"+this.type,e))),t?(e.inState.click=!e.inState.click,e.isInStateTrue()?e.enter(e):e.leave(e)):e.tip().hasClass(\"in\")?e.leave(e):e.enter(e)},m.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off(\".\"+t.type).removeData(\"bs.\"+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},m.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var e=g.fn.tooltip;g.fn.tooltip=function i(o){return this.each(function(){var t=g(this),e=t.data(\"bs.tooltip\"),i=\"object\"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data(\"bs.tooltip\",e=new m(this,i)),\"string\"==typeof o&&e[o]())})},g.fn.tooltip.Constructor=m,g.fn.tooltip.noConflict=function(){return g.fn.tooltip=e,this}}(jQuery),function(n){\"use strict\";var s=function(t,e){this.init(\"popover\",t,e)};if(!n.fn.tooltip)throw new Error(\"Popover requires tooltip.js\");s.VERSION=\"3.4.1\",s.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:\"right\",trigger:\"click\",content:\"\",template:'<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'}),((s.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();if(this.options.html){var o=typeof i;this.options.sanitize&&(e=this.sanitizeHtml(e),\"string\"===o&&(i=this.sanitizeHtml(i))),t.find(\".popover-title\").html(e),t.find(\".popover-content\").children().detach().end()[\"string\"===o?\"html\":\"append\"](i)}else t.find(\".popover-title\").text(e),t.find(\".popover-content\").children().detach().end().text(i);t.removeClass(\"fade top bottom left right in\"),t.find(\".popover-title\").html()||t.find(\".popover-title\").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr(\"data-content\")||(\"function\"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".arrow\")};var t=n.fn.popover;n.fn.popover=function e(o){return this.each(function(){var t=n(this),e=t.data(\"bs.popover\"),i=\"object\"==typeof o&&o;!e&&/destroy|hide/.test(o)||(e||t.data(\"bs.popover\",e=new s(this,i)),\"string\"==typeof o&&e[o]())})},n.fn.popover.Constructor=s,n.fn.popover.noConflict=function(){return n.fn.popover=t,this}}(jQuery),function(s){\"use strict\";function n(t,e){this.$body=s(document.body),this.$scrollElement=s(t).is(document.body)?s(window):s(t),this.options=s.extend({},n.DEFAULTS,e),this.selector=(this.options.target||\"\")+\" .nav li > a\",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on(\"scroll.bs.scrollspy\",s.proxy(this.process,this)),this.refresh(),this.process()}function e(o){return this.each(function(){var t=s(this),e=t.data(\"bs.scrollspy\"),i=\"object\"==typeof o&&o;e||t.data(\"bs.scrollspy\",e=new n(this,i)),\"string\"==typeof o&&e[o]()})}n.VERSION=\"3.4.1\",n.DEFAULTS={offset:10},n.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},n.prototype.refresh=function(){var t=this,o=\"offset\",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),s.isWindow(this.$scrollElement[0])||(o=\"position\",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var t=s(this),e=t.data(\"target\")||t.attr(\"href\"),i=/^#./.test(e)&&s(e);return i&&i.length&&i.is(\":visible\")&&[[i[o]().top+n,e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},n.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),o<=e)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e<n[0])return this.activeTarget=null,this.clear();for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(n[t+1]===undefined||e<n[t+1])&&this.activate(s[t])},n.prototype.activate=function(t){this.activeTarget=t,this.clear();var e=this.selector+'[data-target=\"'+t+'\"],'+this.selector+'[href=\"'+t+'\"]',i=s(e).parents(\"li\").addClass(\"active\");i.parent(\".dropdown-menu\").length&&(i=i.closest(\"li.dropdown\").addClass(\"active\")),i.trigger(\"activate.bs.scrollspy\")},n.prototype.clear=function(){s(this.selector).parentsUntil(this.options.target,\".active\").removeClass(\"active\")};var t=s.fn.scrollspy;s.fn.scrollspy=e,s.fn.scrollspy.Constructor=n,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on(\"load.bs.scrollspy.data-api\",function(){s('[data-spy=\"scroll\"]').each(function(){var t=s(this);e.call(t,t.data())})})}(jQuery),function(r){\"use strict\";var a=function(t){this.element=r(t)};function e(i){return this.each(function(){var t=r(this),e=t.data(\"bs.tab\");e||t.data(\"bs.tab\",e=new a(this)),\"string\"==typeof i&&e[i]()})}a.VERSION=\"3.4.1\",a.TRANSITION_DURATION=150,a.prototype.show=function(){var t=this.element,e=t.closest(\"ul:not(.dropdown-menu)\"),i=t.data(\"target\");if(i||(i=(i=t.attr(\"href\"))&&i.replace(/.*(?=#[^\\s]*$)/,\"\")),!t.parent(\"li\").hasClass(\"active\")){var o=e.find(\".active:last a\"),n=r.Event(\"hide.bs.tab\",{relatedTarget:t[0]}),s=r.Event(\"show.bs.tab\",{relatedTarget:o[0]});if(o.trigger(n),t.trigger(s),!s.isDefaultPrevented()&&!n.isDefaultPrevented()){var a=r(document).find(i);this.activate(t.closest(\"li\"),e),this.activate(a,a.parent(),function(){o.trigger({type:\"hidden.bs.tab\",relatedTarget:t[0]}),t.trigger({type:\"shown.bs.tab\",relatedTarget:o[0]})})}}},a.prototype.activate=function(t,e,i){var o=e.find(\"> .active\"),n=i&&r.support.transition&&(o.length&&o.hasClass(\"fade\")||!!e.find(\"> .fade\").length);function s(){o.removeClass(\"active\").find(\"> .dropdown-menu > .active\").removeClass(\"active\").end().find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",!1),t.addClass(\"active\").find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",!0),n?(t[0].offsetWidth,t.addClass(\"in\")):t.removeClass(\"fade\"),t.parent(\".dropdown-menu\").length&&t.closest(\"li.dropdown\").addClass(\"active\").end().find('[data-toggle=\"tab\"]').attr(\"aria-expanded\",!0),i&&i()}o.length&&n?o.one(\"bsTransitionEnd\",s).emulateTransitionEnd(a.TRANSITION_DURATION):s(),o.removeClass(\"in\")};var t=r.fn.tab;r.fn.tab=e,r.fn.tab.Constructor=a,r.fn.tab.noConflict=function(){return r.fn.tab=t,this};var i=function(t){t.preventDefault(),e.call(r(this),\"show\")};r(document).on(\"click.bs.tab.data-api\",'[data-toggle=\"tab\"]',i).on(\"click.bs.tab.data-api\",'[data-toggle=\"pill\"]',i)}(jQuery),function(l){\"use strict\";var h=function(t,e){this.options=l.extend({},h.DEFAULTS,e);var i=this.options.target===h.DEFAULTS.target?l(this.options.target):l(document).find(this.options.target);this.$target=i.on(\"scroll.bs.affix.data-api\",l.proxy(this.checkPosition,this)).on(\"click.bs.affix.data-api\",l.proxy(this.checkPositionWithEventLoop,this)),this.$element=l(t),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function i(o){return this.each(function(){var t=l(this),e=t.data(\"bs.affix\"),i=\"object\"==typeof o&&o;e||t.data(\"bs.affix\",e=new h(this,i)),\"string\"==typeof o&&e[o]()})}h.VERSION=\"3.4.1\",h.RESET=\"affix affix-top affix-bottom\",h.DEFAULTS={offset:0,target:window},h.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&\"top\"==this.affixed)return n<i&&\"top\";if(\"bottom\"==this.affixed)return null!=i?!(n+this.unpin<=s.top)&&\"bottom\":!(n+a<=t-o)&&\"bottom\";var r=null==this.affixed,l=r?n:s.top;return null!=i&&n<=i?\"top\":null!=o&&t-o<=l+(r?a:e)&&\"bottom\"},h.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(h.RESET).addClass(\"affix\");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},h.prototype.checkPositionWithEventLoop=function(){setTimeout(l.proxy(this.checkPosition,this),1)},h.prototype.checkPosition=function(){if(this.$element.is(\":visible\")){var t=this.$element.height(),e=this.options.offset,i=e.top,o=e.bottom,n=Math.max(l(document).height(),l(document.body).height());\"object\"!=typeof e&&(o=i=e),\"function\"==typeof i&&(i=e.top(this.$element)),\"function\"==typeof o&&(o=e.bottom(this.$element));var s=this.getState(n,t,i,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css(\"top\",\"\");var a=\"affix\"+(s?\"-\"+s:\"\"),r=l.Event(a+\".bs.affix\");if(this.$element.trigger(r),r.isDefaultPrevented())return;this.affixed=s,this.unpin=\"bottom\"==s?this.getPinnedOffset():null,this.$element.removeClass(h.RESET).addClass(a).trigger(a.replace(\"affix\",\"affixed\")+\".bs.affix\")}\"bottom\"==s&&this.$element.offset({top:n-t-o})}};var t=l.fn.affix;l.fn.affix=i,l.fn.affix.Constructor=h,l.fn.affix.noConflict=function(){return l.fn.affix=t,this},l(window).on(\"load\",function(){l('[data-spy=\"affix\"]').each(function(){var t=l(this),e=t.data();e.offset=e.offset||{},null!=e.offsetBottom&&(e.offset.bottom=e.offsetBottom),null!=e.offsetTop&&(e.offset.top=e.offsetTop),i.call(t,e)})})}(jQuery);","!function(t,e){\"use strict\";\"undefined\"!=typeof module&&module.exports?module.exports=e(require(\"jquery\"),require(\"bootstrap\")):\"function\"==typeof define&&define.amd?define(\"bootstrap-dialog\",[\"jquery\",\"bootstrap\"],function(t){return e(t)}):t.BootstrapDialog=e(t.jQuery)}(this,function(t){\"use strict\";var e=t.fn.modal.Constructor,n=function(t,n){e.call(this,t,n)};n.getModalVersion=function(){var e=null;return e=\"undefined\"==typeof t.fn.modal.Constructor.VERSION?\"v3.1\":/3\\.2\\.\\d+/.test(t.fn.modal.Constructor.VERSION)?\"v3.2\":/3\\.3\\.[1,2]/.test(t.fn.modal.Constructor.VERSION)?\"v3.3\":\"v3.3.4\"},n.ORIGINAL_BODY_PADDING=parseInt(t(\"body\").css(\"padding-right\")||0,10),n.METHODS_TO_OVERRIDE={},n.METHODS_TO_OVERRIDE[\"v3.1\"]={},n.METHODS_TO_OVERRIDE[\"v3.2\"]={hide:function(e){if(e&&e.preventDefault(),e=t.Event(\"hide.bs.modal\"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()){this.isShown=!1;var n=this.getGlobalOpenedDialogs();0===n.length&&this.$body.removeClass(\"modal-open\"),this.resetScrollbar(),this.escape(),t(document).off(\"focusin.bs.modal\"),this.$element.removeClass(\"in\").attr(\"aria-hidden\",!0).off(\"click.dismiss.bs.modal\"),t.support.transition&&this.$element.hasClass(\"fade\")?this.$element.one(\"bsTransitionEnd\",t.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()}}},n.METHODS_TO_OVERRIDE[\"v3.3\"]={setScrollbar:function(){var t=n.ORIGINAL_BODY_PADDING;this.bodyIsOverflowing&&this.$body.css(\"padding-right\",t+this.scrollbarWidth)},resetScrollbar:function(){var t=this.getGlobalOpenedDialogs();0===t.length&&this.$body.css(\"padding-right\",n.ORIGINAL_BODY_PADDING)},hideModal:function(){this.$element.hide(),this.backdrop(t.proxy(function(){var t=this.getGlobalOpenedDialogs();0===t.length&&this.$body.removeClass(\"modal-open\"),this.resetAdjustments(),this.resetScrollbar(),this.$element.trigger(\"hidden.bs.modal\")},this))}},n.METHODS_TO_OVERRIDE[\"v3.3.4\"]=t.extend({},n.METHODS_TO_OVERRIDE[\"v3.3\"]),n.prototype={constructor:n,getGlobalOpenedDialogs:function(){var e=[];return t.each(o.dialogs,function(t,n){n.isRealized()&&n.isOpened()&&e.push(n)}),e}},n.prototype=t.extend(n.prototype,e.prototype,n.METHODS_TO_OVERRIDE[n.getModalVersion()]);var o=function(e){this.defaultOptions=t.extend(!0,{id:o.newGuid(),buttons:[],data:{},onshow:null,onshown:null,onhide:null,onhidden:null},o.defaultOptions),this.indexedButtons={},this.registeredButtonHotkeys={},this.draggableData={isMouseDown:!1,mouseOffset:{}},this.realized=!1,this.opened=!1,this.initOptions(e),this.holdThisInstance()};return o.BootstrapDialogModal=n,o.NAMESPACE=\"bootstrap-dialog\",o.TYPE_DEFAULT=\"type-default\",o.TYPE_INFO=\"type-info\",o.TYPE_PRIMARY=\"type-primary\",o.TYPE_SUCCESS=\"type-success\",o.TYPE_WARNING=\"type-warning\",o.TYPE_DANGER=\"type-danger\",o.DEFAULT_TEXTS={},o.DEFAULT_TEXTS[o.TYPE_DEFAULT]=\"Information\",o.DEFAULT_TEXTS[o.TYPE_INFO]=\"Information\",o.DEFAULT_TEXTS[o.TYPE_PRIMARY]=\"Information\",o.DEFAULT_TEXTS[o.TYPE_SUCCESS]=\"Success\",o.DEFAULT_TEXTS[o.TYPE_WARNING]=\"Warning\",o.DEFAULT_TEXTS[o.TYPE_DANGER]=\"Danger\",o.DEFAULT_TEXTS.OK=\"OK\",o.DEFAULT_TEXTS.CANCEL=\"Cancel\",o.DEFAULT_TEXTS.CONFIRM=\"Confirmation\",o.SIZE_NORMAL=\"size-normal\",o.SIZE_SMALL=\"size-small\",o.SIZE_WIDE=\"size-wide\",o.SIZE_LARGE=\"size-large\",o.BUTTON_SIZES={},o.BUTTON_SIZES[o.SIZE_NORMAL]=\"\",o.BUTTON_SIZES[o.SIZE_SMALL]=\"\",o.BUTTON_SIZES[o.SIZE_WIDE]=\"\",o.BUTTON_SIZES[o.SIZE_LARGE]=\"btn-lg\",o.ICON_SPINNER=\"glyphicon glyphicon-asterisk\",o.BUTTONS_ORDER_CANCEL_OK=\"btns-order-cancel-ok\",o.BUTTONS_ORDER_OK_CANCEL=\"btns-order-ok-cancel\",o.defaultOptions={type:o.TYPE_PRIMARY,size:o.SIZE_NORMAL,cssClass:\"\",title:null,message:null,nl2br:!0,closable:!0,closeByBackdrop:!0,closeByKeyboard:!0,closeIcon:\"×\",spinicon:o.ICON_SPINNER,autodestroy:!0,draggable:!1,animate:!0,description:\"\",tabindex:-1,btnsOrder:o.BUTTONS_ORDER_CANCEL_OK},o.configDefaultOptions=function(e){o.defaultOptions=t.extend(!0,o.defaultOptions,e)},o.dialogs={},o.openAll=function(){t.each(o.dialogs,function(t,e){e.open()})},o.closeAll=function(){t.each(o.dialogs,function(t,e){e.close()})},o.getDialog=function(t){var e=null;return\"undefined\"!=typeof o.dialogs[t]&&(e=o.dialogs[t]),e},o.setDialog=function(t){return o.dialogs[t.getId()]=t,t},o.addDialog=function(t){return o.setDialog(t)},o.moveFocus=function(){var e=null;t.each(o.dialogs,function(t,n){n.isRealized()&&n.isOpened()&&(e=n)}),null!==e&&e.getModal().focus()},o.METHODS_TO_OVERRIDE={},o.METHODS_TO_OVERRIDE[\"v3.1\"]={handleModalBackdropEvent:function(){return this.getModal().on(\"click\",{dialog:this},function(t){t.target===this&&t.data.dialog.isClosable()&&t.data.dialog.canCloseByBackdrop()&&t.data.dialog.close()}),this},updateZIndex:function(){if(this.isOpened()){var e=1040,n=1050,i=0;t.each(o.dialogs,function(t,e){e.isRealized()&&e.isOpened()&&i++});var s=this.getModal(),a=s.data(\"bs.modal\").$backdrop;s.css(\"z-index\",n+20*(i-1)),a.css(\"z-index\",e+20*(i-1))}return this},open:function(){return!this.isRealized()&&this.realize(),this.getModal().modal(\"show\"),this.updateZIndex(),this}},o.METHODS_TO_OVERRIDE[\"v3.2\"]={handleModalBackdropEvent:o.METHODS_TO_OVERRIDE[\"v3.1\"].handleModalBackdropEvent,updateZIndex:o.METHODS_TO_OVERRIDE[\"v3.1\"].updateZIndex,open:o.METHODS_TO_OVERRIDE[\"v3.1\"].open},o.METHODS_TO_OVERRIDE[\"v3.3\"]={},o.METHODS_TO_OVERRIDE[\"v3.3.4\"]=t.extend({},o.METHODS_TO_OVERRIDE[\"v3.1\"]),o.prototype={constructor:o,initOptions:function(e){return this.options=t.extend(!0,this.defaultOptions,e),this},holdThisInstance:function(){return o.addDialog(this),this},initModalStuff:function(){return this.setModal(this.createModal()).setModalDialog(this.createModalDialog()).setModalContent(this.createModalContent()).setModalHeader(this.createModalHeader()).setModalBody(this.createModalBody()).setModalFooter(this.createModalFooter()),this.getModal().append(this.getModalDialog()),this.getModalDialog().append(this.getModalContent()),this.getModalContent().append(this.getModalHeader()).append(this.getModalBody()).append(this.getModalFooter()),this},createModal:function(){var e=t('<div class=\"modal\" role=\"dialog\" aria-hidden=\"true\"></div>');return e.prop(\"id\",this.getId()),e.attr(\"aria-labelledby\",this.getId()+\"_title\"),e},getModal:function(){return this.$modal},setModal:function(t){return this.$modal=t,this},createModalDialog:function(){return t('<div class=\"modal-dialog\"></div>')},getModalDialog:function(){return this.$modalDialog},setModalDialog:function(t){return this.$modalDialog=t,this},createModalContent:function(){return t('<div class=\"modal-content\"></div>')},getModalContent:function(){return this.$modalContent},setModalContent:function(t){return this.$modalContent=t,this},createModalHeader:function(){return t('<div class=\"modal-header\"></div>')},getModalHeader:function(){return this.$modalHeader},setModalHeader:function(t){return this.$modalHeader=t,this},createModalBody:function(){return t('<div class=\"modal-body\"></div>')},getModalBody:function(){return this.$modalBody},setModalBody:function(t){return this.$modalBody=t,this},createModalFooter:function(){return t('<div class=\"modal-footer\"></div>')},getModalFooter:function(){return this.$modalFooter},setModalFooter:function(t){return this.$modalFooter=t,this},createDynamicContent:function(t){var e=null;return e=\"function\"==typeof t?t.call(t,this):t,\"string\"==typeof e&&(e=this.formatStringContent(e)),e},formatStringContent:function(t){return this.options.nl2br?t.replace(/\\r\\n/g,\"<br />\").replace(/[\\r\\n]/g,\"<br />\"):t},setData:function(t,e){return this.options.data[t]=e,this},getData:function(t){return this.options.data[t]},setId:function(t){return this.options.id=t,this},getId:function(){return this.options.id},getType:function(){return this.options.type},setType:function(t){return this.options.type=t,this.updateType(),this},updateType:function(){if(this.isRealized()){var t=[o.TYPE_DEFAULT,o.TYPE_INFO,o.TYPE_PRIMARY,o.TYPE_SUCCESS,o.TYPE_WARNING,o.TYPE_DANGER];this.getModal().removeClass(t.join(\" \")).addClass(this.getType())}return this},getSize:function(){return this.options.size},setSize:function(t){return this.options.size=t,this.updateSize(),this},updateSize:function(){if(this.isRealized()){var e=this;this.getModal().removeClass(o.SIZE_NORMAL).removeClass(o.SIZE_SMALL).removeClass(o.SIZE_WIDE).removeClass(o.SIZE_LARGE),this.getModal().addClass(this.getSize()),this.getModalDialog().removeClass(\"modal-sm\"),this.getSize()===o.SIZE_SMALL&&this.getModalDialog().addClass(\"modal-sm\"),this.getModalDialog().removeClass(\"modal-lg\"),this.getSize()===o.SIZE_WIDE&&this.getModalDialog().addClass(\"modal-lg\"),t.each(this.options.buttons,function(n,o){var i=e.getButton(o.id),s=[\"btn-lg\",\"btn-sm\",\"btn-xs\"],a=!1;if(\"string\"==typeof o.cssClass){var d=o.cssClass.split(\" \");t.each(d,function(e,n){-1!==t.inArray(n,s)&&(a=!0)})}a||(i.removeClass(s.join(\" \")),i.addClass(e.getButtonSize()))})}return this},getCssClass:function(){return this.options.cssClass},setCssClass:function(t){return this.options.cssClass=t,this},getTitle:function(){return this.options.title},setTitle:function(t){return this.options.title=t,this.updateTitle(),this},updateTitle:function(){if(this.isRealized()){var t=null!==this.getTitle()?this.createDynamicContent(this.getTitle()):this.getDefaultText();this.getModalHeader().find(\".\"+this.getNamespace(\"title\")).html(\"\").append(t).prop(\"id\",this.getId()+\"_title\")}return this},getMessage:function(){return this.options.message},setMessage:function(t){return this.options.message=t,this.updateMessage(),this},updateMessage:function(){if(this.isRealized()){var t=this.createDynamicContent(this.getMessage());this.getModalBody().find(\".\"+this.getNamespace(\"message\")).html(\"\").append(t)}return this},isClosable:function(){return this.options.closable},setClosable:function(t){return this.options.closable=t,this.updateClosable(),this},setCloseByBackdrop:function(t){return this.options.closeByBackdrop=t,this},canCloseByBackdrop:function(){return this.options.closeByBackdrop},setCloseByKeyboard:function(t){return this.options.closeByKeyboard=t,this},canCloseByKeyboard:function(){return this.options.closeByKeyboard},isAnimate:function(){return this.options.animate},setAnimate:function(t){return this.options.animate=t,this},updateAnimate:function(){return this.isRealized()&&this.getModal().toggleClass(\"fade\",this.isAnimate()),this},getSpinicon:function(){return this.options.spinicon},setSpinicon:function(t){return this.options.spinicon=t,this},addButton:function(t){return this.options.buttons.push(t),this},addButtons:function(e){var n=this;return t.each(e,function(t,e){n.addButton(e)}),this},getButtons:function(){return this.options.buttons},setButtons:function(t){return this.options.buttons=t,this.updateButtons(),this},getButton:function(t){return\"undefined\"!=typeof this.indexedButtons[t]?this.indexedButtons[t]:null},getButtonSize:function(){return\"undefined\"!=typeof o.BUTTON_SIZES[this.getSize()]?o.BUTTON_SIZES[this.getSize()]:\"\"},updateButtons:function(){return this.isRealized()&&(0===this.getButtons().length?this.getModalFooter().hide():this.getModalFooter().show().find(\".\"+this.getNamespace(\"footer\")).html(\"\").append(this.createFooterButtons())),this},isAutodestroy:function(){return this.options.autodestroy},setAutodestroy:function(t){this.options.autodestroy=t},getDescription:function(){return this.options.description},setDescription:function(t){return this.options.description=t,this},setTabindex:function(t){return this.options.tabindex=t,this},getTabindex:function(){return this.options.tabindex},updateTabindex:function(){return this.isRealized()&&this.getModal().attr(\"tabindex\",this.getTabindex()),this},getDefaultText:function(){return o.DEFAULT_TEXTS[this.getType()]},getNamespace:function(t){return o.NAMESPACE+\"-\"+t},createHeaderContent:function(){var e=t(\"<div></div>\");return e.addClass(this.getNamespace(\"header\")),e.append(this.createTitleContent()),e.prepend(this.createCloseButton()),e},createTitleContent:function(){var e=t(\"<div></div>\");return e.addClass(this.getNamespace(\"title\")),e},createCloseButton:function(){var e=t(\"<div></div>\");e.addClass(this.getNamespace(\"close-button\"));var n=t('<button class=\"close\" aria-label=\"close\"></button>');return n.append(this.options.closeIcon),e.append(n),e.on(\"click\",{dialog:this},function(t){t.data.dialog.close()}),e},createBodyContent:function(){var e=t(\"<div></div>\");return e.addClass(this.getNamespace(\"body\")),e.append(this.createMessageContent()),e},createMessageContent:function(){var e=t(\"<div></div>\");return e.addClass(this.getNamespace(\"message\")),e},createFooterContent:function(){var e=t(\"<div></div>\");return e.addClass(this.getNamespace(\"footer\")),e},createFooterButtons:function(){var e=this,n=t(\"<div></div>\");return n.addClass(this.getNamespace(\"footer-buttons\")),this.indexedButtons={},t.each(this.options.buttons,function(t,i){i.id||(i.id=o.newGuid());var s=e.createButton(i);e.indexedButtons[i.id]=s,n.append(s)}),n},createButton:function(e){var n=t('<button class=\"btn\"></button>');return n.prop(\"id\",e.id),n.data(\"button\",e),\"undefined\"!=typeof e.icon&&\"\"!==t.trim(e.icon)&&n.append(this.createButtonIcon(e.icon)),\"undefined\"!=typeof e.label&&n.append(e.label),\"undefined\"!=typeof e.title&&n.attr(\"title\",e.title),n.addClass(\"undefined\"!=typeof e.cssClass&&\"\"!==t.trim(e.cssClass)?e.cssClass:\"btn-default\"),\"object\"==typeof e.data&&e.data.constructor==={}.constructor&&t.each(e.data,function(t,e){n.attr(\"data-\"+t,e)}),\"undefined\"!=typeof e.hotkey&&(this.registeredButtonHotkeys[e.hotkey]=n),n.on(\"click\",{dialog:this,$button:n,button:e},function(t){var e=t.data.dialog,n=t.data.$button,o=n.data(\"button\");return o.autospin&&n.toggleSpin(!0),\"function\"==typeof o.action?o.action.call(n,e,t):void 0}),this.enhanceButton(n),\"undefined\"!=typeof e.enabled&&n.toggleEnable(e.enabled),n},enhanceButton:function(t){return t.dialog=this,t.toggleEnable=function(t){var e=this;return\"undefined\"!=typeof t?e.prop(\"disabled\",!t).toggleClass(\"disabled\",!t):e.prop(\"disabled\",!e.prop(\"disabled\")),e},t.enable=function(){var t=this;return t.toggleEnable(!0),t},t.disable=function(){var t=this;return t.toggleEnable(!1),t},t.toggleSpin=function(e){var n=this,o=n.dialog,i=n.find(\".\"+o.getNamespace(\"button-icon\"));return\"undefined\"==typeof e&&(e=!(t.find(\".icon-spin\").length>0)),e?(i.hide(),t.prepend(o.createButtonIcon(o.getSpinicon()).addClass(\"icon-spin\"))):(i.show(),t.find(\".icon-spin\").remove()),n},t.spin=function(){var t=this;return t.toggleSpin(!0),t},t.stopSpin=function(){var t=this;return t.toggleSpin(!1),t},this},createButtonIcon:function(e){var n=t(\"<span></span>\");return n.addClass(this.getNamespace(\"button-icon\")).addClass(e),n},enableButtons:function(e){return t.each(this.indexedButtons,function(t,n){n.toggleEnable(e)}),this},updateClosable:function(){return this.isRealized()&&this.getModalHeader().find(\".\"+this.getNamespace(\"close-button\")).toggle(this.isClosable()),this},onShow:function(t){return this.options.onshow=t,this},onShown:function(t){return this.options.onshown=t,this},onHide:function(t){return this.options.onhide=t,this},onHidden:function(t){return this.options.onhidden=t,this},isRealized:function(){return this.realized},setRealized:function(t){return this.realized=t,this},isOpened:function(){return this.opened},setOpened:function(t){return this.opened=t,this},handleModalEvents:function(){return this.getModal().on(\"show.bs.modal\",{dialog:this},function(t){var e=t.data.dialog;if(e.setOpened(!0),e.isModalEvent(t)&&\"function\"==typeof e.options.onshow){var n=e.options.onshow(e);return n===!1&&e.setOpened(!1),n}}),this.getModal().on(\"shown.bs.modal\",{dialog:this},function(t){var e=t.data.dialog;e.isModalEvent(t)&&\"function\"==typeof e.options.onshown&&e.options.onshown(e)}),this.getModal().on(\"hide.bs.modal\",{dialog:this},function(t){var e=t.data.dialog;if(e.setOpened(!1),e.isModalEvent(t)&&\"function\"==typeof e.options.onhide){var n=e.options.onhide(e);return n===!1&&e.setOpened(!0),n}}),this.getModal().on(\"hidden.bs.modal\",{dialog:this},function(e){var n=e.data.dialog;n.isModalEvent(e)&&\"function\"==typeof n.options.onhidden&&n.options.onhidden(n),n.isAutodestroy()&&(n.setRealized(!1),delete o.dialogs[n.getId()],t(this).remove()),o.moveFocus(),t(\".modal\").hasClass(\"in\")&&t(\"body\").addClass(\"modal-open\")}),this.handleModalBackdropEvent(),this.getModal().on(\"keyup\",{dialog:this},function(t){27===t.which&&t.data.dialog.isClosable()&&t.data.dialog.canCloseByKeyboard()&&t.data.dialog.close()}),this.getModal().on(\"keyup\",{dialog:this},function(e){var n=e.data.dialog;if(\"undefined\"!=typeof n.registeredButtonHotkeys[e.which]){var o=t(n.registeredButtonHotkeys[e.which]);!o.prop(\"disabled\")&&o.focus().trigger(\"click\")}}),this},handleModalBackdropEvent:function(){return this.getModal().on(\"click\",{dialog:this},function(e){t(e.target).hasClass(\"modal-backdrop\")&&e.data.dialog.isClosable()&&e.data.dialog.canCloseByBackdrop()&&e.data.dialog.close()}),this},isModalEvent:function(t){return\"undefined\"!=typeof t.namespace&&\"bs.modal\"===t.namespace},makeModalDraggable:function(){return this.options.draggable&&(this.getModalHeader().addClass(this.getNamespace(\"draggable\")).on(\"mousedown\",{dialog:this},function(t){var e=t.data.dialog;e.draggableData.isMouseDown=!0;var n=e.getModalDialog().offset();e.draggableData.mouseOffset={top:t.clientY-n.top,left:t.clientX-n.left}}),this.getModal().on(\"mouseup mouseleave\",{dialog:this},function(t){t.data.dialog.draggableData.isMouseDown=!1}),t(\"body\").on(\"mousemove\",{dialog:this},function(t){var e=t.data.dialog;e.draggableData.isMouseDown&&e.getModalDialog().offset({top:t.clientY-e.draggableData.mouseOffset.top,left:t.clientX-e.draggableData.mouseOffset.left})})),this},realize:function(){return this.initModalStuff(),this.getModal().addClass(o.NAMESPACE).addClass(this.getCssClass()),this.updateSize(),this.getDescription()&&this.getModal().attr(\"aria-describedby\",this.getDescription()),this.getModalFooter().append(this.createFooterContent()),this.getModalHeader().append(this.createHeaderContent()),this.getModalBody().append(this.createBodyContent()),this.getModal().data(\"bs.modal\",new n(this.getModal(),{backdrop:\"static\",keyboard:!1,show:!1})),this.makeModalDraggable(),this.handleModalEvents(),this.setRealized(!0),this.updateButtons(),this.updateType(),this.updateTitle(),this.updateMessage(),this.updateClosable(),this.updateAnimate(),this.updateSize(),this.updateTabindex(),this},open:function(){return!this.isRealized()&&this.realize(),this.getModal().modal(\"show\"),this},close:function(){return!this.isRealized()&&this.realize(),this.getModal().modal(\"hide\"),this}},o.prototype=t.extend(o.prototype,o.METHODS_TO_OVERRIDE[n.getModalVersion()]),o.newGuid=function(){return\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,function(t){var e=16*Math.random()|0,n=\"x\"===t?e:3&e|8;return n.toString(16)})},o.show=function(t){return new o(t).open()},o.alert=function(){var e={},n={type:o.TYPE_PRIMARY,title:null,message:null,closable:!1,draggable:!1,buttonLabel:o.DEFAULT_TEXTS.OK,buttonHotkey:null,callback:null};e=\"object\"==typeof arguments[0]&&arguments[0].constructor==={}.constructor?t.extend(!0,n,arguments[0]):t.extend(!0,n,{message:arguments[0],callback:\"undefined\"!=typeof arguments[1]?arguments[1]:null});var i=new o(e);return i.setData(\"callback\",e.callback),i.addButton({label:e.buttonLabel,hotkey:e.buttonHotkey,action:function(t){return\"function\"==typeof t.getData(\"callback\")&&t.getData(\"callback\").call(this,!0)===!1?!1:(t.setData(\"btnClicked\",!0),t.close())}}),i.onHide(\"function\"==typeof i.options.onhide?function(t){var e=!0;return!t.getData(\"btnClicked\")&&t.isClosable()&&\"function\"==typeof t.getData(\"callback\")&&(e=t.getData(\"callback\")(!1)),e===!1?!1:e=this.onhide(t)}.bind({onhide:i.options.onhide}):function(t){var e=!0;return!t.getData(\"btnClicked\")&&t.isClosable()&&\"function\"==typeof t.getData(\"callback\")&&(e=t.getData(\"callback\")(!1)),e}),i.open()},o.confirm=function(){var e={},n={type:o.TYPE_PRIMARY,title:null,message:null,closable:!1,draggable:!1,btnCancelLabel:o.DEFAULT_TEXTS.CANCEL,btnCancelClass:null,btnCancelHotkey:null,btnOKLabel:o.DEFAULT_TEXTS.OK,btnOKClass:null,btnOKHotkey:null,btnsOrder:o.defaultOptions.btnsOrder,callback:null};e=\"object\"==typeof arguments[0]&&arguments[0].constructor==={}.constructor?t.extend(!0,n,arguments[0]):t.extend(!0,n,{message:arguments[0],callback:\"undefined\"!=typeof arguments[1]?arguments[1]:null}),null===e.btnOKClass&&(e.btnOKClass=[\"btn\",e.type.split(\"-\")[1]].join(\"-\"));var i=new o(e);i.setData(\"callback\",e.callback);var s=[{label:e.btnCancelLabel,cssClass:e.btnCancelClass,hotkey:e.btnCancelHotkey,action:function(t){return\"function\"==typeof t.getData(\"callback\")&&t.getData(\"callback\").call(this,!1)===!1?!1:t.close()}},{label:e.btnOKLabel,cssClass:e.btnOKClass,hotkey:e.btnOKHotkey,action:function(t){return\"function\"==typeof t.getData(\"callback\")&&t.getData(\"callback\").call(this,!0)===!1?!1:t.close()}}];return e.btnsOrder===o.BUTTONS_ORDER_OK_CANCEL&&s.reverse(),i.addButtons(s),i.open()},o.warning=function(t,e){return new o({type:o.TYPE_WARNING,message:t}).open()},o.danger=function(t,e){return new o({type:o.TYPE_DANGER,message:t}).open()},o.success=function(t,e){return new o({type:o.TYPE_SUCCESS,message:t}).open()},o});","/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)\n * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\n * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\n *\n * Version: 1.3.8\n *\n */\n(function(e){e.fn.extend({slimScroll:function(f){var a=e.extend({width:\"auto\",height:\"250px\",size:\"7px\",color:\"#000\",position:\"right\",distance:\"1px\",start:\"top\",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:\"#333\",railOpacity:.2,railDraggable:!0,railClass:\"slimScrollRail\",barClass:\"slimScrollBar\",wrapperClass:\"slimScrollDiv\",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:\"7px\",railBorderRadius:\"7px\"},f);this.each(function(){function v(d){if(r){d=d||window.event;\nvar c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest(\".\"+a.wrapperClass).is(b.parent())&&n(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function n(d,g,e){k=!1;var f=b.outerHeight()-c.outerHeight();g&&(g=parseInt(c.css(\"top\"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),g=Math.min(Math.max(g,0),f),g=0<d?Math.ceil(g):Math.floor(g),c.css({top:g+\"px\"}));l=parseInt(c.css(\"top\"))/(b.outerHeight()-c.outerHeight());g=\nl*(b[0].scrollHeight-b.outerHeight());e&&(g=d,d=g/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),f),c.css({top:d+\"px\"}));b.scrollTop(g);b.trigger(\"slimscrolling\",~~g);w();p()}function x(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),30);c.css({height:u+\"px\"});var a=u==b.outerHeight()?\"none\":\"block\";c.css({display:a})}function w(){x();clearTimeout(B);l==~~l?(k=a.allowPageScroll,C!=l&&b.trigger(\"slimscroll\",0==~~l?\"top\":\"bottom\")):k=!1;C=l;u>=b.outerHeight()?k=!0:(c.stop(!0,\n!0).fadeIn(\"fast\"),a.railVisible&&m.stop(!0,!0).fadeIn(\"fast\"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut(\"slow\"),m.fadeOut(\"slow\"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var q=b.scrollTop(),c=b.siblings(\".\"+a.barClass),m=b.siblings(\".\"+a.railClass);x();if(e.isPlainObject(f)){if(\"height\"in f&&\"auto\"==f.height){b.parent().css(\"height\",\"auto\");b.css(\"height\",\"auto\");var h=b.parent().parent().height();b.parent().css(\"height\",\nh);b.css(\"height\",h)}else\"height\"in f&&(h=f.height,b.parent().css(\"height\",h),b.css(\"height\",h));if(\"scrollTo\"in f)q=parseInt(a.scrollTo);else if(\"scrollBy\"in f)q+=parseInt(a.scrollBy);else if(\"destroy\"in f){c.remove();m.remove();b.unwrap();return}n(q,!1,!0)}}else if(!(e.isPlainObject(f)&&\"destroy\"in f)){a.height=\"auto\"==a.height?b.parent().height():a.height;q=e(\"<div></div>\").addClass(a.wrapperClass).css({position:\"relative\",overflow:\"hidden\",width:a.width,height:a.height});b.css({overflow:\"hidden\",\nwidth:a.width,height:a.height});var m=e(\"<div></div>\").addClass(a.railClass).css({width:a.size,height:\"100%\",position:\"absolute\",top:0,display:a.alwaysVisible&&a.railVisible?\"block\":\"none\",\"border-radius\":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e(\"<div></div>\").addClass(a.barClass).css({background:a.color,width:a.size,position:\"absolute\",top:0,opacity:a.opacity,display:a.alwaysVisible?\"block\":\"none\",\"border-radius\":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,\nWebkitBorderRadius:a.borderRadius,zIndex:99}),h=\"right\"==a.position?{right:a.distance}:{left:a.distance};m.css(h);c.css(h);b.wrap(q);b.parent().append(c);b.parent().append(m);a.railDraggable&&c.bind(\"mousedown\",function(a){var b=e(document);z=!0;t=parseFloat(c.css(\"top\"));pageY=a.pageY;b.bind(\"mousemove.slimscroll\",function(a){currTop=t+a.pageY-pageY;c.css(\"top\",currTop);n(0,c.position().top,!1)});b.bind(\"mouseup.slimscroll\",function(a){z=!1;p();b.unbind(\".slimscroll\")});return!1}).bind(\"selectstart.slimscroll\",\nfunction(a){a.stopPropagation();a.preventDefault();return!1});m.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind(\"touchstart\",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind(\"touchmove\",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(n((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});\nx();\"bottom\"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),n(0,!0)):\"top\"!==a.start&&(n(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener(\"DOMMouseScroll\",v,!1),this.addEventListener(\"mousewheel\",v,!1)):document.attachEvent(\"onmousewheel\",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery);","/*! jQuery UI - v1.11.1 - 2014-08-13\n* http://jqueryui.com\n* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js\n* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */\n\n(function(e){\"function\"==typeof define&&define.amd?define([\"jquery\"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return\"area\"===r?(n=t.parentNode,a=n.name,t.href&&a&&\"map\"===n.nodeName.toLowerCase()?(o=e(\"img[usemap='#\"+a+\"']\")[0],!!o&&i(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:\"a\"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return\"hidden\"===e.css(this,\"visibility\")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css(\"position\"),(\"absolute\"===t||\"relative\"===t||\"fixed\"===t)&&(i=parseInt(e.css(\"zIndex\"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId=\"ui-datepicker-div\",this._inlineClass=\"ui-datepicker-inline\",this._appendClass=\"ui-datepicker-append\",this._triggerClass=\"ui-datepicker-trigger\",this._dialogClass=\"ui-datepicker-dialog\",this._disableClass=\"ui-datepicker-disabled\",this._unselectableClass=\"ui-datepicker-unselectable\",this._currentClass=\"ui-datepicker-current-day\",this._dayOverClass=\"ui-datepicker-days-cell-over\",this.regional=[],this.regional[\"\"]={closeText:\"Done\",prevText:\"Prev\",nextText:\"Next\",currentText:\"Today\",monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],weekHeader:\"Wk\",dateFormat:\"mm/dd/yy\",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:\"\"},this._defaults={showOn:\"focus\",showAnim:\"fadeIn\",showOptions:{},defaultDate:null,appendText:\"\",buttonText:\"...\",buttonImage:\"\",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:\"c-10:c+10\",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:\"+10\",minDate:null,maxDate:null,duration:\"fast\",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:\"\",altFormat:\"\",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[\"\"]),this.regional.en=e.extend(!0,{},this.regional[\"\"]),this.regional[\"en-US\"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"))}function a(t){var i=\"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";return t.delegate(i,\"mouseout\",function(){e(this).removeClass(\"ui-state-hover\"),-1!==this.className.indexOf(\"ui-datepicker-prev\")&&e(this).removeClass(\"ui-datepicker-prev-hover\"),-1!==this.className.indexOf(\"ui-datepicker-next\")&&e(this).removeClass(\"ui-datepicker-next-hover\")}).delegate(i,\"mouseover\",o)}function o(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\"),e(this).addClass(\"ui-state-hover\"),-1!==this.className.indexOf(\"ui-datepicker-prev\")&&e(this).addClass(\"ui-datepicker-prev-hover\"),-1!==this.className.indexOf(\"ui-datepicker-next\")&&e(this).addClass(\"ui-datepicker-next-hover\"))}function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}function h(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger(\"change\")}}e.ui=e.ui||{},e.extend(e.ui,{version:\"1.11.1\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css(\"position\"),s=\"absolute\"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&\"static\"===t.css(\"position\")?!1:n.test(t.css(\"overflow\")+t.css(\"overflow-y\")+t.css(\"overflow-x\"))}).eq(0);return\"fixed\"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\\d+$/.test(this.id)&&e(this).removeAttr(\"id\")})}}),e.extend(e.expr[\":\"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,\"tabindex\")))},tabbable:function(i){var s=e.attr(i,\"tabindex\"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e(\"<a>\").outerWidth(1).jquery||e.each([\"Width\",\"Height\"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,\"padding\"+this))||0,s&&(i-=parseFloat(e.css(t,\"border\"+this+\"Width\"))||0),a&&(i-=parseFloat(e.css(t,\"margin\"+this))||0)}),i}var n=\"Width\"===i?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[\"inner\"+i]=function(t){return void 0===t?o[\"inner\"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+\"px\")})},e.fn[\"outer\"+i]=function(t,n){return\"number\"!=typeof t?o[\"outer\"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+\"px\")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e(\"<a>\").data(\"a-b\",\"a\").removeData(\"a-b\").data(\"a-b\")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return\"number\"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e=\"onselectstart\"in document.createElement(\"div\")?\"selectstart\":\"mousedown\";return function(){return this.bind(e+\".ui-disableSelection\",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(\".ui-disableSelection\")},zIndex:function(t){if(void 0!==t)return this.css(\"zIndex\",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css(\"position\"),(\"absolute\"===i||\"relative\"===i||\"fixed\"===i)&&(s=parseInt(n.css(\"zIndex\"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var l=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,\"events\"),s&&s.remove&&e(n).triggerHandler(\"remove\")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(\".\")[0];return t=t.split(\".\")[1],n=l+\"-\"+t,s||(s=i,i=e.Widget),e.expr[\":\"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+\".\"+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=u.call(arguments,1),a=0,o=n.length;o>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a=\"string\"==typeof n,o=u.call(arguments,1),r=this;return n=!a&&o.length?e.widget.extend.apply(null,[n].concat(o)):n,a?this.each(function(){var i,a=e.data(this,s);return\"instance\"===n?(r=a,!1):a?e.isFunction(a[n])&&\"_\"!==n.charAt(0)?(i=a[n].apply(a,o),i!==a&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):e.error(\"no such method '\"+n+\"' for \"+t+\" widget instance\"):e.error(\"cannot call methods on \"+t+\" prior to initialization; \"+\"attempted to call method '\"+n+\"'\")}):this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))}),r}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:\"widget\",widgetEventPrefix:\"\",defaultElement:\"<div>\",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=l++,this.eventNamespace=\".\"+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger(\"create\",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr(\"aria-disabled\").removeClass(this.widgetFullName+\"-disabled \"+\"ui-state-disabled\"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if(\"string\"==typeof t)if(o={},s=t.split(\".\"),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,\"disabled\"===e&&(this.widget().toggleClass(this.widgetFullName+\"-disabled\",!!t),t&&(this.hoverable.removeClass(\"ui-state-hover\"),this.focusable.removeClass(\"ui-state-focus\"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;\"boolean\"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass(\"ui-state-disabled\")?(\"string\"==typeof o?a[o]:o).apply(a,arguments):void 0}\"string\"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\\w:-]*)\\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(e,t){t=(t||\"\").split(\" \").join(this.eventNamespace+\" \")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return(\"string\"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass(\"ui-state-hover\")},mouseleave:function(t){e(t.currentTarget).removeClass(\"ui-state-hover\")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass(\"ui-state-focus\")},focusout:function(t){e(t.currentTarget).removeClass(\"ui-state-focus\")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:\"fadeIn\",hide:\"fadeOut\"},function(t,i){e.Widget.prototype[\"_\"+t]=function(s,n,a){\"string\"==typeof n&&(n={effect:n});var o,r=n?n===!0||\"number\"==typeof n?i:n.effect||i:t;n=n||{},\"number\"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget(\"ui.mouse\",{version:\"1.11.1\",options:{cancel:\"input,textarea,button,select,option\",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind(\"mousedown.\"+this.widgetName,function(e){return t._mouseDown(e)}).bind(\"click.\"+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+\".preventClickEvent\")?(e.removeData(i.target,t.widgetName+\".preventClickEvent\"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind(\".\"+this.widgetName),this._mouseMoveDelegate&&this.document.unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n=\"string\"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+\".preventClickEvent\")&&e.removeData(t.target,this.widgetName+\".preventClickEvent\"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).bind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):t.which?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return this.document.unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(t)),d=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\\+\\-]\\d+(\\.[\\d]+)?%?/,c=/^\\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e(\"<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>\"),a=s.children()[0];return e(\"body\").append(s),t=a.offsetWidth,s.css(\"overflow\",\"scroll\"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?\"\":t.element.css(\"overflow-x\"),s=t.isWindow||t.isDocument?\"\":t.element.css(\"overflow-y\"),n=\"scroll\"===i||\"auto\"===i&&t.width<t.element[0].scrollWidth,a=\"scroll\"===s||\"auto\"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,y,b,_=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||\"flip\").split(\" \"),T={};return b=s(_),_[0].preventDefault&&(n.at=\"left top\"),m=b.width,g=b.height,v=b.offset,y=e.extend({},v),e.each([\"my\",\"at\"],function(){var e,t,i=(n[this]||\"\").split(\" \");1===i.length&&(i=l.test(i[0])?i.concat([\"center\"]):u.test(i[0])?[\"center\"].concat(i):[\"center\",\"center\"]),i[0]=l.test(i[0])?i[0]:\"center\",i[1]=u.test(i[1])?i[1]:\"center\",e=d.exec(i[0]),t=d.exec(i[1]),T[this]=[e?e[0]:0,t?t[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),\"right\"===n.at[0]?y.left+=m:\"center\"===n.at[0]&&(y.left+=m/2),\"bottom\"===n.at[1]?y.top+=g:\"center\"===n.at[1]&&(y.top+=g/2),p=t(T.at,m,g),y.left+=p[0],y.top+=p[1],this.each(function(){var s,l,u=e(this),d=u.outerWidth(),c=u.outerHeight(),f=i(this,\"marginLeft\"),b=i(this,\"marginTop\"),D=d+f+i(this,\"marginRight\")+w.width,S=c+b+i(this,\"marginBottom\")+w.height,M=e.extend({},y),N=t(T.my,u.outerWidth(),u.outerHeight());\"right\"===n.my[0]?M.left-=d:\"center\"===n.my[0]&&(M.left-=d/2),\"bottom\"===n.my[1]?M.top-=c:\"center\"===n.my[1]&&(M.top-=c/2),M.left+=N[0],M.top+=N[1],a||(M.left=h(M.left),M.top=h(M.top)),s={marginLeft:f,marginTop:b},e.each([\"left\",\"top\"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](M,{targetWidth:m,targetHeight:g,elemWidth:d,elemHeight:c,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+N[0],p[1]+N[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-M.left,i=t+m-d,s=v.top-M.top,a=s+g-c,h={target:{element:_,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:M.left,top:M.top,width:d,height:c},horizontal:0>i?\"left\":t>0?\"right\":\"center\",vertical:0>a?\"top\":s>0?\"bottom\":\"middle\"};d>m&&m>r(t+i)&&(h.horizontal=\"center\"),c>g&&g>r(s+a)&&(h.vertical=\"middle\"),h.important=o(r(t),r(i))>o(r(s),r(a))?\"horizontal\":\"vertical\",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c=\"left\"===t.my[0]?-t.elemWidth:\"right\"===t.my[0]?t.elemWidth:0,p=\"left\"===t.at[0]?t.targetWidth:\"right\"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c=\"top\"===t.my[1],p=c?-t.elemHeight:\"bottom\"===t.my[1]?t.elemHeight:0,f=\"top\"===t.at[1]?t.targetHeight:\"bottom\"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,e.top+p+f+m>u&&(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,e.top+p+f+m>d&&(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName(\"body\")[0],h=document.createElement(\"div\");t=document.createElement(r?\"div\":\"body\"),s={visibility:\"hidden\",width:0,height:0,border:0,margin:0,background:\"none\"},r&&e.extend(s,{position:\"absolute\",left:\"-1000px\",top:\"-1000px\"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText=\"position: absolute; left: 10.7432222px;\",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML=\"\",i.removeChild(t)}()}(),e.ui.position,e.widget(\"ui.accordion\",{version:\"1.11.1\",options:{active:0,animate:{},collapsible:!1,event:\"click\",header:\"> li > :first-child,> :not(li):even\",heightStyle:\"auto\",icons:{activeHeader:\"ui-icon-triangle-1-s\",header:\"ui-icon-triangle-1-e\"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:\"hide\",borderBottomWidth:\"hide\",paddingTop:\"hide\",paddingBottom:\"hide\",height:\"hide\"},showProps:{borderTopWidth:\"show\",borderBottomWidth:\"show\",paddingTop:\"show\",paddingBottom:\"show\",height:\"show\"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass(\"ui-accordion ui-widget ui-helper-reset\").attr(\"role\",\"tablist\"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e(\"<span>\").addClass(\"ui-accordion-header-icon ui-icon \"+t.header).prependTo(this.headers),this.active.children(\".ui-accordion-header-icon\").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass(\"ui-accordion-icons\"))},_destroyIcons:function(){this.headers.removeClass(\"ui-accordion-icons\").children(\".ui-accordion-header-icon\").remove()},_destroy:function(){var e;this.element.removeClass(\"ui-accordion ui-widget ui-helper-reset\").removeAttr(\"role\"),this.headers.removeClass(\"ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top\").removeAttr(\"role\").removeAttr(\"aria-expanded\").removeAttr(\"aria-selected\").removeAttr(\"aria-controls\").removeAttr(\"tabIndex\").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass(\"ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled\").css(\"display\",\"\").removeAttr(\"role\").removeAttr(\"aria-hidden\").removeAttr(\"aria-labelledby\").removeUniqueId(),\"content\"!==this.options.heightStyle&&e.css(\"height\",\"\")},_setOption:function(e,t){return\"active\"===e?(this._activate(t),void 0):(\"event\"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),\"collapsible\"!==e||t||this.options.active!==!1||this._activate(0),\"icons\"===e&&(this._destroyIcons(),t&&this._createIcons()),\"disabled\"===e&&(this.element.toggleClass(\"ui-state-disabled\",!!t).attr(\"aria-disabled\",t),this.headers.add(this.headers.next()).toggleClass(\"ui-state-disabled\",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr(\"tabIndex\",-1),e(a).attr(\"tabIndex\",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(\".ui-state-disabled\").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass(\"ui-accordion-header ui-state-default ui-corner-all\"),this.headers.next().addClass(\"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom\").filter(\":not(.ui-accordion-content-active)\").hide()},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass(\"ui-accordion-header-active ui-state-active ui-corner-top\").removeClass(\"ui-corner-all\"),this.active.next().addClass(\"ui-accordion-content-active\").show(),this.headers.attr(\"role\",\"tab\").each(function(){var t=e(this),i=t.uniqueId().attr(\"id\"),s=t.next(),n=s.uniqueId().attr(\"id\");t.attr(\"aria-controls\",n),s.attr(\"aria-labelledby\",i)}).next().attr(\"role\",\"tabpanel\"),this.headers.not(this.active).attr({\"aria-selected\":\"false\",\"aria-expanded\":\"false\",tabIndex:-1}).next().attr({\"aria-hidden\":\"true\"}).hide(),this.active.length?this.active.attr({\"aria-selected\":\"true\",\"aria-expanded\":\"true\",tabIndex:0}).next().attr({\"aria-hidden\":\"false\"}):this.headers.eq(0).attr(\"tabIndex\",0),this._createIcons(),this._setupEvents(i.event),\"fill\"===s?(t=n.height(),this.element.siblings(\":visible\").each(function(){var i=e(this),s=i.css(\"position\");\"absolute\"!==s&&\"fixed\"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css(\"overflow\",\"auto\")):\"auto\"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css(\"height\",\"\").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return\"number\"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:\"_keydown\"};t&&e.each(t.split(\" \"),function(e,t){i[t]=\"_eventHandler\"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:\"_panelKeyDown\"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger(\"beforeActivate\",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass(\"ui-accordion-header-active ui-state-active\"),i.icons&&s.children(\".ui-accordion-header-icon\").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass(\"ui-corner-all\").addClass(\"ui-accordion-header-active ui-state-active ui-corner-top\"),i.icons&&n.children(\".ui-accordion-header-icon\").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass(\"ui-accordion-content-active\")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({\"aria-hidden\":\"true\"}),s.prev().attr(\"aria-selected\",\"false\"),i.length&&s.length?s.prev().attr({tabIndex:-1,\"aria-expanded\":\"false\"}):i.length&&this.headers.filter(function(){return 0===e(this).attr(\"tabIndex\")}).attr(\"tabIndex\",-1),i.attr(\"aria-hidden\",\"false\").prev().attr({\"aria-selected\":\"true\",tabIndex:0,\"aria-expanded\":\"true\"})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.length&&(!t.length||e.index()<t.index()),l=this.options.animate||{},u=h&&l.down||l,d=function(){o._toggleComplete(i)};return\"number\"==typeof u&&(a=u),\"string\"==typeof u&&(n=u),n=n||u.easing||l.easing,a=a||u.duration||l.duration,t.length?e.length?(s=e.show().outerHeight(),t.animate(this.hideProps,{duration:a,easing:n,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(this.showProps,{duration:a,easing:n,complete:d,step:function(e,i){i.now=Math.round(e),\"height\"!==i.prop?r+=i.now:\"content\"!==o.options.heightStyle&&(i.now=Math.round(s-t.outerHeight()-r),r=0)}}),void 0):t.animate(this.hideProps,a,n,d):e.animate(this.showProps,a,n,d)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass(\"ui-accordion-content-active\").prev().removeClass(\"ui-corner-top\").addClass(\"ui-corner-all\"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger(\"activate\",null,e)}}),e.widget(\"ui.menu\",{version:\"1.11.1\",defaultElement:\"<ul>\",delay:300,options:{icons:{submenu:\"ui-icon-carat-1-e\"},items:\"> *\",menus:\"ul\",position:{my:\"left-1 top\",at:\"right top\"},role:\"menu\",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass(\"ui-menu ui-widget ui-widget-content\").toggleClass(\"ui-menu-icons\",!!this.element.find(\".ui-icon\").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass(\"ui-state-disabled\").attr(\"aria-disabled\",\"true\"),this._on({\"mousedown .ui-menu-item\":function(e){e.preventDefault()},\"click .ui-menu-item\":function(t){var i=e(t.target);!this.mouseHandled&&i.not(\".ui-state-disabled\").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(\".ui-menu\").length?this.expand(t):!this.element.is(\":focus\")&&e(this.document[0].activeElement).closest(\".ui-menu\").length&&(this.element.trigger(\"focus\",[!0]),this.active&&1===this.active.parents(\".ui-menu\").length&&clearTimeout(this.timer)))},\"mouseenter .ui-menu-item\":function(t){var i=e(t.currentTarget);i.siblings(\".ui-state-active\").removeClass(\"ui-state-active\"),this.focus(t,i)},mouseleave:\"collapseAll\",\"mouseleave .ui-menu\":\"collapseAll\",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:\"_keydown\"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1\n}})},_destroy:function(){this.element.removeAttr(\"aria-activedescendant\").find(\".ui-menu\").addBack().removeClass(\"ui-menu ui-widget ui-widget-content ui-menu-icons ui-front\").removeAttr(\"role\").removeAttr(\"tabIndex\").removeAttr(\"aria-labelledby\").removeAttr(\"aria-expanded\").removeAttr(\"aria-hidden\").removeAttr(\"aria-disabled\").removeUniqueId().show(),this.element.find(\".ui-menu-item\").removeClass(\"ui-menu-item\").removeAttr(\"role\").removeAttr(\"aria-disabled\").removeUniqueId().removeClass(\"ui-state-hover\").removeAttr(\"tabIndex\").removeAttr(\"role\").removeAttr(\"aria-haspopup\").children().each(function(){var t=e(this);t.data(\"ui-menu-submenu-carat\")&&t.remove()}),this.element.find(\".ui-menu-divider\").removeClass(\"ui-menu-divider ui-widget-content\")},_keydown:function(t){function i(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")}var s,n,a,o,r,h=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move(\"first\",\"first\",t);break;case e.ui.keyCode.END:this._move(\"last\",\"last\",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(\".ui-state-disabled\")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:h=!1,n=this.previousFilter||\"\",a=String.fromCharCode(t.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp(\"^\"+i(a),\"i\"),s=this.activeMenu.find(this.options.items).filter(function(){return r.test(e(this).text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(\".ui-menu-item\"):s,s.length||(a=String.fromCharCode(t.keyCode),r=RegExp(\"^\"+i(a),\"i\"),s=this.activeMenu.find(this.options.items).filter(function(){return r.test(e(this).text())})),s.length?(this.focus(t,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&t.preventDefault()},_activate:function(e){this.active.is(\".ui-state-disabled\")||(this.active.is(\"[aria-haspopup='true']\")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass(\"ui-menu-icons\",!!this.element.find(\".ui-icon\").length),a.filter(\":not(.ui-menu)\").addClass(\"ui-menu ui-widget ui-widget-content ui-front\").hide().attr({role:this.options.role,\"aria-hidden\":\"true\",\"aria-expanded\":\"false\"}).each(function(){var t=e(this),i=t.parent(),s=e(\"<span>\").addClass(\"ui-menu-icon ui-icon \"+n).data(\"ui-menu-submenu-carat\",!0);i.attr(\"aria-haspopup\",\"true\").prepend(s),t.attr(\"aria-labelledby\",i.attr(\"id\"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(\".ui-menu-item\").each(function(){var t=e(this);s._isDivider(t)&&t.addClass(\"ui-widget-content ui-menu-divider\")}),i.not(\".ui-menu-item, .ui-menu-divider\").addClass(\"ui-menu-item\").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(\".ui-state-disabled\").attr(\"aria-disabled\",\"true\"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:\"menuitem\",listbox:\"option\"}[this.options.role]},_setOption:function(e,t){\"icons\"===e&&this.element.find(\".ui-menu-icon\").removeClass(this.options.icons.submenu).addClass(t.submenu),\"disabled\"===e&&this.element.toggleClass(\"ui-state-disabled\",!!t).attr(\"aria-disabled\",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&\"focus\"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass(\"ui-state-focus\").removeClass(\"ui-state-active\"),this.options.role&&this.element.attr(\"aria-activedescendant\",s.attr(\"id\")),this.active.parent().closest(\".ui-menu-item\").addClass(\"ui-state-active\"),e&&\"keydown\"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(\".ui-menu\"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger(\"focus\",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],\"borderTopWidth\"))||0,s=parseFloat(e.css(this.activeMenu[0],\"paddingTop\"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass(\"ui-state-focus\"),this.active=null,this._trigger(\"blur\",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),\"true\"===e.attr(\"aria-hidden\")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(\".ui-menu\").not(t.parents(\".ui-menu\")).hide().attr(\"aria-hidden\",\"true\"),t.show().removeAttr(\"aria-hidden\").attr(\"aria-expanded\",\"true\").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(\".ui-menu\"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(\".ui-menu\").hide().attr(\"aria-hidden\",\"true\").attr(\"aria-expanded\",\"false\").end().find(\".ui-state-active\").not(\".ui-state-focus\").removeClass(\"ui-state-active\")},_closeOnDocumentClick:function(t){return!e(t.target).closest(\".ui-menu\").length},_isDivider:function(e){return!/[^\\-\\u2014\\u2013\\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(\".ui-menu-item\",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(\".ui-menu \").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move(\"next\",\"first\",e)},previous:function(e){this._move(\"prev\",\"last\",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(\".ui-menu-item\").length},isLastItem:function(){return this.active&&!this.active.nextAll(\".ui-menu-item\").length},_move:function(e,t,i){var s;this.active&&(s=\"first\"===e||\"last\"===e?this.active[\"first\"===e?\"prevAll\":\"nextAll\"](\".ui-menu-item\").eq(-1):this.active[e+\"All\"](\".ui-menu-item\").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(\".ui-menu-item\").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?\"last\":\"first\"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(\".ui-menu-item\").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop(\"scrollHeight\")},select:function(t){this.active=this.active||e(t.target).closest(\".ui-menu-item\");var i={item:this.active};this.active.has(\".ui-menu\").length||this.collapseAll(t,!0),this._trigger(\"select\",t,i)}}),e.widget(\"ui.autocomplete\",{version:\"1.11.1\",defaultElement:\"<input>\",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a=\"textarea\"===n,o=\"input\"===n;this.isMultiLine=a?!0:o?!1:this.element.prop(\"isContentEditable\"),this.valueMethod=this.element[a||o?\"val\":\"text\"],this.isNewMenu=!0,this.element.addClass(\"ui-autocomplete-input\").attr(\"autocomplete\",\"off\"),this._on(this.element,{keydown:function(n){if(this.element.prop(\"readOnly\"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move(\"previousPage\",n);break;case a.PAGE_DOWN:t=!0,this._move(\"nextPage\",n);break;case a.UP:t=!0,this._keyEvent(\"previous\",n);break;case a.DOWN:t=!0,this._keyEvent(\"next\",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(\":visible\")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(\":visible\"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move(\"previousPage\",s);break;case n.PAGE_DOWN:this._move(\"nextPage\",s);break;case n.UP:this._keyEvent(\"previous\",s);break;case n.DOWN:this._keyEvent(\"next\",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e(\"<ul>\").addClass(\"ui-autocomplete ui-front\").appendTo(this._appendTo()).menu({role:null}).hide().menu(\"instance\"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(\".ui-menu-item\").length||this._delay(function(){var t=this;this.document.one(\"mousedown\",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one(\"mousemove\",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data(\"ui-autocomplete-item\"),!1!==this._trigger(\"focus\",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr(\"aria-label\")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e(\"<div>\").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data(\"ui-autocomplete-item\"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger(\"select\",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e(\"<span>\",{role:\"status\",\"aria-live\":\"assertive\",\"aria-relevant\":\"additions\"}).addClass(\"ui-helper-hidden-accessible\").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass(\"ui-autocomplete-input\").removeAttr(\"autocomplete\"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),\"source\"===e&&this._initSource(),\"appendTo\"===e&&this.menu.element.appendTo(this._appendTo()),\"disabled\"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(\".ui-front\")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):\"string\"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:\"json\",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(\":visible\"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger(\"search\",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass(\"ui-autocomplete-loading\"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass(\"ui-autocomplete-loading\")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger(\"response\",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger(\"open\")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(\":visible\")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger(\"close\",e))},_change:function(e){this.previous!==this._value()&&this._trigger(\"change\",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return\"string\"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width(\"\").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data(\"ui-autocomplete-item\",t)},_renderItem:function(t,i){return e(\"<li>\").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(\":visible\")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(\":visible\"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),\"i\");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget(\"ui.autocomplete\",e.ui.autocomplete,{options:{messages:{noResults:\"No search results.\",results:function(e){return e+(e>1?\" results are\":\" result is\")+\" available, use up and down arrow keys to navigate.\"}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e(\"<div>\").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete;var c,p=\"ui-button ui-widget ui-state-default ui-corner-all\",f=\"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",m=function(){var t=e(this);setTimeout(function(){t.find(\":ui-button\").button(\"refresh\")},1)},g=function(t){var i=t.name,s=t.form,n=e([]);return i&&(i=i.replace(/'/g,\"\\\\'\"),n=s?e(s).find(\"[name='\"+i+\"'][type=radio]\"):e(\"[name='\"+i+\"'][type=radio]\",t.ownerDocument).filter(function(){return!this.form})),n};e.widget(\"ui.button\",{version:\"1.11.1\",defaultElement:\"<button>\",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest(\"form\").unbind(\"reset\"+this.eventNamespace).bind(\"reset\"+this.eventNamespace,m),\"boolean\"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop(\"disabled\"):this.element.prop(\"disabled\",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr(\"title\");var t=this,i=this.options,s=\"checkbox\"===this.type||\"radio\"===this.type,n=s?\"\":\"ui-state-active\";null===i.label&&(i.label=\"input\"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr(\"role\",\"button\").bind(\"mouseenter\"+this.eventNamespace,function(){i.disabled||this===c&&e(this).addClass(\"ui-state-active\")}).bind(\"mouseleave\"+this.eventNamespace,function(){i.disabled||e(this).removeClass(n)}).bind(\"click\"+this.eventNamespace,function(e){i.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass(\"ui-state-focus\")},blur:function(){this.buttonElement.removeClass(\"ui-state-focus\")}}),s&&this.element.bind(\"change\"+this.eventNamespace,function(){t.refresh()}),\"checkbox\"===this.type?this.buttonElement.bind(\"click\"+this.eventNamespace,function(){return i.disabled?!1:void 0}):\"radio\"===this.type?this.buttonElement.bind(\"click\"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass(\"ui-state-active\"),t.buttonElement.attr(\"aria-pressed\",\"true\");var s=t.element[0];g(s).not(s).map(function(){return e(this).button(\"widget\")[0]}).removeClass(\"ui-state-active\").attr(\"aria-pressed\",\"false\")}):(this.buttonElement.bind(\"mousedown\"+this.eventNamespace,function(){return i.disabled?!1:(e(this).addClass(\"ui-state-active\"),c=this,t.document.one(\"mouseup\",function(){c=null}),void 0)}).bind(\"mouseup\"+this.eventNamespace,function(){return i.disabled?!1:(e(this).removeClass(\"ui-state-active\"),void 0)}).bind(\"keydown\"+this.eventNamespace,function(t){return i.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass(\"ui-state-active\"),void 0)}).bind(\"keyup\"+this.eventNamespace+\" blur\"+this.eventNamespace,function(){e(this).removeClass(\"ui-state-active\")}),this.buttonElement.is(\"a\")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption(\"disabled\",i.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is(\"[type=checkbox]\")?\"checkbox\":this.element.is(\"[type=radio]\")?\"radio\":this.element.is(\"input\")?\"input\":\"button\",\"checkbox\"===this.type||\"radio\"===this.type?(e=this.element.parents().last(),t=\"label[for='\"+this.element.attr(\"id\")+\"']\",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass(\"ui-helper-hidden-accessible\"),i=this.element.is(\":checked\"),i&&this.buttonElement.addClass(\"ui-state-active\"),this.buttonElement.prop(\"aria-pressed\",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass(\"ui-helper-hidden-accessible\"),this.buttonElement.removeClass(p+\" ui-state-active \"+f).removeAttr(\"role\").removeAttr(\"aria-pressed\").html(this.buttonElement.find(\".ui-button-text\").html()),this.hasTitle||this.buttonElement.removeAttr(\"title\")},_setOption:function(e,t){return this._super(e,t),\"disabled\"===e?(this.widget().toggleClass(\"ui-state-disabled\",!!t),this.element.prop(\"disabled\",!!t),t&&(\"checkbox\"===this.type||\"radio\"===this.type?this.buttonElement.removeClass(\"ui-state-focus\"):this.buttonElement.removeClass(\"ui-state-focus ui-state-active\")),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is(\"input, button\")?this.element.is(\":disabled\"):this.element.hasClass(\"ui-button-disabled\");t!==this.options.disabled&&this._setOption(\"disabled\",t),\"radio\"===this.type?g(this.element[0]).each(function(){e(this).is(\":checked\")?e(this).button(\"widget\").addClass(\"ui-state-active\").attr(\"aria-pressed\",\"true\"):e(this).button(\"widget\").removeClass(\"ui-state-active\").attr(\"aria-pressed\",\"false\")}):\"checkbox\"===this.type&&(this.element.is(\":checked\")?this.buttonElement.addClass(\"ui-state-active\").attr(\"aria-pressed\",\"true\"):this.buttonElement.removeClass(\"ui-state-active\").attr(\"aria-pressed\",\"false\"))},_resetButton:function(){if(\"input\"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(f),i=e(\"<span></span>\",this.document[0]).addClass(\"ui-button-text\").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push(\"ui-button-text-icon\"+(n?\"s\":s.primary?\"-primary\":\"-secondary\")),s.primary&&t.prepend(\"<span class='ui-button-icon-primary ui-icon \"+s.primary+\"'></span>\"),s.secondary&&t.append(\"<span class='ui-button-icon-secondary ui-icon \"+s.secondary+\"'></span>\"),this.options.text||(a.push(n?\"ui-button-icons-only\":\"ui-button-icon-only\"),this.hasTitle||t.attr(\"title\",e.trim(i)))):a.push(\"ui-button-text-only\"),t.addClass(a.join(\" \"))}}),e.widget(\"ui.buttonset\",{version:\"1.11.1\",options:{items:\"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)\"},_create:function(){this.element.addClass(\"ui-buttonset\")},_init:function(){this.refresh()},_setOption:function(e,t){\"disabled\"===e&&this.buttons.button(\"option\",e,t),this._super(e,t)},refresh:function(){var t=\"rtl\"===this.element.css(\"direction\"),i=this.element.find(this.options.items),s=i.filter(\":ui-button\");i.not(\":ui-button\").button(),s.button(\"refresh\"),this.buttons=i.map(function(){return e(this).button(\"widget\")[0]}).removeClass(\"ui-corner-all ui-corner-left ui-corner-right\").filter(\":first\").addClass(t?\"ui-corner-right\":\"ui-corner-left\").end().filter(\":last\").addClass(t?\"ui-corner-left\":\"ui-corner-right\").end().end()},_destroy:function(){this.element.removeClass(\"ui-buttonset\"),this.buttons.map(function(){return e(this).button(\"widget\")[0]}).removeClass(\"ui-corner-left ui-corner-right\").end().button(\"destroy\")}}),e.ui.button,e.extend(e.ui,{datepicker:{version:\"1.11.1\"}});var v;e.extend(n.prototype,{markerClassName:\"hasDatepicker\",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return r(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var s,n,a;s=t.nodeName.toLowerCase(),n=\"div\"===s||\"span\"===s,t.id||(this.uuid+=1,t.id=\"dp\"+this.uuid),a=this._newInst(e(t),n),a.settings=e.extend({},i||{}),\"input\"===s?this._connectDatepicker(t,a):n&&this._inlineDatepicker(t,a)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\\-])/g,\"\\\\\\\\$1\");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e(\"<div class='\"+this._inlineClass+\" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\")):this.dpDiv}},_connectDatepicker:function(t,i){var s=e(t);i.append=e([]),i.trigger=e([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,\"datepicker\",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var s,n,a,o=this._get(i,\"appendText\"),r=this._get(i,\"isRTL\");i.append&&i.append.remove(),o&&(i.append=e(\"<span class='\"+this._appendClass+\"'>\"+o+\"</span>\"),t[r?\"before\":\"after\"](i.append)),t.unbind(\"focus\",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,\"showOn\"),(\"focus\"===s||\"both\"===s)&&t.focus(this._showDatepicker),(\"button\"===s||\"both\"===s)&&(n=this._get(i,\"buttonText\"),a=this._get(i,\"buttonImage\"),i.trigger=e(this._get(i,\"buttonImageOnly\")?e(\"<img/>\").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):e(\"<button type='button'></button>\").addClass(this._triggerClass).html(a?e(\"<img/>\").attr({src:a,alt:n,title:n}):n)),t[r?\"before\":\"after\"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,\"autoSize\")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),o=this._get(e,\"dateFormat\");o.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,o.match(/MM/)?\"monthNames\":\"monthNamesShort\"))),a.setDate(t(this._get(e,o.match(/DD/)?\"dayNames\":\"dayNamesShort\"))+20-a.getDay())),e.input.attr(\"size\",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),e.data(t,\"datepicker\",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css(\"display\",\"block\"))},_dialogDatepicker:function(t,i,s,n,a){var o,h,l,u,d,c=this._dialogInst;return c||(this.uuid+=1,o=\"dp\"+this.uuid,this._dialogInput=e(\"<input type='text' id='\"+o+\"' style='position: absolute; top: -100px; width: 0px;'/>\"),this._dialogInput.keydown(this._doKeyDown),e(\"body\").append(this._dialogInput),c=this._dialogInst=this._newInst(this._dialogInput,!1),c.settings={},e.data(this._dialogInput[0],\"datepicker\",c)),r(c.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+d]),this._dialogInput.css(\"left\",this._pos[0]+20+\"px\").css(\"top\",this._pos[1]+\"px\"),c.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],\"datepicker\",c),this},_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,\"datepicker\");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,\"datepicker\"),\"input\"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind(\"focus\",this._showDatepicker).unbind(\"keydown\",this._doKeyDown).unbind(\"keypress\",this._doKeyPress).unbind(\"keyup\",this._doKeyUp)):(\"div\"===i||\"span\"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,\"datepicker\");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),\"input\"===i?(t.disabled=!1,a.trigger.filter(\"button\").each(function(){this.disabled=!1}).end().filter(\"img\").css({opacity:\"1.0\",cursor:\"\"})):(\"div\"===i||\"span\"===i)&&(s=n.children(\".\"+this._inlineClass),s.children().removeClass(\"ui-state-disabled\"),s.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,\"datepicker\");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),\"input\"===i?(t.disabled=!0,a.trigger.filter(\"button\").each(function(){this.disabled=!0}).end().filter(\"img\").css({opacity:\"0.5\",cursor:\"default\"})):(\"div\"===i||\"span\"===i)&&(s=n.children(\".\"+this._inlineClass),s.children().addClass(\"ui-state-disabled\"),s.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,\"datepicker\")}catch(i){throw\"Missing instance data for this datepicker\"}},_optionDatepicker:function(t,i,s){var n,a,o,h,l=this._getInst(t);return 2===arguments.length&&\"string\"==typeof i?\"defaults\"===i?e.extend({},e.datepicker._defaults):l?\"all\"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},\"string\"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,\"min\"),h=this._getMinMaxDate(l,\"max\"),r(l.settings,n),null!==o&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),\"disabled\"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,s,n,a=e.datepicker._getInst(t.target),o=!0,r=a.dpDiv.is(\".ui-datepicker-rtl\");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),o=!1;break;case 13:return n=e(\"td.\"+e.datepicker._dayOverClass+\":not(.\"+e.datepicker._currentClass+\")\",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,\"onSelect\"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,\"stepBigMonths\"):-e.datepicker._get(a,\"stepMonths\"),\"M\");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,\"stepBigMonths\"):+e.datepicker._get(a,\"stepMonths\"),\"M\");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,\"D\"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,\"stepBigMonths\"):-e.datepicker._get(a,\"stepMonths\"),\"M\");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,\"D\"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,\"D\"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,\"stepBigMonths\"):+e.datepicker._get(a,\"stepMonths\"),\"M\");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,\"D\"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target);return e.datepicker._get(n,\"constrainInput\")?(i=e.datepicker._possibleChars(e.datepicker._get(n,\"dateFormat\")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||\" \">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,\"dateFormat\"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))\n}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,\"input\"!==t.nodeName.toLowerCase()&&(t=e(\"input\",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,\"beforeShow\"),a=n?n.apply(t,[t,i]):{},a!==!1&&(r(i.settings,a),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=\"\"),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),o=!1,e(t).parents().each(function(){return o|=\"fixed\"===e(this).css(\"position\"),!o}),h={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:\"absolute\",display:\"block\",top:\"-1000px\"}),e.datepicker._updateDatepicker(i),h=e.datepicker._checkOffset(i,h,o),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?\"static\":o?\"fixed\":\"absolute\",display:\"none\",left:h.left+\"px\",top:h.top+\"px\"}),i.inline||(l=e.datepicker._get(i,\"showAnim\"),u=e.datepicker._get(i,\"duration\"),i.dpDiv.css(\"z-index\",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,\"showOptions\"),u):i.dpDiv[l||\"show\"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,r=t.dpDiv.find(\".\"+this._dayOverClass+\" a\");r.length>0&&o.apply(r.get(0)),t.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\"),n>1&&t.dpDiv.addClass(\"ui-datepicker-multi-\"+n).css(\"width\",a*n+\"em\"),t.dpDiv[(1!==s[0]||1!==s[1]?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-multi\"),t.dpDiv[(this._get(t,\"isRTL\")?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-rtl\"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(\":visible\")&&!e.input.is(\":disabled\")&&!e.input.is(\":focus\")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,\"isRTL\")?n-o:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+r):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,\"isRTL\");t&&(\"hidden\"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?\"previousSibling\":\"nextSibling\"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,o=this._curInst;!o||t&&o!==e.data(t,\"datepicker\")||this._datepickerShowing&&(i=this._get(o,\"showAnim\"),s=this._get(o,\"duration\"),n=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,\"showOptions\"),s,n):o.dpDiv[\"slideDown\"===i?\"slideUp\":\"fadeIn\"===i?\"fadeOut\":\"hide\"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,\"onClose\"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():\"\",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:\"absolute\",left:\"0\",top:\"-100px\"}),e.blockUI&&(e.unblockUI(),e(\"body\").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(\".ui-datepicker-calendar\")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents(\"#\"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest(\".\"+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+(\"M\"===s?this._get(a,\"showCurrentAtPos\"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,\"gotoCurrent\")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a[\"selected\"+(\"M\"===s?\"Month\":\"Year\")]=a[\"draw\"+(\"M\"===s?\"Month\":\"Year\")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,o=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(a=this._getInst(o[0]),a.selectedDay=a.currentDay=e(\"a\",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,\"\")},_selectDate:function(t,i){var s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,\"onSelect\"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger(\"change\"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],\"object\"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,\"altField\");a&&(i=this._get(t,\"altFormat\")||this._get(t,\"dateFormat\"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,\"\"]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,s){if(null==t||null==i)throw\"Invalid arguments\";if(i=\"object\"==typeof i?\"\"+i:i+\"\",\"\"===i)return null;var n,a,o,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u=\"string\"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,c=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=_(e),s=\"@\"===e?14:\"!\"===e?20:\"y\"===e&&t?4:\"o\"===e?3:2,n=\"y\"===e?s:1,a=RegExp(\"^\\\\d{\"+n+\",\"+s+\"}\"),o=i.substring(h).match(a);if(!o)throw\"Missing number at position \"+h;return h+=o[0].length,parseInt(o[0],10)},w=function(t,s,n){var a=-1,o=e.map(_(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw\"Unknown name at position \"+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw\"Unexpected literal at position \"+h;h++};for(n=0;t.length>n;n++)if(b)\"'\"!==t.charAt(n)||_(\"'\")?k():b=!1;else switch(t.charAt(n)){case\"d\":v=x(\"d\");break;case\"D\":w(\"D\",d,c);break;case\"o\":y=x(\"o\");break;case\"m\":g=x(\"m\");break;case\"M\":g=w(\"M\",p,f);break;case\"y\":m=x(\"y\");break;case\"@\":r=new Date(x(\"@\")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case\"!\":r=new Date((x(\"!\")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case\"'\":_(\"'\")?k():b=!0;break;default:k()}if(i.length>h&&(o=i.substr(h),!/^\\s+/.test(o)))throw\"Extra/unparsed characters found in date: \"+o;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),y>-1)for(g=1,v=y;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw\"Invalid date\";return r},ATOM:\"yy-mm-dd\",COOKIE:\"D, dd M yy\",ISO_8601:\"yy-mm-dd\",RFC_822:\"D, d M y\",RFC_850:\"DD, dd-M-y\",RFC_1036:\"D, d M y\",RFC_1123:\"D, d M yy\",RFC_2822:\"D, d M yy\",RSS:\"D, d M y\",TICKS:\"!\",TIMESTAMP:\"@\",W3C:\"yy-mm-dd\",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return\"\";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=\"\"+t;if(h(e))for(;i>s.length;)s=\"0\"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},d=\"\",c=!1;if(t)for(s=0;e.length>s;s++)if(c)\"'\"!==e.charAt(s)||h(\"'\")?d+=e.charAt(s):c=!1;else switch(e.charAt(s)){case\"d\":d+=l(\"d\",t.getDate(),2);break;case\"D\":d+=u(\"D\",t.getDay(),n,a);break;case\"o\":d+=l(\"o\",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case\"m\":d+=l(\"m\",t.getMonth()+1,2);break;case\"M\":d+=u(\"M\",t.getMonth(),o,r);break;case\"y\":d+=h(\"y\")?t.getFullYear():(10>t.getYear()%100?\"0\":\"\")+t.getYear()%100;break;case\"@\":d+=t.getTime();break;case\"!\":d+=1e4*t.getTime()+this._ticksTo1970;break;case\"'\":h(\"'\")?d+=\"'\":c=!0;break;default:d+=e.charAt(s)}return d},_possibleChars:function(e){var t,i=\"\",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)\"'\"!==e.charAt(t)||n(\"'\")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case\"d\":case\"m\":case\"y\":case\"@\":i+=\"0123456789\";break;case\"D\":case\"M\":return null;case\"'\":n(\"'\")?i+=\"'\":s=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,\"dateFormat\"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,o=this._getFormatConfig(e);try{a=this.parseDate(i,s,o)||n}catch(r){s=t?\"\":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,\"defaultDate\"),new Date))},_determineDate:function(t,i,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,\"dateFormat\"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),h=/([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||\"d\"){case\"d\":case\"D\":r+=parseInt(l[1],10);break;case\"w\":case\"W\":r+=7*parseInt(l[1],10);break;case\"m\":case\"M\":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o));break;case\"y\":case\"Y\":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o))}l=h.exec(i)}return new Date(a,o,r)},o=null==i||\"\"===i?s:\"string\"==typeof i?a(i):\"number\"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return o=o&&\"Invalid Date\"==\"\"+o?s:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?\"\":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&\"\"===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,\"stepMonths\"),s=\"#\"+t.id.replace(/\\\\\\\\/g,\"\\\\\");t.dpDiv.find(\"[data-handler]\").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,\"M\")},next:function(){e.datepicker._adjustDate(s,+i,\"M\")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute(\"data-month\"),+this.getAttribute(\"data-year\"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,\"M\"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,\"Y\"),!1}};e(this).bind(this.getAttribute(\"data-event\"),t[this.getAttribute(\"data-handler\")])})},_generateHTML:function(e){var t,i,s,n,a,o,r,h,l,u,d,c,p,f,m,g,v,y,b,_,x,w,k,T,D,S,M,N,C,A,I,P,z,H,F,E,j,O,W,L=new Date,R=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(e,\"isRTL\"),B=this._get(e,\"showButtonPanel\"),J=this._get(e,\"hideIfNoPrevNext\"),q=this._get(e,\"navigationAsDateFormat\"),K=this._getNumberOfMonths(e),V=this._get(e,\"showCurrentAtPos\"),U=this._get(e,\"stepMonths\"),Q=1!==K[0]||1!==K[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,\"min\"),$=this._getMinMaxDate(e,\"max\"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),$)for(t=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-K[0]*K[1]+1,$.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,\"prevText\"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-U,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?\"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='\"+i+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(Y?\"e\":\"w\")+\"'>\"+i+\"</span></a>\":J?\"\":\"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='\"+i+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(Y?\"e\":\"w\")+\"'>\"+i+\"</span></a>\",n=this._get(e,\"nextText\"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+U,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?\"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='\"+n+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(Y?\"w\":\"e\")+\"'>\"+n+\"</span></a>\":J?\"\":\"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='\"+n+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(Y?\"w\":\"e\")+\"'>\"+n+\"</span></a>\",o=this._get(e,\"currentText\"),r=this._get(e,\"gotoCurrent\")&&e.currentDay?G:R,o=q?this.formatDate(o,r,this._getFormatConfig(e)):o,h=e.inline?\"\":\"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>\"+this._get(e,\"closeText\")+\"</button>\",l=B?\"<div class='ui-datepicker-buttonpane ui-widget-content'>\"+(Y?h:\"\")+(this._isInRange(e,r)?\"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>\"+o+\"</button>\":\"\")+(Y?\"\":h)+\"</div>\":\"\",u=parseInt(this._get(e,\"firstDay\"),10),u=isNaN(u)?0:u,d=this._get(e,\"showWeek\"),c=this._get(e,\"dayNames\"),p=this._get(e,\"dayNamesMin\"),f=this._get(e,\"monthNames\"),m=this._get(e,\"monthNamesShort\"),g=this._get(e,\"beforeShowDay\"),v=this._get(e,\"showOtherMonths\"),y=this._get(e,\"selectOtherMonths\"),b=this._getDefaultDate(e),_=\"\",w=0;K[0]>w;w++){for(k=\"\",this.maxRows=4,T=0;K[1]>T;T++){if(D=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=\" ui-corner-all\",M=\"\",Q){if(M+=\"<div class='ui-datepicker-group\",K[1]>1)switch(T){case 0:M+=\" ui-datepicker-group-first\",S=\" ui-corner-\"+(Y?\"right\":\"left\");break;case K[1]-1:M+=\" ui-datepicker-group-last\",S=\" ui-corner-\"+(Y?\"left\":\"right\");break;default:M+=\" ui-datepicker-group-middle\",S=\"\"}M+=\"'>\"}for(M+=\"<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix\"+S+\"'>\"+(/all|left/.test(S)&&0===w?Y?a:s:\"\")+(/all|right/.test(S)&&0===w?Y?s:a:\"\")+this._generateMonthYearHeader(e,Z,et,X,$,w>0||T>0,f,m)+\"</div><table class='ui-datepicker-calendar'><thead>\"+\"<tr>\",N=d?\"<th class='ui-datepicker-week-col'>\"+this._get(e,\"weekHeader\")+\"</th>\":\"\",x=0;7>x;x++)C=(x+u)%7,N+=\"<th scope='col'\"+((x+u+6)%7>=5?\" class='ui-datepicker-week-end'\":\"\")+\">\"+\"<span title='\"+c[C]+\"'>\"+p[C]+\"</span></th>\";for(M+=N+\"</tr></thead><tbody>\",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),I=(this._getFirstDayOfMonth(et,Z)-u+7)%7,P=Math.ceil((I+A)/7),z=Q?this.maxRows>P?this.maxRows:P:P,this.maxRows=z,H=this._daylightSavingAdjust(new Date(et,Z,1-I)),F=0;z>F;F++){for(M+=\"<tr>\",E=d?\"<td class='ui-datepicker-week-col'>\"+this._get(e,\"calculateWeek\")(H)+\"</td>\":\"\",x=0;7>x;x++)j=g?g.apply(e.input?e.input[0]:null,[H]):[!0,\"\"],O=H.getMonth()!==Z,W=O&&!y||!j[0]||X&&X>H||$&&H>$,E+=\"<td class='\"+((x+u+6)%7>=5?\" ui-datepicker-week-end\":\"\")+(O?\" ui-datepicker-other-month\":\"\")+(H.getTime()===D.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===H.getTime()&&b.getTime()===D.getTime()?\" \"+this._dayOverClass:\"\")+(W?\" \"+this._unselectableClass+\" ui-state-disabled\":\"\")+(O&&!v?\"\":\" \"+j[1]+(H.getTime()===G.getTime()?\" \"+this._currentClass:\"\")+(H.getTime()===R.getTime()?\" ui-datepicker-today\":\"\"))+\"'\"+(O&&!v||!j[2]?\"\":\" title='\"+j[2].replace(/'/g,\"'\")+\"'\")+(W?\"\":\" data-handler='selectDay' data-event='click' data-month='\"+H.getMonth()+\"' data-year='\"+H.getFullYear()+\"'\")+\">\"+(O&&!v?\" \":W?\"<span class='ui-state-default'>\"+H.getDate()+\"</span>\":\"<a class='ui-state-default\"+(H.getTime()===R.getTime()?\" ui-state-highlight\":\"\")+(H.getTime()===G.getTime()?\" ui-state-active\":\"\")+(O?\" ui-priority-secondary\":\"\")+\"' href='#'>\"+H.getDate()+\"</a>\")+\"</td>\",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);M+=E+\"</tr>\"}Z++,Z>11&&(Z=0,et++),M+=\"</tbody></table>\"+(Q?\"</div>\"+(K[0]>0&&T===K[1]-1?\"<div class='ui-datepicker-row-break'></div>\":\"\"):\"\"),k+=M}_+=k}return _+=l,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,s,n,a,o,r){var h,l,u,d,c,p,f,m,g=this._get(e,\"changeMonth\"),v=this._get(e,\"changeYear\"),y=this._get(e,\"showMonthAfterYear\"),b=\"<div class='ui-datepicker-title'>\",_=\"\";if(a||!g)_+=\"<span class='ui-datepicker-month'>\"+o[t]+\"</span>\";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,_+=\"<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>\",u=0;12>u;u++)(!h||u>=s.getMonth())&&(!l||n.getMonth()>=u)&&(_+=\"<option value='\"+u+\"'\"+(u===t?\" selected='selected'\":\"\")+\">\"+r[u]+\"</option>\");_+=\"</select>\"}if(y||(b+=_+(!a&&g&&v?\"\":\" \")),!e.yearshtml)if(e.yearshtml=\"\",a||!v)b+=\"<span class='ui-datepicker-year'>\"+i+\"</span>\";else{for(d=this._get(e,\"yearRange\").split(\":\"),c=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(t)?c:t},f=p(d[0]),m=Math.max(f,p(d[1]||\"\")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+=\"<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>\";m>=f;f++)e.yearshtml+=\"<option value='\"+f+\"'\"+(f===i?\" selected='selected'\":\"\")+\">\"+f+\"</option>\";e.yearshtml+=\"</select>\",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,\"yearSuffix\"),y&&(b+=(!a&&g&&v?\"\":\" \")+_),b+=\"</div>\"},_adjustInstDate:function(e,t,i){var s=e.drawYear+(\"Y\"===i?t:0),n=e.drawMonth+(\"M\"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+(\"D\"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),(\"M\"===i||\"Y\"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,\"min\"),s=this._getMinMaxDate(e,\"max\"),n=i&&i>t?i:t;return s&&n>s?s:n},_notifyChange:function(e){var t=this._get(e,\"onChangeMonthYear\");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,\"numberOfMonths\");return null==t?[1,1]:\"number\"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+\"Date\"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,\"min\"),a=this._getMinMaxDate(e,\"max\"),o=null,r=null,h=this._get(e,\"yearRange\");return h&&(i=h.split(\":\"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\\-].*/)&&(o+=s),i[1].match(/[+\\-].*/)&&(r+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!r||r>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,\"shortYearCutoff\");return t=\"string\"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,\"dayNamesShort\"),dayNames:this._get(e,\"dayNames\"),monthNamesShort:this._get(e,\"monthNamesShort\"),monthNames:this._get(e,\"monthNames\")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?\"object\"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,\"dateFormat\"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e(\"#\"+e.datepicker._mainDivId).length&&e(\"body\").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return\"string\"!=typeof t||\"isDisabled\"!==t&&\"getDate\"!==t&&\"widget\"!==t?\"option\"===t&&2===arguments.length&&\"string\"==typeof arguments[1]?e.datepicker[\"_\"+t+\"Datepicker\"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){\"string\"==typeof t?e.datepicker[\"_\"+t+\"Datepicker\"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker[\"_\"+t+\"Datepicker\"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version=\"1.11.1\",e.datepicker,e.widget(\"ui.draggable\",e.ui.mouse,{version:\"1.11.1\",widgetEventPrefix:\"drag\",options:{addClasses:!0,appendTo:\"parent\",axis:!1,connectToSortable:!1,containment:!1,cursor:\"auto\",cursorAt:!1,grid:!1,handle:!1,helper:\"original\",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:\"default\",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:\"both\",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){\"original\"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css(\"position\"))||(this.element[0].style.position=\"relative\"),this.options.addClasses&&this.element.addClass(\"ui-draggable\"),this.options.disabled&&this.element.addClass(\"ui-draggable-disabled\"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),\"handle\"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(\".ui-draggable-dragging\")?(this.destroyOnClear=!0,void 0):(this.element.removeClass(\"ui-draggable ui-draggable-dragging ui-draggable-disabled\"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.document[0],s=this.options;try{i.activeElement&&\"body\"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(n){}return this.helper||s.disabled||e(t.target).closest(\".ui-resizable-handle\").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(s.iframeFix===!0?\"iframe\":s.iframeFix).each(function(){e(\"<div class='ui-draggable-iframeFix' style='background: #fff;'></div>\").css({width:this.offsetWidth+\"px\",height:this.offsetHeight+\"px\",position:\"absolute\",opacity:\"0.001\",zIndex:1e3}).css(e(this).offset()).appendTo(\"body\")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass(\"ui-draggable-dragging\"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css(\"position\"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css(\"position\"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger(\"start\",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if(\"fixed\"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo(\"absolute\"),!i){var s=this._uiHash();if(this._trigger(\"drag\",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+\"px\",this.helper[0].style.top=this.position.top+\"px\",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),\"invalid\"===this.options.revert&&!s||\"valid\"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger(\"stop\",t)!==!1&&i._clear()}):this._trigger(\"stop\",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return e(\"div.ui-draggable-iframeFix\").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(\".ui-draggable-dragging\")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass(\"ui-draggable-handle\")},_removeHandleClassName:function(){this.handleElement.removeClass(\"ui-draggable-handle\")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):\"clone\"===i.helper?this.element.clone().removeAttr(\"id\"):this.element;return s.parents(\"body\").length||s.appendTo(\"parent\"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css(\"position\"))||s.css(\"position\",\"absolute\"),s},_adjustOffsetFromHelper:function(t){\"string\"==typeof t&&(t=t.split(\" \")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),\"left\"in t&&(this.offset.click.left=t.left+this.margins.left),\"right\"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),\"top\"in t&&(this.offset.click.top=t.top+this.margins.top),\"bottom\"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return\"absolute\"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css(\"borderTopWidth\"),10)||0),left:t.left+(parseInt(this.offsetParent.css(\"borderLeftWidth\"),10)||0)}},_getRelativeOffset:function(){if(\"relative\"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css(\"top\"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css(\"left\"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css(\"marginLeft\"),10)||0,top:parseInt(this.element.css(\"marginTop\"),10)||0,right:parseInt(this.element.css(\"marginRight\"),10)||0,bottom:parseInt(this.element.css(\"marginBottom\"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?\"window\"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):\"document\"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):(\"parent\"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t=\"hidden\"!==i.css(\"overflow\"),this.containment=[(parseInt(i.css(\"borderLeftWidth\"),10)||0)+(parseInt(i.css(\"paddingLeft\"),10)||0),(parseInt(i.css(\"borderTopWidth\"),10)||0)+(parseInt(i.css(\"paddingTop\"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css(\"borderRightWidth\"),10)||0)-(parseInt(i.css(\"paddingRight\"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css(\"borderBottomWidth\"),10)||0)-(parseInt(i.css(\"paddingBottom\"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,t){t||(t=this.position);var i=\"absolute\"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-(\"fixed\"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-(\"fixed\"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}\n},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),\"y\"===o.axis&&(h=this.originalPageX),\"x\"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(\"fixed\"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(\"fixed\"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass(\"ui-draggable-dragging\"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),\"drag\"===t&&(this.positionAbs=this._convertPositionTo(\"absolute\")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add(\"draggable\",\"connectToSortable\",{start:function(t,i,s){var n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e(this).sortable(\"instance\");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger(\"activate\",t,a))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,\"original\"===s.options.helper&&this.instance.currentItem.css({top:\"auto\",left:\"auto\"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger(\"deactivate\",t,n))})},drag:function(t,i,s){var n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr(\"id\").appendTo(this.instance.element).data(\"ui-sortable-item\",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger(\"toSortable\",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger(\"out\",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger(\"fromSortable\",t),s.dropped=!1)})}}),e.ui.plugin.add(\"draggable\",\"cursor\",{start:function(t,i,s){var n=e(\"body\"),a=s.options;n.css(\"cursor\")&&(a._cursor=n.css(\"cursor\")),n.css(\"cursor\",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e(\"body\").css(\"cursor\",n._cursor)}}),e.ui.plugin.add(\"draggable\",\"opacity\",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css(\"opacity\")&&(a._opacity=n.css(\"opacity\")),n.css(\"opacity\",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css(\"opacity\",n._opacity)}}),e.ui.plugin.add(\"draggable\",\"scroll\",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&\"HTML\"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&\"HTML\"!==o.tagName?(n.axis&&\"x\"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY<n.scrollSensitivity?o.scrollTop=a=o.scrollTop+n.scrollSpeed:t.pageY-s.overflowOffset.top<n.scrollSensitivity&&(o.scrollTop=a=o.scrollTop-n.scrollSpeed)),n.axis&&\"y\"===n.axis||(s.overflowOffset.left+o.offsetWidth-t.pageX<n.scrollSensitivity?o.scrollLeft=a=o.scrollLeft+n.scrollSpeed:t.pageX-s.overflowOffset.left<n.scrollSensitivity&&(o.scrollLeft=a=o.scrollLeft-n.scrollSpeed))):(n.axis&&\"x\"===n.axis||(t.pageY-e(r).scrollTop()<n.scrollSensitivity?a=e(r).scrollTop(e(r).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(r).scrollTop())<n.scrollSensitivity&&(a=e(r).scrollTop(e(r).scrollTop()+n.scrollSpeed))),n.axis&&\"y\"===n.axis||(t.pageX-e(r).scrollLeft()<n.scrollSensitivity?a=e(r).scrollLeft(e(r).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(r).scrollLeft())<n.scrollSensitivity&&(a=e(r).scrollLeft(e(r).scrollLeft()+n.scrollSpeed)))),a!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(s,t)}}),e.ui.plugin.add(\"draggable\",\"snap\",{start:function(t,i,s){var n=s.options;s.snapElements=[],e(n.snap.constructor!==String?n.snap.items||\":data(ui-draggable)\":n.snap).each(function(){var t=e(this),i=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,s){var n,a,o,r,h,l,u,d,c,p,f=s.options,m=f.snapTolerance,g=i.offset.left,v=g+s.helperProportions.width,y=i.offset.top,b=y+s.helperProportions.height;for(c=s.snapElements.length-1;c>=0;c--)h=s.snapElements[c].left,l=h+s.snapElements[c].width,u=s.snapElements[c].top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):(\"inner\"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo(\"relative\",{top:u-s.helperProportions.height,left:0}).top-s.margins.top),a&&(i.position.top=s._convertPositionTo(\"relative\",{top:d,left:0}).top-s.margins.top),o&&(i.position.left=s._convertPositionTo(\"relative\",{top:0,left:h-s.helperProportions.width}).left-s.margins.left),r&&(i.position.left=s._convertPositionTo(\"relative\",{top:0,left:l}).left-s.margins.left)),p=n||a||o||r,\"outer\"!==f.snapMode&&(n=m>=Math.abs(u-y),a=m>=Math.abs(d-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo(\"relative\",{top:u,left:0}).top-s.margins.top),a&&(i.position.top=s._convertPositionTo(\"relative\",{top:d-s.helperProportions.height,left:0}).top-s.margins.top),o&&(i.position.left=s._convertPositionTo(\"relative\",{top:0,left:h}).left-s.margins.left),r&&(i.position.left=s._convertPositionTo(\"relative\",{top:0,left:l-s.helperProportions.width}).left-s.margins.left)),!s.snapElements[c].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=n||a||o||r||p)}}),e.ui.plugin.add(\"draggable\",\"stack\",{start:function(t,i,s){var n,a=s.options,o=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css(\"zIndex\"),10)||0)-(parseInt(e(i).css(\"zIndex\"),10)||0)});o.length&&(n=parseInt(e(o[0]).css(\"zIndex\"),10)||0,e(o).each(function(t){e(this).css(\"zIndex\",n+t)}),this.css(\"zIndex\",n+o.length))}}),e.ui.plugin.add(\"draggable\",\"zIndex\",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css(\"zIndex\")&&(a._zIndex=n.css(\"zIndex\")),n.css(\"zIndex\",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css(\"zIndex\",n._zIndex)}}),e.ui.draggable,e.widget(\"ui.resizable\",e.ui.mouse,{version:\"1.11.1\",widgetEventPrefix:\"resize\",options:{alsoResize:!1,animate:!1,animateDuration:\"slow\",animateEasing:\"swing\",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:\"e,s,se\",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if(\"hidden\"===e(t).css(\"overflow\"))return!1;var s=i&&\"left\"===i?\"scrollLeft\":\"scrollTop\",n=!1;return t[s]>0?!0:(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass(\"ui-resizable\"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||\"ui-resizable-helper\":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e(\"<div class='ui-wrapper' style='overflow: hidden;'></div>\").css({position:this.element.css(\"position\"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css(\"top\"),left:this.element.css(\"left\")})),this.element=this.element.parent().data(\"ui-resizable\",this.element.resizable(\"instance\")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css(\"marginLeft\"),marginTop:this.originalElement.css(\"marginTop\"),marginRight:this.originalElement.css(\"marginRight\"),marginBottom:this.originalElement.css(\"marginBottom\")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css(\"resize\"),this.originalElement.css(\"resize\",\"none\"),this._proportionallyResizeElements.push(this.originalElement.css({position:\"static\",zoom:1,display:\"block\"})),this.originalElement.css({margin:this.originalElement.css(\"margin\")}),this._proportionallyResize()),this.handles=r.handles||(e(\".ui-resizable-handle\",this.element).length?{n:\".ui-resizable-n\",e:\".ui-resizable-e\",s:\".ui-resizable-s\",w:\".ui-resizable-w\",se:\".ui-resizable-se\",sw:\".ui-resizable-sw\",ne:\".ui-resizable-ne\",nw:\".ui-resizable-nw\"}:\"e,s,se\"),this.handles.constructor===String)for(\"all\"===this.handles&&(this.handles=\"n,e,s,w,se,sw,ne,nw\"),t=this.handles.split(\",\"),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a=\"ui-resizable-\"+s,n=e(\"<div class='ui-resizable-handle \"+a+\"'></div>\"),n.css({zIndex:r.zIndex}),\"se\"===s&&n.addClass(\"ui-icon ui-icon-gripsmall-diagonal-se\"),this.handles[s]=\".ui-resizable-\"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=this.element.children(this.handles[i]).first().show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=[\"padding\",/ne|nw|n/.test(i)?\"Top\":/se|sw|s/.test(i)?\"Bottom\":/^e$/.test(i)?\"Right\":\"Left\"].join(\"\"),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(\".ui-resizable-handle\",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:\"se\")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass(\"ui-resizable-autohide\").mouseenter(function(){r.disabled||(e(this).removeClass(\"ui-resizable-autohide\"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass(\"ui-resizable-autohide\"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass(\"ui-resizable ui-resizable-disabled ui-resizable-resizing\").removeData(\"resizable\").removeData(\"ui-resizable\").unbind(\".resizable\").find(\".ui-resizable-handle\").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css(\"position\"),width:t.outerWidth(),height:t.outerHeight(),top:t.css(\"top\"),left:t.css(\"left\")}).insertAfter(t),t.remove()),this.originalElement.css(\"resize\",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,a=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css(\"left\")),s=this._num(this.helper.css(\"top\")),a.containment&&(i+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=\"number\"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=e(\".ui-resizable-\"+this.axis).css(\"cursor\"),e(\"body\").css(\"cursor\",\"auto\"===n?this.axis+\"-resize\":n),o.addClass(\"ui-resizable-resizing\"),this._propagate(\"start\",t),!0},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,a=this.axis,o=t.pageX-n.left||0,r=t.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[t,o,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate(\"resize\",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger(\"resize\",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],\"left\")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css(\"left\"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css(\"top\"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e(\"body\").css(\"cursor\",\"auto\"),this.element.removeClass(\"ui-resizable-resizing\"),this._propagate(\"stop\",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+\"px\"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+\"px\"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+\"px\"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+\"px\"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,s,n,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),\"sw\"===s&&(e.left=t.left+(i.width-e.width),e.top=null),\"nw\"===s&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,n=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,a=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),n&&(e.height=t.maxHeight),a&&l&&(e.left=r-t.minWidth),s&&l&&(e.left=r-t.maxWidth),o&&u&&(e.top=h-t.minHeight),n&&u&&(e.top=h-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],s=[e.css(\"borderTopWidth\"),e.css(\"borderRightWidth\"),e.css(\"borderBottomWidth\"),e.css(\"borderLeftWidth\")],n=[e.css(\"paddingTop\"),e.css(\"paddingRight\"),e.css(\"paddingBottom\"),e.css(\"paddingLeft\")];4>t;t++)i[t]=parseInt(s[t],10)||0,i[t]+=parseInt(n[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e(\"<div style='overflow:hidden;'></div>\"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:\"absolute\",left:this.elementOffset.left+\"px\",top:this.elementOffset.top+\"px\",zIndex:++i.zIndex}),this.helper.appendTo(\"body\").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),\"resize\"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add(\"resizable\",\"animate\",{stop:function(t){var i=e(this).resizable(\"instance\"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&i._hasScroll(n[0],\"left\")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css(\"left\"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css(\"top\"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css(\"width\"),10),height:parseInt(i.element.css(\"height\"),10),top:parseInt(i.element.css(\"top\"),10),left:parseInt(i.element.css(\"left\"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate(\"resize\",t)}})}}),e.ui.plugin.add(\"resizable\",\"containment\",{start:function(){var t,i,s,n,a,o,r,h=e(this).resizable(\"instance\"),l=h.options,u=h.element,d=l.containment,c=d instanceof e?d.get(0):/parent/.test(d)?u.parent().get(0):d;c&&(h.containerElement=e(c),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(c),i=[],e([\"Top\",\"Right\",\"Left\",\"Bottom\"]).each(function(e,s){i[e]=h._num(t.css(\"padding\"+s))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,o=h._hasScroll(c,\"left\")?c.scrollWidth:a,r=h._hasScroll(c)?c.scrollHeight:n,h.parentData={element:c,left:s.left,top:s.top,width:o,height:r}))},resize:function(t){var i,s,n,a,o=e(this).resizable(\"instance\"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,d={top:0,left:0},c=o.containerElement,p=!0;c[0]!==document&&/static/.test(c.css(\"position\"))&&(d=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-d.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?h.top:0),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css(\"position\")),n&&a?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-d.left:o.offset.left-h.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-d.top:o.offset.top-h.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=e(this).resizable(\"instance\"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css(\"position\"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css(\"position\"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add(\"resizable\",\"alsoResize\",{start:function(){var t=e(this).resizable(\"instance\"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data(\"ui-resizable-alsoresize\",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css(\"left\"),10),top:parseInt(t.css(\"top\"),10)})})};\"object\"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).resizable(\"instance\"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data(\"ui-resizable-alsoresize\"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?[\"width\",\"height\"]:[\"width\",\"height\",\"top\",\"left\"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};\"object\"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData(\"resizable-alsoresize\")}}),e.ui.plugin.add(\"resizable\",\"ghost\",{start:function(){var t=e(this).resizable(\"instance\"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:\"block\",position:\"relative\",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass(\"ui-resizable-ghost\").addClass(\"string\"==typeof i.ghost?i.ghost:\"\"),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable(\"instance\");t.ghost&&t.ghost.css({position:\"relative\",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable(\"instance\");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add(\"resizable\",\"grid\",{resize:function(){var t,i=e(this).resizable(\"instance\"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis,h=\"number\"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,d=Math.round((n.width-a.width)/l)*l,c=Math.round((n.height-a.height)/u)*u,p=a.width+d,f=a.height+c,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,y=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),y&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=o.top-c):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=o.left-d):((0>=f-u||0>=p-l)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=o.top-c):(f=u-t.height,i.size.height=f,i.position.top=o.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=o.left-d):(p=u-t.height,i.size.width=p,i.position.left=o.left+a.width-p))}}),e.ui.resizable,e.widget(\"ui.dialog\",{version:\"1.11.1\",options:{appendTo:\"body\",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:\"Close\",dialogClass:\"\",draggable:!0,hide:null,height:\"auto\",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:\"center\",at:\"center\",of:window,collision:\"fit\",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css(\"top\",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr(\"title\"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr(\"title\").addClass(\"ui-dialog-content ui-widget-content\").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||\"body\").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass(\"ui-dialog-content ui-widget-content\").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr(\"title\",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,s=this;if(this._isOpen&&this._trigger(\"beforeClose\",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(\":focusable\").focus().length)try{i=this.document[0].activeElement,i&&\"body\"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger(\"close\",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var s=!1,n=this.uiDialog.siblings(\".ui-front:visible\").map(function(){return+e(this).css(\"z-index\")}).get(),a=Math.max.apply(null,n);return a>=+this.uiDialog.css(\"z-index\")&&(this.uiDialog.css(\"z-index\",a+1),s=!0),s&&!i&&this._trigger(\"focus\",t),s},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css(\"z-index\",this.uiDialog.css(\"z-index\")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger(\"focus\")}),this._makeFocusTarget(),this._trigger(\"open\"),void 0)},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find(\"[autofocus]\")),e.length||(e=this.element.find(\":tabbable\")),e.length||(e=this.uiDialogButtonPane.find(\":tabbable\")),e.length||(e=this.uiDialogTitlebarClose.filter(\":tabbable\")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e(\"<div>\").addClass(\"ui-dialog ui-widget ui-widget-content ui-corner-all ui-front \"+this.options.dialogClass).hide().attr({tabIndex:-1,role:\"dialog\"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0;\nif(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(\":tabbable\"),s=i.filter(\":first\"),n=i.filter(\":last\");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==s[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){n.focus()}),t.preventDefault()):(this._delay(function(){s.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find(\"[aria-describedby]\").length||this.uiDialog.attr({\"aria-describedby\":this.element.uniqueId().attr(\"id\")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e(\"<div>\").addClass(\"ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix\").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(\".ui-dialog-titlebar-close\")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e(\"<button type='button'></button>\").button({label:this.options.closeText,icons:{primary:\"ui-icon-closethick\"},text:!1}).addClass(\"ui-dialog-titlebar-close\").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e(\"<span>\").uniqueId().addClass(\"ui-dialog-title\").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({\"aria-labelledby\":t.attr(\"id\")})},_title:function(e){this.options.title||e.html(\" \"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e(\"<div>\").addClass(\"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix\"),this.uiButtonSet=e(\"<div>\").addClass(\"ui-dialog-buttonset\").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass(\"ui-dialog-buttons\"),void 0):(e.each(i,function(i,s){var n,a;s=e.isFunction(s)?{click:s,text:i}:s,s=e.extend({type:\"button\"},s),n=s.click,s.click=function(){n.apply(t.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,e(\"<button></button>\",s).button(a).appendTo(t.uiButtonSet)}),this.uiDialog.addClass(\"ui-dialog-buttons\"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:\".ui-dialog-content, .ui-dialog-titlebar-close\",handle:\".ui-dialog-titlebar\",containment:\"document\",start:function(s,n){e(this).addClass(\"ui-dialog-dragging\"),i._blockFrames(),i._trigger(\"dragStart\",s,t(n))},drag:function(e,s){i._trigger(\"drag\",e,t(s))},stop:function(n,a){var o=a.offset.left-i.document.scrollLeft(),r=a.offset.top-i.document.scrollTop();s.position={my:\"left top\",at:\"left\"+(o>=0?\"+\":\"\")+o+\" \"+\"top\"+(r>=0?\"+\":\"\")+r,of:i.window},e(this).removeClass(\"ui-dialog-dragging\"),i._unblockFrames(),i._trigger(\"dragStop\",n,t(a))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css(\"position\"),o=\"string\"==typeof n?n:\"n,e,s,w,se,sw,ne,nw\";this.uiDialog.resizable({cancel:\".ui-dialog-content\",containment:\"document\",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){e(this).addClass(\"ui-dialog-resizing\"),i._blockFrames(),i._trigger(\"resizeStart\",s,t(n))},resize:function(e,s){i._trigger(\"resize\",e,t(s))},stop:function(n,a){var o=i.uiDialog.offset(),r=o.left-i.document.scrollLeft(),h=o.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:\"left top\",at:\"left\"+(r>=0?\"+\":\"\")+r+\" \"+\"top\"+(h>=0?\"+\":\"\")+h,of:i.window},e(this).removeClass(\"ui-dialog-resizing\"),i._unblockFrames(),i._trigger(\"resizeStop\",n,t(a))}}).css(\"position\",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data(\"ui-dialog-instances\");return e||(e=[],this.document.data(\"ui-dialog-instances\",e)),e},_minHeight:function(){var e=this.options;return\"auto\"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(\":visible\");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(s=!0),e in i.resizableRelatedOptions&&(n[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(\":data(ui-resizable)\")&&this.uiDialog.resizable(\"option\",n)},_setOption:function(e,t){var i,s,n=this.uiDialog;\"dialogClass\"===e&&n.removeClass(this.options.dialogClass).addClass(t),\"disabled\"!==e&&(this._super(e,t),\"appendTo\"===e&&this.uiDialog.appendTo(this._appendTo()),\"buttons\"===e&&this._createButtons(),\"closeText\"===e&&this.uiDialogTitlebarClose.button({label:\"\"+t}),\"draggable\"===e&&(i=n.is(\":data(ui-draggable)\"),i&&!t&&n.draggable(\"destroy\"),!i&&t&&this._makeDraggable()),\"position\"===e&&this._position(),\"resizable\"===e&&(s=n.is(\":data(ui-resizable)\"),s&&!t&&n.resizable(\"destroy\"),s&&\"string\"==typeof t&&n.resizable(\"option\",\"handles\",t),s||t===!1||this._makeResizable()),\"title\"===e&&this._title(this.uiDialogTitlebar.find(\".ui-dialog-title\")))},_size:function(){var e,t,i,s=this.options;this.element.show().css({width:\"auto\",minHeight:0,maxHeight:\"none\",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),e=this.uiDialog.css({height:\"auto\",width:s.width}).outerHeight(),t=Math.max(0,s.minHeight-e),i=\"number\"==typeof s.maxHeight?Math.max(0,s.maxHeight-e):\"none\",\"auto\"===s.height?this.element.css({minHeight:t,maxHeight:i,height:\"auto\"}):this.element.height(Math.max(0,s.height-e)),this.uiDialog.is(\":data(ui-resizable)\")&&this.uiDialog.resizable(\"option\",\"minHeight\",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find(\"iframe\").map(function(){var t=e(this);return e(\"<div>\").css({position:\"absolute\",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(\".ui-dialog\").length?!0:!!e(t.target).closest(\".ui-datepicker\").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data(\"ui-dialog-overlays\")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e(\"<div>\").addClass(\"ui-widget-overlay ui-front\").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:\"_keepFocus\"}),this.document.data(\"ui-dialog-overlays\",(this.document.data(\"ui-dialog-overlays\")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data(\"ui-dialog-overlays\")-1;e?this.document.data(\"ui-dialog-overlays\",e):this.document.unbind(\"focusin\").removeData(\"ui-dialog-overlays\"),this.overlay.remove(),this.overlay=null}}}),e.widget(\"ui.droppable\",{version:\"1.11.1\",widgetEventPrefix:\"drop\",options:{accept:\"*\",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:\"default\",tolerance:\"intersect\",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass(\"ui-droppable\")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass(\"ui-droppable ui-droppable-disabled\")},_setOption:function(t,i){if(\"accept\"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if(\"scope\"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger(\"activate\",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger(\"deactivate\",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger(\"over\",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger(\"out\",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(\":data(ui-droppable)\").not(\".ui-draggable-dragging\").each(function(){var i=e(this).droppable(\"instance\");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger(\"drop\",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left,o=(t.positionAbs||t.position.absolute).top,r=a+t.helperProportions.width,h=o+t.helperProportions.height,l=i.offset.left,u=i.offset.top,d=l+i.proportions().width,c=u+i.proportions().height;switch(s){case\"fit\":return a>=l&&d>=r&&o>=u&&c>=h;case\"intersect\":return a+t.helperProportions.width/2>l&&d>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>u&&c>h-t.helperProportions.height/2;case\"pointer\":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case\"touch\":return(o>=u&&c>=o||h>=u&&c>=h||u>o&&h>c)&&(a>=l&&d>=a||r>=l&&d>=r||l>a&&r>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{\"default\":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(\":data(ui-droppable)\").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible=\"none\"!==a[s].element.css(\"display\"),a[s].visible&&(\"mousedown\"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil(\"body\").bind(\"scroll.droppable\",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance,i),r=!o&&this.isover?\"isout\":o&&!this.isover?\"isover\":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(\":data(ui-droppable)\").filter(function(){return e(this).droppable(\"instance\").options.scope===n}),a.length&&(s=e(a[0]).droppable(\"instance\"),s.greedyChild=\"isover\"===r)),s&&\"isover\"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this[\"isout\"===r?\"isover\":\"isout\"]=!1,this[\"isover\"===r?\"_over\":\"_out\"].call(this,i),s&&\"isout\"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil(\"body\").unbind(\"scroll.droppable\"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable;var y=\"ui-effects-\",b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||\"rgba\";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?(\"0,0,0,0\"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o=\"backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor\",r=/^([\\-+])=\\s*(\\d+\\.?\\d*)/,h=[{re:/rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,space:\"hsla\",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={rgba:{props:{red:{idx:0,type:\"byte\"},green:{idx:1,type:\"byte\"},blue:{idx:2,type:\"byte\"}}},hsla:{props:{hue:{idx:0,type:\"degrees\"},saturation:{idx:1,type:\"percent\"},lightness:{idx:2,type:\"percent\"}}}},d={\"byte\":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=l.support={},p=e(\"<p>\")[0],f=e.each;p.style.cssText=\"background-color:rgba(1,1,1,.5)\",c.rgba=p.style.backgroundColor.indexOf(\"rgba\")>-1,f(u,function(e,t){t.cache=\"_\"+e,t.props.alpha={idx:3,type:\"percent\",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,o,r,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(o),o=t);var d=this,c=e.type(n),p=this._rgba=[];return o!==t&&(n=[n,o,r,h],c=\"array\"),\"string\"===c?this.parse(s(n)||a._default):\"array\"===c?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):\"object\"===c?(n instanceof l?f(u,function(e,t){n[t.cache]&&(d[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!d[a]&&s.to){if(\"alpha\"===e||null==n[e])return;d[a]=s.to(d._rgba)}d[a][t.idx]=i(n[e],t,!0)}),d[a]&&0>e.inArray(null,d[a].slice(0,3))&&(d[a][3]=1,s.from&&(d._rgba=s.from(d[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],o=0===this.alpha()?l(\"transparent\"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,o=r[a],l=s[a],u=d[n.type]||{};null!==l&&(null===o?h[a]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),h[a]=i((l-o)*t+o,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t=\"rgba(\",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t=\"rgb(\"),t+i.join()+\")\"},toHslaString:function(){var t=\"hsla(\",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+\"%\"),e});return 1===i[3]&&(i.pop(),t=\"hsl(\"),t+i.join()+\")\"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),\"#\"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?\"0\"+e:e}).join(\"\")},toString:function(){return 0===this._rgba[3]?\"transparent\":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,o=e[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,u=r+h,d=.5*u;return t=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==o?1:o]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,t+1/3)),Math.round(255*n(r,o,t)),Math.round(255*n(r,o,t-1/3)),a]},f(u,function(s,n){var a=n.props,o=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===t)return this[o].slice();var n,r=e.type(s),d=\"array\"===r||\"object\"===r?s:arguments,c=this[o].slice();return f(a,function(e,t){var s=d[\"object\"===r?e:t.idx];null==s&&(s=c[t.idx]),c[t.idx]=i(s,t)}),u?(n=l(u(c)),n[o]=c,n):l(c)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,o=e.type(n),h=\"alpha\"===t?this._hsla?\"hsla\":\"rgba\":s,l=this[h](),u=l[i.idx];return\"undefined\"===o?u:(\"function\"===o&&(n=n.call(this,u),o=e.type(n)),null==n&&i.empty?this:(\"string\"===o&&(a=r.exec(n),a&&(n=u+parseFloat(a[2])*(\"+\"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(\" \");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,o,r=\"\";if(\"transparent\"!==n&&(\"string\"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!c.rgba&&1!==n._rgba[3]){for(o=\"backgroundColor\"===i?t.parentNode:t;(\"\"===r||\"transparent\"===r)&&o&&o.style;)try{r=e.css(o,\"backgroundColor\"),o=o.parentNode}catch(h){}n=n.blend(r&&\"transparent\"!==r?r:\"_default\")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(o),e.cssHooks.borderColor={expand:function(e){var t={};return f([\"Top\",\"Right\",\"Bottom\",\"Left\"],function(i,s){t[\"border\"+s+\"Color\"]=e}),t}},a=e.Color.names={aqua:\"#00ffff\",black:\"#000000\",blue:\"#0000ff\",fuchsia:\"#ff00ff\",gray:\"#808080\",green:\"#008000\",lime:\"#00ff00\",maroon:\"#800000\",navy:\"#000080\",olive:\"#808000\",purple:\"#800080\",red:\"#ff0000\",silver:\"#c0c0c0\",teal:\"#008080\",white:\"#ffffff\",yellow:\"#ffff00\",transparent:[null,null,null,0],_default:\"#ffffff\"}}(b),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],\"string\"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)\"string\"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(o[s]=a));return o}var s=[\"add\",\"remove\",\"toggle\"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each([\"borderLeftStyle\",\"borderRightStyle\",\"borderBottomStyle\",\"borderTopStyle\"],function(t,i){e.fx.step[i]=function(e){(\"none\"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,o,r){var h=e.speed(a,o,r);return this.queue(function(){var a,o=e(this),r=o.attr(\"class\")||\"\",l=h.children?o.find(\"*\").addBack():o;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&o[t+\"Class\"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),o.attr(\"class\",r),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,\"\")})}),h.complete.call(o[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,o){return\"boolean\"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),(\"number\"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:\"number\"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||\"number\"==typeof t||e.fx.speeds[t]?!0:\"string\"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:\"object\"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:\"1.11.1\",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(y+t[s]),void 0===i&&(i=\"\"),e.css(t[s],i))},setMode:function(e,t){return\"toggle\"===t&&(t=e.is(\":hidden\")?\"show\":\"hide\"),t},getBaseline:function(e,t){var i,s;switch(e[0]){case\"top\":i=0;break;case\"middle\":i=.5;break;case\"bottom\":i=1;break;default:i=e[0]/t.height}switch(e[1]){case\"left\":s=0;break;case\"center\":s=.5;break;case\"right\":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(\".ui-effects-wrapper\"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),\"float\":t.css(\"float\")},s=e(\"<div></div>\").addClass(\"ui-effects-wrapper\").css({fontSize:\"100%\",background:\"transparent\",border:\"none\",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),\"static\"===t.css(\"position\")?(s.css({position:\"relative\"}),t.css({position:\"relative\"})):(e.extend(i,{position:t.css(\"position\"),zIndex:t.css(\"z-index\")}),e.each([\"top\",\"left\",\"bottom\",\"right\"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]=\"auto\")}),t.css({position:\"relative\",top:0,left:0,right:\"auto\",bottom:\"auto\"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement;return t.parent().is(\".ui-effects-wrapper\")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,r=s.mode;(n.is(\":hidden\")?\"hide\"===r:\"show\"===r)?(n[r](),i()):o.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,o=e.effects.effect[s.effect];return e.fx.off||!o?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||\"fx\",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode=\"show\",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode=\"hide\",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||\"boolean\"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode=\"toggle\",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each([\"em\",\"px\",\"%\",\"pt\"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each([\"Quad\",\"Cubic\",\"Quart\",\"Quint\",\"Expo\"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing[\"easeIn\"+t]=i,e.easing[\"easeOut\"+t]=function(e){return 1-i(1-e)},e.easing[\"easeInOut\"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,i){var s,n,a,o=e(this),r=/up|down|vertical/,h=/up|left|vertical|horizontal/,l=[\"position\",\"top\",\"bottom\",\"left\",\"right\",\"height\",\"width\"],u=e.effects.setMode(o,t.mode||\"hide\"),d=t.direction||\"up\",c=r.test(d),p=c?\"height\":\"width\",f=c?\"top\":\"left\",m=h.test(d),g={},v=\"show\"===u;o.parent().is(\".ui-effects-wrapper\")?e.effects.save(o.parent(),l):e.effects.save(o,l),o.show(),s=e.effects.createWrapper(o).css({overflow:\"hidden\"}),n=s[p](),a=parseFloat(s.css(f))||0,g[p]=v?n:0,m||(o.css(c?\"bottom\":\"right\",0).css(c?\"top\":\"left\",\"auto\").css({position:\"absolute\"}),g[f]=v?a:n+a),v&&(s.css(p,0),m||s.css(f,a+n)),s.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){\"hide\"===u&&o.hide(),e.effects.restore(o,l),e.effects.removeWrapper(o),i()}})},e.effects.effect.bounce=function(t,i){var s,n,a,o=e(this),r=[\"position\",\"top\",\"bottom\",\"left\",\"right\",\"height\",\"width\"],h=e.effects.setMode(o,t.mode||\"effect\"),l=\"hide\"===h,u=\"show\"===h,d=t.direction||\"up\",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v=\"up\"===d||\"down\"===d?\"top\":\"left\",y=\"up\"===d||\"left\"===d,b=o.queue(),_=b.length;for((u||l)&&r.push(\"opacity\"),e.effects.save(o,r),o.show(),e.effects.createWrapper(o),c||(c=o[\"top\"===v?\"outerHeight\":\"outerWidth\"]()/3),u&&(a={opacity:1},a[v]=0,o.css(\"opacity\",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?\"-=\":\"+=\")+c,o.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?\"-=\":\"+=\")+c,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),o.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,o=e(this),r=[\"position\",\"top\",\"bottom\",\"left\",\"right\",\"height\",\"width\"],h=e.effects.setMode(o,t.mode||\"hide\"),l=\"show\"===h,u=t.direction||\"vertical\",d=\"vertical\"===u,c=d?\"height\":\"width\",p=d?\"top\":\"left\",f={};e.effects.save(o,r),o.show(),s=e.effects.createWrapper(o).css({overflow:\"hidden\"}),n=\"IMG\"===o[0].tagName?s:o,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=[\"position\",\"top\",\"bottom\",\"left\",\"right\",\"opacity\",\"height\",\"width\"],o=e.effects.setMode(n,t.mode||\"hide\"),r=\"show\"===o,h=t.direction||\"left\",l=\"up\"===h||\"down\"===h?\"top\":\"left\",u=\"up\"===h||\"left\"===h?\"pos\":\"neg\",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n[\"top\"===l?\"outerHeight\":\"outerWidth\"](!0)/2,r&&n.css(\"opacity\",0).css(l,\"pos\"===u?-s:s),d[l]=(r?\"pos\"===u?\"+=\":\"-=\":\"pos\"===u?\"-=\":\"+=\")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){\"hide\"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:\"visible\"}),e(b).remove(),m||p.hide(),i()}var a,o,r,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||\"hide\"),m=\"show\"===f,g=p.show().css(\"visibility\",\"hidden\").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,o=0;c>o;o++)r=g.left+o*v,l=o-(c-1)/2,p.clone().appendTo(\"body\").wrap(\"<div></div>\").css({position:\"absolute\",visibility:\"visible\",left:-o*v,top:-a*y}).parent().addClass(\"ui-effects-explode\").css({position:\"absolute\",overflow:\"hidden\",width:v,height:y,left:r+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||\"toggle\");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=[\"position\",\"top\",\"bottom\",\"left\",\"right\",\"height\",\"width\"],r=e.effects.setMode(a,t.mode||\"hide\"),h=\"show\"===r,l=\"hide\"===r,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?[\"width\",\"height\"]:[\"height\",\"width\"],m=t.duration/2,g={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:\"hidden\"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=[\"backgroundImage\",\"backgroundColor\",\"opacity\"],a=e.effects.setMode(s,t.mode||\"show\"),o={backgroundColor:s.css(\"backgroundColor\")};\"hide\"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:\"none\",backgroundColor:t.color||\"#ffff99\"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){\"hide\"===a&&s.hide(),e.effects.restore(s,n),i()}})},e.effects.effect.size=function(t,i){var s,n,a,o=e(this),r=[\"position\",\"top\",\"bottom\",\"left\",\"right\",\"width\",\"height\",\"overflow\",\"opacity\"],h=[\"position\",\"top\",\"bottom\",\"left\",\"right\",\"overflow\",\"opacity\"],l=[\"width\",\"height\",\"overflow\"],u=[\"fontSize\"],d=[\"borderTopWidth\",\"borderBottomWidth\",\"paddingTop\",\"paddingBottom\"],c=[\"borderLeftWidth\",\"borderRightWidth\",\"paddingLeft\",\"paddingRight\"],p=e.effects.setMode(o,t.mode||\"effect\"),f=t.restore||\"effect\"!==p,m=t.scale||\"both\",g=t.origin||[\"middle\",\"center\"],v=o.css(\"position\"),y=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};\"show\"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},\"toggle\"===t.mode&&\"show\"===p?(o.from=t.to||b,o.to=t.from||s):(o.from=t.from||(\"show\"===p?b:s),o.to=t.to||(\"hide\"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},(\"box\"===m||\"both\"===m)&&(a.from.y!==a.to.y&&(y=y.concat(d),o.from=e.effects.setTransition(o,d,a.from.y,o.from),o.to=e.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,a.from.x,o.from),o.to=e.effects.setTransition(o,c,a.to.x,o.to))),(\"content\"===m||\"both\"===m)&&a.from.y!==a.to.y&&(y=y.concat(u).concat(l),o.from=e.effects.setTransition(o,u,a.from.y,o.from),o.to=e.effects.setTransition(o,u,a.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css(\"overflow\",\"hidden\").css(o.from),g&&(n=e.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),(\"content\"===m||\"both\"===m)&&(d=d.concat([\"marginTop\",\"marginBottom\"]).concat(u),c=c.concat([\"marginLeft\",\"marginRight\"]),l=r.concat(d).concat(c),o.find(\"*[width]\").each(function(){var i=e(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};\nf&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=e.effects.setTransition(i,d,a.from.y,i.from),i.to=e.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=e.effects.setTransition(i,c,a.from.x,i.from),i.to=e.effects.setTransition(i,c,a.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===o.to.opacity&&o.css(\"opacity\",o.from.opacity),\"hide\"===p&&o.hide(),e.effects.restore(o,y),f||(\"static\"===v?o.css({position:\"relative\",top:o.to.top,left:o.to.left}):e.each([\"top\",\"left\"],function(e,t){o.css(t,function(t,i){var s=parseInt(i,10),n=e?o.to.left:o.to.top;return\"auto\"===i?n+\"px\":s+n+\"px\"})})),e.effects.removeWrapper(o),i()}})},e.effects.effect.scale=function(t,i){var s=e(this),n=e.extend(!0,{},t),a=e.effects.setMode(s,t.mode||\"effect\"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:\"hide\"===a?0:100),r=t.direction||\"both\",h=t.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:\"horizontal\"!==r?o/100:1,x:\"vertical\"!==r?o/100:1};n.effect=\"size\",n.queue=!1,n.complete=i,\"effect\"!==a&&(n.origin=h||[\"middle\",\"center\"],n.restore=!0),n.from=t.from||(\"show\"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},n.fade&&(\"show\"===a&&(n.from.opacity=0,n.to.opacity=1),\"hide\"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},e.effects.effect.puff=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||\"hide\"),a=\"hide\"===n,o=parseInt(t.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};e.extend(t,{effect:\"scale\",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(t)},e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||\"show\"),o=\"show\"===a,r=\"hide\"===a,h=o||\"hide\"===a,l=2*(t.times||5)+(h?1:0),u=t.duration/l,d=0,c=n.queue(),p=c.length;for((o||!n.is(\":visible\"))&&(n.css(\"opacity\",0).show(),d=1),s=1;l>s;s++)n.animate({opacity:d},u,t.easing),d=1-d;n.animate({opacity:d},u,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,l+1))),n.dequeue()},e.effects.effect.shake=function(t,i){var s,n=e(this),a=[\"position\",\"top\",\"bottom\",\"left\",\"right\",\"height\",\"width\"],o=e.effects.setMode(n,t.mode||\"effect\"),r=t.direction||\"left\",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c=\"up\"===r||\"down\"===r?\"top\":\"left\",p=\"up\"===r||\"left\"===r,f={},m={},g={},v=n.queue(),y=v.length;for(e.effects.save(n,a),n.show(),e.effects.createWrapper(n),f[c]=(p?\"-=\":\"+=\")+h,m[c]=(p?\"+=\":\"-=\")+2*h,g[c]=(p?\"-=\":\"+=\")+2*h,n.animate(f,d,t.easing),s=1;l>s;s++)n.animate(m,d,t.easing).animate(g,d,t.easing);n.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){\"hide\"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),n.dequeue()},e.effects.effect.slide=function(t,i){var s,n=e(this),a=[\"position\",\"top\",\"bottom\",\"left\",\"right\",\"width\",\"height\"],o=e.effects.setMode(n,t.mode||\"show\"),r=\"show\"===o,h=t.direction||\"left\",l=\"up\"===h||\"down\"===h?\"top\":\"left\",u=\"up\"===h||\"left\"===h,d={};e.effects.save(n,a),n.show(),s=t.distance||n[\"top\"===l?\"outerHeight\":\"outerWidth\"](!0),e.effects.createWrapper(n).css({overflow:\"hidden\"}),r&&n.css(l,u?isNaN(s)?\"-\"+s:-s:s),d[l]=(r?u?\"+=\":\"-=\":u?\"-=\":\"+=\")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){\"hide\"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a=\"fixed\"===n.css(\"position\"),o=e(\"body\"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),u={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),c=e(\"<div class='ui-effects-transfer'></div>\").appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?\"fixed\":\"absolute\"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})},e.widget(\"ui.progressbar\",{version:\"1.11.1\",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass(\"ui-progressbar ui-widget ui-widget-content ui-corner-all\").attr({role:\"progressbar\",\"aria-valuemin\":this.min}),this.valueDiv=e(\"<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>\").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass(\"ui-progressbar ui-widget ui-widget-content ui-corner-all\").removeAttr(\"role\").removeAttr(\"aria-valuemin\").removeAttr(\"aria-valuemax\").removeAttr(\"aria-valuenow\"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,\"number\"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){\"max\"===e&&(t=Math.max(this.min,t)),\"disabled\"===e&&this.element.toggleClass(\"ui-state-disabled\",!!t).attr(\"aria-disabled\",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass(\"ui-corner-right\",t===this.options.max).width(i.toFixed(0)+\"%\"),this.element.toggleClass(\"ui-progressbar-indeterminate\",this.indeterminate),this.indeterminate?(this.element.removeAttr(\"aria-valuenow\"),this.overlayDiv||(this.overlayDiv=e(\"<div class='ui-progressbar-overlay'></div>\").appendTo(this.valueDiv))):(this.element.attr({\"aria-valuemax\":this.options.max,\"aria-valuenow\":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger(\"change\")),t===this.options.max&&this._trigger(\"complete\")}}),e.widget(\"ui.selectable\",e.ui.mouse,{version:\"1.11.1\",options:{appendTo:\"body\",autoRefresh:!0,distance:0,filter:\"*\",tolerance:\"touch\",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass(\"ui-selectable\"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass(\"ui-selectee\"),t.each(function(){var t=e(this),i=t.offset();e.data(this,\"selectable-item\",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass(\"ui-selected\"),selecting:t.hasClass(\"ui-selecting\"),unselecting:t.hasClass(\"ui-unselecting\")})})},this.refresh(),this.selectees=t.addClass(\"ui-selectee\"),this._mouseInit(),this.helper=e(\"<div class='ui-selectable-helper'></div>\")},_destroy:function(){this.selectees.removeClass(\"ui-selectee\").removeData(\"selectable-item\"),this.element.removeClass(\"ui-selectable ui-selectable-disabled\"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger(\"start\",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(\".ui-selected\").each(function(){var s=e.data(this,\"selectable-item\");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass(\"ui-selected\"),s.selected=!1,s.$element.addClass(\"ui-unselecting\"),s.unselecting=!0,i._trigger(\"unselecting\",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,\"selectable-item\");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass(\"ui-selected\"),n.$element.removeClass(s?\"ui-unselecting\":\"ui-selected\").addClass(s?\"ui-selecting\":\"ui-unselecting\"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger(\"selecting\",t,{selecting:n.element}):i._trigger(\"unselecting\",t,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,\"selectable-item\"),l=!1;i&&i.element!==s.element[0]&&(\"touch\"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):\"fit\"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass(\"ui-selected\"),i.selected=!1),i.unselecting&&(i.$element.removeClass(\"ui-unselecting\"),i.unselecting=!1),i.selecting||(i.$element.addClass(\"ui-selecting\"),i.selecting=!0,s._trigger(\"selecting\",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass(\"ui-selecting\"),i.selecting=!1,i.$element.addClass(\"ui-selected\"),i.selected=!0):(i.$element.removeClass(\"ui-selecting\"),i.selecting=!1,i.startselected&&(i.$element.addClass(\"ui-unselecting\"),i.unselecting=!0),s._trigger(\"unselecting\",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass(\"ui-selected\"),i.selected=!1,i.$element.addClass(\"ui-unselecting\"),i.unselecting=!0,s._trigger(\"unselecting\",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(\".ui-unselecting\",this.element[0]).each(function(){var s=e.data(this,\"selectable-item\");s.$element.removeClass(\"ui-unselecting\"),s.unselecting=!1,s.startselected=!1,i._trigger(\"unselected\",t,{unselected:s.element})}),e(\".ui-selecting\",this.element[0]).each(function(){var s=e.data(this,\"selectable-item\");s.$element.removeClass(\"ui-selecting\").addClass(\"ui-selected\"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger(\"selected\",t,{selected:s.element})}),this._trigger(\"stop\",t),this.helper.remove(),!1}}),e.widget(\"ui.selectmenu\",{version:\"1.11.1\",defaultElement:\"<select>\",options:{appendTo:null,disabled:null,icons:{button:\"ui-icon-triangle-1-s\"},position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr(\"id\");this.ids={element:e,button:e+\"-button\",menu:e+\"-menu\"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var t=this,i=this.element.attr(\"tabindex\");this.label=e(\"label[for='\"+this.ids.element+\"']\").attr(\"for\",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e(\"<span>\",{\"class\":\"ui-selectmenu-button ui-widget ui-state-default ui-corner-all\",tabindex:i||this.options.disabled?-1:0,id:this.ids.button,role:\"combobox\",\"aria-expanded\":\"false\",\"aria-autocomplete\":\"list\",\"aria-owns\":this.ids.menu,\"aria-haspopup\":\"true\"}).insertAfter(this.element),e(\"<span>\",{\"class\":\"ui-icon \"+this.options.icons.button}).prependTo(this.button),this.buttonText=e(\"<span>\",{\"class\":\"ui-selectmenu-text\"}).appendTo(this.button),this._setText(this.buttonText,this.element.find(\"option:selected\").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one(\"focusin\",function(){t.menuItems||t._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=e(\"<ul>\",{\"aria-hidden\":\"true\",\"aria-labelledby\":this.ids.button,id:this.ids.menu}),this.menuWrap=e(\"<div>\",{\"class\":\"ui-selectmenu-menu ui-front\"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:\"listbox\",select:function(e,i){e.preventDefault(),t._select(i.item.data(\"ui-selectmenu-item\"),e)},focus:function(e,i){var s=i.item.data(\"ui-selectmenu-item\");null!=t.focusIndex&&s.index!==t.focusIndex&&(t._trigger(\"focus\",e,{item:s}),t.isOpen||t._select(s,e)),t.focusIndex=s.index,t.button.attr(\"aria-activedescendant\",t.menuItems.eq(s.index).attr(\"id\"))}}).menu(\"instance\"),this.menu.addClass(\"ui-corner-bottom\").removeClass(\"ui-corner-all\"),this.menuInstance._off(this.menu,\"mouseleave\"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find(\"option\");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find(\"li\").not(\".ui-selectmenu-optgroup\"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data(\"ui-selectmenu-item\")),this._setOption(\"disabled\",this.element.prop(\"disabled\")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(\".ui-state-focus\").removeClass(\"ui-state-focus\"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger(\"open\",e))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this._off(this.document),this._trigger(\"close\",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,i){var s=this,n=\"\";e.each(i,function(i,a){a.optgroup!==n&&(e(\"<li>\",{\"class\":\"ui-selectmenu-optgroup ui-menu-divider\"+(a.element.parent(\"optgroup\").prop(\"disabled\")?\" ui-state-disabled\":\"\"),text:a.optgroup}).appendTo(t),n=a.optgroup),s._renderItemData(t,a)})},_renderItemData:function(e,t){return this._renderItem(e,t).data(\"ui-selectmenu-item\",t)},_renderItem:function(t,i){var s=e(\"<li>\");return i.disabled&&s.addClass(\"ui-state-disabled\"),this._setText(s,i.label),s.appendTo(t)},_setText:function(e,t){t?e.text(t):e.html(\" \")},_move:function(e,t){var i,s,n=\".ui-menu-item\";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),n+=\":not(.ui-state-disabled)\"),s=\"first\"===e||\"last\"===e?i[\"first\"===e?\"prevAll\":\"nextAll\"](n).eq(-1):i[e+\"All\"](n).eq(0),s.length&&this.menuInstance.focus(t,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?\"close\":\"open\"](e)},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(\".ui-selectmenu-menu, #\"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(e){e.preventDefault()},click:\"_toggle\",keydown:function(t){var i=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),i=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move(\"prev\",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move(\"next\",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move(\"prev\",t);break;case e.ui.keyCode.RIGHT:this._move(\"next\",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move(\"first\",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move(\"last\",t);break;default:this.menu.trigger(t),i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass(\"ui-state-disabled\")||this._select(t.data(\"ui-selectmenu-item\"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger(\"select\",t,{item:e}),e.index!==i&&this._trigger(\"change\",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr(\"id\");this.button.attr({\"aria-labelledby\":t,\"aria-activedescendant\":t}),this.menu.attr(\"aria-activedescendant\",t)},_setOption:function(e,t){\"icons\"===e&&this.button.find(\"span.ui-icon\").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),\"appendTo\"===e&&this.menuWrap.appendTo(this._appendTo()),\"disabled\"===e&&(this.menuInstance.option(\"disabled\",t),this.button.toggleClass(\"ui-state-disabled\",t).attr(\"aria-disabled\",t),this.element.prop(\"disabled\",t),t?(this.button.attr(\"tabindex\",-1),this.close()):this.button.attr(\"tabindex\",0)),\"width\"===e&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(\".ui-front\")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass(\"ui-corner-top\",this.isOpen).toggleClass(\"ui-corner-all\",!this.isOpen).attr(\"aria-expanded\",this.isOpen),this.menuWrap.toggleClass(\"ui-selectmenu-open\",this.isOpen),this.menu.attr(\"aria-hidden\",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width(\"\").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop(\"disabled\")}},_parseOptions:function(t){var i=[];t.each(function(t,s){var n=e(s),a=n.parent(\"optgroup\");i.push({element:n,index:t,value:n.attr(\"value\"),label:n.text(),optgroup:a.attr(\"label\")||\"\",disabled:a.prop(\"disabled\")||n.prop(\"disabled\")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr(\"for\",this.ids.element)}}),e.widget(\"ui.slider\",e.ui.mouse,{version:\"1.11.1\",widgetEventPrefix:\"slide\",options:{animate:!1,distance:0,max:100,min:0,orientation:\"horizontal\",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass(\"ui-slider ui-slider-\"+this.orientation+\" ui-widget\"+\" ui-widget-content\"+\" ui-corner-all\"),this._refresh(),this._setOption(\"disabled\",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,n=this.element.find(\".ui-slider-handle\").addClass(\"ui-state-default ui-corner-all\"),a=\"<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>\",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),t=n.length;i>t;t++)o.push(a);this.handles=n.add(e(o.join(\"\")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data(\"ui-slider-handle-index\",t)})},_createRange:function(){var t=this.options,i=\"\";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass(\"ui-slider-range-min ui-slider-range-max\").css({left:\"\",bottom:\"\"}):(this.range=e(\"<div></div>\").appendTo(this.element),i=\"ui-slider-range ui-widget-header ui-corner-all\"),this.range.addClass(i+(\"min\"===t.range||\"max\"===t.range?\" ui-slider-range-\"+t.range:\"\"))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass(\"ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all\"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,a,o,r,h,l,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(n>i||n===i&&(t===u._lastChangedValue||u.values(t)===d.min))&&(n=i,a=e(this),o=t)}),r=this._start(t,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass(\"ui-state-active\").focus(),h=a.offset(),l=!e(t.target).parents().addBack().is(\".ui-slider-handle\"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-a.width()/2,top:t.pageY-h.top-a.height()/2-(parseInt(a.css(\"borderTopWidth\"),10)||0)-(parseInt(a.css(\"borderBottomWidth\"),10)||0)+(parseInt(a.css(\"marginTop\"),10)||0)},this.handles.hasClass(\"ui-state-hover\")||this._slide(t,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass(\"ui-state-active\"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation=\"vertical\"===this.options.orientation?\"vertical\":\"horizontal\"},_normValueFromMouse:function(e){var t,i,s,n,a;return\"horizontal\"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),\"vertical\"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger(\"start\",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger(\"slide\",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i))):i!==this.value()&&(a=this._trigger(\"slide\",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger(\"stop\",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger(\"change\",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(t,i){var s,n=0;switch(\"range\"===t&&this.options.range===!0&&(\"min\"===i?(this.options.value=this._values(0),this.options.values=null):\"max\"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(n=this.options.values.length),\"disabled\"===t&&this.element.toggleClass(\"ui-state-disabled\",!!i),this._super(t,i),t){case\"orientation\":this._detectOrientation(),this.element.removeClass(\"ui-slider-horizontal ui-slider-vertical\").addClass(\"ui-slider-\"+this.orientation),this._refreshValue(),this.handles.css(\"horizontal\"===i?\"bottom\":\"left\",\"\");break;case\"value\":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case\"values\":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case\"min\":case\"max\":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case\"range\":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u[\"horizontal\"===h.orientation?\"left\":\"bottom\"]=i+\"%\",e(this).stop(1,1)[l?\"animate\":\"css\"](u,r.animate),h.options.range===!0&&(\"horizontal\"===h.orientation?(0===s&&h.range.stop(1,1)[l?\"animate\":\"css\"]({left:i+\"%\"},r.animate),1===s&&h.range[l?\"animate\":\"css\"]({width:i-t+\"%\"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?\"animate\":\"css\"]({bottom:i+\"%\"},r.animate),1===s&&h.range[l?\"animate\":\"css\"]({height:i-t+\"%\"},{queue:!1,duration:r.animate}))),t=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u[\"horizontal\"===this.orientation?\"left\":\"bottom\"]=i+\"%\",this.handle.stop(1,1)[l?\"animate\":\"css\"](u,r.animate),\"min\"===o&&\"horizontal\"===this.orientation&&this.range.stop(1,1)[l?\"animate\":\"css\"]({width:i+\"%\"},r.animate),\"max\"===o&&\"horizontal\"===this.orientation&&this.range[l?\"animate\":\"css\"]({width:100-i+\"%\"},{queue:!1,duration:r.animate}),\"min\"===o&&\"vertical\"===this.orientation&&this.range.stop(1,1)[l?\"animate\":\"css\"]({height:i+\"%\"},r.animate),\"max\"===o&&\"vertical\"===this.orientation&&this.range[l?\"animate\":\"css\"]({height:100-i+\"%\"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(t){var i,s,n,a,o=e(t.target).data(\"ui-slider-handle-index\");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass(\"ui-state-active\"),i=this._start(t,o),i===!1))return}switch(a=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+a);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-a)}this._slide(t,o,n)},keyup:function(t){var i=e(t.target).data(\"ui-slider-handle-index\");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass(\"ui-state-active\"))}}}),e.widget(\"ui.sortable\",e.ui.mouse,{version:\"1.11.1\",widgetEventPrefix:\"sort\",ready:!1,options:{appendTo:\"parent\",axis:!1,connectWith:!1,containment:!1,cursor:\"auto\",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:\"original\",items:\"> *\",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:\"default\",tolerance:\"intersect\",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css(\"float\"))||/inline|table-cell/.test(e.css(\"display\"))},_create:function(){var e=this.options;this.containerCache={},this.element.addClass(\"ui-sortable\"),this.refresh(),this.floating=this.items.length?\"x\"===e.axis||this._isFloating(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),\"handle\"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(\".ui-sortable-handle\").removeClass(\"ui-sortable-handle\"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass(\"ui-sortable-handle\")})},_destroy:function(){this.element.removeClass(\"ui-sortable ui-sortable-disabled\").find(\".ui-sortable-handle\").removeClass(\"ui-sortable-handle\"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+\"-item\");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||\"static\"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+\"-item\")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+\"-item\")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find(\"*\").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css(\"position\",\"absolute\"),this.cssPosition=this.helper.css(\"position\"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&\"auto\"!==o.cursor&&(a=this.document.find(\"body\"),this.storedCursor=a.css(\"cursor\"),a.css(\"cursor\",o.cursor),this.storedStylesheet=e(\"<style>*{ cursor: \"+o.cursor+\" !important; }</style>\").appendTo(a)),o.opacity&&(this.helper.css(\"opacity\")&&(this._storedOpacity=this.helper.css(\"opacity\")),this.helper.css(\"opacity\",o.opacity)),o.zIndex&&(this.helper.css(\"zIndex\")&&(this._storedZIndex=this.helper.css(\"zIndex\")),this.helper.css(\"zIndex\",o.zIndex)),this.scrollParent[0]!==document&&\"HTML\"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger(\"start\",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger(\"activate\",t,this._uiHash(this));\nreturn e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass(\"ui-sortable-helper\"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo(\"absolute\"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&\"HTML\"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-e(document).scrollTop()<o.scrollSensitivity?r=e(document).scrollTop(e(document).scrollTop()-o.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<o.scrollSensitivity&&(r=e(document).scrollTop(e(document).scrollTop()+o.scrollSpeed)),t.pageX-e(document).scrollLeft()<o.scrollSensitivity?r=e(document).scrollLeft(e(document).scrollLeft()-o.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<o.scrollSensitivity&&(r=e(document).scrollLeft(e(document).scrollLeft()+o.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo(\"absolute\"),this.options.axis&&\"y\"===this.options.axis||(this.helper[0].style.left=this.position.left+\"px\"),this.options.axis&&\"x\"===this.options.axis||(this.helper[0].style.top=this.position.top+\"px\"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?\"next\":\"prev\"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&(\"semi-dynamic\"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?\"down\":\"up\",\"pointer\"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger(\"change\",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger(\"sort\",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&\"x\"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&\"y\"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),\"original\"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger(\"deactivate\",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger(\"out\",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),\"original\"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||\"id\")||\"\").match(t.expression||/(.+)[\\-=_](.+)/);i&&s.push((t.key||i[1]+\"[]\")+\"=\"+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+\"=\"),s.join(\"&\")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||\"id\")||\"\")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=e.left,o=a+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,d=\"x\"===this.options.axis||s+l>r&&h>s+l,c=\"y\"===this.options.axis||t+u>a&&o>t+u,p=d&&c;return\"pointer\"===this.options.tolerance||this.options.forcePointerForContainers||\"pointer\"!==this.options.tolerance&&this.helperProportions[this.floating?\"width\":\"height\"]>e[this.floating?\"width\":\"height\"]?p:t+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t=\"x\"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i=\"y\"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&\"right\"===a||\"down\"===n?2:1:n&&(\"down\"===n?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?\"right\"===n&&i||\"left\"===n&&!i:s&&(\"down\"===s&&t||\"up\"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?\"down\":\"up\")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?\"right\":\"left\")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s]),n=a.length-1;n>=0;n--)o=e.data(a[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),o]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(\":data(\"+this.widgetName+\"-item)\");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(n=e(c[i]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(d.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=d.length-1;i>=0;i--)for(o=d[i][1],r=d[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetName+\"-item\",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),n=e(\"<\"+s+\">\",t.document[0]).addClass(i||t.currentItem[0].className+\" ui-sortable-placeholder\").removeClass(\"ui-sortable-helper\");return\"tr\"===s?t.currentItem.children().each(function(){e(\"<td> </td>\",t.document[0]).attr(\"colspan\",e(this).attr(\"colspan\")||1).appendTo(n)}):\"img\"===s&&n.attr(\"src\",t.currentItem.attr(\"src\")),i||n.css(\"visibility\",\"hidden\"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css(\"paddingTop\")||0,10)-parseInt(t.currentItem.css(\"paddingBottom\")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css(\"paddingLeft\")||0,10)-parseInt(t.currentItem.css(\"paddingRight\")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var i,s,n,a,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger(\"out\",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger(\"over\",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isFloating(this.currentItem),o=u?\"left\":\"top\",r=u?\"width\":\"height\",d=u?\"clientX\":\"clientY\",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[d]-h)&&(n=Math.abs(t[d]-h),a=this.items[s],this.direction=l?\"up\":\"down\"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger(\"change\",t,this._uiHash()),this.containers[p]._trigger(\"change\",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger(\"over\",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):\"clone\"===i.helper?this.currentItem.clone():this.currentItem;return s.parents(\"body\").length||e(\"parent\"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css(\"position\"),top:this.currentItem.css(\"top\"),left:this.currentItem.css(\"left\")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){\"string\"==typeof t&&(t=t.split(\" \")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),\"left\"in t&&(this.offset.click.left=t.left+this.margins.left),\"right\"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),\"top\"in t&&(this.offset.click.top=t.top+this.margins.top),\"bottom\"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return\"absolute\"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&\"html\"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css(\"borderTopWidth\"),10)||0),left:t.left+(parseInt(this.offsetParent.css(\"borderLeftWidth\"),10)||0)}},_getRelativeOffset:function(){if(\"relative\"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css(\"top\"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css(\"left\"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css(\"marginLeft\"),10)||0,top:parseInt(this.currentItem.css(\"marginTop\"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;\"parent\"===n.containment&&(n.containment=this.helper[0].parentNode),(\"document\"===n.containment||\"window\"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e(\"document\"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e(\"document\"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s=\"hidden\"!==e(t).css(\"overflow\"),this.containment=[i.left+(parseInt(e(t).css(\"borderLeftWidth\"),10)||0)+(parseInt(e(t).css(\"paddingLeft\"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css(\"borderTopWidth\"),10)||0)+(parseInt(e(t).css(\"paddingTop\"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css(\"borderLeftWidth\"),10)||0)-(parseInt(e(t).css(\"paddingRight\"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css(\"borderTopWidth\"),10)||0)-(parseInt(e(t).css(\"paddingBottom\"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s=\"absolute\"===t?1:-1,n=\"absolute\"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,o=t.pageY,r=\"absolute\"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return\"relative\"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(\"fixed\"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],\"down\"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)(\"auto\"===this._storedCSS[s]||\"static\"===this._storedCSS[s])&&(this._storedCSS[s]=\"\");this.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger(\"receive\",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(\".ui-sortable-helper\")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger(\"update\",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger(\"remove\",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger(\"receive\",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger(\"update\",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i(\"deactivate\",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i(\"out\",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find(\"body\").css(\"cursor\",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css(\"opacity\",this._storedOpacity),this._storedZIndex&&this.helper.css(\"zIndex\",\"auto\"===this._storedZIndex?\"\":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger(\"beforeStop\",e,this._uiHash()),s=0;n.length>s;s++)n[s].call(this,e);this._trigger(\"stop\",e,this._uiHash())}return this.fromOutside=!1,!1}if(t||this._trigger(\"beforeStop\",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger(\"stop\",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget(\"ui.spinner\",{version:\"1.11.1\",defaultElement:\"<input>\",widgetEventPrefix:\"spin\",options:{culture:null,icons:{down:\"ui-icon-triangle-1-s\",up:\"ui-icon-triangle-1-n\"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption(\"max\",this.options.max),this._setOption(\"min\",this.options.min),this._setOption(\"step\",this.options.step),\"\"!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each([\"min\",\"max\",\"step\"],function(e,s){var n=i.attr(s);void 0!==n&&n.length&&(t[s]=n)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:\"_stop\",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger(\"change\",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},\"mousedown .ui-spinner-button\":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,t)},\"mouseup .ui-spinner-button\":\"_stop\",\"mouseenter .ui-spinner-button\":function(t){return e(t.currentTarget).hasClass(\"ui-state-active\")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass(\"ui-spinner-up\")?1:-1,t),void 0):void 0},\"mouseleave .ui-spinner-button\":\"_stop\"},_draw:function(){var e=this.uiSpinner=this.element.addClass(\"ui-spinner-input\").attr(\"autocomplete\",\"off\").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr(\"role\",\"spinbutton\"),this.buttons=e.find(\".ui-spinner-button\").attr(\"tabIndex\",-1).button().removeClass(\"ui-corner-all\"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()},_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return\"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>\"},_buttonHtml:function(){return\"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon \"+this.options.icons.up+\"'>▲</span>\"+\"</a>\"+\"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>\"+\"<span class='ui-icon \"+this.options.icons.down+\"'>▼</span>\"+\"</a>\"},_start:function(e){return this.spinning||this._trigger(\"start\",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger(\"spin\",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=\"\"+e,i=t.indexOf(\".\");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger(\"stop\",e))},_setOption:function(e,t){if(\"culture\"===e||\"numberFormat\"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}(\"max\"===e||\"min\"===e||\"step\"===e)&&\"string\"==typeof t&&(t=this._parse(t)),\"icons\"===e&&(this.buttons.first().find(\".ui-icon\").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(\".ui-icon\").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),\"disabled\"===e&&(this.widget().toggleClass(\"ui-state-disabled\",!!t),this.element.prop(\"disabled\",!!t),this.buttons.button(t?\"disable\":\"enable\"))},_setOptions:h(function(e){this._super(e)}),_parse:function(e){return\"string\"==typeof e&&\"\"!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),\"\"===e||isNaN(e)?null:e},_format:function(e){return\"\"===e?\"\":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({\"aria-valuemin\":this.options.min,\"aria-valuemax\":this.options.max,\"aria-valuenow\":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;\"\"!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass(\"ui-spinner-input\").prop(\"disabled\",!1).removeAttr(\"autocomplete\").removeAttr(\"role\").removeAttr(\"aria-valuemin\").removeAttr(\"aria-valuemax\").removeAttr(\"aria-valuenow\"),this.uiSpinner.replaceWith(this.element)},stepUp:h(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:h(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:h(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:h(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(h(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget(\"ui.tabs\",{version:\"1.11.1\",delay:300,options:{active:null,collapsible:!1,event:\"click\",heightStyle:\"content\",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,\"\"),s=location.href.replace(e,\"\");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass(\"ui-tabs ui-widget ui-widget-content ui-corner-all\").toggleClass(\"ui-tabs-collapsible\",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(\".ui-state-disabled\"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr(\"aria-controls\")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(\".ui-tabs-active\"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest(\"li\"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||(i.attr(\"aria-selected\",\"false\"),this.tabs.eq(s).attr(\"aria-selected\",\"true\"),this.activating=this._delay(function(){this.option(\"active\",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return\"active\"===e?(this._activate(t),void 0):\"disabled\"===e?(this._setupDisabled(t),void 0):(this._super(e,t),\"collapsible\"===e&&(this.element.toggleClass(\"ui-tabs-collapsible\",t),t||this.options.active!==!1||this._activate(0)),\"event\"===e&&this._setupEvents(t),\"heightStyle\"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g,\"\\\\$&\"):\"\"},refresh:function(){var t=this.options,i=this.tablist.children(\":has(a[href])\");t.disabled=e.map(i.filter(\".ui-state-disabled\"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({\"aria-selected\":\"false\",\"aria-expanded\":\"false\",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({\"aria-hidden\":\"true\"}),this.active.length?(this.active.addClass(\"ui-tabs-active ui-state-active\").attr({\"aria-selected\":\"true\",\"aria-expanded\":\"true\",tabIndex:0}),this._getPanelForTab(this.active).show().attr({\"aria-hidden\":\"false\"})):this.tabs.eq(0).attr(\"tabIndex\",0)},_processTabs:function(){var t=this;this.tablist=this._getList().addClass(\"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\").attr(\"role\",\"tablist\").delegate(\"> li\",\"mousedown\"+this.eventNamespace,function(t){e(this).is(\".ui-state-disabled\")&&t.preventDefault()}).delegate(\".ui-tabs-anchor\",\"focus\"+this.eventNamespace,function(){e(this).closest(\"li\").is(\".ui-state-disabled\")&&this.blur()}),this.tabs=this.tablist.find(\"> li:has(a[href])\").addClass(\"ui-state-default ui-corner-top\").attr({role:\"tab\",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e(\"a\",this)[0]\n}).addClass(\"ui-tabs-anchor\").attr({role:\"presentation\",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr(\"id\"),h=e(s).closest(\"li\"),l=h.attr(\"aria-controls\");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(o=h.attr(\"aria-controls\")||e({}).uniqueId()[0].id,n=\"#\"+o,a=t.element.find(n),a.length||(a=t._createPanel(o),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr(\"aria-live\",\"polite\")),a.length&&(t.panels=t.panels.add(a)),l&&h.data(\"ui-tabs-aria-controls\",l),h.attr({\"aria-controls\":o,\"aria-labelledby\":r}),a.attr(\"aria-labelledby\",r)}),this.panels.addClass(\"ui-tabs-panel ui-widget-content ui-corner-bottom\").attr(\"role\",\"tabpanel\")},_getList:function(){return this.tablist||this.element.find(\"ol,ul\").eq(0)},_createPanel:function(t){return e(\"<div>\").attr(\"id\",t).addClass(\"ui-tabs-panel ui-widget-content ui-corner-bottom\").data(\"ui-tabs-destroy\",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass(\"ui-state-disabled\").attr(\"aria-disabled\",\"true\"):e(i).removeClass(\"ui-state-disabled\").removeAttr(\"aria-disabled\");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(\" \"),function(e,t){i[t]=\"_eventHandler\"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:\"_tabKeydown\"}),this._on(this.panels,{keydown:\"_panelKeydown\"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();\"fill\"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(\":visible\").each(function(){var t=e(this),s=t.css(\"position\");\"absolute\"!==s&&\"fixed\"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css(\"overflow\",\"auto\")):\"auto\"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height(\"\").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest(\"li\"),o=a[0]===s[0],r=o&&i.collapsible,h=r?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:r?e():a,newPanel:h};t.preventDefault(),a.hasClass(\"ui-state-disabled\")||a.hasClass(\"ui-tabs-loading\")||this.running||o&&!i.collapsible||this._trigger(\"beforeActivate\",t,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error(\"jQuery UI Tabs: Mismatching fragment identifier.\"),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger(\"activate\",t,i)}function n(){i.newTab.closest(\"li\").addClass(\"ui-tabs-active ui-state-active\"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest(\"li\").removeClass(\"ui-tabs-active ui-state-active\"),n()}):(i.oldTab.closest(\"li\").removeClass(\"ui-tabs-active ui-state-active\"),r.hide(),n()),r.attr(\"aria-hidden\",\"true\"),i.oldTab.attr({\"aria-selected\":\"false\",\"aria-expanded\":\"false\"}),o.length&&r.length?i.oldTab.attr(\"tabIndex\",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr(\"tabIndex\")}).attr(\"tabIndex\",-1),o.attr(\"aria-hidden\",\"false\"),i.newTab.attr({\"aria-selected\":\"true\",\"aria-expanded\":\"true\",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(\".ui-tabs-anchor\")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return\"string\"==typeof e&&(e=this.anchors.index(this.anchors.filter(\"[href$='\"+e+\"']\"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass(\"ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible\"),this.tablist.removeClass(\"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\").removeAttr(\"role\"),this.anchors.removeClass(\"ui-tabs-anchor\").removeAttr(\"role\").removeAttr(\"tabIndex\").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,\"ui-tabs-destroy\")?e(this).remove():e(this).removeClass(\"ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel\").removeAttr(\"tabIndex\").removeAttr(\"aria-live\").removeAttr(\"aria-busy\").removeAttr(\"aria-selected\").removeAttr(\"aria-labelledby\").removeAttr(\"aria-hidden\").removeAttr(\"aria-expanded\").removeAttr(\"role\")}),this.tabs.each(function(){var t=e(this),i=t.data(\"ui-tabs-aria-controls\");i?t.attr(\"aria-controls\",i).removeData(\"ui-tabs-aria-controls\"):t.removeAttr(\"aria-controls\")}),this.panels.show(),\"content\"!==this.options.heightStyle&&this.panels.css(\"height\",\"\")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(\".ui-tabs-anchor\"),o=this._getPanelForTab(n),r={tab:n,panel:o};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,r)),this.xhr&&\"canceled\"!==this.xhr.statusText&&(n.addClass(\"ui-tabs-loading\"),o.attr(\"aria-busy\",\"true\"),this.xhr.success(function(e){setTimeout(function(){o.html(e),s._trigger(\"load\",i,r)},1)}).complete(function(e,t){setTimeout(function(){\"abort\"===t&&s.panels.stop(!1,!0),n.removeClass(\"ui-tabs-loading\"),o.removeAttr(\"aria-busy\"),e===s.xhr&&delete s.xhr},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr(\"href\"),beforeSend:function(t,a){return n._trigger(\"beforeLoad\",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr(\"aria-controls\");return this.element.find(this._sanitizeSelector(\"#\"+i))}}),e.widget(\"ui.tooltip\",{version:\"1.11.1\",options:{content:function(){var t=e(this).attr(\"title\")||\"\";return e(\"<a>\").text(t).html()},hide:!0,items:\"[title]:not([disabled])\",position:{my:\"left top+15\",at:\"left bottom\",collision:\"flipfit flip\"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var s=(t.attr(\"aria-describedby\")||\"\").split(/\\s+/);s.push(i),t.data(\"ui-tooltip-id\",i).attr(\"aria-describedby\",e.trim(s.join(\" \")))},_removeDescribedBy:function(t){var i=t.data(\"ui-tooltip-id\"),s=(t.attr(\"aria-describedby\")||\"\").split(/\\s+/),n=e.inArray(i,s);-1!==n&&s.splice(n,1),t.removeData(\"ui-tooltip-id\"),s=e.trim(s.join(\" \")),s?t.attr(\"aria-describedby\",s):t.removeAttr(\"aria-describedby\")},_create:function(){this._on({mouseover:\"open\",focusin:\"open\"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e(\"<div>\").attr({role:\"log\",\"aria-live\":\"assertive\",\"aria-relevant\":\"additions\"}).addClass(\"ui-helper-hidden-accessible\").appendTo(this.document[0].body)},_setOption:function(t,i){var s=this;return\"disabled\"===t?(this[i?\"_disable\":\"_enable\"](),this.options[t]=i,void 0):(this._super(t,i),\"content\"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event(\"blur\");n.target=n.currentTarget=s[0],t.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is(\"[title]\")&&t.data(\"ui-tooltip-title\",t.attr(\"title\")).removeAttr(\"title\")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data(\"ui-tooltip-title\")&&t.attr(\"title\",t.data(\"ui-tooltip-title\"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data(\"ui-tooltip-id\")&&(s.attr(\"title\")&&s.data(\"ui-tooltip-title\",s.attr(\"title\")),s.data(\"ui-tooltip-open\",!0),t&&\"mouseover\"===t.type&&s.parents().each(function(){var t,s=e(this);s.data(\"ui-tooltip-open\")&&(t=e.Event(\"blur\"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr(\"title\")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr(\"title\")},s.attr(\"title\",\"\"))}),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,n=this,a=t?t.type:null;return\"string\"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){e.data(\"ui-tooltip-open\")&&n._delay(function(){t&&(t.type=a),this._open(t,e,i)})}),i&&this._open(t,e,i),void 0)},_open:function(t,i,s){function n(e){l.of=e,a.is(\":hidden\")||a.position(l)}var a,o,r,h,l=e.extend({},this.options.position);if(s){if(a=this._find(i),a.length)return a.find(\".ui-tooltip-content\").html(s),void 0;i.is(\"[title]\")&&(t&&\"mouseover\"===t.type?i.attr(\"title\",\"\"):i.removeAttr(\"title\")),a=this._tooltip(i),this._addDescribedBy(i,a.attr(\"id\")),a.find(\".ui-tooltip-content\").html(s),this.liveRegion.children().hide(),s.clone?(h=s.clone(),h.removeAttr(\"id\").find(\"[id]\").removeAttr(\"id\")):h=s,e(\"<div>\").html(h).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:n}),n(t)):a.position(e.extend({of:i},this.options.position)),this.hiding=!1,this.closing=!1,a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(\":visible\")&&(n(l.of),clearInterval(r))},e.fx.interval)),this._trigger(\"open\",t,{tooltip:a}),o={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var s=e.Event(t);s.currentTarget=i[0],this.close(s,!0)}}},i[0]!==this.element[0]&&(o.remove=function(){this._removeTooltip(a)}),t&&\"mouseover\"!==t.type||(o.mouseleave=\"close\"),t&&\"focusin\"!==t.type||(o.focusout=\"close\"),this._on(!0,i,o)}},close:function(t){var i=this,s=e(t?t.currentTarget:this.element),n=this._find(s);this.closing||(clearInterval(this.delayedShow),s.data(\"ui-tooltip-title\")&&!s.attr(\"title\")&&s.attr(\"title\",s.data(\"ui-tooltip-title\")),this._removeDescribedBy(s),this.hiding=!0,n.stop(!0),this._hide(n,this.options.hide,function(){i._removeTooltip(e(this)),this.hiding=!1,this.closing=!1}),s.removeData(\"ui-tooltip-open\"),this._off(s,\"mouseleave focusout keyup\"),s[0]!==this.element[0]&&this._off(s,\"remove\"),this._off(this.document,\"mousemove\"),t&&\"mouseleave\"===t.type&&e.each(this.parents,function(t,s){e(s.element).attr(\"title\",s.title),delete i.parents[t]}),this.closing=!0,this._trigger(\"close\",t,{tooltip:n}),this.hiding||(this.closing=!1))},_tooltip:function(t){var i=e(\"<div>\").attr(\"role\",\"tooltip\").addClass(\"ui-tooltip ui-widget ui-corner-all ui-widget-content \"+(this.options.tooltipClass||\"\")),s=i.uniqueId().attr(\"id\");return e(\"<div>\").addClass(\"ui-tooltip-content\").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]=t,i},_find:function(t){var i=t.data(\"ui-tooltip-id\");return i?e(\"#\"+i):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr(\"id\")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event(\"blur\");n.target=n.currentTarget=s[0],t.close(n,!0),e(\"#\"+i).remove(),s.data(\"ui-tooltip-title\")&&(s.attr(\"title\")||s.attr(\"title\",s.data(\"ui-tooltip-title\")),s.removeData(\"ui-tooltip-title\"))}),this.liveRegion.remove()}})});","/*! AdminLTE app.js\n* ================\n* Main JS application file for AdminLTE v2. This file\n* should be included in all pages. It controls some layout\n* options and implements exclusive AdminLTE plugins.\n*\n* @author Colorlib\n* @support <https://github.com/ColorlibHQ/AdminLTE/issues>\n* @version v2.4.18\n* @repository git://github.com/ColorlibHQ/AdminLTE.git\n* @license MIT <http://opensource.org/licenses/MIT>\n*/\nif(\"undefined\"==typeof jQuery)throw new Error(\"AdminLTE requires jQuery\");!function(i){\"use strict\";function s(t,e){if(this.element=t,this.options=e,this.$overlay=i(e.overlayTemplate),\"\"===e.source)throw new Error(\"Source url was not defined. Please specify a url in your BoxRefresh source option.\");this._setUpListeners(),this.load()}var r=\"lte.boxrefresh\",a={source:\"\",params:{},trigger:\".refresh-btn\",content:\".box-body\",loadInContent:!0,responseType:\"\",overlayTemplate:'<div class=\"overlay\"><div class=\"fa fa-refresh fa-spin\"></div></div>',onLoadStart:function(){},onLoadDone:function(t){return t}},t='[data-widget=\"box-refresh\"]';function e(n){return this.each(function(){var t=i(this),e=t.data(r);if(!e){var o=i.extend({},a,t.data(),\"object\"==typeof n&&n);t.data(r,e=new s(t,o))}if(\"string\"==typeof e){if(void 0===e[n])throw new Error(\"No method named \"+n);e[n]()}})}s.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(i(this)),i.get(this.options.source,this.options.params,function(t){this.options.loadInContent&&i(this.element).find(this.options.content).html(t),this.options.onLoadDone.call(i(this),t),this._removeOverlay()}.bind(this),\"\"!==this.options.responseType&&this.options.responseType)},s.prototype._setUpListeners=function(){i(this.element).on(\"click\",this.options.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},s.prototype._addOverlay=function(){i(this.element).append(this.$overlay)},s.prototype._removeOverlay=function(){i(this.$overlay).remove()};var o=i.fn.boxRefresh;i.fn.boxRefresh=e,i.fn.boxRefresh.Constructor=s,i.fn.boxRefresh.noConflict=function(){return i.fn.boxRefresh=o,this},i(window).on(\"load\",function(){i(t).each(function(){e.call(i(this))})})}(jQuery),function(i){\"use strict\";function s(t,e){this.element=t,this.options=e,this._setUpListeners()}var r=\"lte.boxwidget\",a={animationSpeed:500,collapseTrigger:'[data-widget=\"collapse\"]',removeTrigger:'[data-widget=\"remove\"]',collapseIcon:\"fa-minus\",expandIcon:\"fa-plus\",removeIcon:\"fa-times\"},t=\".box\",e=\".collapsed-box\",d=\".box-header\",l=\".box-body\",c=\".box-footer\",h=\".box-tools\",f=\"collapsed-box\",p=\"collapsing.boxwidget\",u=\"collapsed.boxwidget\",g=\"expanding.boxwidget\",v=\"expanded.boxwidget\",o=\"removing.boxwidget\",n=\"removed.boxwidget\";function b(n){return this.each(function(){var t=i(this),e=t.data(r);if(!e){var o=i.extend({},a,t.data(),\"object\"==typeof n&&n);t.data(r,e=new s(t,o))}if(\"string\"==typeof n){if(void 0===e[n])throw new Error(\"No method named \"+n);e[n]()}})}s.prototype.toggle=function(){!i(this.element).is(e)?this.collapse():this.expand()},s.prototype.expand=function(){var t=i.Event(v),e=i.Event(g),o=this.options.collapseIcon,n=this.options.expandIcon;i(this.element).removeClass(f),i(this.element).children(d+\", \"+l+\", \"+c).children(h).find(\".\"+n).removeClass(n).addClass(o),i(this.element).children(l+\", \"+c).slideDown(this.options.animationSpeed,function(){i(this.element).trigger(t)}.bind(this)).trigger(e)},s.prototype.collapse=function(){var t=i.Event(u),e=i.Event(p),o=this.options.collapseIcon,n=this.options.expandIcon;i(this.element).children(d+\", \"+l+\", \"+c).children(h).find(\".\"+o).removeClass(o).addClass(n),i(this.element).children(l+\", \"+c).slideUp(this.options.animationSpeed,function(){i(this.element).addClass(f),i(this.element).trigger(t)}.bind(this)).trigger(e)},s.prototype.remove=function(){var t=i.Event(n),e=i.Event(o);i(this.element).slideUp(this.options.animationSpeed,function(){i(this.element).trigger(t),i(this.element).remove()}.bind(this)).trigger(e)},s.prototype._setUpListeners=function(){var e=this;i(this.element).on(\"click\",this.options.collapseTrigger,function(t){return t&&t.preventDefault(),e.toggle(i(this)),!1}),i(this.element).on(\"click\",this.options.removeTrigger,function(t){return t&&t.preventDefault(),e.remove(i(this)),!1})};var m=i.fn.boxWidget;i.fn.boxWidget=b,i.fn.boxWidget.Constructor=s,i.fn.boxWidget.noConflict=function(){return i.fn.boxWidget=m,this},i(window).on(\"load\",function(){i(t).each(function(){b.call(i(this))})})}(jQuery),function(i){\"use strict\";function s(t,e){this.element=t,this.options=e,this.hasBindedResize=!1,this.init()}var r=\"lte.controlsidebar\",a={controlsidebarSlide:!0},e=\".control-sidebar\",t='[data-toggle=\"control-sidebar\"]',o=\".control-sidebar-open\",n=\".control-sidebar-bg\",d=\".wrapper\",l=\".layout-boxed\",c=\"control-sidebar-open\",h=\"control-sidebar-hold-transition\",f=\"collapsed.controlsidebar\",p=\"expanded.controlsidebar\";function u(n){return this.each(function(){var t=i(this),e=t.data(r);if(!e){var o=i.extend({},a,t.data(),\"object\"==typeof n&&n);t.data(r,e=new s(t,o))}\"string\"==typeof n&&e.toggle()})}s.prototype.init=function(){i(this.element).is(t)||i(this).on(\"click\",this.toggle),this.fix(),i(window).resize(function(){this.fix()}.bind(this))},s.prototype.toggle=function(t){t&&t.preventDefault(),this.fix(),i(e).is(o)||i(\"body\").is(o)?this.collapse():this.expand()},s.prototype.expand=function(){i(e).show(),this.options.controlsidebarSlide?i(e).addClass(c):i(\"body\").addClass(h).addClass(c).delay(50).queue(function(){i(\"body\").removeClass(h),i(this).dequeue()}),i(this.element).trigger(i.Event(p))},s.prototype.collapse=function(){this.options.controlsidebarSlide?i(e).removeClass(c):i(\"body\").addClass(h).removeClass(c).delay(50).queue(function(){i(\"body\").removeClass(h),i(this).dequeue()}),i(e).fadeOut(),i(this.element).trigger(i.Event(f))},s.prototype.fix=function(){i(\"body\").is(l)&&this._fixForBoxed(i(n))},s.prototype._fixForBoxed=function(t){t.css({position:\"absolute\",height:i(d).height()})};var g=i.fn.controlSidebar;i.fn.controlSidebar=u,i.fn.controlSidebar.Constructor=s,i.fn.controlSidebar.noConflict=function(){return i.fn.controlSidebar=g,this},i(document).on(\"click\",t,function(t){t&&t.preventDefault(),u.call(i(this),\"toggle\")})}(jQuery),function(n){\"use strict\";function i(t){this.element=t}var s=\"lte.directchat\",t='[data-widget=\"chat-pane-toggle\"]',e=\".direct-chat\",o=\"direct-chat-contacts-open\";function r(o){return this.each(function(){var t=n(this),e=t.data(s);e||t.data(s,e=new i(t)),\"string\"==typeof o&&e.toggle(t)})}i.prototype.toggle=function(t){t.parents(e).first().toggleClass(o)};var a=n.fn.directChat;n.fn.directChat=r,n.fn.directChat.Constructor=i,n.fn.directChat.noConflict=function(){return n.fn.directChat=a,this},n(document).on(\"click\",t,function(t){t&&t.preventDefault(),r.call(n(this),\"toggle\")})}(jQuery),function(i){\"use strict\";function s(t){this.options=t,this.init()}var r=\"lte.pushmenu\",a={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},t=\".sidebar-collapse\",e=\".main-sidebar\",o=\".content-wrapper\",n=\".sidebar-form .form-control\",d='[data-toggle=\"push-menu\"]',l=\".sidebar-mini\",c=\".sidebar-expanded-on-hover\",h=\".fixed\",f=\"sidebar-collapse\",p=\"sidebar-open\",u=\"sidebar-expanded-on-hover\",g=\"sidebar-mini-expand-feature\",v=\"expanded.pushMenu\",b=\"collapsed.pushMenu\";function m(n){return this.each(function(){var t=i(this),e=t.data(r);if(!e){var o=i.extend({},a,t.data(),\"object\"==typeof n&&n);t.data(r,e=new s(o))}\"toggle\"===n&&e.toggle()})}s.prototype.init=function(){(this.options.expandOnHover||i(\"body\").is(l+h))&&(this.expandOnHover(),i(\"body\").addClass(g)),i(o).click(function(){i(window).width()<=this.options.collapseScreenSize&&i(\"body\").hasClass(p)&&this.close()}.bind(this)),i(n).click(function(t){t.stopPropagation()})},s.prototype.toggle=function(){var t=i(window).width(),e=!i(\"body\").hasClass(f);t<=this.options.collapseScreenSize&&(e=i(\"body\").hasClass(p)),e?this.close():this.open()},s.prototype.open=function(){i(window).width()>this.options.collapseScreenSize?i(\"body\").removeClass(f).trigger(i.Event(v)):i(\"body\").addClass(p).trigger(i.Event(v))},s.prototype.close=function(){i(window).width()>this.options.collapseScreenSize?i(\"body\").addClass(f).trigger(i.Event(b)):i(\"body\").removeClass(p+\" \"+f).trigger(i.Event(b))},s.prototype.expandOnHover=function(){i(e).hover(function(){i(\"body\").is(l+t)&&i(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){i(\"body\").is(c)&&this.collapse()}.bind(this))},s.prototype.expand=function(){setTimeout(function(){i(\"body\").removeClass(f).addClass(u)},this.options.expandTransitionDelay)},s.prototype.collapse=function(){setTimeout(function(){i(\"body\").removeClass(u).addClass(f)},this.options.expandTransitionDelay)};var y=i.fn.pushMenu;i.fn.pushMenu=m,i.fn.pushMenu.Constructor=s,i.fn.pushMenu.noConflict=function(){return i.fn.pushMenu=y,this},i(document).on(\"click\",d,function(t){t.preventDefault(),m.call(i(this),\"toggle\")}),i(window).on(\"load\",function(){m.call(i(d))})}(jQuery),function(i){\"use strict\";function s(t,e){this.element=t,this.options=e,this._setUpListeners()}var r=\"lte.todolist\",a={onCheck:function(t){return t},onUnCheck:function(t){return t}},e={data:'[data-widget=\"todo-list\"]'},o=\"done\";function t(n){return this.each(function(){var t=i(this),e=t.data(r);if(!e){var o=i.extend({},a,t.data(),\"object\"==typeof n&&n);t.data(r,e=new s(t,o))}if(\"string\"==typeof e){if(void 0===e[n])throw new Error(\"No method named \"+n);e[n]()}})}s.prototype.toggle=function(t){t.parents(e.li).first().toggleClass(o),t.prop(\"checked\")?this.check(t):this.unCheck(t)},s.prototype.check=function(t){this.options.onCheck.call(t)},s.prototype.unCheck=function(t){this.options.onUnCheck.call(t)},s.prototype._setUpListeners=function(){var t=this;i(this.element).on(\"change ifChanged\",\"input:checkbox\",function(){t.toggle(i(this))})};var n=i.fn.todoList;i.fn.todoList=t,i.fn.todoList.Constructor=s,i.fn.todoList.noConflict=function(){return i.fn.todoList=n,this},i(window).on(\"load\",function(){i(e.data).each(function(){t.call(i(this))})})}(jQuery),function(s){\"use strict\";function n(t,e){this.element=t,this.options=e,s(this.element).addClass(h),s(a+o,this.element).addClass(c),this._setUpListeners()}var i=\"lte.tree\",r={animationSpeed:500,accordion:!0,followLink:!1,trigger:\".treeview a\"},a=\".treeview\",d=\".treeview-menu\",l=\".menu-open, .active\",t='[data-widget=\"tree\"]',o=\".active\",c=\"menu-open\",h=\"tree\",f=\"collapsed.tree\",p=\"expanded.tree\";function e(o){return this.each(function(){var t=s(this);if(!t.data(i)){var e=s.extend({},r,t.data(),\"object\"==typeof o&&o);t.data(i,new n(t,e))}})}n.prototype.toggle=function(t,e){var o=t.next(d),n=t.parent(),i=n.hasClass(c);n.is(a)&&(this.options.followLink&&\"#\"!==t.attr(\"href\")||e.preventDefault(),i?this.collapse(o,n):this.expand(o,n))},n.prototype.expand=function(t,e){var o=s.Event(p);if(this.options.accordion){var n=e.siblings(l),i=n.children(d);this.collapse(i,n)}e.addClass(c),t.stop().slideDown(this.options.animationSpeed,function(){s(this.element).trigger(o),e.height(\"auto\")}.bind(this))},n.prototype.collapse=function(t,e){var o=s.Event(f);e.removeClass(c),t.stop().slideUp(this.options.animationSpeed,function(){s(this.element).trigger(o),e.find(a).removeClass(c).find(d).hide()}.bind(this))},n.prototype._setUpListeners=function(){var e=this;s(this.element).on(\"click\",this.options.trigger,function(t){e.toggle(s(this),t)})};var u=s.fn.tree;s.fn.tree=e,s.fn.tree.Constructor=n,s.fn.tree.noConflict=function(){return s.fn.tree=u,this},s(window).on(\"load\",function(){s(t).each(function(){e.call(s(this))})})}(jQuery),function(a){\"use strict\";function i(t){this.options=t,this.bindedResize=!1,this.activate()}var s=\"lte.layout\",r={slimscroll:!0,resetHeight:!0},d=\".wrapper\",l=\".content-wrapper\",c=\".layout-boxed\",h=\".main-footer\",f=\".main-header\",t=\".main-sidebar\",e=\"slimScrollDiv\",p=\".sidebar\",u=\".control-sidebar\",o=\".sidebar-menu\",n=\".main-header .logo\",g=\"fixed\",v=\"hold-transition\";function b(n){return this.each(function(){var t=a(this),e=t.data(s);if(!e){var o=a.extend({},r,t.data(),\"object\"==typeof n&&n);t.data(s,e=new i(o))}if(\"string\"==typeof n){if(void 0===e[n])throw new Error(\"No method named \"+n);e[n]()}})}i.prototype.activate=function(){this.fix(),this.fixSidebar(),a(\"body\").removeClass(v),this.options.resetHeight&&a(\"body, html, \"+d).css({height:\"auto\",\"min-height\":\"100%\"}),this.bindedResize||(a(window).resize(function(){this.fix(),this.fixSidebar(),a(n+\", \"+p).one(\"webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend\",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),a(o).on(\"expanded.tree\",function(){this.fix(),this.fixSidebar()}.bind(this)),a(o).on(\"collapsed.tree\",function(){this.fix(),this.fixSidebar()}.bind(this))},i.prototype.fix=function(){a(c+\" > \"+d).css(\"overflow\",\"hidden\");var t=a(h).outerHeight()||0,e=a(f).outerHeight()||0,o=e+t,n=a(window).height(),i=a(p).outerHeight()||0;if(a(\"body\").hasClass(g))a(l).css(\"min-height\",n-t);else{var s;s=i+e<=n?(a(l).css(\"min-height\",n-o),n-o):(a(l).css(\"min-height\",i),i);var r=a(u);void 0!==r&&r.height()>s&&a(l).css(\"min-height\",r.height())}},i.prototype.fixSidebar=function(){a(\"body\").hasClass(g)?this.options.slimscroll&&void 0!==a.fn.slimScroll&&0===a(t).find(e).length&&a(p).slimScroll({height:a(window).height()-a(f).height()+\"px\"}):void 0!==a.fn.slimScroll&&a(p).slimScroll({destroy:!0}).height(\"auto\")};var m=a.fn.layout;a.fn.layout=b,a.fn.layout.Constuctor=i,a.fn.layout.noConflict=function(){return a.fn.layout=m,this},a(window).on(\"load\",function(){b.call(a(\"body\"))})}(jQuery);","/*! selectize.js - v0.12.6 | https://github.com/selectize/selectize.js | Apache License (v2) */\n\n!function(a,b){\"function\"==typeof define&&define.amd?define(\"sifter\",b):\"object\"==typeof exports?module.exports=b():a.Sifter=b()}(this,function(){var a=function(a,b){this.items=a,this.settings=b||{diacritics:!0}};a.prototype.tokenize=function(a){if(!(a=e(String(a||\"\").toLowerCase()))||!a.length)return[];var b,c,d,g,i=[],j=a.split(/ +/);for(b=0,c=j.length;b<c;b++){if(d=f(j[b]),this.settings.diacritics)for(g in h)h.hasOwnProperty(g)&&(d=d.replace(new RegExp(g,\"g\"),h[g]));i.push({string:j[b],regex:new RegExp(d,\"i\")})}return i},a.prototype.iterator=function(a,b){var c;c=g(a)?Array.prototype.forEach||function(a){for(var b=0,c=this.length;b<c;b++)a(this[b],b,this)}:function(a){for(var b in this)this.hasOwnProperty(b)&&a(this[b],b,this)},c.apply(a,[b])},a.prototype.getScoreFunction=function(a,b){var c,e,f,g,h;c=this,a=c.prepareSearch(a,b),f=a.tokens,e=a.options.fields,g=f.length,h=a.options.nesting;var i=function(a,b){var c,d;return a?(a=String(a||\"\"),-1===(d=a.search(b.regex))?0:(c=b.string.length/a.length,0===d&&(c+=.5),c)):0},j=function(){var a=e.length;return a?1===a?function(a,b){return i(d(b,e[0],h),a)}:function(b,c){for(var f=0,g=0;f<a;f++)g+=i(d(c,e[f],h),b);return g/a}:function(){return 0}}();return g?1===g?function(a){return j(f[0],a)}:\"and\"===a.options.conjunction?function(a){for(var b,c=0,d=0;c<g;c++){if((b=j(f[c],a))<=0)return 0;d+=b}return d/g}:function(a){for(var b=0,c=0;b<g;b++)c+=j(f[b],a);return c/g}:function(){return 0}},a.prototype.getSortFunction=function(a,c){var e,f,g,h,i,j,k,l,m,n,o;if(g=this,a=g.prepareSearch(a,c),o=!a.query&&c.sort_empty||c.sort,m=function(a,b){return\"$score\"===a?b.score:d(g.items[b.id],a,c.nesting)},i=[],o)for(e=0,f=o.length;e<f;e++)(a.query||\"$score\"!==o[e].field)&&i.push(o[e]);if(a.query){for(n=!0,e=0,f=i.length;e<f;e++)if(\"$score\"===i[e].field){n=!1;break}n&&i.unshift({field:\"$score\",direction:\"desc\"})}else for(e=0,f=i.length;e<f;e++)if(\"$score\"===i[e].field){i.splice(e,1);break}for(l=[],e=0,f=i.length;e<f;e++)l.push(\"desc\"===i[e].direction?-1:1);return j=i.length,j?1===j?(h=i[0].field,k=l[0],function(a,c){return k*b(m(h,a),m(h,c))}):function(a,c){var d,e,f;for(d=0;d<j;d++)if(f=i[d].field,e=l[d]*b(m(f,a),m(f,c)))return e;return 0}:null},a.prototype.prepareSearch=function(a,b){if(\"object\"==typeof a)return a;b=c({},b);var d=b.fields,e=b.sort,f=b.sort_empty;return d&&!g(d)&&(b.fields=[d]),e&&!g(e)&&(b.sort=[e]),f&&!g(f)&&(b.sort_empty=[f]),{options:b,query:String(a||\"\").toLowerCase(),tokens:this.tokenize(a),total:0,items:[]}},a.prototype.search=function(a,b){var c,d,e,f,g=this;return d=this.prepareSearch(a,b),b=d.options,a=d.query,f=b.score||g.getScoreFunction(d),a.length?g.iterator(g.items,function(a,e){c=f(a),(!1===b.filter||c>0)&&d.items.push({score:c,id:e})}):g.iterator(g.items,function(a,b){d.items.push({score:1,id:b})}),e=g.getSortFunction(d,b),e&&d.items.sort(e),d.total=d.items.length,\"number\"==typeof b.limit&&(d.items=d.items.slice(0,b.limit)),d};var b=function(a,b){return\"number\"==typeof a&&\"number\"==typeof b?a>b?1:a<b?-1:0:(a=i(String(a||\"\")),b=i(String(b||\"\")),a>b?1:b>a?-1:0)},c=function(a,b){var c,d,e,f;for(c=1,d=arguments.length;c<d;c++)if(f=arguments[c])for(e in f)f.hasOwnProperty(e)&&(a[e]=f[e]);return a},d=function(a,b,c){if(a&&b){if(!c)return a[b];for(var d=b.split(\".\");d.length&&(a=a[d.shift()]););return a}},e=function(a){return(a+\"\").replace(/^\\s+|\\s+$|/g,\"\")},f=function(a){return(a+\"\").replace(/([.?*+^$[\\]\\\\(){}|-])/g,\"\\\\$1\")},g=Array.isArray||\"undefined\"!=typeof $&&$.isArray||function(a){return\"[object Array]\"===Object.prototype.toString.call(a)},h={a:\"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]\",b:\"[b␢βΒB฿𐌁ᛒ]\",c:\"[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]\",d:\"[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]\",e:\"[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]\",f:\"[fƑƒḞḟ]\",g:\"[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]\",h:\"[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]\",i:\"[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]\",j:\"[jȷĴĵɈɉʝɟʲ]\",k:\"[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]\",l:\"[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]\",n:\"[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]\",o:\"[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]\",p:\"[pṔṕṖṗⱣᵽƤƥᵱ]\",q:\"[qꝖꝗʠɊɋꝘꝙq̃]\",r:\"[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]\",s:\"[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]\",t:\"[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]\",u:\"[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]\",v:\"[vṼṽṾṿƲʋꝞꝟⱱʋ]\",w:\"[wẂẃẀẁŴŵẄẅẆẇẈẉ]\",x:\"[xẌẍẊẋχ]\",y:\"[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]\",z:\"[zŹźẐẑŽžŻżẒẓẔẕƵƶ]\"},i=function(){var a,b,c,d,e=\"\",f={};for(c in h)if(h.hasOwnProperty(c))for(d=h[c].substring(2,h[c].length-1),e+=d,a=0,b=d.length;a<b;a++)f[d.charAt(a)]=c;var g=new RegExp(\"[\"+e+\"]\",\"g\");return function(a){return a.replace(g,function(a){return f[a]}).toLowerCase()}}();return a}),function(a,b){\"function\"==typeof define&&define.amd?define(\"microplugin\",b):\"object\"==typeof exports?module.exports=b():a.MicroPlugin=b()}(this,function(){var a={};a.mixin=function(a){a.plugins={},a.prototype.initializePlugins=function(a){var c,d,e,f=this,g=[];if(f.plugins={names:[],settings:{},requested:{},loaded:{}},b.isArray(a))for(c=0,d=a.length;c<d;c++)\"string\"==typeof a[c]?g.push(a[c]):(f.plugins.settings[a[c].name]=a[c].options,g.push(a[c].name));else if(a)for(e in a)a.hasOwnProperty(e)&&(f.plugins.settings[e]=a[e],g.push(e));for(;g.length;)f.require(g.shift())},a.prototype.loadPlugin=function(b){var c=this,d=c.plugins,e=a.plugins[b];if(!a.plugins.hasOwnProperty(b))throw new Error('Unable to find \"'+b+'\" plugin');d.requested[b]=!0,d.loaded[b]=e.fn.apply(c,[c.plugins.settings[b]||{}]),d.names.push(b)},a.prototype.require=function(a){var b=this,c=b.plugins;if(!b.plugins.loaded.hasOwnProperty(a)){if(c.requested[a])throw new Error('Plugin has circular dependency (\"'+a+'\")');b.loadPlugin(a)}return c.loaded[a]},a.define=function(b,c){a.plugins[b]={name:b,fn:c}}};var b={isArray:Array.isArray||function(a){return\"[object Array]\"===Object.prototype.toString.call(a)}};return a}),function(a,b){\"function\"==typeof define&&define.amd?define(\"selectize\",[\"jquery\",\"sifter\",\"microplugin\"],b):\"object\"==typeof exports?module.exports=b(require(\"jquery\"),require(\"sifter\"),require(\"microplugin\")):a.Selectize=b(a.jQuery,a.Sifter,a.MicroPlugin)}(this,function(a,b,c){\"use strict\";var d=function(a,b){if(\"string\"!=typeof b||b.length){var c=\"string\"==typeof b?new RegExp(b,\"i\"):b,d=function(a){var b=0;if(3===a.nodeType){var e=a.data.search(c);if(e>=0&&a.data.length>0){var f=a.data.match(c),g=document.createElement(\"span\");g.className=\"highlight\";var h=a.splitText(e),i=(h.splitText(f[0].length),h.cloneNode(!0));g.appendChild(i),h.parentNode.replaceChild(g,h),b=1}}else if(1===a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName)&&(\"highlight\"!==a.className||\"SPAN\"!==a.tagName))for(var j=0;j<a.childNodes.length;++j)j+=d(a.childNodes[j]);return b};return a.each(function(){d(this)})}};a.fn.removeHighlight=function(){return this.find(\"span.highlight\").each(function(){this.parentNode.firstChild.nodeName;var a=this.parentNode;a.replaceChild(this.firstChild,this),a.normalize()}).end()};var e=function(){};e.prototype={on:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},off:function(a,b){var c=arguments.length;return 0===c?delete this._events:1===c?delete this._events[a]:(this._events=this._events||{},void(a in this._events!=!1&&this._events[a].splice(this._events[a].indexOf(b),1)))},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;b<this._events[a].length;b++)this._events[a][b].apply(this,Array.prototype.slice.call(arguments,1))}},e.mixin=function(a){for(var b=[\"on\",\"off\",\"trigger\"],c=0;c<b.length;c++)a.prototype[b[c]]=e.prototype[b[c]]};var f=/Mac/.test(navigator.userAgent),g=f?91:17,h=f?18:17,i=!/android/i.test(window.navigator.userAgent)&&!!document.createElement(\"input\").validity,j=function(a){return void 0!==a},k=function(a){return void 0===a||null===a?null:\"boolean\"==typeof a?a?\"1\":\"0\":a+\"\"},l=function(a){return(a+\"\").replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\")},m={};m.before=function(a,b,c){var d=a[b];a[b]=function(){return c.apply(a,arguments),d.apply(a,arguments)}},m.after=function(a,b,c){var d=a[b];a[b]=function(){var b=d.apply(a,arguments);return c.apply(a,arguments),b}};var n=function(a){var b=!1;return function(){b||(b=!0,a.apply(this,arguments))}},o=function(a,b){var c;return function(){var d=this,e=arguments;window.clearTimeout(c),c=window.setTimeout(function(){a.apply(d,e)},b)}},p=function(a,b,c){var d,e=a.trigger,f={};a.trigger=function(){var c=arguments[0];if(-1===b.indexOf(c))return e.apply(a,arguments);f[c]=arguments},c.apply(a,[]),a.trigger=e;for(d in f)f.hasOwnProperty(d)&&e.apply(a,f[d])},q=function(a,b,c,d){a.on(b,c,function(b){for(var c=b.target;c&&c.parentNode!==a[0];)c=c.parentNode;return b.currentTarget=c,d.apply(this,[b])})},r=function(a){var b={};if(\"selectionStart\"in a)b.start=a.selectionStart,b.length=a.selectionEnd-b.start;else if(document.selection){a.focus();var c=document.selection.createRange(),d=document.selection.createRange().text.length;c.moveStart(\"character\",-a.value.length),b.start=c.text.length-d,b.length=d}return b},s=function(a,b,c){var d,e,f={};if(c)for(d=0,e=c.length;d<e;d++)f[c[d]]=a.css(c[d]);else f=a.css();b.css(f)},t=function(b,c){return b?(w.$testInput||(w.$testInput=a(\"<span />\").css({position:\"absolute\",top:-99999,left:-99999,width:\"auto\",padding:0,whiteSpace:\"pre\"}).appendTo(\"body\")),w.$testInput.text(b),s(c,w.$testInput,[\"letterSpacing\",\"fontSize\",\"fontFamily\",\"fontWeight\",\"textTransform\"]),w.$testInput.width()):0},u=function(a){var b=null,c=function(c,d){var e,f,g,h,i,j,k,l;c=c||window.event||{},d=d||{},c.metaKey||c.altKey||(d.force||!1!==a.data(\"grow\"))&&(e=a.val(),c.type&&\"keydown\"===c.type.toLowerCase()&&(f=c.keyCode,g=f>=48&&f<=57||f>=65&&f<=90||f>=96&&f<=111||f>=186&&f<=222||32===f,46===f||8===f?(l=r(a[0]),l.length?e=e.substring(0,l.start)+e.substring(l.start+l.length):8===f&&l.start?e=e.substring(0,l.start-1)+e.substring(l.start+1):46===f&&void 0!==l.start&&(e=e.substring(0,l.start)+e.substring(l.start+1))):g&&(j=c.shiftKey,k=String.fromCharCode(c.keyCode),k=j?k.toUpperCase():k.toLowerCase(),e+=k)),h=a.attr(\"placeholder\"),!e&&h&&(e=h),(i=t(e,a)+4)!==b&&(b=i,a.width(i),a.triggerHandler(\"resize\")))};a.on(\"keydown keyup update blur\",c),c()},v=function(a){var b=document.createElement(\"div\");return b.appendChild(a.cloneNode(!0)),b.innerHTML},w=function(c,d){var e,f,g,h,i=this;h=c[0],h.selectize=i;var j=window.getComputedStyle&&window.getComputedStyle(h,null);if(g=j?j.getPropertyValue(\"direction\"):h.currentStyle&&h.currentStyle.direction,g=g||c.parents(\"[dir]:first\").attr(\"dir\")||\"\",a.extend(i,{order:0,settings:d,$input:c,tabIndex:c.attr(\"tabindex\")||\"\",tagType:\"select\"===h.tagName.toLowerCase()?1:2,rtl:/rtl/i.test(g),eventNS:\".selectize\"+ ++w.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:c.is(\"[required]\"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:\"\",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===d.loadThrottle?i.onSearchChange:o(i.onSearchChange,d.loadThrottle)}),i.sifter=new b(this.options,{diacritics:d.diacritics}),i.settings.options){for(e=0,f=i.settings.options.length;e<f;e++)i.registerOption(i.settings.options[e]);delete i.settings.options}if(i.settings.optgroups){for(e=0,f=i.settings.optgroups.length;e<f;e++)i.registerOptionGroup(i.settings.optgroups[e]);delete i.settings.optgroups}i.settings.mode=i.settings.mode||(1===i.settings.maxItems?\"single\":\"multi\"),\"boolean\"!=typeof i.settings.hideSelected&&(i.settings.hideSelected=\"multi\"===i.settings.mode),i.initializePlugins(i.settings.plugins),i.setupCallbacks(),i.setupTemplates(),i.setup()};return e.mixin(w),void 0!==c?c.mixin(w):function(a,b){b||(b={});console.error(\"Selectize: \"+a),b.explanation&&(console.group&&console.group(),console.error(b.explanation),console.group&&console.groupEnd())}(\"Dependency MicroPlugin is missing\",{explanation:'Make sure you either: (1) are using the \"standalone\" version of Selectize, or (2) require MicroPlugin before you load Selectize.'}),a.extend(w.prototype,{setup:function(){var b,c,d,e,j,k,l,m,n,o,p=this,r=p.settings,s=p.eventNS,t=a(window),v=a(document),w=p.$input;if(l=p.settings.mode,m=w.attr(\"class\")||\"\",b=a(\"<div>\").addClass(r.wrapperClass).addClass(m).addClass(l),c=a(\"<div>\").addClass(r.inputClass).addClass(\"items\").appendTo(b),d=a('<input type=\"text\" autocomplete=\"off\" />').appendTo(c).attr(\"tabindex\",w.is(\":disabled\")?\"-1\":p.tabIndex),k=a(r.dropdownParent||b),e=a(\"<div>\").addClass(r.dropdownClass).addClass(l).hide().appendTo(k),j=a(\"<div>\").addClass(r.dropdownContentClass).appendTo(e),(o=w.attr(\"id\"))&&(d.attr(\"id\",o+\"-selectized\"),a(\"label[for='\"+o+\"']\").attr(\"for\",o+\"-selectized\")),p.settings.copyClassesToDropdown&&e.addClass(m),b.css({width:w[0].style.width}),p.plugins.names.length&&(n=\"plugin-\"+p.plugins.names.join(\" plugin-\"),b.addClass(n),e.addClass(n)),(null===r.maxItems||r.maxItems>1)&&1===p.tagType&&w.attr(\"multiple\",\"multiple\"),p.settings.placeholder&&d.attr(\"placeholder\",r.placeholder),!p.settings.splitOn&&p.settings.delimiter){var x=p.settings.delimiter.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\");p.settings.splitOn=new RegExp(\"\\\\s*\"+x+\"+\\\\s*\")}w.attr(\"autocorrect\")&&d.attr(\"autocorrect\",w.attr(\"autocorrect\")),w.attr(\"autocapitalize\")&&d.attr(\"autocapitalize\",w.attr(\"autocapitalize\")),d[0].type=w[0].type,p.$wrapper=b,p.$control=c,p.$control_input=d,p.$dropdown=e,p.$dropdown_content=j,e.on(\"mouseenter mousedown click\",\"[data-disabled]>[data-selectable]\",function(a){a.stopImmediatePropagation()}),e.on(\"mouseenter\",\"[data-selectable]\",function(){return p.onOptionHover.apply(p,arguments)}),e.on(\"mousedown click\",\"[data-selectable]\",function(){return p.onOptionSelect.apply(p,arguments)}),q(c,\"mousedown\",\"*:not(input)\",function(){return p.onItemSelect.apply(p,arguments)}),u(d),c.on({mousedown:function(){return p.onMouseDown.apply(p,arguments)},click:function(){return p.onClick.apply(p,arguments)}}),d.on({mousedown:function(a){a.stopPropagation()},keydown:function(){return p.onKeyDown.apply(p,arguments)},keyup:function(){return p.onKeyUp.apply(p,arguments)},keypress:function(){return p.onKeyPress.apply(p,arguments)},resize:function(){p.positionDropdown.apply(p,[])},blur:function(){return p.onBlur.apply(p,arguments)},focus:function(){return p.ignoreBlur=!1,p.onFocus.apply(p,arguments)},paste:function(){return p.onPaste.apply(p,arguments)}}),v.on(\"keydown\"+s,function(a){p.isCmdDown=a[f?\"metaKey\":\"ctrlKey\"],p.isCtrlDown=a[f?\"altKey\":\"ctrlKey\"],p.isShiftDown=a.shiftKey}),v.on(\"keyup\"+s,function(a){a.keyCode===h&&(p.isCtrlDown=!1),16===a.keyCode&&(p.isShiftDown=!1),a.keyCode===g&&(p.isCmdDown=!1)}),v.on(\"mousedown\"+s,function(a){if(p.isFocused){if(a.target===p.$dropdown[0]||a.target.parentNode===p.$dropdown[0])return!1;p.$control.has(a.target).length||a.target===p.$control[0]||p.blur(a.target)}}),t.on([\"scroll\"+s,\"resize\"+s].join(\" \"),function(){p.isOpen&&p.positionDropdown.apply(p,arguments)}),t.on(\"mousemove\"+s,function(){p.ignoreHover=!1}),this.revertSettings={$children:w.children().detach(),tabindex:w.attr(\"tabindex\")},w.attr(\"tabindex\",-1).hide().after(p.$wrapper),a.isArray(r.items)&&(p.setValue(r.items),delete r.items),i&&w.on(\"invalid\"+s,function(a){a.preventDefault(),p.isInvalid=!0,p.refreshState()}),p.updateOriginalInput(),p.refreshItems(),p.refreshState(),p.updatePlaceholder(),p.isSetup=!0,w.is(\":disabled\")&&p.disable(),p.on(\"change\",this.onChange),w.data(\"selectize\",p),w.addClass(\"selectized\"),p.trigger(\"initialize\"),!0===r.preload&&p.onSearchChange(\"\")},setupTemplates:function(){var b=this,c=b.settings.labelField,d=b.settings.optgroupLabelField,e={optgroup:function(a){return'<div class=\"optgroup\">'+a.html+\"</div>\"},optgroup_header:function(a,b){return'<div class=\"optgroup-header\">'+b(a[d])+\"</div>\"},option:function(a,b){return'<div class=\"option\">'+b(a[c])+\"</div>\"},item:function(a,b){return'<div class=\"item\">'+b(a[c])+\"</div>\"},option_create:function(a,b){return'<div class=\"create\">Add <strong>'+b(a.input)+\"</strong>…</div>\"}};b.settings.render=a.extend({},e,b.settings.render)},setupCallbacks:function(){var a,b,c={initialize:\"onInitialize\",change:\"onChange\",item_add:\"onItemAdd\",item_remove:\"onItemRemove\",clear:\"onClear\",option_add:\"onOptionAdd\",option_remove:\"onOptionRemove\",option_clear:\"onOptionClear\",optgroup_add:\"onOptionGroupAdd\",optgroup_remove:\"onOptionGroupRemove\",optgroup_clear:\"onOptionGroupClear\",dropdown_open:\"onDropdownOpen\",dropdown_close:\"onDropdownClose\",type:\"onType\",load:\"onLoad\",focus:\"onFocus\",blur:\"onBlur\"};for(a in c)c.hasOwnProperty(a)&&(b=this.settings[c[a]])&&this.on(a,b)},onClick:function(a){var b=this;b.isFocused&&b.isOpen||(b.focus(),a.preventDefault())},onMouseDown:function(b){var c=this,d=b.isDefaultPrevented();a(b.target);if(c.isFocused){if(b.target!==c.$control_input[0])return\"single\"===c.settings.mode?c.isOpen?c.close():c.open():d||c.setActiveItem(null),!1}else d||window.setTimeout(function(){c.focus()},0)},onChange:function(){this.$input.trigger(\"change\")},onPaste:function(b){var c=this;if(c.isFull()||c.isInputHidden||c.isLocked)return void b.preventDefault();c.settings.splitOn&&setTimeout(function(){var b=c.$control_input.val();if(b.match(c.settings.splitOn))for(var d=a.trim(b).split(c.settings.splitOn),e=0,f=d.length;e<f;e++)c.createItem(d[e])},0)},onKeyPress:function(a){if(this.isLocked)return a&&a.preventDefault();var b=String.fromCharCode(a.keyCode||a.which);return this.settings.create&&\"multi\"===this.settings.mode&&b===this.settings.delimiter?(this.createItem(),a.preventDefault(),!1):void 0},onKeyDown:function(a){var b=(a.target,this.$control_input[0],this);if(b.isLocked)return void(9!==a.keyCode&&a.preventDefault());switch(a.keyCode){case 65:if(b.isCmdDown)return void b.selectAll();break;case 27:return void(b.isOpen&&(a.preventDefault(),a.stopPropagation(),b.close()));case 78:if(!a.ctrlKey||a.altKey)break;case 40:if(!b.isOpen&&b.hasOptions)b.open();else if(b.$activeOption){b.ignoreHover=!0;var c=b.getAdjacentOption(b.$activeOption,1);c.length&&b.setActiveOption(c,!0,!0)}return void a.preventDefault();case 80:if(!a.ctrlKey||a.altKey)break;case 38:if(b.$activeOption){b.ignoreHover=!0;var d=b.getAdjacentOption(b.$activeOption,-1);d.length&&b.setActiveOption(d,!0,!0)}return void a.preventDefault();case 13:return void(b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),a.preventDefault()));case 37:return void b.advanceSelection(-1,a);case 39:return void b.advanceSelection(1,a);case 9:return b.settings.selectOnTab&&b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),b.isFull()||a.preventDefault()),void(b.settings.create&&b.createItem()&&a.preventDefault());case 8:case 46:return void b.deleteSelection(a)}return!b.isFull()&&!b.isInputHidden||(f?a.metaKey:a.ctrlKey)?void 0:void a.preventDefault()},onKeyUp:function(a){var b=this;if(b.isLocked)return a&&a.preventDefault();var c=b.$control_input.val()||\"\";b.lastValue!==c&&(b.lastValue=c,b.onSearchChange(c),b.refreshOptions(),b.trigger(\"type\",c))},onSearchChange:function(a){var b=this,c=b.settings.load;c&&(b.loadedSearches.hasOwnProperty(a)||(b.loadedSearches[a]=!0,b.load(function(d){c.apply(b,[a,d])})))},onFocus:function(a){var b=this,c=b.isFocused;if(b.isDisabled)return b.blur(),a&&a.preventDefault(),!1;b.ignoreFocus||(b.isFocused=!0,\"focus\"===b.settings.preload&&b.onSearchChange(\"\"),c||b.trigger(\"focus\"),b.$activeItems.length||(b.showInput(),b.setActiveItem(null),b.refreshOptions(!!b.settings.openOnFocus)),b.refreshState())},onBlur:function(a,b){var c=this;if(c.isFocused&&(c.isFocused=!1,!c.ignoreFocus)){if(!c.ignoreBlur&&document.activeElement===c.$dropdown_content[0])return c.ignoreBlur=!0,void c.onFocus(a);var d=function(){c.close(),c.setTextboxValue(\"\"),c.setActiveItem(null),c.setActiveOption(null),c.setCaret(c.items.length),c.refreshState(),b&&b.focus&&b.focus(),c.isBlurring=!1,c.ignoreFocus=!1,c.trigger(\"blur\")};c.isBlurring=!0,c.ignoreFocus=!0,c.settings.create&&c.settings.createOnBlur?c.createItem(null,!1,d):d()}},onOptionHover:function(a){this.ignoreHover||this.setActiveOption(a.currentTarget,!1)},onOptionSelect:function(b){var c,d,e=this;b.preventDefault&&(b.preventDefault(),b.stopPropagation()),d=a(b.currentTarget),d.hasClass(\"create\")?e.createItem(null,function(){e.settings.closeAfterSelect&&e.close()}):void 0!==(c=d.attr(\"data-value\"))&&(e.lastQuery=null,e.setTextboxValue(\"\"),e.addItem(c),e.settings.closeAfterSelect?e.close():!e.settings.hideSelected&&b.type&&/mouse/.test(b.type)&&e.setActiveOption(e.getOption(c)))},onItemSelect:function(a){var b=this;b.isLocked||\"multi\"===b.settings.mode&&(a.preventDefault(),b.setActiveItem(a.currentTarget,a))},load:function(a){var b=this,c=b.$wrapper.addClass(b.settings.loadingClass);b.loading++,a.apply(b,[function(a){b.loading=Math.max(b.loading-1,0),a&&a.length&&(b.addOption(a),b.refreshOptions(b.isFocused&&!b.isInputHidden)),b.loading||c.removeClass(b.settings.loadingClass),b.trigger(\"load\",a)}])},setTextboxValue:function(a){var b=this.$control_input;b.val()!==a&&(b.val(a).triggerHandler(\"update\"),this.lastValue=a)},getValue:function(){return 1===this.tagType&&this.$input.attr(\"multiple\")?this.items:this.items.join(this.settings.delimiter)},setValue:function(a,b){p(this,b?[]:[\"change\"],function(){this.clear(b),this.addItems(a,b)})},setActiveItem:function(b,c){var d,e,f,g,h,i,j,k,l=this;if(\"single\"!==l.settings.mode){if(b=a(b),!b.length)return a(l.$activeItems).removeClass(\"active\"),l.$activeItems=[],void(l.isFocused&&l.showInput());if(\"mousedown\"===(d=c&&c.type.toLowerCase())&&l.isShiftDown&&l.$activeItems.length){for(k=l.$control.children(\".active:last\"),g=Array.prototype.indexOf.apply(l.$control[0].childNodes,[k[0]]),h=Array.prototype.indexOf.apply(l.$control[0].childNodes,[b[0]]),g>h&&(j=g,g=h,h=j),e=g;e<=h;e++)i=l.$control[0].childNodes[e],-1===l.$activeItems.indexOf(i)&&(a(i).addClass(\"active\"),l.$activeItems.push(i));c.preventDefault()}else\"mousedown\"===d&&l.isCtrlDown||\"keydown\"===d&&this.isShiftDown?b.hasClass(\"active\")?(f=l.$activeItems.indexOf(b[0]),l.$activeItems.splice(f,1),b.removeClass(\"active\")):l.$activeItems.push(b.addClass(\"active\")[0]):(a(l.$activeItems).removeClass(\"active\"),l.$activeItems=[b.addClass(\"active\")[0]]);l.hideInput(),this.isFocused||l.focus()}},setActiveOption:function(b,c,d){var e,f,g,h,i,k=this;k.$activeOption&&k.$activeOption.removeClass(\"active\"),k.$activeOption=null,b=a(b),b.length&&(k.$activeOption=b.addClass(\"active\"),!c&&j(c)||(e=k.$dropdown_content.height(),f=k.$activeOption.outerHeight(!0),c=k.$dropdown_content.scrollTop()||0,g=k.$activeOption.offset().top-k.$dropdown_content.offset().top+c,h=g,i=g-e+f,g+f>e+c?k.$dropdown_content.stop().animate({scrollTop:i},d?k.settings.scrollDuration:0):g<c&&k.$dropdown_content.stop().animate({scrollTop:h},d?k.settings.scrollDuration:0)))},selectAll:function(){var a=this;\"single\"!==a.settings.mode&&(a.$activeItems=Array.prototype.slice.apply(a.$control.children(\":not(input)\").addClass(\"active\")),a.$activeItems.length&&(a.hideInput(),a.close()),a.focus())},hideInput:function(){var a=this;a.setTextboxValue(\"\"),a.$control_input.css({opacity:0,position:\"absolute\",left:a.rtl?1e4:-1e4}),a.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:\"relative\",left:0}),this.isInputHidden=!1},focus:function(){var a=this;a.isDisabled||(a.ignoreFocus=!0,a.$control_input[0].focus(),window.setTimeout(function(){a.ignoreFocus=!1,a.onFocus()},0))},blur:function(a){this.$control_input[0].blur(),this.onBlur(null,a)},getScoreFunction:function(a){return this.sifter.getScoreFunction(a,this.getSearchOptions())},getSearchOptions:function(){var a=this.settings,b=a.sortField;return\"string\"==typeof b&&(b=[{field:b}]),{fields:a.searchField,conjunction:a.searchConjunction,sort:b,nesting:a.nesting}},search:function(b){var c,d,e,f=this,g=f.settings,h=this.getSearchOptions();if(g.score&&\"function\"!=typeof(e=f.settings.score.apply(this,[b])))throw new Error('Selectize \"score\" setting must be a function that returns a function');if(b!==f.lastQuery?(f.lastQuery=b,d=f.sifter.search(b,a.extend(h,{score:e})),f.currentResults=d):d=a.extend(!0,{},f.currentResults),g.hideSelected)for(c=d.items.length-1;c>=0;c--)-1!==f.items.indexOf(k(d.items[c].id))&&d.items.splice(c,1);return d},refreshOptions:function(b){var c,e,f,g,h,i,j,l,m,n,o,p,q,r,s,t;void 0===b&&(b=!0);var u=this,w=a.trim(u.$control_input.val()),x=u.search(w),y=u.$dropdown_content,z=u.$activeOption&&k(u.$activeOption.attr(\"data-value\"));for(g=x.items.length,\"number\"==typeof u.settings.maxOptions&&(g=Math.min(g,u.settings.maxOptions)),h={},i=[],c=0;c<g;c++)for(j=u.options[x.items[c].id],l=u.render(\"option\",j),m=j[u.settings.optgroupField]||\"\",n=a.isArray(m)?m:[m],e=0,f=n&&n.length;e<f;e++)m=n[e],u.optgroups.hasOwnProperty(m)||(m=\"\"),h.hasOwnProperty(m)||(h[m]=document.createDocumentFragment(),i.push(m)),h[m].appendChild(l);for(this.settings.lockOptgroupOrder&&i.sort(function(a,b){return(u.optgroups[a].$order||0)-(u.optgroups[b].$order||0)}),o=document.createDocumentFragment(),c=0,g=i.length;c<g;c++)m=i[c],u.optgroups.hasOwnProperty(m)&&h[m].childNodes.length?(p=document.createDocumentFragment(),p.appendChild(u.render(\"optgroup_header\",u.optgroups[m])),p.appendChild(h[m]),o.appendChild(u.render(\"optgroup\",a.extend({},u.optgroups[m],{html:v(p),dom:p})))):o.appendChild(h[m]);if(y.html(o),u.settings.highlight&&(y.removeHighlight(),x.query.length&&x.tokens.length))for(c=0,g=x.tokens.length;c<g;c++)d(y,x.tokens[c].regex);if(!u.settings.hideSelected)for(c=0,g=u.items.length;c<g;c++)u.getOption(u.items[c]).addClass(\"selected\");q=u.canCreate(w),q&&(y.prepend(u.render(\"option_create\",{input:w})),t=a(y[0].childNodes[0])),u.hasOptions=x.items.length>0||q,u.hasOptions?(x.items.length>0?(s=z&&u.getOption(z),s&&s.length?r=s:\"single\"===u.settings.mode&&u.items.length&&(r=u.getOption(u.items[0])),r&&r.length||(r=t&&!u.settings.addPrecedence?u.getAdjacentOption(t,1):y.find(\"[data-selectable]:first\"))):r=t,u.setActiveOption(r),b&&!u.isOpen&&u.open()):(u.setActiveOption(null),b&&u.isOpen&&u.close())},addOption:function(b){var c,d,e,f=this;if(a.isArray(b))for(c=0,d=b.length;c<d;c++)f.addOption(b[c]);else(e=f.registerOption(b))&&(f.userOptions[e]=!0,f.lastQuery=null,f.trigger(\"option_add\",e,b))},registerOption:function(a){var b=k(a[this.settings.valueField]);return void 0!==b&&null!==b&&!this.options.hasOwnProperty(b)&&(a.$order=a.$order||++this.order,this.options[b]=a,b)},registerOptionGroup:function(a){var b=k(a[this.settings.optgroupValueField]);return!!b&&(a.$order=a.$order||++this.order,this.optgroups[b]=a,b)},addOptionGroup:function(a,b){b[this.settings.optgroupValueField]=a,(a=this.registerOptionGroup(b))&&this.trigger(\"optgroup_add\",a,b)},removeOptionGroup:function(a){this.optgroups.hasOwnProperty(a)&&(delete this.optgroups[a],this.renderCache={},this.trigger(\"optgroup_remove\",a))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger(\"optgroup_clear\")},updateOption:function(b,c){var d,e,f,g,h,i,j,l=this;if(b=k(b),f=k(c[l.settings.valueField]),null!==b&&l.options.hasOwnProperty(b)){if(\"string\"!=typeof f)throw new Error(\"Value must be set in option data\");j=l.options[b].$order,f!==b&&(delete l.options[b],-1!==(g=l.items.indexOf(b))&&l.items.splice(g,1,f)),c.$order=c.$order||j,l.options[f]=c,h=l.renderCache.item,i=l.renderCache.option,h&&(delete h[b],delete h[f]),i&&(delete i[b],delete i[f]),-1!==l.items.indexOf(f)&&(d=l.getItem(b),e=a(l.render(\"item\",c)),d.hasClass(\"active\")&&e.addClass(\"active\"),d.replaceWith(e)),l.lastQuery=null,l.isOpen&&l.refreshOptions(!1)}},removeOption:function(a,b){var c=this;a=k(a);var d=c.renderCache.item,e=c.renderCache.option;d&&delete d[a],e&&delete e[a],delete c.userOptions[a],delete c.options[a],c.lastQuery=null,c.trigger(\"option_remove\",a),c.removeItem(a,b)},clearOptions:function(){var b=this;b.loadedSearches={},b.userOptions={},b.renderCache={};var c=b.options;a.each(b.options,function(a,d){-1==b.items.indexOf(a)&&delete c[a]}),b.options=b.sifter.items=c,b.lastQuery=null,b.trigger(\"option_clear\")},getOption:function(a){return this.getElementWithValue(a,this.$dropdown_content.find(\"[data-selectable]\"))},getAdjacentOption:function(b,c){var d=this.$dropdown.find(\"[data-selectable]\"),e=d.index(b)+c;return e>=0&&e<d.length?d.eq(e):a()},getElementWithValue:function(b,c){if(void 0!==(b=k(b))&&null!==b)for(var d=0,e=c.length;d<e;d++)if(c[d].getAttribute(\"data-value\")===b)return a(c[d]);return a()},getItem:function(a){return this.getElementWithValue(a,this.$control.children())},addItems:function(b,c){this.buffer=document.createDocumentFragment();for(var d=this.$control[0].childNodes,e=0;e<d.length;e++)this.buffer.appendChild(d[e]);for(var f=a.isArray(b)?b:[b],e=0,g=f.length;e<g;e++)this.isPending=e<g-1,this.addItem(f[e],c);var h=this.$control[0];h.insertBefore(this.buffer,h.firstChild),this.buffer=null},addItem:function(b,c){p(this,c?[]:[\"change\"],function(){var d,e,f,g,h,i=this,j=i.settings.mode;if(b=k(b),-1!==i.items.indexOf(b))return void(\"single\"===j&&i.close());i.options.hasOwnProperty(b)&&(\"single\"===j&&i.clear(c),\"multi\"===j&&i.isFull()||(d=a(i.render(\"item\",i.options[b])),h=i.isFull(),i.items.splice(i.caretPos,0,b),i.insertAtCaret(d),(!i.isPending||!h&&i.isFull())&&i.refreshState(),i.isSetup&&(f=i.$dropdown_content.find(\"[data-selectable]\"),i.isPending||(e=i.getOption(b),g=i.getAdjacentOption(e,1).attr(\"data-value\"),i.refreshOptions(i.isFocused&&\"single\"!==j),g&&i.setActiveOption(i.getOption(g))),!f.length||i.isFull()?i.close():i.isPending||i.positionDropdown(),i.updatePlaceholder(),i.trigger(\"item_add\",b,d),i.isPending||i.updateOriginalInput({silent:c}))))})},removeItem:function(b,c){var d,e,f,g=this;d=b instanceof a?b:g.getItem(b),b=k(d.attr(\"data-value\")),-1!==(e=g.items.indexOf(b))&&(d.remove(),d.hasClass(\"active\")&&(f=g.$activeItems.indexOf(d[0]),g.$activeItems.splice(f,1)),g.items.splice(e,1),g.lastQuery=null,!g.settings.persist&&g.userOptions.hasOwnProperty(b)&&g.removeOption(b,c),e<g.caretPos&&g.setCaret(g.caretPos-1),g.refreshState(),g.updatePlaceholder(),g.updateOriginalInput({silent:c}),g.positionDropdown(),g.trigger(\"item_remove\",b,d))},createItem:function(b,c){var d=this,e=d.caretPos;b=b||a.trim(d.$control_input.val()||\"\");var f=arguments[arguments.length-1];if(\"function\"!=typeof f&&(f=function(){}),\"boolean\"!=typeof c&&(c=!0),!d.canCreate(b))return f(),!1;d.lock();var g=\"function\"==typeof d.settings.create?this.settings.create:function(a){var b={};return b[d.settings.labelField]=a,b[d.settings.valueField]=a,b},h=n(function(a){if(d.unlock(),!a||\"object\"!=typeof a)return f();var b=k(a[d.settings.valueField]);if(\"string\"!=typeof b)return f();d.setTextboxValue(\"\"),d.addOption(a),d.setCaret(e),d.addItem(b),d.refreshOptions(c&&\"single\"!==d.settings.mode),f(a)}),i=g.apply(this,[b,h]);return void 0!==i&&h(i),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var a=!this.items.length;this.isInvalid=a,this.$control_input.prop(\"required\",a),this.$input.prop(\"required\",!a)},refreshClasses:function(){var b=this,c=b.isFull(),d=b.isLocked;b.$wrapper.toggleClass(\"rtl\",b.rtl),b.$control.toggleClass(\"focus\",b.isFocused).toggleClass(\"disabled\",b.isDisabled).toggleClass(\"required\",b.isRequired).toggleClass(\"invalid\",b.isInvalid).toggleClass(\"locked\",d).toggleClass(\"full\",c).toggleClass(\"not-full\",!c).toggleClass(\"input-active\",b.isFocused&&!b.isInputHidden).toggleClass(\"dropdown-active\",b.isOpen).toggleClass(\"has-options\",!a.isEmptyObject(b.options)).toggleClass(\"has-items\",b.items.length>0),b.$control_input.data(\"grow\",!c&&!d)},isFull:function(){\nreturn null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(a){var b,c,d,e,f=this;if(a=a||{},1===f.tagType){for(d=[],b=0,c=f.items.length;b<c;b++)e=f.options[f.items[b]][f.settings.labelField]||\"\",d.push('<option value=\"'+l(f.items[b])+'\" selected=\"selected\">'+l(e)+\"</option>\");d.length||this.$input.attr(\"multiple\")||d.push('<option value=\"\" selected=\"selected\"></option>'),f.$input.html(d.join(\"\"))}else f.$input.val(f.getValue()),f.$input.attr(\"value\",f.$input.val());f.isSetup&&(a.silent||f.trigger(\"change\",f.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var a=this.$control_input;this.items.length?a.removeAttr(\"placeholder\"):a.attr(\"placeholder\",this.settings.placeholder),a.triggerHandler(\"update\",{force:!0})}},open:function(){var a=this;a.isLocked||a.isOpen||\"multi\"===a.settings.mode&&a.isFull()||(a.focus(),a.isOpen=!0,a.refreshState(),a.$dropdown.css({visibility:\"hidden\",display:\"block\"}),a.positionDropdown(),a.$dropdown.css({visibility:\"visible\"}),a.trigger(\"dropdown_open\",a.$dropdown))},close:function(){var a=this,b=a.isOpen;\"single\"===a.settings.mode&&a.items.length&&(a.hideInput(),a.isBlurring||a.$control_input.blur()),a.isOpen=!1,a.$dropdown.hide(),a.setActiveOption(null),a.refreshState(),b&&a.trigger(\"dropdown_close\",a.$dropdown)},positionDropdown:function(){var a=this.$control,b=\"body\"===this.settings.dropdownParent?a.offset():a.position();b.top+=a.outerHeight(!0),this.$dropdown.css({width:a[0].getBoundingClientRect().width,top:b.top,left:b.left})},clear:function(a){var b=this;b.items.length&&(b.$control.children(\":not(input)\").remove(),b.items=[],b.lastQuery=null,b.setCaret(0),b.setActiveItem(null),b.updatePlaceholder(),b.updateOriginalInput({silent:a}),b.refreshState(),b.showInput(),b.trigger(\"clear\"))},insertAtCaret:function(a){var b=Math.min(this.caretPos,this.items.length),c=a[0],d=this.buffer||this.$control[0];0===b?d.insertBefore(c,d.firstChild):d.insertBefore(c,d.childNodes[b]),this.setCaret(b+1)},deleteSelection:function(b){var c,d,e,f,g,h,i,j,k,l=this;if(e=b&&8===b.keyCode?-1:1,f=r(l.$control_input[0]),l.$activeOption&&!l.settings.hideSelected&&(i=l.getAdjacentOption(l.$activeOption,-1).attr(\"data-value\")),g=[],l.$activeItems.length){for(k=l.$control.children(\".active:\"+(e>0?\"last\":\"first\")),h=l.$control.children(\":not(input)\").index(k),e>0&&h++,c=0,d=l.$activeItems.length;c<d;c++)g.push(a(l.$activeItems[c]).attr(\"data-value\"));b&&(b.preventDefault(),b.stopPropagation())}else(l.isFocused||\"single\"===l.settings.mode)&&l.items.length&&(e<0&&0===f.start&&0===f.length?g.push(l.items[l.caretPos-1]):e>0&&f.start===l.$control_input.val().length&&g.push(l.items[l.caretPos]));if(!g.length||\"function\"==typeof l.settings.onDelete&&!1===l.settings.onDelete.apply(l,[g]))return!1;for(void 0!==h&&l.setCaret(h);g.length;)l.removeItem(g.pop());return l.showInput(),l.positionDropdown(),l.refreshOptions(!0),i&&(j=l.getOption(i),j.length&&l.setActiveOption(j)),!0},advanceSelection:function(a,b){var c,d,e,f,g,h=this;0!==a&&(h.rtl&&(a*=-1),c=a>0?\"last\":\"first\",d=r(h.$control_input[0]),h.isFocused&&!h.isInputHidden?(f=h.$control_input.val().length,(a<0?0===d.start&&0===d.length:d.start===f)&&!f&&h.advanceCaret(a,b)):(g=h.$control.children(\".active:\"+c),g.length&&(e=h.$control.children(\":not(input)\").index(g),h.setActiveItem(null),h.setCaret(a>0?e+1:e))))},advanceCaret:function(a,b){var c,d,e=this;0!==a&&(c=a>0?\"next\":\"prev\",e.isShiftDown?(d=e.$control_input[c](),d.length&&(e.hideInput(),e.setActiveItem(d),b&&b.preventDefault())):e.setCaret(e.caretPos+a))},setCaret:function(b){var c=this;if(b=\"single\"===c.settings.mode?c.items.length:Math.max(0,Math.min(c.items.length,b)),!c.isPending){var d,e,f,g;for(f=c.$control.children(\":not(input)\"),d=0,e=f.length;d<e;d++)g=a(f[d]).detach(),d<b?c.$control_input.before(g):c.$control.append(g)}c.caretPos=b},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var a=this;a.$input.prop(\"disabled\",!0),a.$control_input.prop(\"disabled\",!0).prop(\"tabindex\",-1),a.isDisabled=!0,a.lock()},enable:function(){var a=this;a.$input.prop(\"disabled\",!1),a.$control_input.prop(\"disabled\",!1).prop(\"tabindex\",a.tabIndex),a.isDisabled=!1,a.unlock()},destroy:function(){var b=this,c=b.eventNS,d=b.revertSettings;b.trigger(\"destroy\"),b.off(),b.$wrapper.remove(),b.$dropdown.remove(),b.$input.html(\"\").append(d.$children).removeAttr(\"tabindex\").removeClass(\"selectized\").attr({tabindex:d.tabindex}).show(),b.$control_input.removeData(\"grow\"),b.$input.removeData(\"selectize\"),0==--w.count&&w.$testInput&&(w.$testInput.remove(),w.$testInput=void 0),a(window).off(c),a(document).off(c),a(document.body).off(c),delete b.$input[0].selectize},render:function(b,c){var d,e,f=\"\",g=!1,h=this;return\"option\"!==b&&\"item\"!==b||(d=k(c[h.settings.valueField]),g=!!d),g&&(j(h.renderCache[b])||(h.renderCache[b]={}),h.renderCache[b].hasOwnProperty(d))?h.renderCache[b][d]:(f=a(h.settings.render[b].apply(this,[c,l])),\"option\"===b||\"option_create\"===b?c[h.settings.disabledField]||f.attr(\"data-selectable\",\"\"):\"optgroup\"===b&&(e=c[h.settings.optgroupValueField]||\"\",f.attr(\"data-group\",e),c[h.settings.disabledField]&&f.attr(\"data-disabled\",\"\")),\"option\"!==b&&\"item\"!==b||f.attr(\"data-value\",d||\"\"),g&&(h.renderCache[b][d]=f[0]),f[0])},clearCache:function(a){var b=this;void 0===a?b.renderCache={}:delete b.renderCache[a]},canCreate:function(a){var b=this;if(!b.settings.create)return!1;var c=b.settings.createFilter;return a.length&&(\"function\"!=typeof c||c.apply(b,[a]))&&(\"string\"!=typeof c||new RegExp(c).test(a))&&(!(c instanceof RegExp)||c.test(a))}}),w.count=0,w.defaults={options:[],optgroups:[],plugins:[],delimiter:\",\",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:\"loading\",dataAttr:\"data-data\",optgroupField:\"optgroup\",valueField:\"value\",labelField:\"text\",disabledField:\"disabled\",optgroupLabelField:\"label\",optgroupValueField:\"value\",lockOptgroupOrder:!1,sortField:\"$order\",searchField:[\"text\"],searchConjunction:\"and\",mode:null,wrapperClass:\"selectize-control\",inputClass:\"selectize-input\",dropdownClass:\"selectize-dropdown\",dropdownContentClass:\"selectize-dropdown-content\",dropdownParent:null,copyClassesToDropdown:!0,render:{}},a.fn.selectize=function(b){var c=a.fn.selectize.defaults,d=a.extend({},c,b),e=d.dataAttr,f=d.labelField,g=d.valueField,h=d.disabledField,i=d.optgroupField,j=d.optgroupLabelField,l=d.optgroupValueField,m=function(b,c){var h,i,j,k,l=b.attr(e);if(l)for(c.options=JSON.parse(l),h=0,i=c.options.length;h<i;h++)c.items.push(c.options[h][g]);else{var m=a.trim(b.val()||\"\");if(!d.allowEmptyOption&&!m.length)return;for(j=m.split(d.delimiter),h=0,i=j.length;h<i;h++)k={},k[f]=j[h],k[g]=j[h],c.options.push(k);c.items=j}},n=function(b,c){var m,n,o,p,q=c.options,r={},s=function(a){var b=e&&a.attr(e);return\"string\"==typeof b&&b.length?JSON.parse(b):null},t=function(b,e){b=a(b);var j=k(b.val());if(j||d.allowEmptyOption)if(r.hasOwnProperty(j)){if(e){var l=r[j][i];l?a.isArray(l)?l.push(e):r[j][i]=[l,e]:r[j][i]=e}}else{var m=s(b)||{};m[f]=m[f]||b.text(),m[g]=m[g]||j,m[h]=m[h]||b.prop(\"disabled\"),m[i]=m[i]||e,r[j]=m,q.push(m),b.is(\":selected\")&&c.items.push(j)}};for(c.maxItems=b.attr(\"multiple\")?null:1,p=b.children(),m=0,n=p.length;m<n;m++)o=p[m].tagName.toLowerCase(),\"optgroup\"===o?function(b){var d,e,f,g,i;for(b=a(b),f=b.attr(\"label\"),f&&(g=s(b)||{},g[j]=f,g[l]=f,g[h]=b.prop(\"disabled\"),c.optgroups.push(g)),i=a(\"option\",b),d=0,e=i.length;d<e;d++)t(i[d],f)}(p[m]):\"option\"===o&&t(p[m])};return this.each(function(){if(!this.selectize){var e=a(this),f=this.tagName.toLowerCase(),g=e.attr(\"placeholder\")||e.attr(\"data-placeholder\");g||d.allowEmptyOption||(g=e.children('option[value=\"\"]').text());var h={placeholder:g,options:[],optgroups:[],items:[]};\"select\"===f?n(e,h):m(e,h),new w(e,a.extend(!0,{},c,h,b))}})},a.fn.selectize.defaults=w.defaults,a.fn.selectize.support={validity:i},w.define(\"drag_drop\",function(b){if(!a.fn.sortable)throw new Error('The \"drag_drop\" plugin requires jQuery UI \"sortable\".');if(\"multi\"===this.settings.mode){var c=this;c.lock=function(){var a=c.lock;return function(){var b=c.$control.data(\"sortable\");return b&&b.disable(),a.apply(c,arguments)}}(),c.unlock=function(){var a=c.unlock;return function(){var b=c.$control.data(\"sortable\");return b&&b.enable(),a.apply(c,arguments)}}(),c.setup=function(){var b=c.setup;return function(){b.apply(this,arguments);var d=c.$control.sortable({items:\"[data-value]\",forcePlaceholderSize:!0,disabled:c.isLocked,start:function(a,b){b.placeholder.css(\"width\",b.helper.css(\"width\")),d.css({overflow:\"visible\"})},stop:function(){d.css({overflow:\"hidden\"});var b=c.$activeItems?c.$activeItems.slice():null,e=[];d.children(\"[data-value]\").each(function(){e.push(a(this).attr(\"data-value\"))}),c.setValue(e),c.setActiveItem(b)}})}}()}}),w.define(\"dropdown_header\",function(b){var c=this;b=a.extend({title:\"Untitled\",headerClass:\"selectize-dropdown-header\",titleRowClass:\"selectize-dropdown-header-title\",labelClass:\"selectize-dropdown-header-label\",closeClass:\"selectize-dropdown-header-close\",html:function(a){return'<div class=\"'+a.headerClass+'\"><div class=\"'+a.titleRowClass+'\"><span class=\"'+a.labelClass+'\">'+a.title+'</span><a href=\"javascript:void(0)\" class=\"'+a.closeClass+'\">×</a></div></div>'}},b),c.setup=function(){var d=c.setup;return function(){d.apply(c,arguments),c.$dropdown_header=a(b.html(b)),c.$dropdown.prepend(c.$dropdown_header)}}()}),w.define(\"optgroup_columns\",function(b){var c=this;b=a.extend({equalizeWidth:!0,equalizeHeight:!0},b),this.getAdjacentOption=function(b,c){var d=b.closest(\"[data-group]\").find(\"[data-selectable]\"),e=d.index(b)+c;return e>=0&&e<d.length?d.eq(e):a()},this.onKeyDown=function(){var a=c.onKeyDown;return function(b){var d,e,f,g;return!this.isOpen||37!==b.keyCode&&39!==b.keyCode?a.apply(this,arguments):(c.ignoreHover=!0,g=this.$activeOption.closest(\"[data-group]\"),d=g.find(\"[data-selectable]\").index(this.$activeOption),g=37===b.keyCode?g.prev(\"[data-group]\"):g.next(\"[data-group]\"),f=g.find(\"[data-selectable]\"),e=f.eq(Math.min(f.length-1,d)),void(e.length&&this.setActiveOption(e)))}}();var d=function(){var a,b=d.width,c=document;return void 0===b&&(a=c.createElement(\"div\"),a.innerHTML='<div style=\"width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;\"><div style=\"width:1px;height:100px;\"></div></div>',a=a.firstChild,c.body.appendChild(a),b=d.width=a.offsetWidth-a.clientWidth,c.body.removeChild(a)),b},e=function(){var e,f,g,h,i,j,k;if(k=a(\"[data-group]\",c.$dropdown_content),(f=k.length)&&c.$dropdown_content.width()){if(b.equalizeHeight){for(g=0,e=0;e<f;e++)g=Math.max(g,k.eq(e).height());k.css({height:g})}b.equalizeWidth&&(j=c.$dropdown_content.innerWidth()-d(),h=Math.round(j/f),k.css({width:h}),f>1&&(i=j-h*(f-1),k.eq(f-1).css({width:i})))}};(b.equalizeHeight||b.equalizeWidth)&&(m.after(this,\"positionDropdown\",e),m.after(this,\"refreshOptions\",e))}),w.define(\"remove_button\",function(b){b=a.extend({label:\"×\",title:\"Remove\",className:\"remove\",append:!0},b);if(\"single\"===this.settings.mode)return void function(b,c){c.className=\"remove-single\";var d=b,e='<a href=\"javascript:void(0)\" class=\"'+c.className+'\" tabindex=\"-1\" title=\"'+l(c.title)+'\">'+c.label+\"</a>\",f=function(b,c){return a(\"<span>\").append(b).append(c)};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=a(d.$input.context).attr(\"id\"),i=(a(\"#\"+h),d.settings.render.item);d.settings.render.item=function(a){return f(i.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on(\"click\",\".\"+c.className,function(a){a.preventDefault(),d.isLocked||d.clear()})}}()}(this,b);!function(b,c){var d=b,e='<a href=\"javascript:void(0)\" class=\"'+c.className+'\" tabindex=\"-1\" title=\"'+l(c.title)+'\">'+c.label+\"</a>\",f=function(a,b){var c=a.search(/(<\\/[^>]+>\\s*)$/);return a.substring(0,c)+b+a.substring(c)};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=d.settings.render.item;d.settings.render.item=function(a){return f(h.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on(\"click\",\".\"+c.className,function(b){if(b.preventDefault(),!d.isLocked){var c=a(b.currentTarget).parent();d.setActiveItem(c),d.deleteSelection()&&d.setCaret(d.items.length)}})}}()}(this,b)}),w.define(\"restore_on_backspace\",function(a){var b=this;a.text=a.text||function(a){return a[this.settings.labelField]},this.onKeyDown=function(){var c=b.onKeyDown;return function(b){var d,e;return 8===b.keyCode&&\"\"===this.$control_input.val()&&!this.$activeItems.length&&(d=this.caretPos-1)>=0&&d<this.items.length?(e=this.options[this.items[d]],this.deleteSelection(b)&&(this.setTextboxValue(a.text.apply(this,[e])),this.refreshOptions(!0)),void b.preventDefault()):c.apply(this,arguments)}}()}),w});","/*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */\n!function(n){\"function\"==typeof define&&define.amd?define([\"jquery\"],n):\"object\"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t=\"undefined\"!=typeof window?require(\"jquery\"):require(\"jquery\")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,b;function w(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split(\"/\"),f=y.map,g=f&&f[\"*\"]||{};if(e){for(s=(e=e.split(\"/\")).length-1,y.nodeIdCompat&&b.test(e[s])&&(e[s]=e[s].replace(b,\"\")),\".\"===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u<e.length;u++)if(\".\"===(p=e[u]))e.splice(u,1),--u;else if(\"..\"===p){if(0===u||1===u&&\"..\"===e[2]||\"..\"===e[u-1])continue;0<u&&(e.splice(u-1,2),u-=2)}e=e.join(\"/\")}if((h||g)&&f){for(u=(n=e.split(\"/\")).length;0<u;--u){if(r=n.slice(0,u).join(\"/\"),h)for(d=h.length;0<d;--d)if(i=(i=f[h.slice(0,d).join(\"/\")])&&i[r]){o=i,a=u;break}if(o)break;!l&&g&&g[r]&&(l=g[r],c=u)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join(\"/\"))}return e}function A(t,n){return function(){var e=a.call(arguments,0);return\"string\"!=typeof e[0]&&1===e.length&&e.push(null),s.apply(h,e.concat([t,n]))}}function x(t){return function(e){m[t]=e}}function D(e){if(w(v,e)){var t=v[e];delete v[e],_[e]=!0,o.apply(h,t)}if(!w(m,e)&&!w(_,e))throw new Error(\"No \"+e);return m[e]}function c(e){var t,n=e?e.indexOf(\"!\"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return e?c(e):[]}return e&&e.requirejs||(e?n=e:e={},m={},v={},y={},_={},i=Object.prototype.hasOwnProperty,a=[].slice,b=/\\.js$/,f=function(e,t){var n,r,i=c(e),o=i[0],s=t[1];return e=i[1],o&&(n=D(o=l(o,s))),o?e=n&&n.normalize?n.normalize(e,(r=s,function(e){return l(e,r)})):l(e,s):(o=(i=c(e=l(e,s)))[0],e=i[1],o&&(n=D(o))),{f:o?o+\"!\"+e:e,n:e,pr:o,p:n}},g={require:function(e){return A(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:\"\",exports:m[e],config:(t=e,function(){return y&&y.config&&y.config[t]||{}})};var t}},o=function(e,t,n,r){var i,o,s,a,l,c,u,d=[],p=typeof n;if(c=S(r=r||e),\"undefined\"==p||\"function\"==p){for(t=!t.length&&n.length?[\"require\",\"exports\",\"module\"]:t,l=0;l<t.length;l+=1)if(\"require\"===(o=(a=f(t[l],c)).f))d[l]=g.require(e);else if(\"exports\"===o)d[l]=g.exports(e),u=!0;else if(\"module\"===o)i=d[l]=g.module(e);else if(w(m,o)||w(v,o)||w(_,o))d[l]=D(o);else{if(!a.p)throw new Error(e+\" missing \"+o);a.p.load(a.n,A(r,!0),x(o),{}),d[l]=m[o]}s=n?n.apply(m[e],d):void 0,e&&(i&&i.exports!==h&&i.exports!==m[e]?m[e]=i.exports:s===h&&u||(m[e]=s))}else e&&(m[e]=n)},t=n=s=function(e,t,n,r,i){if(\"string\"==typeof e)return g[e]?g[e](t):D(f(e,S(t)).f);if(!e.splice){if((y=e).deps&&s(y.deps,y.callback),!t)return;t.splice?(e=t,t=n,n=null):e=h}return t=t||function(){},\"function\"==typeof n&&(n=r,r=i),r?o(h,e,t,n):setTimeout(function(){o(h,e,t,n)},4),s},s.config=function(e){return s(e)},t._defined=m,(r=function(e,t,n){if(\"string\"!=typeof e)throw new Error(\"See almond README: incorrect module build, no module name\");t.splice||(n=t,t=[]),w(m,e)||w(v,e)||(v[e]=[e,t,n])}).amd={jQuery:!0},e.requirejs=t,e.require=n,e.define=r),e.define(\"almond\",function(){}),e.define(\"jquery\",[],function(){var e=u||$;return null==e&&console&&console.error&&console.error(\"Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page.\"),e}),e.define(\"select2/utils\",[\"jquery\"],function(o){var i={};function u(e){var t=e.prototype,n=[];for(var r in t){\"function\"==typeof t[r]&&\"constructor\"!==r&&n.push(r)}return n}i.Extend=function(e,t){var n={}.hasOwnProperty;function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},i.Decorate=function(r,i){var e=u(i),t=u(r);function o(){var e=Array.prototype.unshift,t=i.prototype.constructor.length,n=r.prototype.constructor;0<t&&(e.call(arguments,r.prototype.constructor),n=i.prototype.constructor),n.apply(this,arguments)}i.displayName=r.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=r.prototype[s]}function a(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=i.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}for(var l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o};function e(){this.listeners={}}e.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},e.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),\"*\"in this.listeners&&this.invoke(this.listeners[\"*\"],arguments)},e.prototype.invoke=function(e,t){for(var n=0,r=e.length;n<r;n++)e[n].apply(this,t)},i.Observable=e,i.generateChars=function(e){for(var t=\"\",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},i.bind=function(e,t){return function(){e.apply(t,arguments)}},i._convertData=function(e){for(var t in e){var n=t.split(\"-\"),r=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in r||(r[o]={}),i==n.length-1&&(r[o]=e[t]),r=r[o]}delete e[t]}}return e},i.hasScroll=function(e,t){var n=o(t),r=t.style.overflowX,i=t.style.overflowY;return(r!==i||\"hidden\"!==i&&\"visible\"!==i)&&(\"scroll\"===r||\"scroll\"===i||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},i.escapeMarkup=function(e){var t={\"\\\\\":\"\\",\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\",\"/\":\"/\"};return\"string\"!=typeof e?e:String(e).replace(/[&<>\"'\\/\\\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if(\"1.7\"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute(\"data-select2-id\");return null==t&&(e.id?(t=e.id,e.setAttribute(\"data-select2-id\",t)):(e.setAttribute(\"data-select2-id\",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute(\"data-select2-id\")},i}),e.define(\"select2/results\",[\"jquery\",\"./utils\"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('<ul class=\"select2-results__options\" role=\"listbox\"></ul>');return this.options.get(\"multiple\")&&e.attr(\"aria-multiselectable\",\"true\"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get(\"escapeMarkup\");this.clear(),this.hideLoading();var n=h('<li role=\"alert\" aria-live=\"assertive\" class=\"select2-results__option\"></li>'),r=this.options.get(\"translations\").get(e.message);n.append(t(r(e.args))),n[0].className+=\" select2-results__message\",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(\".select2-results__message\").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var r=e.results[n],i=this.option(r);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger(\"results:message\",{message:\"noResults\"})},r.prototype.position=function(e,t){t.find(\".select2-results\").append(e)},r.prototype.sort=function(e){return this.options.get(\"sorter\")(e)},r.prototype.highlightFirstItem=function(){var e=this.$results.find(\".select2-results__option[aria-selected]\"),t=e.filter(\"[aria-selected=true]\");0<t.length?t.first().trigger(\"mouseenter\"):e.first().trigger(\"mouseenter\"),this.ensureHighlightVisible()},r.prototype.setClasses=function(){var t=this;this.data.current(function(e){var r=h.map(e,function(e){return e.id.toString()});t.$results.find(\".select2-results__option[aria-selected]\").each(function(){var e=h(this),t=f.GetData(this,\"data\"),n=\"\"+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<h.inArray(n,r)?e.attr(\"aria-selected\",\"true\"):e.attr(\"aria-selected\",\"false\")})})},r.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get(\"translations\").get(\"searching\")(e)},n=this.option(t);n.className+=\" loading-results\",this.$results.prepend(n)},r.prototype.hideLoading=function(){this.$results.find(\".loading-results\").remove()},r.prototype.option=function(e){var t=document.createElement(\"li\");t.className=\"select2-results__option\";var n={role:\"option\",\"aria-selected\":\"false\"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var i in(null!=e.element&&r.call(e.element,\":disabled\")||null==e.element&&e.disabled)&&(delete n[\"aria-selected\"],n[\"aria-disabled\"]=\"true\"),null==e.id&&delete n[\"aria-selected\"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role=\"group\",n[\"aria-label\"]=e.text,delete n[\"aria-selected\"]),n){var o=n[i];t.setAttribute(i,o)}if(e.children){var s=h(t),a=document.createElement(\"strong\");a.className=\"select2-results__group\";h(a);this.template(e,a);for(var l=[],c=0;c<e.children.length;c++){var u=e.children[c],d=this.option(u);l.push(d)}var p=h(\"<ul></ul>\",{class:\"select2-results__options select2-results__options--nested\"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,\"data\",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+\"-results\";this.$results.attr(\"id\",n),t.on(\"results:all\",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on(\"results:append\",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on(\"query\",function(e){l.hideMessages(),l.showLoading(e)}),t.on(\"select\",function(){t.isOpen()&&(l.setClasses(),l.options.get(\"scrollAfterSelect\")&&l.highlightFirstItem())}),t.on(\"unselect\",function(){t.isOpen()&&(l.setClasses(),l.options.get(\"scrollAfterSelect\")&&l.highlightFirstItem())}),t.on(\"open\",function(){l.$results.attr(\"aria-expanded\",\"true\"),l.$results.attr(\"aria-hidden\",\"false\"),l.setClasses(),l.ensureHighlightVisible()}),t.on(\"close\",function(){l.$results.attr(\"aria-expanded\",\"false\"),l.$results.attr(\"aria-hidden\",\"true\"),l.$results.removeAttr(\"aria-activedescendant\")}),t.on(\"results:toggle\",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger(\"mouseup\")}),t.on(\"results:select\",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],\"data\");\"true\"==e.attr(\"aria-selected\")?l.trigger(\"close\",{}):l.trigger(\"select\",{data:t})}}),t.on(\"results:previous\",function(){var e=l.getHighlightedResults(),t=l.$results.find(\"[aria-selected]\"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger(\"mouseenter\");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on(\"results:next\",function(){var e=l.getHighlightedResults(),t=l.$results.find(\"[aria-selected]\"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger(\"mouseenter\");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):i<o&&l.$results.scrollTop(s)}}),t.on(\"results:focus\",function(e){e.element.addClass(\"select2-results__option--highlighted\")}),t.on(\"results:message\",function(e){l.displayMessage(e)}),h.fn.mousewheel&&this.$results.on(\"mousewheel\",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,r=0<e.deltaY&&t-e.deltaY<=0,i=e.deltaY<0&&n<=l.$results.height();r?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):i&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on(\"mouseup\",\".select2-results__option[aria-selected]\",function(e){var t=h(this),n=f.GetData(this,\"data\");\"true\"!==t.attr(\"aria-selected\")?l.trigger(\"select\",{originalEvent:e,data:n}):l.options.get(\"multiple\")?l.trigger(\"unselect\",{originalEvent:e,data:n}):l.trigger(\"close\",{})}),this.$results.on(\"mouseenter\",\".select2-results__option[aria-selected]\",function(e){var t=f.GetData(this,\"data\");l.getHighlightedResults().removeClass(\"select2-results__option--highlighted\"),l.trigger(\"results:focus\",{data:t,element:h(this)})})},r.prototype.getHighlightedResults=function(){return this.$results.find(\".select2-results__option--highlighted\")},r.prototype.destroy=function(){this.$results.remove()},r.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find(\"[aria-selected]\").index(e),n=this.$results.offset().top,r=e.offset().top,i=this.$results.scrollTop()+(r-n),o=r-n;i-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get(\"templateResult\"),r=this.options.get(\"escapeMarkup\"),i=n(e,t);null==i?t.style.display=\"none\":\"string\"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define(\"select2/keys\",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define(\"select2/selection/base\",[\"jquery\",\"../utils\",\"../keys\"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('<span class=\"select2-selection\" role=\"combobox\" aria-haspopup=\"true\" aria-expanded=\"false\"></span>');return this._tabindex=0,null!=r.GetData(this.$element[0],\"old-tabindex\")?this._tabindex=r.GetData(this.$element[0],\"old-tabindex\"):null!=this.$element.attr(\"tabindex\")&&(this._tabindex=this.$element.attr(\"tabindex\")),e.attr(\"title\",this.$element.attr(\"title\")),e.attr(\"tabindex\",this._tabindex),e.attr(\"aria-disabled\",\"false\"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+\"-results\";this.container=e,this.$selection.on(\"focus\",function(e){n.trigger(\"focus\",e)}),this.$selection.on(\"blur\",function(e){n._handleBlur(e)}),this.$selection.on(\"keydown\",function(e){n.trigger(\"keypress\",e),e.which===i.SPACE&&e.preventDefault()}),e.on(\"results:focus\",function(e){n.$selection.attr(\"aria-activedescendant\",e.data._resultId)}),e.on(\"selection:update\",function(e){n.update(e.data)}),e.on(\"open\",function(){n.$selection.attr(\"aria-expanded\",\"true\"),n.$selection.attr(\"aria-owns\",r),n._attachCloseHandler(e)}),e.on(\"close\",function(){n.$selection.attr(\"aria-expanded\",\"false\"),n.$selection.removeAttr(\"aria-activedescendant\"),n.$selection.removeAttr(\"aria-owns\"),n.$selection.trigger(\"focus\"),n._detachCloseHandler(e)}),e.on(\"enable\",function(){n.$selection.attr(\"tabindex\",n._tabindex),n.$selection.attr(\"aria-disabled\",\"false\")}),e.on(\"disable\",function(){n.$selection.attr(\"tabindex\",\"-1\"),n.$selection.attr(\"aria-disabled\",\"true\")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger(\"blur\",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on(\"mousedown.select2.\"+e.id,function(e){var t=n(e.target).closest(\".select2\");n(\".select2.select2-container--open\").each(function(){this!=t[0]&&r.GetData(this,\"element\").select2(\"close\")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off(\"mousedown.select2.\"+e.id)},o.prototype.position=function(e,t){t.find(\".selection\").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error(\"The `update` method must be defined in child classes.\")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get(\"disabled\")},o}),e.define(\"select2/selection/single\",[\"jquery\",\"./base\",\"../utils\",\"../keys\"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass(\"select2-selection--single\"),e.html('<span class=\"select2-selection__rendered\"></span><span class=\"select2-selection__arrow\" role=\"presentation\"><b role=\"presentation\"></b></span>'),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+\"-container\";this.$selection.find(\".select2-selection__rendered\").attr(\"id\",r).attr(\"role\",\"textbox\").attr(\"aria-readonly\",\"true\"),this.$selection.attr(\"aria-labelledby\",r),this.$selection.on(\"mousedown\",function(e){1===e.which&&n.trigger(\"toggle\",{originalEvent:e})}),this.$selection.on(\"focus\",function(e){}),this.$selection.on(\"blur\",function(e){}),t.on(\"focus\",function(e){t.isOpen()||n.$selection.trigger(\"focus\")})},i.prototype.clear=function(){var e=this.$selection.find(\".select2-selection__rendered\");e.empty(),e.removeAttr(\"title\")},i.prototype.display=function(e,t){var n=this.options.get(\"templateSelection\");return this.options.get(\"escapeMarkup\")(n(e,t))},i.prototype.selectionContainer=function(){return e(\"<span></span>\")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(\".select2-selection__rendered\"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr(\"title\",i):n.removeAttr(\"title\")}else this.clear()},i}),e.define(\"select2/selection/multiple\",[\"jquery\",\"./base\",\"../utils\"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass(\"select2-selection--multiple\"),e.html('<ul class=\"select2-selection__rendered\"></ul>'),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on(\"click\",function(e){r.trigger(\"toggle\",{originalEvent:e})}),this.$selection.on(\"click\",\".select2-selection__choice__remove\",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],\"data\");r.trigger(\"unselect\",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(\".select2-selection__rendered\");e.empty(),e.removeAttr(\"title\")},n.prototype.display=function(e,t){var n=this.options.get(\"templateSelection\");return this.options.get(\"escapeMarkup\")(n(e,t))},n.prototype.selectionContainer=function(){return i('<li class=\"select2-selection__choice\"><span class=\"select2-selection__choice__remove\" role=\"presentation\">×</span></li>')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=this.selectionContainer(),o=this.display(r,i);i.append(o);var s=r.title||r.text;s&&i.attr(\"title\",s),l.StoreData(i[0],\"data\",r),t.push(i)}var a=this.$selection.find(\".select2-selection__rendered\");l.appendMany(a,t)}},n}),e.define(\"select2/selection/placeholder\",[\"../utils\"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get(\"placeholder\")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return\"string\"==typeof t&&(t={id:\"\",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass(\"select2-selection__placeholder\").removeClass(\"select2-selection__choice\"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var r=this.createPlaceholder(this.placeholder);this.$selection.find(\".select2-selection__rendered\").append(r)},t}),e.define(\"select2/selection/allowClear\",[\"jquery\",\"../keys\",\"../utils\"],function(i,r,a){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),null==this.placeholder&&this.options.get(\"debug\")&&window.console&&console.error&&console.error(\"Select2: The `allowClear` option should be used in combination with the `placeholder` option.\"),this.$selection.on(\"mousedown\",\".select2-selection__clear\",function(e){r._handleClear(e)}),t.on(\"keypress\",function(e){r._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.isDisabled()){var n=this.$selection.find(\".select2-selection__clear\");if(0!==n.length){t.stopPropagation();var r=a.GetData(n[0],\"data\"),i=this.$element.val();this.$element.val(this.placeholder.id);var o={data:r};if(this.trigger(\"clear\",o),o.prevented)this.$element.val(i);else{for(var s=0;s<r.length;s++)if(o={data:r[s]},this.trigger(\"unselect\",o),o.prevented)return void this.$element.val(i);this.$element.trigger(\"input\").trigger(\"change\"),this.trigger(\"toggle\",{})}}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=r.DELETE&&t.which!=r.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(\".select2-selection__placeholder\").length||0===t.length)){var n=this.options.get(\"translations\").get(\"removeAllItems\"),r=i('<span class=\"select2-selection__clear\" title=\"'+n()+'\">×</span>');a.StoreData(r[0],\"data\",t),this.$selection.find(\".select2-selection__rendered\").prepend(r)}},e}),e.define(\"select2/selection/search\",[\"jquery\",\"../utils\",\"../keys\"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('<li class=\"select2-search select2-search--inline\"><input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"none\" spellcheck=\"false\" role=\"searchbox\" aria-autocomplete=\"list\" /></li>');this.$searchContainer=t,this.$search=t.find(\"input\");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+\"-results\";e.call(this,t,n),t.on(\"open\",function(){r.$search.attr(\"aria-controls\",i),r.$search.trigger(\"focus\")}),t.on(\"close\",function(){r.$search.val(\"\"),r.$search.removeAttr(\"aria-controls\"),r.$search.removeAttr(\"aria-activedescendant\"),r.$search.trigger(\"focus\")}),t.on(\"enable\",function(){r.$search.prop(\"disabled\",!1),r._transferTabIndex()}),t.on(\"disable\",function(){r.$search.prop(\"disabled\",!0)}),t.on(\"focus\",function(e){r.$search.trigger(\"focus\")}),t.on(\"results:focus\",function(e){e.data._resultId?r.$search.attr(\"aria-activedescendant\",e.data._resultId):r.$search.removeAttr(\"aria-activedescendant\")}),this.$selection.on(\"focusin\",\".select2-search--inline\",function(e){r.trigger(\"focus\",e)}),this.$selection.on(\"focusout\",\".select2-search--inline\",function(e){r._handleBlur(e)}),this.$selection.on(\"keydown\",\".select2-search--inline\",function(e){if(e.stopPropagation(),r.trigger(\"keypress\",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&\"\"===r.$search.val()){var t=r.$searchContainer.prev(\".select2-selection__choice\");if(0<t.length){var n=a.GetData(t[0],\"data\");r.searchRemoveChoice(n),e.preventDefault()}}}),this.$selection.on(\"click\",\".select2-search--inline\",function(e){r.$search.val()&&e.stopPropagation()});var o=document.documentMode,s=o&&o<=11;this.$selection.on(\"input.searchcheck\",\".select2-search--inline\",function(e){s?r.$selection.off(\"input.search input.searchcheck\"):r.$selection.off(\"keyup.search\")}),this.$selection.on(\"keyup.search input.search\",\".select2-search--inline\",function(e){if(s&&\"input\"===e.type)r.$selection.off(\"input.search input.searchcheck\");else{var t=e.which;t!=l.SHIFT&&t!=l.CTRL&&t!=l.ALT&&t!=l.TAB&&r.handleSearch(e)}})},e.prototype._transferTabIndex=function(e){this.$search.attr(\"tabindex\",this.$selection.attr(\"tabindex\")),this.$selection.attr(\"tabindex\",\"-1\")},e.prototype.createPlaceholder=function(e,t){this.$search.attr(\"placeholder\",t.text)},e.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr(\"placeholder\",\"\"),e.call(this,t),this.$selection.find(\".select2-selection__rendered\").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger(\"focus\")},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger(\"query\",{term:e})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(e,t){this.trigger(\"unselect\",{data:t}),this.$search.val(t.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css(\"width\",\"25px\");var e=\"\";\"\"!==this.$search.attr(\"placeholder\")?e=this.$selection.find(\".select2-selection__rendered\").width():e=.75*(this.$search.val().length+1)+\"em\";this.$search.css(\"width\",e)},e}),e.define(\"select2/selection/eventRelay\",[\"jquery\"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var r=this,i=[\"open\",\"opening\",\"close\",\"closing\",\"select\",\"selecting\",\"unselect\",\"unselecting\",\"clear\",\"clearing\"],o=[\"opening\",\"closing\",\"selecting\",\"unselecting\",\"clearing\"];e.call(this,t,n),t.on(\"*\",function(e,t){if(-1!==s.inArray(e,i)){t=t||{};var n=s.Event(\"select2:\"+e,{params:t});r.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define(\"select2/translation\",[\"jquery\",\"require\"],function(t,n){function r(e){this.dict=e||{}}return r.prototype.all=function(){return this.dict},r.prototype.get=function(e){return this.dict[e]},r.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},r._cache={},r.loadPath=function(e){if(!(e in r._cache)){var t=n(e);r._cache[e]=t}return new r(r._cache[e])},r}),e.define(\"select2/diacritics\",[],function(){return{\"Ⓐ\":\"A\",\"A\":\"A\",\"À\":\"A\",\"Á\":\"A\",\"Â\":\"A\",\"Ầ\":\"A\",\"Ấ\":\"A\",\"Ẫ\":\"A\",\"Ẩ\":\"A\",\"Ã\":\"A\",\"Ā\":\"A\",\"Ă\":\"A\",\"Ằ\":\"A\",\"Ắ\":\"A\",\"Ẵ\":\"A\",\"Ẳ\":\"A\",\"Ȧ\":\"A\",\"Ǡ\":\"A\",\"Ä\":\"A\",\"Ǟ\":\"A\",\"Ả\":\"A\",\"Å\":\"A\",\"Ǻ\":\"A\",\"Ǎ\":\"A\",\"Ȁ\":\"A\",\"Ȃ\":\"A\",\"Ạ\":\"A\",\"Ậ\":\"A\",\"Ặ\":\"A\",\"Ḁ\":\"A\",\"Ą\":\"A\",\"Ⱥ\":\"A\",\"Ɐ\":\"A\",\"Ꜳ\":\"AA\",\"Æ\":\"AE\",\"Ǽ\":\"AE\",\"Ǣ\":\"AE\",\"Ꜵ\":\"AO\",\"Ꜷ\":\"AU\",\"Ꜹ\":\"AV\",\"Ꜻ\":\"AV\",\"Ꜽ\":\"AY\",\"Ⓑ\":\"B\",\"B\":\"B\",\"Ḃ\":\"B\",\"Ḅ\":\"B\",\"Ḇ\":\"B\",\"Ƀ\":\"B\",\"Ƃ\":\"B\",\"Ɓ\":\"B\",\"Ⓒ\":\"C\",\"C\":\"C\",\"Ć\":\"C\",\"Ĉ\":\"C\",\"Ċ\":\"C\",\"Č\":\"C\",\"Ç\":\"C\",\"Ḉ\":\"C\",\"Ƈ\":\"C\",\"Ȼ\":\"C\",\"Ꜿ\":\"C\",\"Ⓓ\":\"D\",\"D\":\"D\",\"Ḋ\":\"D\",\"Ď\":\"D\",\"Ḍ\":\"D\",\"Ḑ\":\"D\",\"Ḓ\":\"D\",\"Ḏ\":\"D\",\"Đ\":\"D\",\"Ƌ\":\"D\",\"Ɗ\":\"D\",\"Ɖ\":\"D\",\"Ꝺ\":\"D\",\"DZ\":\"DZ\",\"DŽ\":\"DZ\",\"Dz\":\"Dz\",\"Dž\":\"Dz\",\"Ⓔ\":\"E\",\"E\":\"E\",\"È\":\"E\",\"É\":\"E\",\"Ê\":\"E\",\"Ề\":\"E\",\"Ế\":\"E\",\"Ễ\":\"E\",\"Ể\":\"E\",\"Ẽ\":\"E\",\"Ē\":\"E\",\"Ḕ\":\"E\",\"Ḗ\":\"E\",\"Ĕ\":\"E\",\"Ė\":\"E\",\"Ë\":\"E\",\"Ẻ\":\"E\",\"Ě\":\"E\",\"Ȅ\":\"E\",\"Ȇ\":\"E\",\"Ẹ\":\"E\",\"Ệ\":\"E\",\"Ȩ\":\"E\",\"Ḝ\":\"E\",\"Ę\":\"E\",\"Ḙ\":\"E\",\"Ḛ\":\"E\",\"Ɛ\":\"E\",\"Ǝ\":\"E\",\"Ⓕ\":\"F\",\"F\":\"F\",\"Ḟ\":\"F\",\"Ƒ\":\"F\",\"Ꝼ\":\"F\",\"Ⓖ\":\"G\",\"G\":\"G\",\"Ǵ\":\"G\",\"Ĝ\":\"G\",\"Ḡ\":\"G\",\"Ğ\":\"G\",\"Ġ\":\"G\",\"Ǧ\":\"G\",\"Ģ\":\"G\",\"Ǥ\":\"G\",\"Ɠ\":\"G\",\"Ꞡ\":\"G\",\"Ᵹ\":\"G\",\"Ꝿ\":\"G\",\"Ⓗ\":\"H\",\"H\":\"H\",\"Ĥ\":\"H\",\"Ḣ\":\"H\",\"Ḧ\":\"H\",\"Ȟ\":\"H\",\"Ḥ\":\"H\",\"Ḩ\":\"H\",\"Ḫ\":\"H\",\"Ħ\":\"H\",\"Ⱨ\":\"H\",\"Ⱶ\":\"H\",\"Ɥ\":\"H\",\"Ⓘ\":\"I\",\"I\":\"I\",\"Ì\":\"I\",\"Í\":\"I\",\"Î\":\"I\",\"Ĩ\":\"I\",\"Ī\":\"I\",\"Ĭ\":\"I\",\"İ\":\"I\",\"Ï\":\"I\",\"Ḯ\":\"I\",\"Ỉ\":\"I\",\"Ǐ\":\"I\",\"Ȉ\":\"I\",\"Ȋ\":\"I\",\"Ị\":\"I\",\"Į\":\"I\",\"Ḭ\":\"I\",\"Ɨ\":\"I\",\"Ⓙ\":\"J\",\"J\":\"J\",\"Ĵ\":\"J\",\"Ɉ\":\"J\",\"Ⓚ\":\"K\",\"K\":\"K\",\"Ḱ\":\"K\",\"Ǩ\":\"K\",\"Ḳ\":\"K\",\"Ķ\":\"K\",\"Ḵ\":\"K\",\"Ƙ\":\"K\",\"Ⱪ\":\"K\",\"Ꝁ\":\"K\",\"Ꝃ\":\"K\",\"Ꝅ\":\"K\",\"Ꞣ\":\"K\",\"Ⓛ\":\"L\",\"L\":\"L\",\"Ŀ\":\"L\",\"Ĺ\":\"L\",\"Ľ\":\"L\",\"Ḷ\":\"L\",\"Ḹ\":\"L\",\"Ļ\":\"L\",\"Ḽ\":\"L\",\"Ḻ\":\"L\",\"Ł\":\"L\",\"Ƚ\":\"L\",\"Ɫ\":\"L\",\"Ⱡ\":\"L\",\"Ꝉ\":\"L\",\"Ꝇ\":\"L\",\"Ꞁ\":\"L\",\"LJ\":\"LJ\",\"Lj\":\"Lj\",\"Ⓜ\":\"M\",\"M\":\"M\",\"Ḿ\":\"M\",\"Ṁ\":\"M\",\"Ṃ\":\"M\",\"Ɱ\":\"M\",\"Ɯ\":\"M\",\"Ⓝ\":\"N\",\"N\":\"N\",\"Ǹ\":\"N\",\"Ń\":\"N\",\"Ñ\":\"N\",\"Ṅ\":\"N\",\"Ň\":\"N\",\"Ṇ\":\"N\",\"Ņ\":\"N\",\"Ṋ\":\"N\",\"Ṉ\":\"N\",\"Ƞ\":\"N\",\"Ɲ\":\"N\",\"Ꞑ\":\"N\",\"Ꞥ\":\"N\",\"NJ\":\"NJ\",\"Nj\":\"Nj\",\"Ⓞ\":\"O\",\"O\":\"O\",\"Ò\":\"O\",\"Ó\":\"O\",\"Ô\":\"O\",\"Ồ\":\"O\",\"Ố\":\"O\",\"Ỗ\":\"O\",\"Ổ\":\"O\",\"Õ\":\"O\",\"Ṍ\":\"O\",\"Ȭ\":\"O\",\"Ṏ\":\"O\",\"Ō\":\"O\",\"Ṑ\":\"O\",\"Ṓ\":\"O\",\"Ŏ\":\"O\",\"Ȯ\":\"O\",\"Ȱ\":\"O\",\"Ö\":\"O\",\"Ȫ\":\"O\",\"Ỏ\":\"O\",\"Ő\":\"O\",\"Ǒ\":\"O\",\"Ȍ\":\"O\",\"Ȏ\":\"O\",\"Ơ\":\"O\",\"Ờ\":\"O\",\"Ớ\":\"O\",\"Ỡ\":\"O\",\"Ở\":\"O\",\"Ợ\":\"O\",\"Ọ\":\"O\",\"Ộ\":\"O\",\"Ǫ\":\"O\",\"Ǭ\":\"O\",\"Ø\":\"O\",\"Ǿ\":\"O\",\"Ɔ\":\"O\",\"Ɵ\":\"O\",\"Ꝋ\":\"O\",\"Ꝍ\":\"O\",\"Œ\":\"OE\",\"Ƣ\":\"OI\",\"Ꝏ\":\"OO\",\"Ȣ\":\"OU\",\"Ⓟ\":\"P\",\"P\":\"P\",\"Ṕ\":\"P\",\"Ṗ\":\"P\",\"Ƥ\":\"P\",\"Ᵽ\":\"P\",\"Ꝑ\":\"P\",\"Ꝓ\":\"P\",\"Ꝕ\":\"P\",\"Ⓠ\":\"Q\",\"Q\":\"Q\",\"Ꝗ\":\"Q\",\"Ꝙ\":\"Q\",\"Ɋ\":\"Q\",\"Ⓡ\":\"R\",\"R\":\"R\",\"Ŕ\":\"R\",\"Ṙ\":\"R\",\"Ř\":\"R\",\"Ȑ\":\"R\",\"Ȓ\":\"R\",\"Ṛ\":\"R\",\"Ṝ\":\"R\",\"Ŗ\":\"R\",\"Ṟ\":\"R\",\"Ɍ\":\"R\",\"Ɽ\":\"R\",\"Ꝛ\":\"R\",\"Ꞧ\":\"R\",\"Ꞃ\":\"R\",\"Ⓢ\":\"S\",\"S\":\"S\",\"ẞ\":\"S\",\"Ś\":\"S\",\"Ṥ\":\"S\",\"Ŝ\":\"S\",\"Ṡ\":\"S\",\"Š\":\"S\",\"Ṧ\":\"S\",\"Ṣ\":\"S\",\"Ṩ\":\"S\",\"Ș\":\"S\",\"Ş\":\"S\",\"Ȿ\":\"S\",\"Ꞩ\":\"S\",\"Ꞅ\":\"S\",\"Ⓣ\":\"T\",\"T\":\"T\",\"Ṫ\":\"T\",\"Ť\":\"T\",\"Ṭ\":\"T\",\"Ț\":\"T\",\"Ţ\":\"T\",\"Ṱ\":\"T\",\"Ṯ\":\"T\",\"Ŧ\":\"T\",\"Ƭ\":\"T\",\"Ʈ\":\"T\",\"Ⱦ\":\"T\",\"Ꞇ\":\"T\",\"Ꜩ\":\"TZ\",\"Ⓤ\":\"U\",\"U\":\"U\",\"Ù\":\"U\",\"Ú\":\"U\",\"Û\":\"U\",\"Ũ\":\"U\",\"Ṹ\":\"U\",\"Ū\":\"U\",\"Ṻ\":\"U\",\"Ŭ\":\"U\",\"Ü\":\"U\",\"Ǜ\":\"U\",\"Ǘ\":\"U\",\"Ǖ\":\"U\",\"Ǚ\":\"U\",\"Ủ\":\"U\",\"Ů\":\"U\",\"Ű\":\"U\",\"Ǔ\":\"U\",\"Ȕ\":\"U\",\"Ȗ\":\"U\",\"Ư\":\"U\",\"Ừ\":\"U\",\"Ứ\":\"U\",\"Ữ\":\"U\",\"Ử\":\"U\",\"Ự\":\"U\",\"Ụ\":\"U\",\"Ṳ\":\"U\",\"Ų\":\"U\",\"Ṷ\":\"U\",\"Ṵ\":\"U\",\"Ʉ\":\"U\",\"Ⓥ\":\"V\",\"V\":\"V\",\"Ṽ\":\"V\",\"Ṿ\":\"V\",\"Ʋ\":\"V\",\"Ꝟ\":\"V\",\"Ʌ\":\"V\",\"Ꝡ\":\"VY\",\"Ⓦ\":\"W\",\"W\":\"W\",\"Ẁ\":\"W\",\"Ẃ\":\"W\",\"Ŵ\":\"W\",\"Ẇ\":\"W\",\"Ẅ\":\"W\",\"Ẉ\":\"W\",\"Ⱳ\":\"W\",\"Ⓧ\":\"X\",\"X\":\"X\",\"Ẋ\":\"X\",\"Ẍ\":\"X\",\"Ⓨ\":\"Y\",\"Y\":\"Y\",\"Ỳ\":\"Y\",\"Ý\":\"Y\",\"Ŷ\":\"Y\",\"Ỹ\":\"Y\",\"Ȳ\":\"Y\",\"Ẏ\":\"Y\",\"Ÿ\":\"Y\",\"Ỷ\":\"Y\",\"Ỵ\":\"Y\",\"Ƴ\":\"Y\",\"Ɏ\":\"Y\",\"Ỿ\":\"Y\",\"Ⓩ\":\"Z\",\"Z\":\"Z\",\"Ź\":\"Z\",\"Ẑ\":\"Z\",\"Ż\":\"Z\",\"Ž\":\"Z\",\"Ẓ\":\"Z\",\"Ẕ\":\"Z\",\"Ƶ\":\"Z\",\"Ȥ\":\"Z\",\"Ɀ\":\"Z\",\"Ⱬ\":\"Z\",\"Ꝣ\":\"Z\",\"ⓐ\":\"a\",\"a\":\"a\",\"ẚ\":\"a\",\"à\":\"a\",\"á\":\"a\",\"â\":\"a\",\"ầ\":\"a\",\"ấ\":\"a\",\"ẫ\":\"a\",\"ẩ\":\"a\",\"ã\":\"a\",\"ā\":\"a\",\"ă\":\"a\",\"ằ\":\"a\",\"ắ\":\"a\",\"ẵ\":\"a\",\"ẳ\":\"a\",\"ȧ\":\"a\",\"ǡ\":\"a\",\"ä\":\"a\",\"ǟ\":\"a\",\"ả\":\"a\",\"å\":\"a\",\"ǻ\":\"a\",\"ǎ\":\"a\",\"ȁ\":\"a\",\"ȃ\":\"a\",\"ạ\":\"a\",\"ậ\":\"a\",\"ặ\":\"a\",\"ḁ\":\"a\",\"ą\":\"a\",\"ⱥ\":\"a\",\"ɐ\":\"a\",\"ꜳ\":\"aa\",\"æ\":\"ae\",\"ǽ\":\"ae\",\"ǣ\":\"ae\",\"ꜵ\":\"ao\",\"ꜷ\":\"au\",\"ꜹ\":\"av\",\"ꜻ\":\"av\",\"ꜽ\":\"ay\",\"ⓑ\":\"b\",\"b\":\"b\",\"ḃ\":\"b\",\"ḅ\":\"b\",\"ḇ\":\"b\",\"ƀ\":\"b\",\"ƃ\":\"b\",\"ɓ\":\"b\",\"ⓒ\":\"c\",\"c\":\"c\",\"ć\":\"c\",\"ĉ\":\"c\",\"ċ\":\"c\",\"č\":\"c\",\"ç\":\"c\",\"ḉ\":\"c\",\"ƈ\":\"c\",\"ȼ\":\"c\",\"ꜿ\":\"c\",\"ↄ\":\"c\",\"ⓓ\":\"d\",\"d\":\"d\",\"ḋ\":\"d\",\"ď\":\"d\",\"ḍ\":\"d\",\"ḑ\":\"d\",\"ḓ\":\"d\",\"ḏ\":\"d\",\"đ\":\"d\",\"ƌ\":\"d\",\"ɖ\":\"d\",\"ɗ\":\"d\",\"ꝺ\":\"d\",\"dz\":\"dz\",\"dž\":\"dz\",\"ⓔ\":\"e\",\"e\":\"e\",\"è\":\"e\",\"é\":\"e\",\"ê\":\"e\",\"ề\":\"e\",\"ế\":\"e\",\"ễ\":\"e\",\"ể\":\"e\",\"ẽ\":\"e\",\"ē\":\"e\",\"ḕ\":\"e\",\"ḗ\":\"e\",\"ĕ\":\"e\",\"ė\":\"e\",\"ë\":\"e\",\"ẻ\":\"e\",\"ě\":\"e\",\"ȅ\":\"e\",\"ȇ\":\"e\",\"ẹ\":\"e\",\"ệ\":\"e\",\"ȩ\":\"e\",\"ḝ\":\"e\",\"ę\":\"e\",\"ḙ\":\"e\",\"ḛ\":\"e\",\"ɇ\":\"e\",\"ɛ\":\"e\",\"ǝ\":\"e\",\"ⓕ\":\"f\",\"f\":\"f\",\"ḟ\":\"f\",\"ƒ\":\"f\",\"ꝼ\":\"f\",\"ⓖ\":\"g\",\"g\":\"g\",\"ǵ\":\"g\",\"ĝ\":\"g\",\"ḡ\":\"g\",\"ğ\":\"g\",\"ġ\":\"g\",\"ǧ\":\"g\",\"ģ\":\"g\",\"ǥ\":\"g\",\"ɠ\":\"g\",\"ꞡ\":\"g\",\"ᵹ\":\"g\",\"ꝿ\":\"g\",\"ⓗ\":\"h\",\"h\":\"h\",\"ĥ\":\"h\",\"ḣ\":\"h\",\"ḧ\":\"h\",\"ȟ\":\"h\",\"ḥ\":\"h\",\"ḩ\":\"h\",\"ḫ\":\"h\",\"ẖ\":\"h\",\"ħ\":\"h\",\"ⱨ\":\"h\",\"ⱶ\":\"h\",\"ɥ\":\"h\",\"ƕ\":\"hv\",\"ⓘ\":\"i\",\"i\":\"i\",\"ì\":\"i\",\"í\":\"i\",\"î\":\"i\",\"ĩ\":\"i\",\"ī\":\"i\",\"ĭ\":\"i\",\"ï\":\"i\",\"ḯ\":\"i\",\"ỉ\":\"i\",\"ǐ\":\"i\",\"ȉ\":\"i\",\"ȋ\":\"i\",\"ị\":\"i\",\"į\":\"i\",\"ḭ\":\"i\",\"ɨ\":\"i\",\"ı\":\"i\",\"ⓙ\":\"j\",\"j\":\"j\",\"ĵ\":\"j\",\"ǰ\":\"j\",\"ɉ\":\"j\",\"ⓚ\":\"k\",\"k\":\"k\",\"ḱ\":\"k\",\"ǩ\":\"k\",\"ḳ\":\"k\",\"ķ\":\"k\",\"ḵ\":\"k\",\"ƙ\":\"k\",\"ⱪ\":\"k\",\"ꝁ\":\"k\",\"ꝃ\":\"k\",\"ꝅ\":\"k\",\"ꞣ\":\"k\",\"ⓛ\":\"l\",\"l\":\"l\",\"ŀ\":\"l\",\"ĺ\":\"l\",\"ľ\":\"l\",\"ḷ\":\"l\",\"ḹ\":\"l\",\"ļ\":\"l\",\"ḽ\":\"l\",\"ḻ\":\"l\",\"ſ\":\"l\",\"ł\":\"l\",\"ƚ\":\"l\",\"ɫ\":\"l\",\"ⱡ\":\"l\",\"ꝉ\":\"l\",\"ꞁ\":\"l\",\"ꝇ\":\"l\",\"lj\":\"lj\",\"ⓜ\":\"m\",\"m\":\"m\",\"ḿ\":\"m\",\"ṁ\":\"m\",\"ṃ\":\"m\",\"ɱ\":\"m\",\"ɯ\":\"m\",\"ⓝ\":\"n\",\"n\":\"n\",\"ǹ\":\"n\",\"ń\":\"n\",\"ñ\":\"n\",\"ṅ\":\"n\",\"ň\":\"n\",\"ṇ\":\"n\",\"ņ\":\"n\",\"ṋ\":\"n\",\"ṉ\":\"n\",\"ƞ\":\"n\",\"ɲ\":\"n\",\"ʼn\":\"n\",\"ꞑ\":\"n\",\"ꞥ\":\"n\",\"nj\":\"nj\",\"ⓞ\":\"o\",\"o\":\"o\",\"ò\":\"o\",\"ó\":\"o\",\"ô\":\"o\",\"ồ\":\"o\",\"ố\":\"o\",\"ỗ\":\"o\",\"ổ\":\"o\",\"õ\":\"o\",\"ṍ\":\"o\",\"ȭ\":\"o\",\"ṏ\":\"o\",\"ō\":\"o\",\"ṑ\":\"o\",\"ṓ\":\"o\",\"ŏ\":\"o\",\"ȯ\":\"o\",\"ȱ\":\"o\",\"ö\":\"o\",\"ȫ\":\"o\",\"ỏ\":\"o\",\"ő\":\"o\",\"ǒ\":\"o\",\"ȍ\":\"o\",\"ȏ\":\"o\",\"ơ\":\"o\",\"ờ\":\"o\",\"ớ\":\"o\",\"ỡ\":\"o\",\"ở\":\"o\",\"ợ\":\"o\",\"ọ\":\"o\",\"ộ\":\"o\",\"ǫ\":\"o\",\"ǭ\":\"o\",\"ø\":\"o\",\"ǿ\":\"o\",\"ɔ\":\"o\",\"ꝋ\":\"o\",\"ꝍ\":\"o\",\"ɵ\":\"o\",\"œ\":\"oe\",\"ƣ\":\"oi\",\"ȣ\":\"ou\",\"ꝏ\":\"oo\",\"ⓟ\":\"p\",\"p\":\"p\",\"ṕ\":\"p\",\"ṗ\":\"p\",\"ƥ\":\"p\",\"ᵽ\":\"p\",\"ꝑ\":\"p\",\"ꝓ\":\"p\",\"ꝕ\":\"p\",\"ⓠ\":\"q\",\"q\":\"q\",\"ɋ\":\"q\",\"ꝗ\":\"q\",\"ꝙ\":\"q\",\"ⓡ\":\"r\",\"r\":\"r\",\"ŕ\":\"r\",\"ṙ\":\"r\",\"ř\":\"r\",\"ȑ\":\"r\",\"ȓ\":\"r\",\"ṛ\":\"r\",\"ṝ\":\"r\",\"ŗ\":\"r\",\"ṟ\":\"r\",\"ɍ\":\"r\",\"ɽ\":\"r\",\"ꝛ\":\"r\",\"ꞧ\":\"r\",\"ꞃ\":\"r\",\"ⓢ\":\"s\",\"s\":\"s\",\"ß\":\"s\",\"ś\":\"s\",\"ṥ\":\"s\",\"ŝ\":\"s\",\"ṡ\":\"s\",\"š\":\"s\",\"ṧ\":\"s\",\"ṣ\":\"s\",\"ṩ\":\"s\",\"ș\":\"s\",\"ş\":\"s\",\"ȿ\":\"s\",\"ꞩ\":\"s\",\"ꞅ\":\"s\",\"ẛ\":\"s\",\"ⓣ\":\"t\",\"t\":\"t\",\"ṫ\":\"t\",\"ẗ\":\"t\",\"ť\":\"t\",\"ṭ\":\"t\",\"ț\":\"t\",\"ţ\":\"t\",\"ṱ\":\"t\",\"ṯ\":\"t\",\"ŧ\":\"t\",\"ƭ\":\"t\",\"ʈ\":\"t\",\"ⱦ\":\"t\",\"ꞇ\":\"t\",\"ꜩ\":\"tz\",\"ⓤ\":\"u\",\"u\":\"u\",\"ù\":\"u\",\"ú\":\"u\",\"û\":\"u\",\"ũ\":\"u\",\"ṹ\":\"u\",\"ū\":\"u\",\"ṻ\":\"u\",\"ŭ\":\"u\",\"ü\":\"u\",\"ǜ\":\"u\",\"ǘ\":\"u\",\"ǖ\":\"u\",\"ǚ\":\"u\",\"ủ\":\"u\",\"ů\":\"u\",\"ű\":\"u\",\"ǔ\":\"u\",\"ȕ\":\"u\",\"ȗ\":\"u\",\"ư\":\"u\",\"ừ\":\"u\",\"ứ\":\"u\",\"ữ\":\"u\",\"ử\":\"u\",\"ự\":\"u\",\"ụ\":\"u\",\"ṳ\":\"u\",\"ų\":\"u\",\"ṷ\":\"u\",\"ṵ\":\"u\",\"ʉ\":\"u\",\"ⓥ\":\"v\",\"v\":\"v\",\"ṽ\":\"v\",\"ṿ\":\"v\",\"ʋ\":\"v\",\"ꝟ\":\"v\",\"ʌ\":\"v\",\"ꝡ\":\"vy\",\"ⓦ\":\"w\",\"w\":\"w\",\"ẁ\":\"w\",\"ẃ\":\"w\",\"ŵ\":\"w\",\"ẇ\":\"w\",\"ẅ\":\"w\",\"ẘ\":\"w\",\"ẉ\":\"w\",\"ⱳ\":\"w\",\"ⓧ\":\"x\",\"x\":\"x\",\"ẋ\":\"x\",\"ẍ\":\"x\",\"ⓨ\":\"y\",\"y\":\"y\",\"ỳ\":\"y\",\"ý\":\"y\",\"ŷ\":\"y\",\"ỹ\":\"y\",\"ȳ\":\"y\",\"ẏ\":\"y\",\"ÿ\":\"y\",\"ỷ\":\"y\",\"ẙ\":\"y\",\"ỵ\":\"y\",\"ƴ\":\"y\",\"ɏ\":\"y\",\"ỿ\":\"y\",\"ⓩ\":\"z\",\"z\":\"z\",\"ź\":\"z\",\"ẑ\":\"z\",\"ż\":\"z\",\"ž\":\"z\",\"ẓ\":\"z\",\"ẕ\":\"z\",\"ƶ\":\"z\",\"ȥ\":\"z\",\"ɀ\":\"z\",\"ⱬ\":\"z\",\"ꝣ\":\"z\",\"Ά\":\"Α\",\"Έ\":\"Ε\",\"Ή\":\"Η\",\"Ί\":\"Ι\",\"Ϊ\":\"Ι\",\"Ό\":\"Ο\",\"Ύ\":\"Υ\",\"Ϋ\":\"Υ\",\"Ώ\":\"Ω\",\"ά\":\"α\",\"έ\":\"ε\",\"ή\":\"η\",\"ί\":\"ι\",\"ϊ\":\"ι\",\"ΐ\":\"ι\",\"ό\":\"ο\",\"ύ\":\"υ\",\"ϋ\":\"υ\",\"ΰ\":\"υ\",\"ώ\":\"ω\",\"ς\":\"σ\",\"’\":\"'\"}}),e.define(\"select2/data/base\",[\"../utils\"],function(r){function n(e,t){n.__super__.constructor.call(this)}return r.Extend(n,r.Observable),n.prototype.current=function(e){throw new Error(\"The `current` method must be defined in child classes.\")},n.prototype.query=function(e,t){throw new Error(\"The `query` method must be defined in child classes.\")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+\"-result-\";return n+=r.generateChars(4),null!=t.id?n+=\"-\"+t.id.toString():n+=\"-\"+r.generateChars(4),n},n}),e.define(\"select2/data/select\",[\"./base\",\"../utils\",\"jquery\"],function(e,a,l){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return a.Extend(n,e),n.prototype.current=function(e){var n=[],r=this;this.$element.find(\":selected\").each(function(){var e=l(this),t=r.item(e);n.push(t)}),e(n)},n.prototype.select=function(i){var o=this;if(i.selected=!0,l(i.element).is(\"option\"))return i.element.selected=!0,void this.$element.trigger(\"input\").trigger(\"change\");if(this.$element.prop(\"multiple\"))this.current(function(e){var t=[];(i=[i]).push.apply(i,e);for(var n=0;n<i.length;n++){var r=i[n].id;-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger(\"input\").trigger(\"change\")});else{var e=i.id;this.$element.val(e),this.$element.trigger(\"input\").trigger(\"change\")}},n.prototype.unselect=function(i){var o=this;if(this.$element.prop(\"multiple\")){if(i.selected=!1,l(i.element).is(\"option\"))return i.element.selected=!1,void this.$element.trigger(\"input\").trigger(\"change\");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n].id;r!==i.id&&-1===l.inArray(r,t)&&t.push(r)}o.$element.val(t),o.$element.trigger(\"input\").trigger(\"change\")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on(\"select\",function(e){n.select(e.data)}),e.on(\"unselect\",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find(\"*\").each(function(){a.RemoveData(this)})},n.prototype.query=function(r,e){var i=[],o=this;this.$element.children().each(function(){var e=l(this);if(e.is(\"option\")||e.is(\"optgroup\")){var t=o.item(e),n=o.matches(r,t);null!==n&&i.push(n)}}),e({results:i})},n.prototype.addOptions=function(e){a.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement(\"optgroup\")).label=e.text:void 0!==(t=document.createElement(\"option\")).textContent?t.textContent=e.text:t.innerText=e.text,void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=l(t),r=this._normalizeItem(e);return r.element=t,a.StoreData(t,\"data\",r),n},n.prototype.item=function(e){var t={};if(null!=(t=a.GetData(e[0],\"data\")))return t;if(e.is(\"option\"))t={id:e.val(),text:e.text(),disabled:e.prop(\"disabled\"),selected:e.prop(\"selected\"),title:e.prop(\"title\")};else if(e.is(\"optgroup\")){t={text:e.prop(\"label\"),children:[],title:e.prop(\"title\")};for(var n=e.children(\"option\"),r=[],i=0;i<n.length;i++){var o=l(n[i]),s=this.item(o);r.push(s)}t.children=r}return(t=this._normalizeItem(t)).element=e[0],a.StoreData(e[0],\"data\",t),t},n.prototype._normalizeItem=function(e){e!==Object(e)&&(e={id:e,text:e});return null!=(e=l.extend({},{text:\"\"},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),l.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get(\"matcher\")(e,t)},n}),e.define(\"select2/data/array\",[\"./select\",\"../utils\",\"jquery\"],function(e,f,g){function r(e,t){this._dataToConvert=t.get(\"data\")||[],r.__super__.constructor.call(this,e,t)}return f.Extend(r,e),r.prototype.bind=function(e,t){r.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(n){var e=this.$element.find(\"option\").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),r.__super__.select.call(this,n)},r.prototype.convertToOptions=function(e){var t=this,n=this.$element.find(\"option\"),r=n.map(function(){return t.item(g(this)).id}).get(),i=[];function o(e){return function(){return g(this).val()==e.id}}for(var s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=g.inArray(a.id,r)){var l=n.filter(o(a)),c=this.item(l),u=g.extend(!0,{},a,c),d=this.option(u);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);f.appendMany(p,h)}i.push(p)}}return i},r}),e.define(\"select2/data/ajax\",[\"./array\",\"../utils\",\"jquery\"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get(\"ajax\")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var r=o.ajax(e);return r.then(t),r.fail(n),r}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,r){var i=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:\"GET\"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=i.processResults(e,n);i.options.get(\"debug\")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error(\"Select2: The AJAX results did not return an array in the `results` key of the response.\")),r(t)},function(){\"status\"in e&&(0===e.status||\"0\"===e.status)||i.trigger(\"results:message\",{message:\"errorLoading\"})});i._request=e}\"function\"==typeof t.url&&(t.url=t.url.call(this.$element,n)),\"function\"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define(\"select2/data/tags\",[\"jquery\"],function(u){function e(e,t,n){var r=n.get(\"tags\"),i=n.get(\"createTag\");void 0!==i&&(this.createTag=i);var o=n.get(\"insertTag\");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),u.isArray(r))for(var s=0;s<r.length;s++){var a=r[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,u){var d=this;this._removeOldTags(),null!=c.term&&null==c.page?e.call(this,c,function e(t,n){for(var r=t.results,i=0;i<r.length;i++){var o=r[i],s=null!=o.children&&!e({results:o.children},!0);if((o.text||\"\").toUpperCase()===(c.term||\"\").toUpperCase()||s)return!n&&(t.data=r,void u(t))}if(n)return!0;var a=d.createTag(c);if(null!=a){var l=d.option(a);l.attr(\"data-select2-tag\",!0),d.addOptions([l]),d.insertTag(r,a)}t.results=r,u(t)}):e.call(this,c,u)},e.prototype.createTag=function(e,t){var n=u.trim(t.term);return\"\"===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this.$element.find(\"option[data-select2-tag]\").each(function(){this.selected||u(this).remove()})},e}),e.define(\"select2/data/tokenizer\",[\"jquery\"],function(d){function e(e,t,n){var r=n.get(\"tokenizer\");void 0!==r&&(this.tokenizer=r),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(\".select2-search__field\")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||\"\";var r=this.tokenizer(t,this.options,function(e){var t,n=i._normalizeItem(e);if(!i.$element.find(\"option\").filter(function(){return d(this).val()===n.id}).length){var r=i.option(n);r.attr(\"data-select2-tag\",!0),i._removeOldTags(),i.addOptions([r])}t=n,i.trigger(\"select\",{data:t})});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.trigger(\"focus\")),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,r){for(var i=n.get(\"tokenSeparators\")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==d.inArray(l,i)){var c=o.substr(0,s),u=a(d.extend({},t,{term:c}));null!=u?(r(u),o=o.substr(s+1)||\"\",s=0):s++}else s++}return{term:o}},e}),e.define(\"select2/data/minimumInputLength\",[],function(){function e(e,t,n){this.minimumInputLength=n.get(\"minimumInputLength\"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||\"\",t.term.length<this.minimumInputLength?this.trigger(\"results:message\",{message:\"inputTooShort\",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define(\"select2/data/maximumInputLength\",[],function(){function e(e,t,n){this.maximumInputLength=n.get(\"maximumInputLength\"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||\"\",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger(\"results:message\",{message:\"inputTooLong\",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define(\"select2/data/maximumSelectionLength\",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get(\"maximumSelectionLength\"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on(\"select\",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0<r.maximumSelectionLength&&t>=r.maximumSelectionLength?r.trigger(\"results:message\",{message:\"maximumSelected\",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define(\"select2/dropdown\",[\"jquery\",\"./utils\"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class=\"select2-dropdown\"><span class=\"select2-results\"></span></span>');return e.attr(\"dir\",this.options.get(\"dir\")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define(\"select2/dropdown/search\",[\"jquery\",\"../utils\"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('<span class=\"select2-search select2-search--dropdown\"><input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\" autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"none\" spellcheck=\"false\" role=\"searchbox\" aria-autocomplete=\"list\" /></span>');return this.$searchContainer=n,this.$search=n.find(\"input\"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+\"-results\";e.call(this,t,n),this.$search.on(\"keydown\",function(e){r.trigger(\"keypress\",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on(\"input\",function(e){o(this).off(\"keyup\")}),this.$search.on(\"keyup input\",function(e){r.handleSearch(e)}),t.on(\"open\",function(){r.$search.attr(\"tabindex\",0),r.$search.attr(\"aria-controls\",i),r.$search.trigger(\"focus\"),window.setTimeout(function(){r.$search.trigger(\"focus\")},0)}),t.on(\"close\",function(){r.$search.attr(\"tabindex\",-1),r.$search.removeAttr(\"aria-controls\"),r.$search.removeAttr(\"aria-activedescendant\"),r.$search.val(\"\"),r.$search.trigger(\"blur\")}),t.on(\"focus\",function(){t.isOpen()||r.$search.trigger(\"focus\")}),t.on(\"results:all\",function(e){null!=e.query.term&&\"\"!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass(\"select2-search--hide\"):r.$searchContainer.addClass(\"select2-search--hide\"))}),t.on(\"results:focus\",function(e){e.data._resultId?r.$search.attr(\"aria-activedescendant\",e.data._resultId):r.$search.removeAttr(\"aria-activedescendant\")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger(\"query\",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define(\"select2/dropdown/hidePlaceholder\",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get(\"placeholder\")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return\"string\"==typeof t&&(t={id:\"\",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define(\"select2/dropdown/infiniteScroll\",[\"jquery\"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on(\"query\",function(e){r.lastParams=e,r.loading=!0}),t.on(\"query:append\",function(e){r.lastParams=e,r.loading=!0}),this.$results.on(\"scroll\",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger(\"query:append\",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('<li class=\"select2-results__option select2-results__option--load-more\"role=\"option\" aria-disabled=\"true\"></li>'),t=this.options.get(\"translations\").get(\"loadingMore\");return e.html(t(this.lastParams)),e},e}),e.define(\"select2/dropdown/attachBody\",[\"jquery\",\"../utils\"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get(\"dropdownParent\")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on(\"open\",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on(\"close\",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on(\"mousedown\",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr(\"class\",n.attr(\"class\")),t.removeClass(\"select2\"),t.addClass(\"select2-container--open\"),t.css({position:\"absolute\",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(\"<span></span>\"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on(\"results:all\",function(){n._positionDropdown(),n._resizeDropdown()}),t.on(\"results:append\",function(){n._positionDropdown(),n._resizeDropdown()}),t.on(\"results:message\",function(){n._positionDropdown(),n._resizeDropdown()}),t.on(\"select\",function(){n._positionDropdown(),n._resizeDropdown()}),t.on(\"unselect\",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r=\"scroll.select2.\"+t.id,i=\"resize.select2.\"+t.id,o=\"orientationchange.select2.\"+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,\"select2-scroll-position\",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,\"select2-scroll-position\");f(this).scrollTop(t.y)}),f(window).on(r+\" \"+i+\" \"+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n=\"scroll.select2.\"+t.id,r=\"resize.select2.\"+t.id,i=\"orientationchange.select2.\"+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+\" \"+r+\" \"+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass(\"select2-dropdown--above\"),n=this.$dropdown.hasClass(\"select2-dropdown--below\"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<i.top-s,u=l>i.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;\"static\"===p.css(\"position\")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r=\"below\"),u||!c||t?!c&&u&&t&&(r=\"below\"):r=\"above\",(\"above\"==r||t&&\"below\"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass(\"select2-dropdown--below select2-dropdown--above\").addClass(\"select2-dropdown--\"+r),this.$container.removeClass(\"select2-container--below select2-container--above\").addClass(\"select2-container--\"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+\"px\"};this.options.get(\"dropdownAutoWidth\")&&(e.minWidth=e.width,e.position=\"relative\",e.width=\"auto\"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define(\"select2/dropdown/minimumResultsForSearch\",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get(\"minimumResultsForSearch\"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r<t.length;r++){var i=t[r];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define(\"select2/dropdown/selectOnClose\",[\"../utils\"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on(\"close\",function(e){r._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if(\"select\"===n._type||\"unselect\"===n._type)return}var r=this.getHighlightedResults();if(!(r.length<1)){var i=o.GetData(r[0],\"data\");null!=i.element&&i.element.selected||null==i.element&&i.selected||this.trigger(\"select\",{data:i})}},e}),e.define(\"select2/dropdown/closeOnSelect\",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on(\"select\",function(e){r._selectTriggered(e)}),t.on(\"unselect\",function(e){r._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger(\"close\",{originalEvent:n,originalSelect2Event:t})},e}),e.define(\"select2/i18n/en\",[],function(){return{errorLoading:function(){return\"The results could not be loaded.\"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=\"Please delete \"+t+\" character\";return 1!=t&&(n+=\"s\"),n},inputTooShort:function(e){return\"Please enter \"+(e.minimum-e.input.length)+\" or more characters\"},loadingMore:function(){return\"Loading more results…\"},maximumSelected:function(e){var t=\"You can only select \"+e.maximum+\" item\";return 1!=e.maximum&&(t+=\"s\"),t},noResults:function(){return\"No results found\"},searching:function(){return\"Searching…\"},removeAllItems:function(){return\"Remove all items\"}}}),e.define(\"select2/defaults\",[\"jquery\",\"require\",\"./results\",\"./selection/single\",\"./selection/multiple\",\"./selection/placeholder\",\"./selection/allowClear\",\"./selection/search\",\"./selection/eventRelay\",\"./utils\",\"./translation\",\"./diacritics\",\"./data/select\",\"./data/array\",\"./data/ajax\",\"./data/tags\",\"./data/tokenizer\",\"./data/minimumInputLength\",\"./data/maximumInputLength\",\"./data/maximumSelectionLength\",\"./dropdown\",\"./dropdown/search\",\"./dropdown/hidePlaceholder\",\"./dropdown/infiniteScroll\",\"./dropdown/attachBody\",\"./dropdown/minimumResultsForSearch\",\"./dropdown/selectOnClose\",\"./dropdown/closeOnSelect\",\"./i18n/en\"],function(c,u,d,p,h,f,g,m,v,y,s,t,_,$,b,w,A,x,D,S,E,C,O,T,q,L,I,j,e){function n(){this.reset()}return n.prototype.apply=function(e){if(null==(e=c.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=b:null!=e.data?e.dataAdapter=$:e.dataAdapter=_,0<e.minimumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,x)),0<e.maximumInputLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,D)),0<e.maximumSelectionLength&&(e.dataAdapter=y.Decorate(e.dataAdapter,S)),e.tags&&(e.dataAdapter=y.Decorate(e.dataAdapter,w)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=y.Decorate(e.dataAdapter,A)),null!=e.query){var t=u(e.amdBase+\"compat/query\");e.dataAdapter=y.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var n=u(e.amdBase+\"compat/initSelection\");e.dataAdapter=y.Decorate(e.dataAdapter,n)}}if(null==e.resultsAdapter&&(e.resultsAdapter=d,null!=e.ajax&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,T)),null!=e.placeholder&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,O)),e.selectOnClose&&(e.resultsAdapter=y.Decorate(e.resultsAdapter,I))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=E;else{var r=y.Decorate(E,C);e.dropdownAdapter=r}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,L)),e.closeOnSelect&&(e.dropdownAdapter=y.Decorate(e.dropdownAdapter,j)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var i=u(e.amdBase+\"compat/dropdownCss\");e.dropdownAdapter=y.Decorate(e.dropdownAdapter,i)}e.dropdownAdapter=y.Decorate(e.dropdownAdapter,q)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=h:e.selectionAdapter=p,null!=e.placeholder&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,f)),e.allowClear&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,g)),e.multiple&&(e.selectionAdapter=y.Decorate(e.selectionAdapter,m)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=u(e.amdBase+\"compat/containerCss\");e.selectionAdapter=y.Decorate(e.selectionAdapter,o)}e.selectionAdapter=y.Decorate(e.selectionAdapter,v)}e.language=this._resolveLanguage(e.language),e.language.push(\"en\");for(var s=[],a=0;a<e.language.length;a++){var l=e.language[a];-1===s.indexOf(l)&&s.push(l)}return e.language=s,e.translations=this._processTranslations(e.language,e.debug),e},n.prototype.reset=function(){function a(e){return e.replace(/[^\\u0000-\\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:\"./\",amdLanguageBase:\"./i18n/\",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:y.escapeMarkup,language:{},matcher:function e(t,n){if(\"\"===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var r=c.extend(!0,{},n),i=n.children.length-1;0<=i;i--)null==e(t,n.children[i])&&r.children.splice(i,1);return 0<r.children.length?r:e(t,r)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:\"default\",width:\"resolve\"}},n.prototype.applyFromElement=function(e,t){var n=e.language,r=this.defaults.language,i=t.prop(\"lang\"),o=t.closest(\"[lang]\").prop(\"lang\"),s=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(r),this._resolveLanguage(o));return e.language=s,e},n.prototype._resolveLanguage=function(e){if(!e)return[];if(c.isEmptyObject(e))return[];if(c.isPlainObject(e))return[e];var t;t=c.isArray(e)?e:[e];for(var n=[],r=0;r<t.length;r++)if(n.push(t[r]),\"string\"==typeof t[r]&&0<t[r].indexOf(\"-\")){var i=t[r].split(\"-\")[0];n.push(i)}return n},n.prototype._processTranslations=function(e,t){for(var n=new s,r=0;r<e.length;r++){var i=new s,o=e[r];if(\"string\"==typeof o)try{i=s.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,i=s.loadPath(o)}catch(e){t&&window.console&&console.warn&&console.warn('Select2: The language file for \"'+o+'\" could not be automatically loaded. A fallback will be used instead.')}}else i=c.isPlainObject(o)?new s(o):o;n.extend(i)}return n},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;var r=y._convertData(n);c.extend(!0,this.defaults,r)},new n}),e.define(\"select2/options\",[\"require\",\"jquery\",\"./defaults\",\"./utils\"],function(r,d,i,p){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),null!=t&&(this.options=i.applyFromElement(this.options,t)),this.options=i.apply(this.options),t&&t.is(\"input\")){var n=r(this.get(\"amdBase\")+\"compat/inputData\");this.options.dataAdapter=p.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=[\"select2\"];null==this.options.multiple&&(this.options.multiple=e.prop(\"multiple\")),null==this.options.disabled&&(this.options.disabled=e.prop(\"disabled\")),null==this.options.dir&&(e.prop(\"dir\")?this.options.dir=e.prop(\"dir\"):e.closest(\"[dir]\").prop(\"dir\")?this.options.dir=e.closest(\"[dir]\").prop(\"dir\"):this.options.dir=\"ltr\"),e.prop(\"disabled\",this.options.disabled),e.prop(\"multiple\",this.options.multiple),p.GetData(e[0],\"select2Tags\")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags=\"true\"` attributes and will be removed in future versions of Select2.'),p.StoreData(e[0],\"data\",p.GetData(e[0],\"select2Tags\")),p.StoreData(e[0],\"tags\",!0)),p.GetData(e[0],\"ajaxUrl\")&&(this.options.debug&&window.console&&console.warn&&console.warn(\"Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2.\"),e.attr(\"ajax--url\",p.GetData(e[0],\"ajaxUrl\")),p.StoreData(e[0],\"ajax-Url\",p.GetData(e[0],\"ajaxUrl\")));var n={};function r(e,t){return t.toUpperCase()}for(var i=0;i<e[0].attributes.length;i++){var o=e[0].attributes[i].name,s=\"data-\";if(o.substr(0,s.length)==s){var a=o.substring(s.length),l=p.GetData(e[0],a);n[a.replace(/-([a-z])/g,r)]=l}}d.fn.jquery&&\"1.\"==d.fn.jquery.substr(0,2)&&e[0].dataset&&(n=d.extend(!0,{},e[0].dataset,n));var c=d.extend(!0,{},p.GetData(e[0]),n);for(var u in c=p._convertData(c))-1<d.inArray(u,t)||(d.isPlainObject(this.options[u])?d.extend(this.options[u],c[u]):this.options[u]=c[u]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define(\"select2/core\",[\"jquery\",\"./options\",\"./utils\",\"./keys\"],function(o,c,u,r){var d=function(e,t){null!=u.GetData(e[0],\"select2\")&&u.GetData(e[0],\"select2\").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr(\"tabindex\")||0;u.StoreData(e[0],\"old-tabindex\",n),e.attr(\"tabindex\",\"-1\");var r=this.options.get(\"dataAdapter\");this.dataAdapter=new r(e,this.options);var i=this.render();this._placeContainer(i);var o=this.options.get(\"selectionAdapter\");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,i);var s=this.options.get(\"dropdownAdapter\");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,i);var a=this.options.get(\"resultsAdapter\");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger(\"selection:update\",{data:e})}),e.addClass(\"select2-hidden-accessible\"),e.attr(\"aria-hidden\",\"true\"),this._syncAttributes(),u.StoreData(e[0],\"select2\",this),e.data(\"select2\",this)};return u.Extend(d,u.Observable),d.prototype._generateId=function(e){return\"select2-\"+(null!=e.attr(\"id\")?e.attr(\"id\"):null!=e.attr(\"name\")?e.attr(\"name\")+\"-\"+u.generateChars(2):u.generateChars(4)).replace(/(:|\\.|\\[|\\]|,)/g,\"\")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get(\"width\"));null!=t&&e.css(\"width\",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(\"resolve\"==t){var r=this._resolveWidth(e,\"style\");return null!=r?r:this._resolveWidth(e,\"element\")}if(\"element\"==t){var i=e.outerWidth(!1);return i<=0?\"auto\":i+\"px\"}if(\"style\"!=t)return\"computedstyle\"!=t?t:window.getComputedStyle(e[0]).width;var o=e.attr(\"style\");if(\"string\"!=typeof o)return null;for(var s=o.split(\";\"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\\s/g,\"\").match(n);if(null!==c&&1<=c.length)return c[1]}return null},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on(\"change.select2\",function(){t.dataAdapter.current(function(e){t.trigger(\"selection:update\",{data:e})})}),this.$element.on(\"focus.select2\",function(e){t.trigger(\"focus\",e)}),this._syncA=u.bind(this._syncAttributes,this),this._syncS=u.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent(\"onpropertychange\",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){t._syncA(),t._syncS(null,e)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener(\"DOMAttrModified\",t._syncA,!1),this.$element[0].addEventListener(\"DOMNodeInserted\",t._syncS,!1),this.$element[0].addEventListener(\"DOMNodeRemoved\",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on(\"*\",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,r=[\"toggle\",\"focus\"];this.selection.on(\"toggle\",function(){n.toggleDropdown()}),this.selection.on(\"focus\",function(e){n.focus(e)}),this.selection.on(\"*\",function(e,t){-1===o.inArray(e,r)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on(\"*\",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on(\"*\",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on(\"open\",function(){n.$container.addClass(\"select2-container--open\")}),this.on(\"close\",function(){n.$container.removeClass(\"select2-container--open\")}),this.on(\"enable\",function(){n.$container.removeClass(\"select2-container--disabled\")}),this.on(\"disable\",function(){n.$container.addClass(\"select2-container--disabled\")}),this.on(\"blur\",function(){n.$container.removeClass(\"select2-container--focus\")}),this.on(\"query\",function(t){n.isOpen()||n.trigger(\"open\",{}),this.dataAdapter.query(t,function(e){n.trigger(\"results:all\",{data:e,query:t})})}),this.on(\"query:append\",function(t){this.dataAdapter.query(t,function(e){n.trigger(\"results:append\",{data:e,query:t})})}),this.on(\"keypress\",function(e){var t=e.which;n.isOpen()?t===r.ESC||t===r.TAB||t===r.UP&&e.altKey?(n.close(e),e.preventDefault()):t===r.ENTER?(n.trigger(\"results:select\",{}),e.preventDefault()):t===r.SPACE&&e.ctrlKey?(n.trigger(\"results:toggle\",{}),e.preventDefault()):t===r.UP?(n.trigger(\"results:previous\",{}),e.preventDefault()):t===r.DOWN&&(n.trigger(\"results:next\",{}),e.preventDefault()):(t===r.ENTER||t===r.SPACE||t===r.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set(\"disabled\",this.$element.prop(\"disabled\")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger(\"disable\",{})):this.trigger(\"enable\",{})},d.prototype._isChangeMutation=function(e,t){var n=!1,r=this;if(!e||!e.target||\"OPTION\"===e.target.nodeName||\"OPTGROUP\"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var i=0;i<t.addedNodes.length;i++){t.addedNodes[i].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length?n=!0:o.isArray(t)&&o.each(t,function(e,t){if(r._isChangeMutation(e,t))return!(n=!0)});else n=!0;return n}},d.prototype._syncSubtree=function(e,t){var n=this._isChangeMutation(e,t),r=this;n&&this.dataAdapter.current(function(e){r.trigger(\"selection:update\",{data:e})})},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,r={open:\"opening\",close:\"closing\",select:\"selecting\",unselect:\"unselecting\",clear:\"clearing\"};if(void 0===t&&(t={}),e in r){var i=r[e],o={prevented:!1,name:e,args:t};if(n.call(this,i,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger(\"query\",{})},d.prototype.close=function(e){this.isOpen()&&this.trigger(\"close\",{originalEvent:e})},d.prototype.isEnabled=function(){return!this.isDisabled()},d.prototype.isDisabled=function(){return this.options.get(\"disabled\")},d.prototype.isOpen=function(){return this.$container.hasClass(\"select2-container--open\")},d.prototype.hasFocus=function(){return this.$container.hasClass(\"select2-container--focus\")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass(\"select2-container--focus\"),this.trigger(\"focus\",{}))},d.prototype.enable=function(e){this.options.get(\"debug\")&&window.console&&console.warn&&console.warn('Select2: The `select2(\"enable\")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop(\"disabled\") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop(\"disabled\",t)},d.prototype.data=function(){this.options.get(\"debug\")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2(\"data\")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get(\"debug\")&&window.console&&console.warn&&console.warn('Select2: The `select2(\"val\")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];o.isArray(t)&&(t=o.map(t,function(e){return e.toString()})),this.$element.val(t).trigger(\"input\").trigger(\"change\")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent(\"onpropertychange\",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener(\"DOMAttrModified\",this._syncA,!1),this.$element[0].removeEventListener(\"DOMNodeInserted\",this._syncS,!1),this.$element[0].removeEventListener(\"DOMNodeRemoved\",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(\".select2\"),this.$element.attr(\"tabindex\",u.GetData(this.$element[0],\"old-tabindex\")),this.$element.removeClass(\"select2-hidden-accessible\"),this.$element.attr(\"aria-hidden\",\"false\"),u.RemoveData(this.$element[0]),this.$element.removeData(\"select2\"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=o('<span class=\"select2 select2-container\"><span class=\"selection\"></span><span class=\"dropdown-wrapper\" aria-hidden=\"true\"></span></span>');return e.attr(\"dir\",this.options.get(\"dir\")),this.$container=e,this.$container.addClass(\"select2-container--\"+this.options.get(\"theme\")),u.StoreData(e[0],\"element\",this.$element),e},d}),e.define(\"jquery-mousewheel\",[\"jquery\"],function(e){return e}),e.define(\"jquery.select2\",[\"jquery\",\"jquery-mousewheel\",\"./select2/core\",\"./select2/defaults\",\"./select2/utils\"],function(i,e,o,t,s){if(null==i.fn.select2){var a=[\"open\",\"close\",\"destroy\"];i.fn.select2=function(t){if(\"object\"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if(\"string\"!=typeof t)throw new Error(\"Invalid arguments for Select2: \"+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,\"select2\");null==e&&window.console&&console.error&&console.error(\"The select2('\"+t+\"') method was called on an element that is not using Select2.\"),n=e[t].apply(e,r)}),-1<i.inArray(t,a)?this:n}}return null==i.fn.select2.defaults&&(i.fn.select2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require(\"jquery.select2\");return u.fn.select2.amd=e,t});","(function(){var t,e,s,i,r,o={}.hasOwnProperty,n=function(t,e){function s(){this.constructor=t}for(var i in e)o.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t};i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return\"OPTGROUP\"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,r,o,n;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:this.escapeExpression(t.label),title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=t.childNodes,n=[],i=0,r=o.length;r>i;i++)s=o[i],n.push(this.add_option(s,e,t.disabled));return n},t.prototype.add_option=function(t,e,s){if(\"OPTION\"===t.nodeName.toUpperCase()){if(\"\"!==t.text){null!=e&&(this.parsed[e].children+=1);var i=t.getAttribute(\"data-exact-match\")||!1;this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:s===!0?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText,exact_match:i})}else this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0});return this.options_index+=1}},t.prototype.escapeExpression=function(t){var e,s;return null==t||t===!1?\"\":/[\\&\\<\\>\\\"\\'\\`]/.test(t)?(e={\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\",\"`\":\"`\"},s=/&(?!\\w+;)|[\\<\\>\\\"\\'\\`]/g,t.replace(s,function(t){return e[t]||\"&\"})):t},t}(),i.select_to_array=function(t){var e,s,r,o,n;for(s=new i,n=t.childNodes,r=0,o=n.length;o>r;r++)e=n[r],s.add_node(e);return s.parsed},e=function(){function e(t,s){this.form_field=t,this.options=null!=s?s:{},e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){var t=this;return this.click_test_action=function(e){return t.test_active_click(e)},this.activate_action=function(e){return t.activate_field(e)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&\"\"===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.search_fuzzy=this.options.search_fuzzy||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.create_option=this.options.create_option||!1,this.exact_match=this.options.exact_match||!1,this.skip_no_results=this.options.skip_no_results||!1},e.prototype.set_default_text=function(){return this.form_field.getAttribute(\"data-placeholder\")?this.default_text=this.form_field.getAttribute(\"data-placeholder\"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.results_none_found=this.form_field.getAttribute(\"data-no_results_text\")||this.options.no_results_text||e.default_no_result_text,this.create_option_text=this.form_field.getAttribute(\"data-create_option_text\")||this.options.create_option_text||e.default_create_option_text},e.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?\"<b class='group-name'>\"+t.group_label+\"</b>\"+t.html:t.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(t){var e=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return e.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},e.prototype.input_blur=function(t){var e=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return e.blur_test()},100))},e.prototype.results_option_build=function(t){var e,s,i,r,o,n,h;for(e=\"\",r=0,h=this.results_data,o=0,n=h.length;n>o&&(s=h[o],i=\"\",i=s.group?this.result_add_group(s):this.result_add_option(s),\"\"!==i&&(r++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(r>=this.max_shown_results));o++);return e},e.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push(\"active-result\"),!t.disabled||t.selected&&this.is_multiple||e.push(\"disabled-result\"),t.selected&&e.push(\"result-selected\"),null!=t.group_array_index&&e.push(\"group-option\"),\"\"!==t.classes&&e.push(t.classes),s=document.createElement(\"li\"),s.className=e.join(\" \"),s.style.cssText=t.style,s.setAttribute(\"data-option-array-index\",t.array_index),s.innerHTML=t.search_text,t.title&&(s.title=t.title),this.outerHTML(s)):\"\"},e.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?(e=[],e.push(\"group-result\"),t.classes&&e.push(t.classes),s=document.createElement(\"li\"),s.className=e.join(\" \"),s.innerHTML=t.search_text,t.title&&(s.title=t.title),this.outerHTML(s)):\"\"},e.prototype.append_option=function(t){return this.select_append_option(t)},e.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},e.prototype.reset_single_select_options=function(){var t,e,s,i,r;for(i=this.results_data,r=[],e=0,s=i.length;s>e;e++)t=i[e],t.selected?r.push(t.selected=!1):r.push(void 0);return r},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(){var t,e,s,i,r,o,n,h,l,c,a,_;for(this.no_results_clear(),o=0,h=this.get_search_text(),s=h.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),l=new RegExp(s,\"i\"),r=this.search_fuzzy?this.get_search_regex(h):this.get_search_regex(s),t=!1,e=new RegExp(\"^\"+s+\"$\",\"i\"),_=this.results_data,c=0,a=_.length;a>c;c++)i=_[c],i.search_match=!1,n=null,this.include_option_in_results(i)&&(i.group&&(i.group_match=!1,i.active_options=0),null!=i.group_array_index&&this.results_data[i.group_array_index]&&(n=this.results_data[i.group_array_index],0===n.active_options&&n.search_match&&(o+=1),n.active_options+=1),i.search_text=i.group?i.label:i.html,(i.exact_match&&e.test(i.exact_match)||!i.exact_match&&e.test(i.html))&&(t=!0),(!i.group||this.group_search)&&(i.search_match=this.search_string_match(i.search_text,r),i.search_match&&!i.group&&(o+=1),i.search_match?(h.length&&(i.search_text=this.highlight_search_result(r,l,i.search_text,h)),null!=n&&(n.group_match=!0)):null!=i.group_array_index&&this.results_data[i.group_array_index].search_match&&(i.search_match=!0)));if(this.result_clear_highlight(),h.length&&!o){var u;this.selected_option_count?(u=this.search_results.find(\"li.result-selected\"),this.update_results_content(\"\"),this.search_results.append(u)):this.update_results_content(\"\"),this.create_option&&this.skip_no_results||this.no_results(h)}else this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight();return this.create_option&&h.length&&!t?this.show_create_option(h):void 0},e.prototype.highlight_search_result=function(t,e,s,i){var r,o,n,h,l,c,a,_,u,d,p,f;if(this.search_fuzzy){for(n=[],_=i.split(\" \").sort(function(t,e){return e.length-t.length}),o=s.split(\" \"),u=0,p=o.length;p>u;u++){for(l=o[u],d=0,f=_.length;f>d;d++)a=_[d],-1===l.indexOf(\"<span>\")&&-1===l.indexOf(\"</span>\")&&(l=l.replace(new RegExp(\"(\"+a.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\")+\")\",\"gi\"),\"<span>$1</span>\"));n.push(l)}r=n.join(\" \")}else h=s.search(e),c=s.substr(0,h+i.length)+\"</span>\"+s.substr(h+i.length),r=c.substr(0,h)+\"<span>\"+c.substr(h);return r},e.prototype.get_tokenized_regex_string=function(t){var e,s,i,r;for(e=[],s=this.get_tokenized_search_string(t),i=0,r=s.length;r>i;i++)t=s[i],t=t.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,\"\\\\$&\"),e.push(\"(?=.*\"+t+\")\");return e.join(\"\")},e.prototype.get_tokenized_search_string=function(t){return t.split(\" \")},e.prototype.get_search_regex=function(t){var e,s;return this.search_fuzzy?new RegExp(this.get_tokenized_regex_string(t),\"i\"):(e=this.search_contains?\"\":\"^\",s=this.case_sensitive_search?\"\":\"i\",new RegExp(e+t,s))},e.prototype.search_string_match=function(t,e){var s,i,r,o;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(\" \")>=0||0===t.indexOf(\"[\"))&&(i=t.replace(/\\[|\\]/g,\"\").split(\" \"),i.length))for(r=0,o=i.length;o>r;r++)if(s=i[r],e.test(s))return!0},e.prototype.choices_count=function(){var t,e,s,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,i=this.form_field.options,e=0,s=i.length;s>e;e++)t=i[e],t.selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(t){return t.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},e.prototype.keyup_checker=function(e){var s,i;switch(s=null!=(i=e.which)?i:e.keyCode,this.search_field_scale(),s){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(e.preventDefault(),this.create_option&&(this.search_results.find(\"li.create-option.highlighted\").length||!this.search_results.find(\"li.active-result:not(.create-option)\").length&&this.search_results.find(\"li.create-option\").length)){if(t(this).trigger(\"chosen:updated\"),this.result_highlight=this.search_results.find(\"li.active-result\").last(),this.result_highlight.length>0)return this.result_select(e)}else if(this.results_showing)return this.result_select(e);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},e.prototype.clipboard_event_checker=function(t){var e=this;return setTimeout(function(){return e.results_search()},50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:\"\"+this.form_field.offsetWidth+\"px\"},e.prototype.include_option_in_results=function(t){return this.is_multiple&&!this.display_selected_options&&t.selected?!1:!this.display_disabled_options&&t.disabled?!1:t.empty?!1:!0},e.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},e.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},e.prototype.search_results_touchend=function(t){return this.touch_started?this.search_results_mouseup(t):void 0},e.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:(e=document.createElement(\"div\"),e.appendChild(t),e.innerHTML)},e.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:\"Microsoft Internet Explorer\"===window.navigator.appName?document.documentMode>=8:!0},e.default_multiple_text=\"Select some options\",e.default_single_text=\"Select an option\",e.default_no_result_text=\"No results match\",e.default_create_option_text=\"Add\",e}(),t=jQuery,t.fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var r,o;return r=t(this),o=r.data(\"chosen\"),\"destroy\"===i?void(o instanceof s&&o.destroy()):void(o instanceof s||r.data(\"chosen\",new s(this,i)))}):this}}),s=function(e){function s(){return r=s.__super__.constructor.apply(this,arguments)}return n(s,e),s.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass(\"chosen-rtl\")},s.prototype.set_up_html=function(){var e,s;return e=[\"chosen-container\"],e.push(\"chosen-container-\"+(this.is_multiple?\"multi\":\"single\")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push(\"chosen-rtl\"),s={\"class\":e.join(\" \"),style:\"width: \"+this.container_width()+\";\",title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\\w]/g,\"_\")+\"_chosen\"),this.container=t(\"<div />\",s),this.is_multiple?this.container.html('<ul class=\"chosen-choices\"><li class=\"search-field\"><input type=\"text\" value=\"'+this.default_text+'\" class=\"default\" autocomplete=\"off\" style=\"width:25px;\" /></li></ul><div class=\"chosen-drop\"><ul class=\"chosen-results\"></ul></div>'):this.container.html('<a class=\"chosen-single chosen-default\"><span>'+this.default_text+'</span><div><b></b></div></a><div class=\"chosen-drop\"><div class=\"chosen-search\"><input type=\"text\" autocomplete=\"off\" /></div><ul class=\"chosen-results\"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find(\"div.chosen-drop\").first(),this.search_field=this.container.find(\"input\").first(),this.search_results=this.container.find(\"ul.chosen-results\").first(),this.search_field_scale(),this.search_no_results=this.container.find(\"li.no-results\").first(),this.is_multiple?(this.search_choices=this.container.find(\"ul.chosen-choices\").first(),this.search_container=this.container.find(\"li.search-field\").first()):(this.search_container=this.container.find(\"div.chosen-search\").first(),this.selected_item=this.container.find(\".chosen-single\").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},s.prototype.on_ready=function(){return this.form_field_jq.trigger(\"chosen:ready\",{chosen:this})},s.prototype.register_observers=function(){var t=this;return this.container.bind(\"touchstart.chosen\",function(e){return t.container_mousedown(e),e.preventDefault()}),this.container.bind(\"touchend.chosen\",function(e){return t.container_mouseup(e),e.preventDefault()}),this.container.bind(\"mousedown.chosen\",function(e){t.container_mousedown(e)}),this.container.bind(\"mouseup.chosen\",function(e){t.container_mouseup(e)}),this.container.bind(\"mouseenter.chosen\",function(e){t.mouse_enter(e)}),this.container.bind(\"mouseleave.chosen\",function(e){t.mouse_leave(e)}),this.search_results.bind(\"mouseup.chosen\",function(e){t.search_results_mouseup(e)}),this.search_results.bind(\"mouseover.chosen\",function(e){t.search_results_mouseover(e)}),this.search_results.bind(\"mouseout.chosen\",function(e){t.search_results_mouseout(e)}),this.search_results.bind(\"mousewheel.chosen DOMMouseScroll.chosen\",function(e){t.search_results_mousewheel(e)}),this.search_results.bind(\"touchstart.chosen\",function(e){t.search_results_touchstart(e)}),this.search_results.bind(\"touchmove.chosen\",function(e){t.search_results_touchmove(e)}),this.search_results.bind(\"touchend.chosen\",function(e){t.search_results_touchend(e)}),this.form_field_jq.bind(\"chosen:updated.chosen\",function(e){t.results_update_field(e)}),this.form_field_jq.bind(\"chosen:activate.chosen\",function(e){t.activate_field(e)}),this.form_field_jq.bind(\"chosen:open.chosen\",function(e){t.container_mousedown(e)}),this.form_field_jq.bind(\"chosen:close.chosen\",function(e){t.input_blur(e)}),this.search_field.bind(\"blur.chosen\",function(e){t.input_blur(e)}),this.search_field.bind(\"keyup.chosen\",function(e){t.keyup_checker(e)}),this.search_field.bind(\"keydown.chosen\",function(e){t.keydown_checker(e)}),this.search_field.bind(\"focus.chosen\",function(e){t.input_focus(e)}),this.search_field.bind(\"cut.chosen\",function(e){t.clipboard_event_checker(e)}),this.search_field.bind(\"paste.chosen\",function(e){t.clipboard_event_checker(e)}),this.is_multiple?this.search_choices.bind(\"click.chosen\",function(e){t.choices_click(e)}):this.container.bind(\"click.chosen\",function(t){t.preventDefault()})},s.prototype.destroy=function(){return t(this.container[0].ownerDocument).unbind(\"click.chosen\",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData(\"chosen\"),this.form_field_jq.show()},s.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass(\"chosen-disabled\"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind(\"focus.chosen\",this.activate_action),this.close_field()):(this.container.removeClass(\"chosen-disabled\"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind(\"focus.chosen\",this.activate_action))},s.prototype.container_mousedown=function(e){return this.is_disabled||(e&&\"mousedown\"===e.type&&!this.results_showing&&e.preventDefault(),null!=e&&t(e.target).hasClass(\"search-choice-close\"))?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents(\"a.chosen-single\").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(\"\"),t(this.container[0].ownerDocument).bind(\"click.chosen\",this.click_test_action),this.results_show()),this.activate_field())},s.prototype.container_mouseup=function(t){return\"ABBR\"!==t.target.nodeName||this.is_disabled?void 0:this.results_reset(t)},s.prototype.search_results_mousewheel=function(t){var e;return t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e?(t.preventDefault(),\"DOMMouseScroll\"===t.type&&(e=40*e),this.search_results.scrollTop(e+this.search_results.scrollTop())):void 0},s.prototype.blur_test=function(t){return!this.active_field&&this.container.hasClass(\"chosen-container-active\")?this.close_field():void 0},s.prototype.close_field=function(){return t(this.container[0].ownerDocument).unbind(\"click.chosen\",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass(\"chosen-container-active\"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},s.prototype.activate_field=function(){return this.container.addClass(\"chosen-container-active\"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},s.prototype.test_active_click=function(e){var s;return s=t(e.target).closest(\".chosen-container\"),s.length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},s.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find(\"li.search-choice\").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold&&!this.create_option?(this.search_field[0].readOnly=!0,this.container.addClass(\"chosen-container-single-nosearch\")):(this.search_field[0].readOnly=!1,this.container.removeClass(\"chosen-container-single-nosearch\"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},s.prototype.result_do_highlight=function(t){var e,s,i,r,o;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass(\"highlighted\"),i=parseInt(this.search_results.css(\"maxHeight\"),10),o=this.search_results.scrollTop(),r=i+o,s=this.result_highlight.position().top+this.search_results.scrollTop(),e=s+this.result_highlight.outerHeight(),e>=r)return this.search_results.scrollTop(e-i>0?e-i:0);if(o>s)return this.search_results.scrollTop(s)}},s.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass(\"highlighted\"),this.result_highlight=null},s.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger(\"chosen:maxselected\",{chosen:this}),!1):(this.container.addClass(\"chosen-with-drop\"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger(\"chosen:showing_dropdown\",{chosen:this}))},s.prototype.update_results_content=function(t){return this.search_results.html(t)},s.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass(\"chosen-with-drop\"),this.form_field_jq.trigger(\"chosen:hiding_dropdown\",{chosen:this})),this.results_showing=!1},s.prototype.set_tab_index=function(t){var e;return this.form_field.tabIndex?(e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e):void 0},s.prototype.set_label_behavior=function(){var e=this;return this.form_field_label=this.form_field_jq.parents(\"label\"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t(\"label[for='\"+this.form_field.id+\"']\")),this.form_field_label.length>0?this.form_field_label.bind(\"click.chosen\",function(t){return e.is_multiple?e.container_mousedown(t):e.activate_field()}):void 0},s.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass(\"default\")):(this.search_field.val(\"\"),this.search_field.removeClass(\"default\"))},s.prototype.search_results_mouseup=function(e){var s;return s=t(e.target).hasClass(\"active-result\")?t(e.target):t(e.target).parents(\".active-result\").first(),s.length?(this.result_highlight=s,this.result_select(e),this.search_field.focus()):void 0},s.prototype.search_results_mouseover=function(e){var s;return s=t(e.target).hasClass(\"active-result\")?t(e.target):t(e.target).parents(\".active-result\").first(),s?this.result_do_highlight(s):void 0},s.prototype.search_results_mouseout=function(e){return t(e.target).hasClass(\"active-result\")?this.result_clear_highlight():void 0},s.prototype.choice_build=function(e){var s,i,r=this;return s=t(\"<li />\",{\"class\":\"search-choice\"}).html(\"<span>\"+this.choice_label(e)+\"</span>\"),e.disabled?s.addClass(\"search-choice-disabled\"):(i=t(\"<a />\",{\"class\":\"search-choice-close\",\"data-option-array-index\":e.array_index}),i.bind(\"click.chosen\",function(t){return r.choice_destroy_link_click(t)}),s.append(i)),this.search_container.before(s)},s.prototype.choice_destroy_link_click=function(e){return e.preventDefault(),e.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(t(e.target))},s.prototype.choice_destroy=function(t){return this.result_deselect(t[0].getAttribute(\"data-option-array-index\"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),t.parents(\"li\").first().remove(),this.search_field_scale()):void 0},s.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger(\"change\"),this.active_field?this.results_hide():void 0},s.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find(\"abbr\").remove()},s.prototype.result_select=function(t){var e,s;return this.result_highlight?(e=this.result_highlight,e.hasClass(\"create-option\")?(this.select_create_option(this.search_field.val()),this.results_hide()):(this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger(\"chosen:maxselected\",{chosen:this}),!1):(this.is_multiple?e.removeClass(\"active-result\"):this.reset_single_select_options(),e.addClass(\"result-selected\"),s=this.results_data[e[0].getAttribute(\"data-option-array-index\")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger(\"change\",{selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale()))):void 0},s.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass(\"chosen-default\"):(this.single_deselect_control_build(),this.selected_item.removeClass(\"chosen-default\")),this.selected_item.find(\"span\").html(t)},s.prototype.result_deselect=function(t){var e;return e=this.results_data[t],this.form_field.options[e.options_index].disabled?!1:(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger(\"change\",{deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},s.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find(\"abbr\").length||this.selected_item.find(\"span\").first().after('<abbr class=\"search-choice-close\"></abbr>'),this.selected_item.addClass(\"chosen-single-with-deselect\")):void 0},s.prototype.get_search_text=function(){return t(\"<div/>\").text(t.trim(this.search_field.val())).html()},s.prototype.winnow_results_set_highlight=function(){var t,e;return e=this.is_multiple?[]:this.search_results.find(\".result-selected.active-result\"),t=e.length?e.first():this.search_results.find(\".active-result\").first(),null!=t?this.result_do_highlight(t):void 0},s.prototype.show_create_option=function(e){var s;return s=t('<li class=\"create-option active-result\"><a>'+this.create_option_text+'</a>: \"'+e+'\"</li>'),this.search_results.append(s)},s.prototype.create_option_clear=function(){return this.search_results.find(\".create-option\").remove()},s.prototype.select_create_option=function(e){return this.results_data.filter(function(t){return t.value===e}).length?void this.search_container.children().val(\"\"):t.isFunction(this.create_option)?this.create_option.call(this,e):this.select_append_option({value:e,text:e})},s.prototype.select_append_option=function(e){var s;return s=t(\"<option />\",e).attr(\"selected\",\"selected\"),this.form_field_jq.append(s),this.form_field_jq.trigger(\"chosen:updated\"),this.form_field_jq.trigger(\"change\"),this.search_field.trigger(\"focus\")},s.prototype.no_results=function(e){var s;return s=t('<li class=\"no-results\">'+this.results_none_found+' \"<span></span>\"</li>'),s.find(\"span\").first().html(e),this.search_results.append(s),this.form_field_jq.trigger(\"chosen:no_results\",{chosen:this})},s.prototype.no_results_clear=function(){return this.search_results.find(\".no-results\").remove()},s.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll(\"li.active-result\").first())?this.result_do_highlight(t):void 0:this.results_showing&&this.create_option?this.result_do_highlight(this.search_results.find(\".create-option\")):this.results_show()},s.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll(\"li.active-result\"),t.length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},s.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find(\"a\").first()),this.clear_backstroke()):(t=this.search_container.siblings(\"li.search-choice\").last(),t.length&&!t.hasClass(\"search-choice-disabled\")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass(\"search-choice-focus\")):void 0)},s.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass(\"search-choice-focus\"),this.pending_backstroke=null},s.prototype.keydown_checker=function(t){var e,s;switch(e=null!=(s=t.which)?s:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},s.prototype.search_field_scale=function(){var e,s,i,r,o,n,h,l,c;if(this.is_multiple){for(i=0,h=0,o=\"position:absolute; left: -1000px; top: -1000px; display:none;\",n=[\"font-size\",\"font-style\",\"font-weight\",\"font-family\",\"line-height\",\"text-transform\",\"letter-spacing\"],l=0,c=n.length;c>l;l++)r=n[l],o+=r+\":\"+this.search_field.css(r)+\";\";return e=t(\"<div />\",{style:o}),e.text(this.search_field.val()),t(\"body\").append(e),h=e.width()+25,e.remove(),s=this.container.outerWidth(),h>s-10&&(h=s-10),this.search_field.css({width:h+\"px\"})}},s}(e)}).call(this);","!function(t){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).pako=t()}}(function(){return function r(s,o,l){function h(e,t){if(!o[e]){if(!s[e]){var a=\"function\"==typeof require&&require;if(!t&&a)return a(e,!0);if(d)return d(e,!0);var i=new Error(\"Cannot find module '\"+e+\"'\");throw i.code=\"MODULE_NOT_FOUND\",i}var n=o[e]={exports:{}};s[e][0].call(n.exports,function(t){return h(s[e][1][t]||t)},n,n.exports,r,s,o,l)}return o[e].exports}for(var d=\"function\"==typeof require&&require,t=0;t<l.length;t++)h(l[t]);return h}({1:[function(t,e,a){\"use strict\";var s=t(\"./zlib/deflate\"),o=t(\"./utils/common\"),l=t(\"./utils/strings\"),n=t(\"./zlib/messages\"),r=t(\"./zlib/zstream\"),h=Object.prototype.toString,d=0,f=-1,_=0,u=8;function c(t){if(!(this instanceof c))return new c(t);this.options=o.assign({level:f,method:u,chunkSize:16384,windowBits:15,memLevel:8,strategy:_,to:\"\"},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;var a=s.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==d)throw new Error(n[a]);if(e.header&&s.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i=\"string\"==typeof e.dictionary?l.string2buf(e.dictionary):\"[object ArrayBuffer]\"===h.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=s.deflateSetDictionary(this.strm,i))!==d)throw new Error(n[a]);this._dict_set=!0}}function i(t,e){var a=new c(e);if(a.push(t,!0),a.err)throw a.msg||n[a.err];return a.result}c.prototype.push=function(t,e){var a,i,n=this.strm,r=this.options.chunkSize;if(this.ended)return!1;i=e===~~e?e:!0===e?4:0,\"string\"==typeof t?n.input=l.string2buf(t):\"[object ArrayBuffer]\"===h.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;do{if(0===n.avail_out&&(n.output=new o.Buf8(r),n.next_out=0,n.avail_out=r),1!==(a=s.deflate(n,i))&&a!==d)return this.onEnd(a),!(this.ended=!0);0!==n.avail_out&&(0!==n.avail_in||4!==i&&2!==i)||(\"string\"===this.options.to?this.onData(l.buf2binstring(o.shrinkBuf(n.output,n.next_out))):this.onData(o.shrinkBuf(n.output,n.next_out)))}while((0<n.avail_in||0===n.avail_out)&&1!==a);return 4===i?(a=s.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===d):2!==i||(this.onEnd(d),!(n.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){t===d&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=c,a.deflate=i,a.deflateRaw=function(t,e){return(e=e||{}).raw=!0,i(t,e)},a.gzip=function(t,e){return(e=e||{}).gzip=!0,i(t,e)}},{\"./utils/common\":3,\"./utils/strings\":4,\"./zlib/deflate\":8,\"./zlib/messages\":13,\"./zlib/zstream\":15}],2:[function(t,e,a){\"use strict\";var f=t(\"./zlib/inflate\"),_=t(\"./utils/common\"),u=t(\"./utils/strings\"),c=t(\"./zlib/constants\"),i=t(\"./zlib/messages\"),n=t(\"./zlib/zstream\"),r=t(\"./zlib/gzheader\"),b=Object.prototype.toString;function s(t){if(!(this instanceof s))return new s(t);this.options=_.assign({chunkSize:16384,windowBits:0,to:\"\"},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0;var a=f.inflateInit2(this.strm,e.windowBits);if(a!==c.Z_OK)throw new Error(i[a]);if(this.header=new r,f.inflateGetHeader(this.strm,this.header),e.dictionary&&(\"string\"==typeof e.dictionary?e.dictionary=u.string2buf(e.dictionary):\"[object ArrayBuffer]\"===b.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=f.inflateSetDictionary(this.strm,e.dictionary))!==c.Z_OK))throw new Error(i[a])}function o(t,e){var a=new s(e);if(a.push(t,!0),a.err)throw a.msg||i[a.err];return a.result}s.prototype.push=function(t,e){var a,i,n,r,s,o=this.strm,l=this.options.chunkSize,h=this.options.dictionary,d=!1;if(this.ended)return!1;i=e===~~e?e:!0===e?c.Z_FINISH:c.Z_NO_FLUSH,\"string\"==typeof t?o.input=u.binstring2buf(t):\"[object ArrayBuffer]\"===b.call(t)?o.input=new Uint8Array(t):o.input=t,o.next_in=0,o.avail_in=o.input.length;do{if(0===o.avail_out&&(o.output=new _.Buf8(l),o.next_out=0,o.avail_out=l),(a=f.inflate(o,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&h&&(a=f.inflateSetDictionary(this.strm,h)),a===c.Z_BUF_ERROR&&!0===d&&(a=c.Z_OK,d=!1),a!==c.Z_STREAM_END&&a!==c.Z_OK)return this.onEnd(a),!(this.ended=!0);o.next_out&&(0!==o.avail_out&&a!==c.Z_STREAM_END&&(0!==o.avail_in||i!==c.Z_FINISH&&i!==c.Z_SYNC_FLUSH)||(\"string\"===this.options.to?(n=u.utf8border(o.output,o.next_out),r=o.next_out-n,s=u.buf2string(o.output,n),o.next_out=r,o.avail_out=l-r,r&&_.arraySet(o.output,o.output,n,r,0),this.onData(s)):this.onData(_.shrinkBuf(o.output,o.next_out)))),0===o.avail_in&&0===o.avail_out&&(d=!0)}while((0<o.avail_in||0===o.avail_out)&&a!==c.Z_STREAM_END);return a===c.Z_STREAM_END&&(i=c.Z_FINISH),i===c.Z_FINISH?(a=f.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===c.Z_OK):i!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(o.avail_out=0))},s.prototype.onData=function(t){this.chunks.push(t)},s.prototype.onEnd=function(t){t===c.Z_OK&&(\"string\"===this.options.to?this.result=this.chunks.join(\"\"):this.result=_.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Inflate=s,a.inflate=o,a.inflateRaw=function(t,e){return(e=e||{}).raw=!0,o(t,e)},a.ungzip=o},{\"./utils/common\":3,\"./utils/strings\":4,\"./zlib/constants\":6,\"./zlib/gzheader\":9,\"./zlib/inflate\":11,\"./zlib/messages\":13,\"./zlib/zstream\":15}],3:[function(t,e,a){\"use strict\";var i=\"undefined\"!=typeof Uint8Array&&\"undefined\"!=typeof Uint16Array&&\"undefined\"!=typeof Int32Array;a.assign=function(t){for(var e,a,i=Array.prototype.slice.call(arguments,1);i.length;){var n=i.shift();if(n){if(\"object\"!=typeof n)throw new TypeError(n+\"must be non-object\");for(var r in n)e=n,a=r,Object.prototype.hasOwnProperty.call(e,a)&&(t[r]=n[r])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var n={arraySet:function(t,e,a,i,n){if(e.subarray&&t.subarray)t.set(e.subarray(a,a+i),n);else for(var r=0;r<i;r++)t[n+r]=e[a+r]},flattenChunks:function(t){var e,a,i,n,r,s;for(e=i=0,a=t.length;e<a;e++)i+=t[e].length;for(s=new Uint8Array(i),e=n=0,a=t.length;e<a;e++)r=t[e],s.set(r,n),n+=r.length;return s}},r={arraySet:function(t,e,a,i,n){for(var r=0;r<i;r++)t[n+r]=e[a+r]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,n)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,r))},a.setTyped(i)},{}],4:[function(t,e,a){\"use strict\";var l=t(\"./common\"),n=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(t){n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){r=!1}for(var h=new l.Buf8(256),i=0;i<256;i++)h[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;function d(t,e){if(e<65534&&(t.subarray&&r||!t.subarray&&n))return String.fromCharCode.apply(null,l.shrinkBuf(t,e));for(var a=\"\",i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a}h[254]=h[254]=1,a.string2buf=function(t){var e,a,i,n,r,s=t.length,o=0;for(n=0;n<s;n++)55296==(64512&(a=t.charCodeAt(n)))&&n+1<s&&56320==(64512&(i=t.charCodeAt(n+1)))&&(a=65536+(a-55296<<10)+(i-56320),n++),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new l.Buf8(o),n=r=0;r<o;n++)55296==(64512&(a=t.charCodeAt(n)))&&n+1<s&&56320==(64512&(i=t.charCodeAt(n+1)))&&(a=65536+(a-55296<<10)+(i-56320),n++),a<128?e[r++]=a:(a<2048?e[r++]=192|a>>>6:(a<65536?e[r++]=224|a>>>12:(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63),e[r++]=128|a>>>6&63),e[r++]=128|63&a);return e},a.buf2binstring=function(t){return d(t,t.length)},a.binstring2buf=function(t){for(var e=new l.Buf8(t.length),a=0,i=e.length;a<i;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,i,n,r,s=e||t.length,o=new Array(2*s);for(a=i=0;a<s;)if((n=t[a++])<128)o[i++]=n;else if(4<(r=h[n]))o[i++]=65533,a+=r-1;else{for(n&=2===r?31:3===r?15:7;1<r&&a<s;)n=n<<6|63&t[a++],r--;1<r?o[i++]=65533:n<65536?o[i++]=n:(n-=65536,o[i++]=55296|n>>10&1023,o[i++]=56320|1023&n)}return d(o,i)},a.utf8border=function(t,e){var a;for((e=e||t.length)>t.length&&(e=t.length),a=e-1;0<=a&&128==(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{\"./common\":3}],5:[function(t,e,a){\"use strict\";e.exports=function(t,e,a,i){for(var n=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){for(a-=s=2e3<a?2e3:a;r=r+(n=n+e[i++]|0)|0,--s;);n%=65521,r%=65521}return n|r<<16|0}},{}],6:[function(t,e,a){\"use strict\";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(t,e,a){\"use strict\";var o=function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}();e.exports=function(t,e,a,i){var n=o,r=i+a;t^=-1;for(var s=i;s<r;s++)t=t>>>8^n[255&(t^e[s])];return-1^t}},{}],8:[function(t,e,a){\"use strict\";var l,_=t(\"../utils/common\"),h=t(\"./trees\"),u=t(\"./adler32\"),c=t(\"./crc32\"),i=t(\"./messages\"),d=0,f=4,b=0,g=-2,m=-1,w=4,n=2,p=8,v=9,r=286,s=30,o=19,k=2*r+1,y=15,x=3,z=258,B=z+x+1,S=42,E=113,A=1,Z=2,R=3,C=4;function N(t,e){return t.msg=i[e],e}function O(t){return(t<<1)-(4<t?9:0)}function D(t){for(var e=t.length;0<=--e;)t[e]=0}function I(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(_.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function U(t,e){h._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,I(t.strm)}function T(t,e){t.pending_buf[t.pending++]=e}function F(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function L(t,e){var a,i,n=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-B?t.strstart-(t.w_size-B):0,h=t.window,d=t.w_mask,f=t.prev,_=t.strstart+z,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<_);if(i=z-(_-r),r=_-z,s<i){if(t.match_start=e,o<=(s=i))break;u=h[r+s-1],c=h[r+s]}}}while((e=f[e&d])>l&&0!=--n);return s<=t.lookahead?s:t.lookahead}function H(t){var e,a,i,n,r,s,o,l,h,d,f=t.w_size;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=f+(f-B)){for(_.arraySet(t.window,t.window,f,f,0),t.match_start-=f,t.strstart-=f,t.block_start-=f,e=a=t.hash_size;i=t.head[--e],t.head[e]=f<=i?i-f:0,--a;);for(e=a=f;i=t.prev[--e],t.prev[e]=f<=i?i-f:0,--a;);n+=f}if(0===t.strm.avail_in)break;if(s=t.strm,o=t.window,l=t.strstart+t.lookahead,h=n,d=void 0,d=s.avail_in,h<d&&(d=h),a=0===d?0:(s.avail_in-=d,_.arraySet(o,s.input,s.next_in,d,l),1===s.state.wrap?s.adler=u(s.adler,o,d,l):2===s.state.wrap&&(s.adler=c(s.adler,o,d,l)),s.next_in+=d,s.total_in+=d,d),t.lookahead+=a,t.lookahead+t.insert>=x)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=(t.ins_h<<t.hash_shift^t.window[r+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[r+x-1])&t.hash_mask,t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<x)););}while(t.lookahead<B&&0!==t.strm.avail_in)}function j(t,e){for(var a,i;;){if(t.lookahead<B){if(H(t),t.lookahead<B&&e===d)return A;if(0===t.lookahead)break}if(a=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-B&&(t.match_length=L(t,a)),t.match_length>=x)if(i=h._tr_tally(t,t.strstart-t.match_start,t.match_length-x),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=x){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}function K(t,e){for(var a,i,n;;){if(t.lookahead<B){if(H(t),t.lookahead<B&&e===d)return A;if(0===t.lookahead)break}if(a=0,t.lookahead>=x&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=x-1,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-B&&(t.match_length=L(t,a),t.match_length<=5&&(1===t.strategy||t.match_length===x&&4096<t.strstart-t.match_start)&&(t.match_length=x-1)),t.prev_length>=x&&t.match_length<=t.prev_length){for(n=t.strstart+t.lookahead-x,i=h._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-x),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=n&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+x-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=x-1,t.strstart++,i&&(U(t,!1),0===t.strm.avail_out))return A}else if(t.match_available){if((i=h._tr_tally(t,0,t.window[t.strstart-1]))&&U(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return A}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=h._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<x-1?t.strstart:x-1,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}function M(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}function P(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=p,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new _.Buf16(2*k),this.dyn_dtree=new _.Buf16(2*(2*s+1)),this.bl_tree=new _.Buf16(2*(2*o+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new _.Buf16(y+1),this.heap=new _.Buf16(2*r+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new _.Buf16(2*r+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Y(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=n,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?S:E,t.adler=2===e.wrap?0:1,e.last_flush=d,h._tr_init(e),b):N(t,g)}function q(t){var e,a=Y(t);return a===b&&((e=t.state).window_size=2*e.w_size,D(e.head),e.max_lazy_match=l[e.level].max_lazy,e.good_match=l[e.level].good_length,e.nice_match=l[e.level].nice_length,e.max_chain_length=l[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=x-1,e.match_available=0,e.ins_h=0),a}function G(t,e,a,i,n,r){if(!t)return g;var s=1;if(e===m&&(e=6),i<0?(s=0,i=-i):15<i&&(s=2,i-=16),n<1||v<n||a!==p||i<8||15<i||e<0||9<e||r<0||w<r)return N(t,g);8===i&&(i=9);var o=new P;return(t.state=o).strm=t,o.wrap=s,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+x-1)/x),o.window=new _.Buf8(2*o.w_size),o.head=new _.Buf16(o.hash_size),o.prev=new _.Buf16(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new _.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=r,o.method=a,q(t)}l=[new M(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(H(t),0===t.lookahead&&e===d)return A;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,U(t,!1),0===t.strm.avail_out))return A;if(t.strstart-t.block_start>=t.w_size-B&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):(t.strstart>t.block_start&&(U(t,!1),t.strm.avail_out),A)}),new M(4,4,8,4,j),new M(4,5,16,8,j),new M(4,6,32,32,j),new M(4,4,16,16,K),new M(8,16,32,32,K),new M(8,16,128,128,K),new M(8,32,128,256,K),new M(32,128,258,1024,K),new M(32,258,258,4096,K)],a.deflateInit=function(t,e){return G(t,e,p,15,8,0)},a.deflateInit2=G,a.deflateReset=q,a.deflateResetKeep=Y,a.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?g:(t.state.gzhead=e,b):g},a.deflate=function(t,e){var a,i,n,r;if(!t||!t.state||5<e||e<0)return t?N(t,g):g;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&e!==f)return N(t,0===t.avail_out?-5:g);if(i.strm=t,a=i.last_flush,i.last_flush=e,i.status===S)if(2===i.wrap)t.adler=0,T(i,31),T(i,139),T(i,8),i.gzhead?(T(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),T(i,255&i.gzhead.time),T(i,i.gzhead.time>>8&255),T(i,i.gzhead.time>>16&255),T(i,i.gzhead.time>>24&255),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(T(i,255&i.gzhead.extra.length),T(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=c(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(T(i,0),T(i,0),T(i,0),T(i,0),T(i,0),T(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),T(i,3),i.status=E);else{var s=p+(i.w_bits-8<<4)<<8;s|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(s|=32),s+=31-s%31,i.status=E,F(i,s),0!==i.strstart&&(F(i,t.adler>>>16),F(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending!==i.pending_buf_size));)T(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),I(t),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}T(i,r=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0)}while(0!==r);i.gzhead.hcrc&&i.pending>n&&(t.adler=c(t.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&I(t),i.pending+2<=i.pending_buf_size&&(T(i,255&t.adler),T(i,t.adler>>8&255),t.adler=0,i.status=E)):i.status=E),0!==i.pending){if(I(t),0===t.avail_out)return i.last_flush=-1,b}else if(0===t.avail_in&&O(e)<=O(a)&&e!==f)return N(t,-5);if(666===i.status&&0!==t.avail_in)return N(t,-5);if(0!==t.avail_in||0!==i.lookahead||e!==d&&666!==i.status){var o=2===i.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(H(t),0===t.lookahead)){if(e===d)return A;break}if(t.match_length=0,a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):3===i.strategy?function(t,e){for(var a,i,n,r,s=t.window;;){if(t.lookahead<=z){if(H(t),t.lookahead<=z&&e===d)return A;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=x&&0<t.strstart&&(i=s[n=t.strstart-1])===s[++n]&&i===s[++n]&&i===s[++n]){r=t.strstart+z;do{}while(i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&i===s[++n]&&n<r);t.match_length=z-(r-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=x?(a=h._tr_tally(t,1,t.match_length-x),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=h._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(U(t,!1),0===t.strm.avail_out))return A}return t.insert=0,e===f?(U(t,!0),0===t.strm.avail_out?R:C):t.last_lit&&(U(t,!1),0===t.strm.avail_out)?A:Z}(i,e):l[i.level].func(i,e);if(o!==R&&o!==C||(i.status=666),o===A||o===R)return 0===t.avail_out&&(i.last_flush=-1),b;if(o===Z&&(1===e?h._tr_align(i):5!==e&&(h._tr_stored_block(i,0,0,!1),3===e&&(D(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),I(t),0===t.avail_out))return i.last_flush=-1,b}return e!==f?b:i.wrap<=0?1:(2===i.wrap?(T(i,255&t.adler),T(i,t.adler>>8&255),T(i,t.adler>>16&255),T(i,t.adler>>24&255),T(i,255&t.total_in),T(i,t.total_in>>8&255),T(i,t.total_in>>16&255),T(i,t.total_in>>24&255)):(F(i,t.adler>>>16),F(i,65535&t.adler)),I(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?b:1)},a.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==S&&69!==e&&73!==e&&91!==e&&103!==e&&e!==E&&666!==e?N(t,g):(t.state=null,e===E?N(t,-3):b):g},a.deflateSetDictionary=function(t,e){var a,i,n,r,s,o,l,h,d=e.length;if(!t||!t.state)return g;if(2===(r=(a=t.state).wrap)||1===r&&a.status!==S||a.lookahead)return g;for(1===r&&(t.adler=u(t.adler,e,d,0)),a.wrap=0,d>=a.w_size&&(0===r&&(D(a.head),a.strstart=0,a.block_start=0,a.insert=0),h=new _.Buf8(a.w_size),_.arraySet(h,e,d-a.w_size,a.w_size,0),e=h,d=a.w_size),s=t.avail_in,o=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,H(a);a.lookahead>=x;){for(i=a.strstart,n=a.lookahead-(x-1);a.ins_h=(a.ins_h<<a.hash_shift^a.window[i+x-1])&a.hash_mask,a.prev[i&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=i,i++,--n;);a.strstart=i,a.lookahead=x-1,H(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=x-1,a.match_available=0,t.next_in=o,t.input=l,t.avail_in=s,a.wrap=r,b},a.deflateInfo=\"pako deflate (from Nodeca project)\"},{\"../utils/common\":3,\"./adler32\":5,\"./crc32\":7,\"./messages\":13,\"./trees\":14}],9:[function(t,e,a){\"use strict\";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=\"\",this.comment=\"\",this.hcrc=0,this.done=!1}},{}],10:[function(t,e,a){\"use strict\";e.exports=function(t,e){var a,i,n,r,s,o,l,h,d,f,_,u,c,b,g,m,w,p,v,k,y,x,z,B,S;a=t.state,i=t.next_in,B=t.input,n=i+(t.avail_in-5),r=t.next_out,S=t.output,s=r-(e-t.avail_out),o=r+(t.avail_out-257),l=a.dmax,h=a.wsize,d=a.whave,f=a.wnext,_=a.window,u=a.hold,c=a.bits,b=a.lencode,g=a.distcode,m=(1<<a.lenbits)-1,w=(1<<a.distbits)-1;t:do{c<15&&(u+=B[i++]<<c,c+=8,u+=B[i++]<<c,c+=8),p=b[u&m];e:for(;;){if(u>>>=v=p>>>24,c-=v,0===(v=p>>>16&255))S[r++]=65535&p;else{if(!(16&v)){if(0==(64&v)){p=b[(65535&p)+(u&(1<<v)-1)];continue e}if(32&v){a.mode=12;break t}t.msg=\"invalid literal/length code\",a.mode=30;break t}k=65535&p,(v&=15)&&(c<v&&(u+=B[i++]<<c,c+=8),k+=u&(1<<v)-1,u>>>=v,c-=v),c<15&&(u+=B[i++]<<c,c+=8,u+=B[i++]<<c,c+=8),p=g[u&w];a:for(;;){if(u>>>=v=p>>>24,c-=v,!(16&(v=p>>>16&255))){if(0==(64&v)){p=g[(65535&p)+(u&(1<<v)-1)];continue a}t.msg=\"invalid distance code\",a.mode=30;break t}if(y=65535&p,c<(v&=15)&&(u+=B[i++]<<c,(c+=8)<v&&(u+=B[i++]<<c,c+=8)),l<(y+=u&(1<<v)-1)){t.msg=\"invalid distance too far back\",a.mode=30;break t}if(u>>>=v,c-=v,(v=r-s)<y){if(d<(v=y-v)&&a.sane){t.msg=\"invalid distance too far back\",a.mode=30;break t}if(z=_,(x=0)===f){if(x+=h-v,v<k){for(k-=v;S[r++]=_[x++],--v;);x=r-y,z=S}}else if(f<v){if(x+=h+f-v,(v-=f)<k){for(k-=v;S[r++]=_[x++],--v;);if(x=0,f<k){for(k-=v=f;S[r++]=_[x++],--v;);x=r-y,z=S}}}else if(x+=f-v,v<k){for(k-=v;S[r++]=_[x++],--v;);x=r-y,z=S}for(;2<k;)S[r++]=z[x++],S[r++]=z[x++],S[r++]=z[x++],k-=3;k&&(S[r++]=z[x++],1<k&&(S[r++]=z[x++]))}else{for(x=r-y;S[r++]=S[x++],S[r++]=S[x++],S[r++]=S[x++],2<(k-=3););k&&(S[r++]=S[x++],1<k&&(S[r++]=S[x++]))}break}}break}}while(i<n&&r<o);i-=k=c>>3,u&=(1<<(c-=k<<3))-1,t.next_in=i,t.next_out=r,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=r<o?o-r+257:257-(r-o),a.hold=u,a.bits=c}},{}],11:[function(t,e,a){\"use strict\";var Z=t(\"../utils/common\"),R=t(\"./adler32\"),C=t(\"./crc32\"),N=t(\"./inffast\"),O=t(\"./inftrees\"),D=1,I=2,U=0,T=-2,F=1,i=852,n=592;function L(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Z.Buf16(320),this.work=new Z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function s(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg=\"\",e.wrap&&(t.adler=1&e.wrap),e.mode=F,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Z.Buf32(i),e.distcode=e.distdyn=new Z.Buf32(n),e.sane=1,e.back=-1,U):T}function o(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,s(t)):T}function l(t,e){var a,i;return t&&t.state?(i=t.state,e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?T:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,o(t))):T}function h(t,e){var a,i;return t?(i=new r,(t.state=i).window=null,(a=l(t,e))!==U&&(t.state=null),a):T}var d,f,_=!0;function H(t){if(_){var e;for(d=new Z.Buf32(512),f=new Z.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(O(D,t.lens,0,288,d,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;O(I,t.lens,0,32,f,0,t.work,{bits:5}),_=!1}t.lencode=d,t.lenbits=9,t.distcode=f,t.distbits=5}function j(t,e,a,i){var n,r=t.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Z.Buf8(r.wsize)),i>=r.wsize?(Z.arraySet(r.window,e,a-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(i<(n=r.wsize-r.wnext)&&(n=i),Z.arraySet(r.window,e,a-i,n,r.wnext),(i-=n)?(Z.arraySet(r.window,e,a-i,i,0),r.wnext=i,r.whave=r.wsize):(r.wnext+=n,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=n))),0}a.inflateReset=o,a.inflateReset2=l,a.inflateResetKeep=s,a.inflateInit=function(t){return h(t,15)},a.inflateInit2=h,a.inflate=function(t,e){var a,i,n,r,s,o,l,h,d,f,_,u,c,b,g,m,w,p,v,k,y,x,z,B,S=0,E=new Z.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return T;12===(a=t.state).mode&&(a.mode=13),s=t.next_out,n=t.output,l=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,f=o,_=l,x=U;t:for(;;)switch(a.mode){case F:if(0===a.wrap){a.mode=13;break}for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(2&a.wrap&&35615===h){E[a.check=0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0),d=h=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg=\"incorrect header check\",a.mode=30;break}if(8!=(15&h)){t.msg=\"unknown compression method\",a.mode=30;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg=\"invalid window size\",a.mode=30;break}a.dmax=1<<y,t.adler=a.check=1,a.mode=512&h?10:12,d=h=0;break;case 2:for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(a.flags=h,8!=(255&a.flags)){t.msg=\"unknown compression method\",a.mode=30;break}if(57344&a.flags){t.msg=\"unknown header flags set\",a.mode=30;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=3;case 3:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,E[2]=h>>>16&255,E[3]=h>>>24&255,a.check=C(a.check,E,4,0)),d=h=0,a.mode=4;case 4:for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&(E[0]=255&h,E[1]=h>>>8&255,a.check=C(a.check,E,2,0)),d=h=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(o<(u=a.length)&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Z.arraySet(a.head.extra,i,r,u,y)),512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===o)break t;for(u=0;y=i[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y)),y&&u<o;);if(512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=8;case 8:if(4096&a.flags){if(0===o)break t;for(u=0;y=i[r+u++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y)),y&&u<o;);if(512&a.flags&&(a.check=C(a.check,i,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.comment=null);a.mode=9;case 9:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(h!==(65535&a.check)){t.msg=\"header crc mismatch\",a.mode=30;break}d=h=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=12;break;case 10:for(;d<32;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}t.adler=a.check=L(h),d=h=0,a.mode=11;case 11:if(0===a.havedict)return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,2;t.adler=a.check=1,a.mode=12;case 12:if(5===e||6===e)break t;case 13:if(a.last){h>>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}switch(a.last=1&h,d-=1,3&(h>>>=1)){case 0:a.mode=14;break;case 1:if(H(a),a.mode=20,6!==e)break;h>>>=2,d-=2;break t;case 2:a.mode=17;break;case 3:t.msg=\"invalid block type\",a.mode=30}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg=\"invalid stored block lengths\",a.mode=30;break}if(a.length=65535&h,d=h=0,a.mode=15,6===e)break t;case 15:a.mode=16;case 16:if(u=a.length){if(o<u&&(u=o),l<u&&(u=l),0===u)break t;Z.arraySet(n,i,r,u,s),o-=u,r+=u,l-=u,s+=u,a.length-=u;break}a.mode=12;break;case 17:for(;d<14;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,286<a.nlen||30<a.ndist){t.msg=\"too many length or distance symbols\",a.mode=30;break}a.have=0,a.mode=18;case 18:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.lens[A[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[A[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=O(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg=\"invalid code lengths set\",a.mode=30;break}a.have=0,a.mode=19;case 19:for(;a.have<a.nlen+a.ndist;){for(;m=(S=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(w<16)h>>>=g,d-=g,a.lens[a.have++]=w;else{if(16===w){for(B=g+2;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(h>>>=g,d-=g,0===a.have){t.msg=\"invalid bit length repeat\",a.mode=30;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===w){for(B=g+3;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}d-=g,y=0,u=3+(7&(h>>>=g)),h>>>=3,d-=3}else{for(B=g+7;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}d-=g,y=0,u=11+(127&(h>>>=g)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg=\"invalid bit length repeat\",a.mode=30;break}for(;u--;)a.lens[a.have++]=y}}if(30===a.mode)break;if(0===a.lens[256]){t.msg=\"invalid code -- missing end-of-block\",a.mode=30;break}if(a.lenbits=9,z={bits:a.lenbits},x=O(D,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg=\"invalid literal/lengths set\",a.mode=30;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=O(I,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg=\"invalid distances set\",a.mode=30;break}if(a.mode=20,6===e)break t;case 20:a.mode=21;case 21:if(6<=o&&258<=l){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,N(t,_),s=t.next_out,n=t.output,l=t.avail_out,r=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,12===a.mode&&(a.back=-1);break}for(a.back=0;m=(S=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(m&&0==(240&m)){for(p=g,v=m,k=w;m=(S=a.lencode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,a.length=w,0===m){a.mode=26;break}if(32&m){a.back=-1,a.mode=12;break}if(64&m){t.msg=\"invalid literal/length code\",a.mode=30;break}a.extra=15&m,a.mode=22;case 22:if(a.extra){for(B=a.extra;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;m=(S=a.distcode[h&(1<<a.distbits)-1])>>>16&255,w=65535&S,!((g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(0==(240&m)){for(p=g,v=m,k=w;m=(S=a.distcode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,w=65535&S,!(p+(g=S>>>24)<=d);){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=g,d-=g,a.back+=g,64&m){t.msg=\"invalid distance code\",a.mode=30;break}a.offset=w,a.extra=15&m,a.mode=24;case 24:if(a.extra){for(B=a.extra;d<B;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg=\"invalid distance too far back\",a.mode=30;break}a.mode=25;case 25:if(0===l)break t;if(u=_-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg=\"invalid distance too far back\",a.mode=30;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),b=a.window}else b=n,c=s-a.offset,u=a.length;for(l<u&&(u=l),l-=u,a.length-=u;n[s++]=b[c++],--u;);0===a.length&&(a.mode=21);break;case 26:if(0===l)break t;n[s++]=a.length,l--,a.mode=21;break;case 27:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[r++]<<d,d+=8}if(_-=l,t.total_out+=_,a.total+=_,_&&(t.adler=a.check=a.flags?C(a.check,n,_,s-_):R(a.check,n,_,s-_)),_=l,(a.flags?h:L(h))!==a.check){t.msg=\"incorrect data check\",a.mode=30;break}d=h=0}a.mode=28;case 28:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[r++]<<d,d+=8}if(h!==(4294967295&a.total)){t.msg=\"incorrect length check\",a.mode=30;break}d=h=0}a.mode=29;case 29:x=1;break t;case 30:x=-3;break t;case 31:return-4;case 32:default:return T}return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||_!==t.avail_out&&a.mode<30&&(a.mode<27||4!==e))&&j(t,t.output,t.next_out,_-t.avail_out)?(a.mode=31,-4):(f-=t.avail_in,_-=t.avail_out,t.total_in+=f,t.total_out+=_,a.total+=_,a.wrap&&_&&(t.adler=a.check=a.flags?C(a.check,n,_,t.next_out-_):R(a.check,n,_,t.next_out-_)),t.data_type=a.bits+(a.last?64:0)+(12===a.mode?128:0)+(20===a.mode||15===a.mode?256:0),(0===f&&0===_||4===e)&&x===U&&(x=-5),x)},a.inflateEnd=function(t){if(!t||!t.state)return T;var e=t.state;return e.window&&(e.window=null),t.state=null,U},a.inflateGetHeader=function(t,e){var a;return t&&t.state?0==(2&(a=t.state).wrap)?T:((a.head=e).done=!1,U):T},a.inflateSetDictionary=function(t,e){var a,i=e.length;return t&&t.state?0!==(a=t.state).wrap&&11!==a.mode?T:11===a.mode&&R(1,e,i,0)!==a.check?-3:j(t,e,i,i)?(a.mode=31,-4):(a.havedict=1,U):T},a.inflateInfo=\"pako inflate (from Nodeca project)\"},{\"../utils/common\":3,\"./adler32\":5,\"./crc32\":7,\"./inffast\":10,\"./inftrees\":12}],12:[function(t,e,a){\"use strict\";var D=t(\"../utils/common\"),I=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],U=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],T=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],F=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,a,i,n,r,s,o){var l,h,d,f,_,u,c,b,g,m=o.bits,w=0,p=0,v=0,k=0,y=0,x=0,z=0,B=0,S=0,E=0,A=null,Z=0,R=new D.Buf16(16),C=new D.Buf16(16),N=null,O=0;for(w=0;w<=15;w++)R[w]=0;for(p=0;p<i;p++)R[e[a+p]]++;for(y=m,k=15;1<=k&&0===R[k];k--);if(k<y&&(y=k),0===k)return n[r++]=20971520,n[r++]=20971520,o.bits=1,0;for(v=1;v<k&&0===R[v];v++);for(y<v&&(y=v),w=B=1;w<=15;w++)if(B<<=1,(B-=R[w])<0)return-1;if(0<B&&(0===t||1!==k))return-1;for(C[1]=0,w=1;w<15;w++)C[w+1]=C[w]+R[w];for(p=0;p<i;p++)0!==e[a+p]&&(s[C[e[a+p]]++]=p);if(0===t?(A=N=s,u=19):1===t?(A=I,Z-=257,N=U,O-=257,u=256):(A=T,N=F,u=-1),w=v,_=r,z=p=E=0,d=-1,f=(S=1<<(x=y))-1,1===t&&852<S||2===t&&592<S)return 1;for(;;){for(c=w-z,s[p]<u?(b=0,g=s[p]):s[p]>u?(b=N[O+s[p]],g=A[Z+s[p]]):(b=96,g=0),l=1<<w-z,v=h=1<<x;n[_+(E>>z)+(h-=l)]=c<<24|b<<16|g|0,0!==h;);for(l=1<<w-1;E&l;)l>>=1;if(0!==l?(E&=l-1,E+=l):E=0,p++,0==--R[w]){if(w===k)break;w=e[a+s[p]]}if(y<w&&(E&f)!==d){for(0===z&&(z=y),_+=v,B=1<<(x=w-z);x+z<k&&!((B-=R[x+z])<=0);)x++,B<<=1;if(S+=1<<x,1===t&&852<S||2===t&&592<S)return 1;n[d=E&f]=y<<24|x<<16|_-r|0}}return 0!==E&&(n[_+E]=w-z<<24|64<<16|0),o.bits=y,0}},{\"../utils/common\":3}],13:[function(t,e,a){\"use strict\";e.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},{}],14:[function(t,e,a){\"use strict\";var l=t(\"../utils/common\"),o=0,h=1;function i(t){for(var e=t.length;0<=--e;)t[e]=0}var d=0,s=29,f=256,_=f+1+s,u=30,c=19,g=2*_+1,m=15,n=16,b=7,w=256,p=16,v=17,k=18,y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],x=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S=new Array(2*(_+2));i(S);var E=new Array(2*u);i(E);var A=new Array(512);i(A);var Z=new Array(256);i(Z);var R=new Array(s);i(R);var C,N,O,D=new Array(u);function I(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}function r(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function U(t){return t<256?A[t]:A[256+(t>>>7)]}function T(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function F(t,e,a){t.bi_valid>n-a?(t.bi_buf|=e<<t.bi_valid&65535,T(t,t.bi_buf),t.bi_buf=e>>n-t.bi_valid,t.bi_valid+=a-n):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function L(t,e,a){F(t,a[2*e],a[2*e+1])}function H(t,e){for(var a=0;a|=1&t,t>>>=1,a<<=1,0<--e;);return a>>>1}function j(t,e,a){var i,n,r=new Array(m+1),s=0;for(i=1;i<=m;i++)r[i]=s=s+a[i-1]<<1;for(n=0;n<=e;n++){var o=t[2*n+1];0!==o&&(t[2*n]=H(r[o]++,o))}}function K(t){var e;for(e=0;e<_;e++)t.dyn_ltree[2*e]=0;for(e=0;e<u;e++)t.dyn_dtree[2*e]=0;for(e=0;e<c;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*w]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function M(t){8<t.bi_valid?T(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function P(t,e,a,i){var n=2*e,r=2*a;return t[n]<t[r]||t[n]===t[r]&&i[e]<=i[a]}function Y(t,e,a){for(var i=t.heap[a],n=a<<1;n<=t.heap_len&&(n<t.heap_len&&P(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!P(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i}function q(t,e,a){var i,n,r,s,o=0;if(0!==t.last_lit)for(;i=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],n=t.pending_buf[t.l_buf+o],o++,0===i?L(t,n,e):(L(t,(r=Z[n])+f+1,e),0!==(s=y[r])&&F(t,n-=R[r],s),L(t,r=U(--i),a),0!==(s=x[r])&&F(t,i-=D[r],s)),o<t.last_lit;);L(t,w,e)}function G(t,e){var a,i,n,r=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,l=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=g,a=0;a<l;a++)0!==r[2*a]?(t.heap[++t.heap_len]=h=a,t.depth[a]=0):r[2*a+1]=0;for(;t.heap_len<2;)r[2*(n=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[n]=0,t.opt_len--,o&&(t.static_len-=s[2*n+1]);for(e.max_code=h,a=t.heap_len>>1;1<=a;a--)Y(t,r,a);for(n=l;a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Y(t,r,1),i=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=i,r[2*n]=r[2*a]+r[2*i],t.depth[n]=(t.depth[a]>=t.depth[i]?t.depth[a]:t.depth[i])+1,r[2*a+1]=r[2*i+1]=n,t.heap[1]=n++,Y(t,r,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,i,n,r,s,o,l=e.dyn_tree,h=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,_=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,c=e.stat_desc.max_length,b=0;for(r=0;r<=m;r++)t.bl_count[r]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<g;a++)c<(r=l[2*l[2*(i=t.heap[a])+1]+1]+1)&&(r=c,b++),l[2*i+1]=r,h<i||(t.bl_count[r]++,s=0,u<=i&&(s=_[i-u]),o=l[2*i],t.opt_len+=o*(r+s),f&&(t.static_len+=o*(d[2*i+1]+s)));if(0!==b){do{for(r=c-1;0===t.bl_count[r];)r--;t.bl_count[r]--,t.bl_count[r+1]+=2,t.bl_count[c]--,b-=2}while(0<b);for(r=c;0!==r;r--)for(i=t.bl_count[r];0!==i;)h<(n=t.heap[--a])||(l[2*n+1]!==r&&(t.opt_len+=(r-l[2*n+1])*l[2*n],l[2*n+1]=r),i--)}}(t,e),j(r,h,t.bl_count)}function X(t,e,a){var i,n,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=s,s=e[2*(i+1)+1],++o<l&&n===s||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==r&&t.bl_tree[2*n]++,t.bl_tree[2*p]++):o<=10?t.bl_tree[2*v]++:t.bl_tree[2*k]++,r=n,(o=0)===s?(l=138,h=3):n===s?(l=6,h=3):(l=7,h=4))}function W(t,e,a){var i,n,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),i=0;i<=a;i++)if(n=s,s=e[2*(i+1)+1],!(++o<l&&n===s)){if(o<h)for(;L(t,n,t.bl_tree),0!=--o;);else 0!==n?(n!==r&&(L(t,n,t.bl_tree),o--),L(t,p,t.bl_tree),F(t,o-3,2)):o<=10?(L(t,v,t.bl_tree),F(t,o-3,3)):(L(t,k,t.bl_tree),F(t,o-11,7));r=n,(o=0)===s?(l=138,h=3):n===s?(l=6,h=3):(l=7,h=4)}}i(D);var J=!1;function Q(t,e,a,i){var n,r,s,o;F(t,(d<<1)+(i?1:0),3),r=e,s=a,o=!0,M(n=t),o&&(T(n,s),T(n,~s)),l.arraySet(n.pending_buf,n.window,r,s,n.pending),n.pending+=s}a._tr_init=function(t){J||(function(){var t,e,a,i,n,r=new Array(m+1);for(i=a=0;i<s-1;i++)for(R[i]=a,t=0;t<1<<y[i];t++)Z[a++]=i;for(Z[a-1]=i,i=n=0;i<16;i++)for(D[i]=n,t=0;t<1<<x[i];t++)A[n++]=i;for(n>>=7;i<u;i++)for(D[i]=n<<7,t=0;t<1<<x[i]-7;t++)A[256+n++]=i;for(e=0;e<=m;e++)r[e]=0;for(t=0;t<=143;)S[2*t+1]=8,t++,r[8]++;for(;t<=255;)S[2*t+1]=9,t++,r[9]++;for(;t<=279;)S[2*t+1]=7,t++,r[7]++;for(;t<=287;)S[2*t+1]=8,t++,r[8]++;for(j(S,_+1,r),t=0;t<u;t++)E[2*t+1]=5,E[2*t]=H(t,5);C=new I(S,y,f+1,_,m),N=new I(E,x,0,u,m),O=new I(new Array(0),z,0,c,b)}(),J=!0),t.l_desc=new r(t.dyn_ltree,C),t.d_desc=new r(t.dyn_dtree,N),t.bl_desc=new r(t.bl_tree,O),t.bi_buf=0,t.bi_valid=0,K(t)},a._tr_stored_block=Q,a._tr_flush_block=function(t,e,a,i){var n,r,s=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return h;for(e=32;e<f;e++)if(0!==t.dyn_ltree[2*e])return h;return o}(t)),G(t,t.l_desc),G(t,t.d_desc),s=function(t){var e;for(X(t,t.dyn_ltree,t.l_desc.max_code),X(t,t.dyn_dtree,t.d_desc.max_code),G(t,t.bl_desc),e=c-1;3<=e&&0===t.bl_tree[2*B[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),n=t.opt_len+3+7>>>3,(r=t.static_len+3+7>>>3)<=n&&(n=r)):n=r=a+5,a+4<=n&&-1!==e?Q(t,e,a,i):4===t.strategy||r===n?(F(t,2+(i?1:0),3),q(t,S,E)):(F(t,4+(i?1:0),3),function(t,e,a,i){var n;for(F(t,e-257,5),F(t,a-1,5),F(t,i-4,4),n=0;n<i;n++)F(t,t.bl_tree[2*B[n]+1],3);W(t,t.dyn_ltree,e-1),W(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),q(t,t.dyn_ltree,t.dyn_dtree)),K(t),i&&M(t)},a._tr_tally=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(Z[a]+f+1)]++,t.dyn_dtree[2*U(e)]++),t.last_lit===t.lit_bufsize-1},a._tr_align=function(t){var e;F(t,2,3),L(t,w,S),16===(e=t).bi_valid?(T(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{\"../utils/common\":3}],15:[function(t,e,a){\"use strict\";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0}},{}],\"/\":[function(t,e,a){\"use strict\";var i={};(0,t(\"./lib/utils/common\").assign)(i,t(\"./lib/deflate\"),t(\"./lib/inflate\"),t(\"./lib/zlib/constants\")),e.exports=i},{\"./lib/deflate\":1,\"./lib/inflate\":2,\"./lib/utils/common\":3,\"./lib/zlib/constants\":6}]},{},[])(\"/\")});\n","/*! @flowjs/flow.js 2.14.1 */\n!function(a,b,c){\"use strict\";function d(b){if(this.support=!(\"undefined\"==typeof File||\"undefined\"==typeof Blob||\"undefined\"==typeof FileList||!Blob.prototype.slice&&!Blob.prototype.webkitSlice&&!Blob.prototype.mozSlice),this.support){this.supportDirectory=/Chrome/.test(a.navigator.userAgent)||/Firefox/.test(a.navigator.userAgent)||/Edge/.test(a.navigator.userAgent),this.files=[],this.defaults={chunkSize:1048576,forceChunkSize:!1,simultaneousUploads:3,singleFile:!1,fileParameterName:\"file\",progressCallbacksInterval:500,speedSmoothingFactor:.1,query:{},headers:{},withCredentials:!1,preprocess:null,changeRawDataBeforeSend:null,method:\"multipart\",testMethod:\"GET\",uploadMethod:\"POST\",prioritizeFirstAndLastChunk:!1,allowDuplicateUploads:!1,target:\"/\",testChunks:!0,generateUniqueIdentifier:null,maxChunkRetries:0,chunkRetryInterval:null,permanentErrors:[404,413,415,500,501],successStatuses:[200,201,202],onDropStopPropagation:!1,initFileFn:null,readFileFn:f},this.opts={},this.events={};var c=this;this.onDrop=function(a){c.opts.onDropStopPropagation&&a.stopPropagation(),a.preventDefault();var b=a.dataTransfer;b.items&&b.items[0]&&b.items[0].webkitGetAsEntry?c.webkitReadDataTransfer(a):c.addFiles(b.files,a)},this.preventEvent=function(a){a.preventDefault()},this.opts=d.extend({},this.defaults,b||{})}}function e(a,b,d){this.flowObj=a,this.bytes=null,this.file=b,this.name=b.fileName||b.name,this.size=b.size,this.relativePath=b.relativePath||b.webkitRelativePath||this.name,this.uniqueIdentifier=d===c?a.generateUniqueIdentifier(b):d,this.chunkSize=0,this.chunks=[],this.paused=!1,this.error=!1,this.averageSpeed=0,this.currentSpeed=0,this._lastProgressCallback=Date.now(),this._prevUploadedSize=0,this._prevProgress=0,this.bootstrap()}function f(a,b,c,d,e){var f=\"slice\";a.file.slice?f=\"slice\":a.file.mozSlice?f=\"mozSlice\":a.file.webkitSlice&&(f=\"webkitSlice\"),e.readFinished(a.file[f](b,c,d))}function g(a,b,c){this.flowObj=a,this.fileObj=b,this.offset=c,this.tested=!1,this.retries=0,this.pendingRetry=!1,this.preprocessState=0,this.readState=0,this.loaded=0,this.total=0,this.chunkSize=this.fileObj.chunkSize,this.startByte=this.offset*this.chunkSize,this.filename=null,this.computeEndByte=function(){var a=Math.min(this.fileObj.size,(this.offset+1)*this.chunkSize);return this.fileObj.size-a<this.chunkSize&&!this.flowObj.opts.forceChunkSize&&(a=this.fileObj.size),a},this.endByte=this.computeEndByte(),this.xhr=null;var d=this;this.event=function(a,b){b=Array.prototype.slice.call(arguments),b.unshift(d),d.fileObj.chunkEvent.apply(d.fileObj,b)},this.progressHandler=function(a){a.lengthComputable&&(d.loaded=a.loaded,d.total=a.total),d.event(\"progress\",a)},this.testHandler=function(a){var b=d.status(!0);\"error\"===b?(d.event(b,d.message()),d.flowObj.uploadNextChunk()):\"success\"===b?(d.tested=!0,d.event(b,d.message()),d.flowObj.uploadNextChunk()):d.fileObj.paused||(d.tested=!0,d.send())},this.doneHandler=function(a){var b=d.status();if(\"success\"===b||\"error\"===b)delete this.data,d.event(b,d.message()),d.flowObj.uploadNextChunk();else if(!d.fileObj.paused){d.event(\"retry\",d.message()),d.pendingRetry=!0,d.abort(),d.retries++;var c=d.flowObj.opts.chunkRetryInterval;null!==c?setTimeout(function(){d.send()},c):d.send()}}}function h(a,b){var c=a.indexOf(b);c>-1&&a.splice(c,1)}function i(a,b){return\"function\"==typeof a&&(b=Array.prototype.slice.call(arguments),a=a.apply(null,b.slice(1))),a}function j(a,b){setTimeout(a.bind(b),0)}function k(a,b){return l(arguments,function(b){b!==a&&l(b,function(b,c){a[c]=b})}),a}function l(a,b,c){if(a){var d;if(\"undefined\"!=typeof a.length){for(d=0;d<a.length;d++)if(b.call(c,a[d],d)===!1)return}else for(d in a)if(a.hasOwnProperty(d)&&b.call(c,a[d],d)===!1)return}}if(!a||!b)return void console.warn(\"Flowjs needs window and document objects to work\");var m=a.navigator.msPointerEnabled;d.prototype={on:function(a,b){a=a.toLowerCase(),this.events.hasOwnProperty(a)||(this.events[a]=[]),this.events[a].push(b)},off:function(a,b){a!==c?(a=a.toLowerCase(),b!==c?this.events.hasOwnProperty(a)&&h(this.events[a],b):delete this.events[a]):this.events={}},fire:function(a,b){b=Array.prototype.slice.call(arguments),a=a.toLowerCase();var c=!1;return this.events.hasOwnProperty(a)&&l(this.events[a],function(a){c=a.apply(this,b.slice(1))===!1||c},this),\"catchall\"!=a&&(b.unshift(\"catchAll\"),c=this.fire.apply(this,b)===!1||c),!c},webkitReadDataTransfer:function(a){function b(a){a.readEntries(function(f){f.length?(g+=f.length,l(f,function(a){if(a.isFile){var e=a.fullPath;a.file(function(a){c(a,e)},d)}else a.isDirectory&&b(a.createReader())}),b(a)):e()},d)}function c(a,b){a.relativePath=b.substring(1),h.push(a),e()}function d(a){throw e(),a}function e(){0==--g&&f.addFiles(h,a)}var f=this,g=a.dataTransfer.items.length,h=[];l(a.dataTransfer.items,function(a){var d=a.webkitGetAsEntry();return d?void(d.isFile?c(a.getAsFile(),d.fullPath):b(d.createReader())):void e()})},generateUniqueIdentifier:function(a){var b=this.opts.generateUniqueIdentifier;if(\"function\"==typeof b)return b(a);var c=a.relativePath||a.webkitRelativePath||a.fileName||a.name;return a.size+\"-\"+c.replace(/[^0-9a-zA-Z_-]/gim,\"\")},uploadNextChunk:function(a){var b=!1;if(this.opts.prioritizeFirstAndLastChunk&&(l(this.files,function(a){return!a.paused&&a.chunks.length&&\"pending\"===a.chunks[0].status()?(a.chunks[0].send(),b=!0,!1):!a.paused&&a.chunks.length>1&&\"pending\"===a.chunks[a.chunks.length-1].status()?(a.chunks[a.chunks.length-1].send(),b=!0,!1):void 0}),b))return b;if(l(this.files,function(a){if(a.paused||l(a.chunks,function(a){if(\"pending\"===a.status())return a.send(),b=!0,!1}),b)return!1}),b)return!0;var c=!1;return l(this.files,function(a){if(!a.isComplete())return c=!0,!1}),c||a||j(function(){this.fire(\"complete\")},this),!1},assignBrowse:function(a,c,d,e){a instanceof Element&&(a=[a]),l(a,function(a){var f;\"INPUT\"===a.tagName&&\"file\"===a.type?f=a:(f=b.createElement(\"input\"),f.setAttribute(\"type\",\"file\"),k(f.style,{visibility:\"hidden\",position:\"absolute\",width:\"1px\",height:\"1px\"}),a.appendChild(f),a.addEventListener(\"click\",function(){f.click()},!1)),this.opts.singleFile||d||f.setAttribute(\"multiple\",\"multiple\"),c&&f.setAttribute(\"webkitdirectory\",\"webkitdirectory\"),l(e,function(a,b){f.setAttribute(b,a)});var g=this;f.addEventListener(\"change\",function(a){a.target.value&&(g.addFiles(a.target.files,a),a.target.value=\"\")},!1)},this)},assignDrop:function(a){\"undefined\"==typeof a.length&&(a=[a]),l(a,function(a){a.addEventListener(\"dragover\",this.preventEvent,!1),a.addEventListener(\"dragenter\",this.preventEvent,!1),a.addEventListener(\"drop\",this.onDrop,!1)},this)},unAssignDrop:function(a){\"undefined\"==typeof a.length&&(a=[a]),l(a,function(a){a.removeEventListener(\"dragover\",this.preventEvent),a.removeEventListener(\"dragenter\",this.preventEvent),a.removeEventListener(\"drop\",this.onDrop)},this)},isUploading:function(){var a=!1;return l(this.files,function(b){if(b.isUploading())return a=!0,!1}),a},_shouldUploadNext:function(){var a=0,b=!0,c=this.opts.simultaneousUploads;return l(this.files,function(d){l(d.chunks,function(d){if(\"uploading\"===d.status()&&(a++,a>=c))return b=!1,!1})}),b&&a},upload:function(){var a=this._shouldUploadNext();if(a!==!1){this.fire(\"uploadStart\");for(var b=!1,c=1;c<=this.opts.simultaneousUploads-a;c++)b=this.uploadNextChunk(!0)||b;b||j(function(){this.fire(\"complete\")},this)}},resume:function(){l(this.files,function(a){a.isComplete()||a.resume()})},pause:function(){l(this.files,function(a){a.pause()})},cancel:function(){for(var a=this.files.length-1;a>=0;a--)this.files[a].cancel()},progress:function(){var a=0,b=0;return l(this.files,function(c){a+=c.progress()*c.size,b+=c.size}),b>0?a/b:0},addFile:function(a,b){this.addFiles([a],b)},addFiles:function(a,b){var c=[];l(a,function(a){if((!m||m&&a.size>0)&&(a.size%4096!==0||\".\"!==a.name&&\".\"!==a.fileName)){var d=this.generateUniqueIdentifier(a);if(this.opts.allowDuplicateUploads||!this.getFromUniqueIdentifier(d)){var f=new e(this,a,d);this.fire(\"fileAdded\",f,b)&&c.push(f)}}},this),this.fire(\"filesAdded\",c,b)&&(l(c,function(a){this.opts.singleFile&&this.files.length>0&&this.removeFile(this.files[0]),this.files.push(a)},this),this.fire(\"filesSubmitted\",c,b))},removeFile:function(a){for(var b=this.files.length-1;b>=0;b--)this.files[b]===a&&(this.files.splice(b,1),a.abort(),this.fire(\"fileRemoved\",a))},getFromUniqueIdentifier:function(a){var b=!1;return l(this.files,function(c){c.uniqueIdentifier===a&&(b=c)}),b},getSize:function(){var a=0;return l(this.files,function(b){a+=b.size}),a},sizeUploaded:function(){var a=0;return l(this.files,function(b){a+=b.sizeUploaded()}),a},timeRemaining:function(){var a=0,b=0;return l(this.files,function(c){c.paused||c.error||(a+=c.size-c.sizeUploaded(),b+=c.averageSpeed)}),a&&!b?Number.POSITIVE_INFINITY:a||b?Math.floor(a/b):0}},e.prototype={measureSpeed:function(){var a=Date.now()-this._lastProgressCallback;if(a){var b=this.flowObj.opts.speedSmoothingFactor,c=this.sizeUploaded();this.currentSpeed=Math.max((c-this._prevUploadedSize)/a*1e3,0),this.averageSpeed=b*this.currentSpeed+(1-b)*this.averageSpeed,this._prevUploadedSize=c}},chunkEvent:function(a,b,c){switch(b){case\"progress\":if(Date.now()-this._lastProgressCallback<this.flowObj.opts.progressCallbacksInterval)break;this.measureSpeed(),this.flowObj.fire(\"fileProgress\",this,a),this.flowObj.fire(\"progress\"),this._lastProgressCallback=Date.now();break;case\"error\":this.error=!0,this.abort(!0),this.flowObj.fire(\"fileError\",this,c,a),this.flowObj.fire(\"error\",c,this,a);break;case\"success\":if(this.error)return;this.measureSpeed(),this.flowObj.fire(\"fileProgress\",this,a),this.flowObj.fire(\"progress\"),this._lastProgressCallback=Date.now(),this.isComplete()&&(this.currentSpeed=0,this.averageSpeed=0,this.flowObj.fire(\"fileSuccess\",this,c,a));break;case\"retry\":this.flowObj.fire(\"fileRetry\",this,a)}},pause:function(){this.paused=!0,this.abort()},resume:function(){this.paused=!1,this.flowObj.upload()},abort:function(a){this.currentSpeed=0,this.averageSpeed=0;var b=this.chunks;a&&(this.chunks=[]),l(b,function(a){\"uploading\"===a.status()&&(a.abort(),this.flowObj.uploadNextChunk())},this)},cancel:function(){this.flowObj.removeFile(this)},retry:function(){this.bootstrap(),this.flowObj.upload()},bootstrap:function(){\"function\"==typeof this.flowObj.opts.initFileFn&&this.flowObj.opts.initFileFn(this),this.abort(!0),this.error=!1,this._prevProgress=0;var a=this.flowObj.opts.forceChunkSize?Math.ceil:Math.floor;this.chunkSize=i(this.flowObj.opts.chunkSize,this);for(var b=Math.max(a(this.size/this.chunkSize),1),c=0;c<b;c++)this.chunks.push(new g(this.flowObj,this,c))},progress:function(){if(this.error)return 1;if(1===this.chunks.length)return this._prevProgress=Math.max(this._prevProgress,this.chunks[0].progress()),this._prevProgress;var a=0;l(this.chunks,function(b){a+=b.progress()*(b.endByte-b.startByte)});var b=a/this.size;return this._prevProgress=Math.max(this._prevProgress,b>.9999?1:b),this._prevProgress},isUploading:function(){var a=!1;return l(this.chunks,function(b){if(\"uploading\"===b.status())return a=!0,!1}),a},isComplete:function(){var a=!1;return l(this.chunks,function(b){var c=b.status();if(\"pending\"===c||\"uploading\"===c||\"reading\"===c||1===b.preprocessState||1===b.readState)return a=!0,!1}),!a},sizeUploaded:function(){var a=0;return l(this.chunks,function(b){a+=b.sizeUploaded()}),a},timeRemaining:function(){if(this.paused||this.error)return 0;var a=this.size-this.sizeUploaded();return a&&!this.averageSpeed?Number.POSITIVE_INFINITY:a||this.averageSpeed?Math.floor(a/this.averageSpeed):0},getType:function(){return this.file.type&&this.file.type.split(\"/\")[1]},getExtension:function(){return this.name.substr((~-this.name.lastIndexOf(\".\")>>>0)+2).toLowerCase()}},g.prototype={getParams:function(){return{flowChunkNumber:this.offset+1,flowChunkSize:this.chunkSize,flowCurrentChunkSize:this.endByte-this.startByte,flowTotalSize:this.fileObj.size,flowIdentifier:this.fileObj.uniqueIdentifier,flowFilename:this.fileObj.name,flowRelativePath:this.fileObj.relativePath,flowTotalChunks:this.fileObj.chunks.length}},getTarget:function(a,b){return 0==b.length?a:(a+=a.indexOf(\"?\")<0?\"?\":\"&\",a+b.join(\"&\"))},test:function(){this.xhr=new XMLHttpRequest,this.xhr.addEventListener(\"load\",this.testHandler,!1),this.xhr.addEventListener(\"error\",this.testHandler,!1);var a=i(this.flowObj.opts.testMethod,this.fileObj,this),b=this.prepareXhrRequest(a,!0);this.xhr.send(b)},preprocessFinished:function(){this.endByte=this.computeEndByte(),this.preprocessState=2,this.send()},readFinished:function(a){this.readState=2,this.bytes=a,this.send()},send:function(){var a=this.flowObj.opts.preprocess,b=this.flowObj.opts.readFileFn;if(\"function\"==typeof a)switch(this.preprocessState){case 0:return this.preprocessState=1,void a(this);case 1:return}switch(this.readState){case 0:return this.readState=1,void b(this.fileObj,this.startByte,this.endByte,this.fileObj.file.type,this);case 1:return}if(this.flowObj.opts.testChunks&&!this.tested)return void this.test();this.loaded=0,this.total=0,this.pendingRetry=!1,this.xhr=new XMLHttpRequest,this.xhr.upload.addEventListener(\"progress\",this.progressHandler,!1),this.xhr.addEventListener(\"load\",this.doneHandler,!1),this.xhr.addEventListener(\"error\",this.doneHandler,!1);var c=i(this.flowObj.opts.uploadMethod,this.fileObj,this),d=this.prepareXhrRequest(c,!1,this.flowObj.opts.method,this.bytes),e=this.flowObj.opts.changeRawDataBeforeSend;\"function\"==typeof e&&(d=e(this,d)),this.xhr.send(d)},abort:function(){var a=this.xhr;this.xhr=null,a&&a.abort()},status:function(a){return 1===this.readState?\"reading\":this.pendingRetry||1===this.preprocessState?\"uploading\":this.xhr?this.xhr.readyState<4?\"uploading\":this.flowObj.opts.successStatuses.indexOf(this.xhr.status)>-1?\"success\":this.flowObj.opts.permanentErrors.indexOf(this.xhr.status)>-1||!a&&this.retries>=this.flowObj.opts.maxChunkRetries?\"error\":(this.abort(),\"pending\"):\"pending\"},message:function(){return this.xhr?this.xhr.responseText:\"\"},progress:function(){if(this.pendingRetry)return 0;var a=this.status();return\"success\"===a||\"error\"===a?1:\"pending\"===a?0:this.total>0?this.loaded/this.total:0},sizeUploaded:function(){var a=this.endByte-this.startByte;return\"success\"!==this.status()&&(a=this.progress()*a),a},prepareXhrRequest:function(a,b,c,d){var e=i(this.flowObj.opts.query,this.fileObj,this,b);e=k(e||{},this.getParams());var f=i(this.flowObj.opts.target,this.fileObj,this,b),g=null;if(\"GET\"===a||\"octet\"===c){var h=[];l(e,function(a,b){h.push([encodeURIComponent(b),encodeURIComponent(a)].join(\"=\"))}),f=this.getTarget(f,h),g=d||null}else g=new FormData,l(e,function(a,b){g.append(b,a)}),\"undefined\"!=typeof d&&g.append(this.flowObj.opts.fileParameterName,d,this.filename||this.fileObj.file.name);return this.xhr.open(a,f,!0),this.xhr.withCredentials=this.flowObj.opts.withCredentials,l(i(this.flowObj.opts.headers,this.fileObj,this,b),function(a,b){this.xhr.setRequestHeader(b,a)},this),g}},d.evalOpts=i,d.extend=k,d.each=l,d.FlowFile=e,d.FlowChunk=g,d.version=\"2.14.1\",\"object\"==typeof module&&module&&\"object\"==typeof module.exports?module.exports=d:(a.Flow=d,\"function\"==typeof define&&define.amd&&define(\"flow\",[],function(){return d}))}(\"undefined\"!=typeof window&&window,\"undefined\"!=typeof document&&document);","(function() {\n\n var debug = false;\n\n var root = this;\n\n var EXIF = function(obj) {\n if (obj instanceof EXIF) return obj;\n if (!(this instanceof EXIF)) return new EXIF(obj);\n this.EXIFwrapped = obj;\n };\n\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = EXIF;\n }\n exports.EXIF = EXIF;\n } else {\n root.EXIF = EXIF;\n }\n\n var ExifTags = EXIF.Tags = {\n\n // version tags\n 0x9000 : \"ExifVersion\", // EXIF version\n 0xA000 : \"FlashpixVersion\", // Flashpix format version\n\n // colorspace tags\n 0xA001 : \"ColorSpace\", // Color space information tag\n\n // image configuration\n 0xA002 : \"PixelXDimension\", // Valid width of meaningful image\n 0xA003 : \"PixelYDimension\", // Valid height of meaningful image\n 0x9101 : \"ComponentsConfiguration\", // Information about channels\n 0x9102 : \"CompressedBitsPerPixel\", // Compressed bits per pixel\n\n // user information\n 0x927C : \"MakerNote\", // Any desired information written by the manufacturer\n 0x9286 : \"UserComment\", // Comments by user\n\n // related file\n 0xA004 : \"RelatedSoundFile\", // Name of related sound file\n\n // date and time\n 0x9003 : \"DateTimeOriginal\", // Date and time when the original image was generated\n 0x9004 : \"DateTimeDigitized\", // Date and time when the image was stored digitally\n 0x9290 : \"SubsecTime\", // Fractions of seconds for DateTime\n 0x9291 : \"SubsecTimeOriginal\", // Fractions of seconds for DateTimeOriginal\n 0x9292 : \"SubsecTimeDigitized\", // Fractions of seconds for DateTimeDigitized\n\n // picture-taking conditions\n 0x829A : \"ExposureTime\", // Exposure time (in seconds)\n 0x829D : \"FNumber\", // F number\n 0x8822 : \"ExposureProgram\", // Exposure program\n 0x8824 : \"SpectralSensitivity\", // Spectral sensitivity\n 0x8827 : \"ISOSpeedRatings\", // ISO speed rating\n 0x8828 : \"OECF\", // Optoelectric conversion factor\n 0x9201 : \"ShutterSpeedValue\", // Shutter speed\n 0x9202 : \"ApertureValue\", // Lens aperture\n 0x9203 : \"BrightnessValue\", // Value of brightness\n 0x9204 : \"ExposureBias\", // Exposure bias\n 0x9205 : \"MaxApertureValue\", // Smallest F number of lens\n 0x9206 : \"SubjectDistance\", // Distance to subject in meters\n 0x9207 : \"MeteringMode\", // Metering mode\n 0x9208 : \"LightSource\", // Kind of light source\n 0x9209 : \"Flash\", // Flash status\n 0x9214 : \"SubjectArea\", // Location and area of main subject\n 0x920A : \"FocalLength\", // Focal length of the lens in mm\n 0xA20B : \"FlashEnergy\", // Strobe energy in BCPS\n 0xA20C : \"SpatialFrequencyResponse\", //\n 0xA20E : \"FocalPlaneXResolution\", // Number of pixels in width direction per FocalPlaneResolutionUnit\n 0xA20F : \"FocalPlaneYResolution\", // Number of pixels in height direction per FocalPlaneResolutionUnit\n 0xA210 : \"FocalPlaneResolutionUnit\", // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution\n 0xA214 : \"SubjectLocation\", // Location of subject in image\n 0xA215 : \"ExposureIndex\", // Exposure index selected on camera\n 0xA217 : \"SensingMethod\", // Image sensor type\n 0xA300 : \"FileSource\", // Image source (3 == DSC)\n 0xA301 : \"SceneType\", // Scene type (1 == directly photographed)\n 0xA302 : \"CFAPattern\", // Color filter array geometric pattern\n 0xA401 : \"CustomRendered\", // Special processing\n 0xA402 : \"ExposureMode\", // Exposure mode\n 0xA403 : \"WhiteBalance\", // 1 = auto white balance, 2 = manual\n 0xA404 : \"DigitalZoomRation\", // Digital zoom ratio\n 0xA405 : \"FocalLengthIn35mmFilm\", // Equivalent foacl length assuming 35mm film camera (in mm)\n 0xA406 : \"SceneCaptureType\", // Type of scene\n 0xA407 : \"GainControl\", // Degree of overall image gain adjustment\n 0xA408 : \"Contrast\", // Direction of contrast processing applied by camera\n 0xA409 : \"Saturation\", // Direction of saturation processing applied by camera\n 0xA40A : \"Sharpness\", // Direction of sharpness processing applied by camera\n 0xA40B : \"DeviceSettingDescription\", //\n 0xA40C : \"SubjectDistanceRange\", // Distance to subject\n\n // other tags\n 0xA005 : \"InteroperabilityIFDPointer\",\n 0xA420 : \"ImageUniqueID\" // Identifier assigned uniquely to each image\n };\n\n var TiffTags = EXIF.TiffTags = {\n 0x0100 : \"ImageWidth\",\n 0x0101 : \"ImageHeight\",\n 0x8769 : \"ExifIFDPointer\",\n 0x8825 : \"GPSInfoIFDPointer\",\n 0xA005 : \"InteroperabilityIFDPointer\",\n 0x0102 : \"BitsPerSample\",\n 0x0103 : \"Compression\",\n 0x0106 : \"PhotometricInterpretation\",\n 0x0112 : \"Orientation\",\n 0x0115 : \"SamplesPerPixel\",\n 0x011C : \"PlanarConfiguration\",\n 0x0212 : \"YCbCrSubSampling\",\n 0x0213 : \"YCbCrPositioning\",\n 0x011A : \"XResolution\",\n 0x011B : \"YResolution\",\n 0x0128 : \"ResolutionUnit\",\n 0x0111 : \"StripOffsets\",\n 0x0116 : \"RowsPerStrip\",\n 0x0117 : \"StripByteCounts\",\n 0x0201 : \"JPEGInterchangeFormat\",\n 0x0202 : \"JPEGInterchangeFormatLength\",\n 0x012D : \"TransferFunction\",\n 0x013E : \"WhitePoint\",\n 0x013F : \"PrimaryChromaticities\",\n 0x0211 : \"YCbCrCoefficients\",\n 0x0214 : \"ReferenceBlackWhite\",\n 0x0132 : \"DateTime\",\n 0x010E : \"ImageDescription\",\n 0x010F : \"Make\",\n 0x0110 : \"Model\",\n 0x0131 : \"Software\",\n 0x013B : \"Artist\",\n 0x8298 : \"Copyright\"\n };\n\n var GPSTags = EXIF.GPSTags = {\n 0x0000 : \"GPSVersionID\",\n 0x0001 : \"GPSLatitudeRef\",\n 0x0002 : \"GPSLatitude\",\n 0x0003 : \"GPSLongitudeRef\",\n 0x0004 : \"GPSLongitude\",\n 0x0005 : \"GPSAltitudeRef\",\n 0x0006 : \"GPSAltitude\",\n 0x0007 : \"GPSTimeStamp\",\n 0x0008 : \"GPSSatellites\",\n 0x0009 : \"GPSStatus\",\n 0x000A : \"GPSMeasureMode\",\n 0x000B : \"GPSDOP\",\n 0x000C : \"GPSSpeedRef\",\n 0x000D : \"GPSSpeed\",\n 0x000E : \"GPSTrackRef\",\n 0x000F : \"GPSTrack\",\n 0x0010 : \"GPSImgDirectionRef\",\n 0x0011 : \"GPSImgDirection\",\n 0x0012 : \"GPSMapDatum\",\n 0x0013 : \"GPSDestLatitudeRef\",\n 0x0014 : \"GPSDestLatitude\",\n 0x0015 : \"GPSDestLongitudeRef\",\n 0x0016 : \"GPSDestLongitude\",\n 0x0017 : \"GPSDestBearingRef\",\n 0x0018 : \"GPSDestBearing\",\n 0x0019 : \"GPSDestDistanceRef\",\n 0x001A : \"GPSDestDistance\",\n 0x001B : \"GPSProcessingMethod\",\n 0x001C : \"GPSAreaInformation\",\n 0x001D : \"GPSDateStamp\",\n 0x001E : \"GPSDifferential\"\n };\n\n // EXIF 2.3 Spec\n var IFD1Tags = EXIF.IFD1Tags = {\n 0x0100: \"ImageWidth\",\n 0x0101: \"ImageHeight\",\n 0x0102: \"BitsPerSample\",\n 0x0103: \"Compression\",\n 0x0106: \"PhotometricInterpretation\",\n 0x0111: \"StripOffsets\",\n 0x0112: \"Orientation\",\n 0x0115: \"SamplesPerPixel\",\n 0x0116: \"RowsPerStrip\",\n 0x0117: \"StripByteCounts\",\n 0x011A: \"XResolution\",\n 0x011B: \"YResolution\",\n 0x011C: \"PlanarConfiguration\",\n 0x0128: \"ResolutionUnit\",\n 0x0201: \"JpegIFOffset\", // When image format is JPEG, this value show offset to JPEG data stored.(aka \"ThumbnailOffset\" or \"JPEGInterchangeFormat\")\n 0x0202: \"JpegIFByteCount\", // When image format is JPEG, this value shows data size of JPEG image (aka \"ThumbnailLength\" or \"JPEGInterchangeFormatLength\")\n 0x0211: \"YCbCrCoefficients\",\n 0x0212: \"YCbCrSubSampling\",\n 0x0213: \"YCbCrPositioning\",\n 0x0214: \"ReferenceBlackWhite\"\n };\n\n var StringValues = EXIF.StringValues = {\n ExposureProgram : {\n 0 : \"Not defined\",\n 1 : \"Manual\",\n 2 : \"Normal program\",\n 3 : \"Aperture priority\",\n 4 : \"Shutter priority\",\n 5 : \"Creative program\",\n 6 : \"Action program\",\n 7 : \"Portrait mode\",\n 8 : \"Landscape mode\"\n },\n MeteringMode : {\n 0 : \"Unknown\",\n 1 : \"Average\",\n 2 : \"CenterWeightedAverage\",\n 3 : \"Spot\",\n 4 : \"MultiSpot\",\n 5 : \"Pattern\",\n 6 : \"Partial\",\n 255 : \"Other\"\n },\n LightSource : {\n 0 : \"Unknown\",\n 1 : \"Daylight\",\n 2 : \"Fluorescent\",\n 3 : \"Tungsten (incandescent light)\",\n 4 : \"Flash\",\n 9 : \"Fine weather\",\n 10 : \"Cloudy weather\",\n 11 : \"Shade\",\n 12 : \"Daylight fluorescent (D 5700 - 7100K)\",\n 13 : \"Day white fluorescent (N 4600 - 5400K)\",\n 14 : \"Cool white fluorescent (W 3900 - 4500K)\",\n 15 : \"White fluorescent (WW 3200 - 3700K)\",\n 17 : \"Standard light A\",\n 18 : \"Standard light B\",\n 19 : \"Standard light C\",\n 20 : \"D55\",\n 21 : \"D65\",\n 22 : \"D75\",\n 23 : \"D50\",\n 24 : \"ISO studio tungsten\",\n 255 : \"Other\"\n },\n Flash : {\n 0x0000 : \"Flash did not fire\",\n 0x0001 : \"Flash fired\",\n 0x0005 : \"Strobe return light not detected\",\n 0x0007 : \"Strobe return light detected\",\n 0x0009 : \"Flash fired, compulsory flash mode\",\n 0x000D : \"Flash fired, compulsory flash mode, return light not detected\",\n 0x000F : \"Flash fired, compulsory flash mode, return light detected\",\n 0x0010 : \"Flash did not fire, compulsory flash mode\",\n 0x0018 : \"Flash did not fire, auto mode\",\n 0x0019 : \"Flash fired, auto mode\",\n 0x001D : \"Flash fired, auto mode, return light not detected\",\n 0x001F : \"Flash fired, auto mode, return light detected\",\n 0x0020 : \"No flash function\",\n 0x0041 : \"Flash fired, red-eye reduction mode\",\n 0x0045 : \"Flash fired, red-eye reduction mode, return light not detected\",\n 0x0047 : \"Flash fired, red-eye reduction mode, return light detected\",\n 0x0049 : \"Flash fired, compulsory flash mode, red-eye reduction mode\",\n 0x004D : \"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected\",\n 0x004F : \"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected\",\n 0x0059 : \"Flash fired, auto mode, red-eye reduction mode\",\n 0x005D : \"Flash fired, auto mode, return light not detected, red-eye reduction mode\",\n 0x005F : \"Flash fired, auto mode, return light detected, red-eye reduction mode\"\n },\n SensingMethod : {\n 1 : \"Not defined\",\n 2 : \"One-chip color area sensor\",\n 3 : \"Two-chip color area sensor\",\n 4 : \"Three-chip color area sensor\",\n 5 : \"Color sequential area sensor\",\n 7 : \"Trilinear sensor\",\n 8 : \"Color sequential linear sensor\"\n },\n SceneCaptureType : {\n 0 : \"Standard\",\n 1 : \"Landscape\",\n 2 : \"Portrait\",\n 3 : \"Night scene\"\n },\n SceneType : {\n 1 : \"Directly photographed\"\n },\n CustomRendered : {\n 0 : \"Normal process\",\n 1 : \"Custom process\"\n },\n WhiteBalance : {\n 0 : \"Auto white balance\",\n 1 : \"Manual white balance\"\n },\n GainControl : {\n 0 : \"None\",\n 1 : \"Low gain up\",\n 2 : \"High gain up\",\n 3 : \"Low gain down\",\n 4 : \"High gain down\"\n },\n Contrast : {\n 0 : \"Normal\",\n 1 : \"Soft\",\n 2 : \"Hard\"\n },\n Saturation : {\n 0 : \"Normal\",\n 1 : \"Low saturation\",\n 2 : \"High saturation\"\n },\n Sharpness : {\n 0 : \"Normal\",\n 1 : \"Soft\",\n 2 : \"Hard\"\n },\n SubjectDistanceRange : {\n 0 : \"Unknown\",\n 1 : \"Macro\",\n 2 : \"Close view\",\n 3 : \"Distant view\"\n },\n FileSource : {\n 3 : \"DSC\"\n },\n\n Components : {\n 0 : \"\",\n 1 : \"Y\",\n 2 : \"Cb\",\n 3 : \"Cr\",\n 4 : \"R\",\n 5 : \"G\",\n 6 : \"B\"\n }\n };\n\n function addEvent(element, event, handler) {\n if (element.addEventListener) {\n element.addEventListener(event, handler, false);\n } else if (element.attachEvent) {\n element.attachEvent(\"on\" + event, handler);\n }\n }\n\n function imageHasData(img) {\n return !!(img.exifdata);\n }\n\n\n function base64ToArrayBuffer(base64, contentType) {\n contentType = contentType || base64.match(/^data\\:([^\\;]+)\\;base64,/mi)[1] || ''; // e.g. 'data:image/jpeg;base64,...' => 'image/jpeg'\n base64 = base64.replace(/^data\\:([^\\;]+)\\;base64,/gmi, '');\n var binary = atob(base64);\n var len = binary.length;\n var buffer = new ArrayBuffer(len);\n var view = new Uint8Array(buffer);\n for (var i = 0; i < len; i++) {\n view[i] = binary.charCodeAt(i);\n }\n return buffer;\n }\n\n function objectURLToBlob(url, callback) {\n var http = new XMLHttpRequest();\n http.open(\"GET\", url, true);\n http.responseType = \"blob\";\n http.onload = function(e) {\n if (this.status == 200 || this.status === 0) {\n callback(this.response);\n }\n };\n http.send();\n }\n\n function getImageData(img, callback) {\n function handleBinaryFile(binFile) {\n var data = findEXIFinJPEG(binFile);\n img.exifdata = data || {};\n var iptcdata = findIPTCinJPEG(binFile);\n img.iptcdata = iptcdata || {};\n if (EXIF.isXmpEnabled) {\n var xmpdata= findXMPinJPEG(binFile);\n img.xmpdata = xmpdata || {}; \n }\n if (callback) {\n callback.call(img);\n }\n }\n\n if (img.src) {\n if (/^data\\:/i.test(img.src)) { // Data URI\n var arrayBuffer = base64ToArrayBuffer(img.src);\n handleBinaryFile(arrayBuffer);\n\n } else if (/^blob\\:/i.test(img.src)) { // Object URL\n var fileReader = new FileReader();\n fileReader.onload = function(e) {\n handleBinaryFile(e.target.result);\n };\n objectURLToBlob(img.src, function (blob) {\n fileReader.readAsArrayBuffer(blob);\n });\n } else {\n var http = new XMLHttpRequest();\n http.onload = function() {\n if (this.status == 200 || this.status === 0) {\n handleBinaryFile(http.response);\n } else {\n throw \"Could not load image\";\n }\n http = null;\n };\n http.open(\"GET\", img.src, true);\n http.responseType = \"arraybuffer\";\n http.send(null);\n }\n } else if (self.FileReader && (img instanceof self.Blob || img instanceof self.File)) {\n var fileReader = new FileReader();\n fileReader.onload = function(e) {\n if (debug) console.log(\"Got file of length \" + e.target.result.byteLength);\n handleBinaryFile(e.target.result);\n };\n\n fileReader.readAsArrayBuffer(img);\n }\n }\n\n function findEXIFinJPEG(file) {\n var dataView = new DataView(file);\n\n if (debug) console.log(\"Got file of length \" + file.byteLength);\n if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n if (debug) console.log(\"Not a valid JPEG\");\n return false; // not a valid jpeg\n }\n\n var offset = 2,\n length = file.byteLength,\n marker;\n\n while (offset < length) {\n if (dataView.getUint8(offset) != 0xFF) {\n if (debug) console.log(\"Not a valid marker at offset \" + offset + \", found: \" + dataView.getUint8(offset));\n return false; // not a valid marker, something is wrong\n }\n\n marker = dataView.getUint8(offset + 1);\n if (debug) console.log(marker);\n\n // we could implement handling for other markers here,\n // but we're only looking for 0xFFE1 for EXIF data\n\n if (marker == 225) {\n if (debug) console.log(\"Found 0xFFE1 marker\");\n\n return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2);\n\n // offset += 2 + file.getShortAt(offset+2, true);\n\n } else {\n offset += 2 + dataView.getUint16(offset+2);\n }\n\n }\n\n }\n\n function findIPTCinJPEG(file) {\n var dataView = new DataView(file);\n\n if (debug) console.log(\"Got file of length \" + file.byteLength);\n if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n if (debug) console.log(\"Not a valid JPEG\");\n return false; // not a valid jpeg\n }\n\n var offset = 2,\n length = file.byteLength;\n\n\n var isFieldSegmentStart = function(dataView, offset){\n return (\n dataView.getUint8(offset) === 0x38 &&\n dataView.getUint8(offset+1) === 0x42 &&\n dataView.getUint8(offset+2) === 0x49 &&\n dataView.getUint8(offset+3) === 0x4D &&\n dataView.getUint8(offset+4) === 0x04 &&\n dataView.getUint8(offset+5) === 0x04\n );\n };\n\n while (offset < length) {\n\n if ( isFieldSegmentStart(dataView, offset )){\n\n // Get the length of the name header (which is padded to an even number of bytes)\n var nameHeaderLength = dataView.getUint8(offset+7);\n if(nameHeaderLength % 2 !== 0) nameHeaderLength += 1;\n // Check for pre photoshop 6 format\n if(nameHeaderLength === 0) {\n // Always 4\n nameHeaderLength = 4;\n }\n\n var startOffset = offset + 8 + nameHeaderLength;\n var sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength);\n\n return readIPTCData(file, startOffset, sectionLength);\n\n break;\n\n }\n\n\n // Not the marker, continue searching\n offset++;\n\n }\n\n }\n var IptcFieldMap = {\n 0x78 : 'caption',\n 0x6E : 'credit',\n 0x19 : 'keywords',\n 0x37 : 'dateCreated',\n 0x50 : 'byline',\n 0x55 : 'bylineTitle',\n 0x7A : 'captionWriter',\n 0x69 : 'headline',\n 0x74 : 'copyright',\n 0x0F : 'category'\n };\n function readIPTCData(file, startOffset, sectionLength){\n var dataView = new DataView(file);\n var data = {};\n var fieldValue, fieldName, dataSize, segmentType, segmentSize;\n var segmentStartPos = startOffset;\n while(segmentStartPos < startOffset+sectionLength) {\n if(dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos+1) === 0x02){\n segmentType = dataView.getUint8(segmentStartPos+2);\n if(segmentType in IptcFieldMap) {\n dataSize = dataView.getInt16(segmentStartPos+3);\n segmentSize = dataSize + 5;\n fieldName = IptcFieldMap[segmentType];\n fieldValue = getStringFromDB(dataView, segmentStartPos+5, dataSize);\n // Check if we already stored a value with this name\n if(data.hasOwnProperty(fieldName)) {\n // Value already stored with this name, create multivalue field\n if(data[fieldName] instanceof Array) {\n data[fieldName].push(fieldValue);\n }\n else {\n data[fieldName] = [data[fieldName], fieldValue];\n }\n }\n else {\n data[fieldName] = fieldValue;\n }\n }\n\n }\n segmentStartPos++;\n }\n return data;\n }\n\n\n\n function readTags(file, tiffStart, dirStart, strings, bigEnd) {\n var entries = file.getUint16(dirStart, !bigEnd),\n tags = {},\n entryOffset, tag,\n i;\n\n for (i=0;i<entries;i++) {\n entryOffset = dirStart + i*12 + 2;\n tag = strings[file.getUint16(entryOffset, !bigEnd)];\n if (!tag && debug) console.log(\"Unknown tag: \" + file.getUint16(entryOffset, !bigEnd));\n tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd);\n }\n return tags;\n }\n\n\n function readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd) {\n var type = file.getUint16(entryOffset+2, !bigEnd),\n numValues = file.getUint32(entryOffset+4, !bigEnd),\n valueOffset = file.getUint32(entryOffset+8, !bigEnd) + tiffStart,\n offset,\n vals, val, n,\n numerator, denominator;\n\n switch (type) {\n case 1: // byte, 8-bit unsigned int\n case 7: // undefined, 8-bit byte, value depending on field\n if (numValues == 1) {\n return file.getUint8(entryOffset + 8, !bigEnd);\n } else {\n offset = numValues > 4 ? valueOffset : (entryOffset + 8);\n vals = [];\n for (n=0;n<numValues;n++) {\n vals[n] = file.getUint8(offset + n);\n }\n return vals;\n }\n\n case 2: // ascii, 8-bit byte\n offset = numValues > 4 ? valueOffset : (entryOffset + 8);\n return getStringFromDB(file, offset, numValues-1);\n\n case 3: // short, 16 bit int\n if (numValues == 1) {\n return file.getUint16(entryOffset + 8, !bigEnd);\n } else {\n offset = numValues > 2 ? valueOffset : (entryOffset + 8);\n vals = [];\n for (n=0;n<numValues;n++) {\n vals[n] = file.getUint16(offset + 2*n, !bigEnd);\n }\n return vals;\n }\n\n case 4: // long, 32 bit int\n if (numValues == 1) {\n return file.getUint32(entryOffset + 8, !bigEnd);\n } else {\n vals = [];\n for (n=0;n<numValues;n++) {\n vals[n] = file.getUint32(valueOffset + 4*n, !bigEnd);\n }\n return vals;\n }\n\n case 5: // rational = two long values, first is numerator, second is denominator\n if (numValues == 1) {\n numerator = file.getUint32(valueOffset, !bigEnd);\n denominator = file.getUint32(valueOffset+4, !bigEnd);\n val = new Number(numerator / denominator);\n val.numerator = numerator;\n val.denominator = denominator;\n return val;\n } else {\n vals = [];\n for (n=0;n<numValues;n++) {\n numerator = file.getUint32(valueOffset + 8*n, !bigEnd);\n denominator = file.getUint32(valueOffset+4 + 8*n, !bigEnd);\n vals[n] = new Number(numerator / denominator);\n vals[n].numerator = numerator;\n vals[n].denominator = denominator;\n }\n return vals;\n }\n\n case 9: // slong, 32 bit signed int\n if (numValues == 1) {\n return file.getInt32(entryOffset + 8, !bigEnd);\n } else {\n vals = [];\n for (n=0;n<numValues;n++) {\n vals[n] = file.getInt32(valueOffset + 4*n, !bigEnd);\n }\n return vals;\n }\n\n case 10: // signed rational, two slongs, first is numerator, second is denominator\n if (numValues == 1) {\n return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset+4, !bigEnd);\n } else {\n vals = [];\n for (n=0;n<numValues;n++) {\n vals[n] = file.getInt32(valueOffset + 8*n, !bigEnd) / file.getInt32(valueOffset+4 + 8*n, !bigEnd);\n }\n return vals;\n }\n }\n }\n\n /**\n * Given an IFD (Image File Directory) start offset\n * returns an offset to next IFD or 0 if it's the last IFD.\n */\n function getNextIFDOffset(dataView, dirStart, bigEnd){\n //the first 2bytes means the number of directory entries contains in this IFD\n var entries = dataView.getUint16(dirStart, !bigEnd);\n\n // After last directory entry, there is a 4bytes of data,\n // it means an offset to next IFD.\n // If its value is '0x00000000', it means this is the last IFD and there is no linked IFD.\n\n return dataView.getUint32(dirStart + 2 + entries * 12, !bigEnd); // each entry is 12 bytes long\n }\n\n function readThumbnailImage(dataView, tiffStart, firstIFDOffset, bigEnd){\n // get the IFD1 offset\n var IFD1OffsetPointer = getNextIFDOffset(dataView, tiffStart+firstIFDOffset, bigEnd);\n\n if (!IFD1OffsetPointer) {\n // console.log('******** IFD1Offset is empty, image thumb not found ********');\n return {};\n }\n else if (IFD1OffsetPointer > dataView.byteLength) { // this should not happen\n // console.log('******** IFD1Offset is outside the bounds of the DataView ********');\n return {};\n }\n // console.log('******* thumbnail IFD offset (IFD1) is: %s', IFD1OffsetPointer);\n\n var thumbTags = readTags(dataView, tiffStart, tiffStart + IFD1OffsetPointer, IFD1Tags, bigEnd)\n\n // EXIF 2.3 specification for JPEG format thumbnail\n\n // If the value of Compression(0x0103) Tag in IFD1 is '6', thumbnail image format is JPEG.\n // Most of Exif image uses JPEG format for thumbnail. In that case, you can get offset of thumbnail\n // by JpegIFOffset(0x0201) Tag in IFD1, size of thumbnail by JpegIFByteCount(0x0202) Tag.\n // Data format is ordinary JPEG format, starts from 0xFFD8 and ends by 0xFFD9. It seems that\n // JPEG format and 160x120pixels of size are recommended thumbnail format for Exif2.1 or later.\n\n if (thumbTags['Compression']) {\n // console.log('Thumbnail image found!');\n\n switch (thumbTags['Compression']) {\n case 6:\n // console.log('Thumbnail image format is JPEG');\n if (thumbTags.JpegIFOffset && thumbTags.JpegIFByteCount) {\n // extract the thumbnail\n var tOffset = tiffStart + thumbTags.JpegIFOffset;\n var tLength = thumbTags.JpegIFByteCount;\n thumbTags['blob'] = new Blob([new Uint8Array(dataView.buffer, tOffset, tLength)], {\n type: 'image/jpeg'\n });\n }\n break;\n\n case 1:\n console.log(\"Thumbnail image format is TIFF, which is not implemented.\");\n break;\n default:\n console.log(\"Unknown thumbnail image format '%s'\", thumbTags['Compression']);\n }\n }\n else if (thumbTags['PhotometricInterpretation'] == 2) {\n console.log(\"Thumbnail image format is RGB, which is not implemented.\");\n }\n return thumbTags;\n }\n\n function getStringFromDB(buffer, start, length) {\n var outstr = \"\";\n for (n = start; n < start+length; n++) {\n outstr += String.fromCharCode(buffer.getUint8(n));\n }\n return outstr;\n }\n\n function readEXIFData(file, start) {\n if (getStringFromDB(file, start, 4) != \"Exif\") {\n if (debug) console.log(\"Not valid EXIF data! \" + getStringFromDB(file, start, 4));\n return false;\n }\n\n var bigEnd,\n tags, tag,\n exifData, gpsData,\n tiffOffset = start + 6;\n\n // test for TIFF validity and endianness\n if (file.getUint16(tiffOffset) == 0x4949) {\n bigEnd = false;\n } else if (file.getUint16(tiffOffset) == 0x4D4D) {\n bigEnd = true;\n } else {\n if (debug) console.log(\"Not valid TIFF data! (no 0x4949 or 0x4D4D)\");\n return false;\n }\n\n if (file.getUint16(tiffOffset+2, !bigEnd) != 0x002A) {\n if (debug) console.log(\"Not valid TIFF data! (no 0x002A)\");\n return false;\n }\n\n var firstIFDOffset = file.getUint32(tiffOffset+4, !bigEnd);\n\n if (firstIFDOffset < 0x00000008) {\n if (debug) console.log(\"Not valid TIFF data! (First offset less than 8)\", file.getUint32(tiffOffset+4, !bigEnd));\n return false;\n }\n\n tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd);\n\n if (tags.ExifIFDPointer) {\n exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd);\n for (tag in exifData) {\n switch (tag) {\n case \"LightSource\" :\n case \"Flash\" :\n case \"MeteringMode\" :\n case \"ExposureProgram\" :\n case \"SensingMethod\" :\n case \"SceneCaptureType\" :\n case \"SceneType\" :\n case \"CustomRendered\" :\n case \"WhiteBalance\" :\n case \"GainControl\" :\n case \"Contrast\" :\n case \"Saturation\" :\n case \"Sharpness\" :\n case \"SubjectDistanceRange\" :\n case \"FileSource\" :\n exifData[tag] = StringValues[tag][exifData[tag]];\n break;\n\n case \"ExifVersion\" :\n case \"FlashpixVersion\" :\n exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3]);\n break;\n\n case \"ComponentsConfiguration\" :\n exifData[tag] =\n StringValues.Components[exifData[tag][0]] +\n StringValues.Components[exifData[tag][1]] +\n StringValues.Components[exifData[tag][2]] +\n StringValues.Components[exifData[tag][3]];\n break;\n }\n tags[tag] = exifData[tag];\n }\n }\n\n if (tags.GPSInfoIFDPointer) {\n gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd);\n for (tag in gpsData) {\n switch (tag) {\n case \"GPSVersionID\" :\n gpsData[tag] = gpsData[tag][0] +\n \".\" + gpsData[tag][1] +\n \".\" + gpsData[tag][2] +\n \".\" + gpsData[tag][3];\n break;\n }\n tags[tag] = gpsData[tag];\n }\n }\n\n // extract thumbnail\n tags['thumbnail'] = readThumbnailImage(file, tiffOffset, firstIFDOffset, bigEnd);\n\n return tags;\n }\n\n function findXMPinJPEG(file) {\n\n if (!('DOMParser' in self)) {\n // console.warn('XML parsing not supported without DOMParser');\n return;\n }\n var dataView = new DataView(file);\n\n if (debug) console.log(\"Got file of length \" + file.byteLength);\n if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {\n if (debug) console.log(\"Not a valid JPEG\");\n return false; // not a valid jpeg\n }\n\n var offset = 2,\n length = file.byteLength,\n dom = new DOMParser();\n\n while (offset < (length-4)) {\n if (getStringFromDB(dataView, offset, 4) == \"http\") {\n var startOffset = offset - 1;\n var sectionLength = dataView.getUint16(offset - 2) - 1;\n var xmpString = getStringFromDB(dataView, startOffset, sectionLength)\n var xmpEndIndex = xmpString.indexOf('xmpmeta>') + 8;\n xmpString = xmpString.substring( xmpString.indexOf( '<x:xmpmeta' ), xmpEndIndex );\n\n var indexOfXmp = xmpString.indexOf('x:xmpmeta') + 10\n //Many custom written programs embed xmp/xml without any namespace. Following are some of them.\n //Without these namespaces, XML is thought to be invalid by parsers\n xmpString = xmpString.slice(0, indexOfXmp)\n + 'xmlns:Iptc4xmpCore=\"http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/\" '\n + 'xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" '\n + 'xmlns:tiff=\"http://ns.adobe.com/tiff/1.0/\" '\n + 'xmlns:plus=\"http://schemas.android.com/apk/lib/com.google.android.gms.plus\" '\n + 'xmlns:ext=\"http://www.gettyimages.com/xsltExtension/1.0\" '\n + 'xmlns:exif=\"http://ns.adobe.com/exif/1.0/\" '\n + 'xmlns:stEvt=\"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#\" '\n + 'xmlns:stRef=\"http://ns.adobe.com/xap/1.0/sType/ResourceRef#\" '\n + 'xmlns:crs=\"http://ns.adobe.com/camera-raw-settings/1.0/\" '\n + 'xmlns:xapGImg=\"http://ns.adobe.com/xap/1.0/g/img/\" '\n + 'xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\" '\n + xmpString.slice(indexOfXmp)\n\n var domDocument = dom.parseFromString( xmpString, 'text/xml' );\n return xml2Object(domDocument);\n } else{\n offset++;\n }\n }\n }\n\n function xml2json(xml) {\n var json = {};\n \n if (xml.nodeType == 1) { // element node\n if (xml.attributes.length > 0) {\n json['@attributes'] = {};\n for (var j = 0; j < xml.attributes.length; j++) {\n var attribute = xml.attributes.item(j);\n json['@attributes'][attribute.nodeName] = attribute.nodeValue;\n }\n }\n } else if (xml.nodeType == 3) { // text node\n return xml.nodeValue;\n }\n \n // deal with children\n if (xml.hasChildNodes()) {\n for(var i = 0; i < xml.childNodes.length; i++) {\n var child = xml.childNodes.item(i);\n var nodeName = child.nodeName;\n if (json[nodeName] == null) {\n json[nodeName] = xml2json(child);\n } else {\n if (json[nodeName].push == null) {\n var old = json[nodeName];\n json[nodeName] = [];\n json[nodeName].push(old);\n }\n json[nodeName].push(xml2json(child));\n }\n }\n }\n \n return json;\n }\n\n function xml2Object(xml) {\n try {\n var obj = {};\n if (xml.children.length > 0) {\n for (var i = 0; i < xml.children.length; i++) {\n var item = xml.children.item(i);\n var attributes = item.attributes;\n for(var idx in attributes) {\n var itemAtt = attributes[idx];\n var dataKey = itemAtt.nodeName;\n var dataValue = itemAtt.nodeValue;\n\n if(dataKey !== undefined) {\n obj[dataKey] = dataValue;\n }\n }\n var nodeName = item.nodeName;\n\n if (typeof (obj[nodeName]) == \"undefined\") {\n obj[nodeName] = xml2json(item);\n } else {\n if (typeof (obj[nodeName].push) == \"undefined\") {\n var old = obj[nodeName];\n\n obj[nodeName] = [];\n obj[nodeName].push(old);\n }\n obj[nodeName].push(xml2json(item));\n }\n }\n } else {\n obj = xml.textContent;\n }\n return obj;\n } catch (e) {\n console.log(e.message);\n }\n }\n\n EXIF.enableXmp = function() {\n EXIF.isXmpEnabled = true;\n }\n\n EXIF.disableXmp = function() {\n EXIF.isXmpEnabled = false;\n }\n\n EXIF.getData = function(img, callback) {\n if (((self.Image && img instanceof self.Image)\n || (self.HTMLImageElement && img instanceof self.HTMLImageElement))\n && !img.complete)\n return false;\n\n if (!imageHasData(img)) {\n getImageData(img, callback);\n } else {\n if (callback) {\n callback.call(img);\n }\n }\n return true;\n }\n\n EXIF.getTag = function(img, tag) {\n if (!imageHasData(img)) return;\n return img.exifdata[tag];\n }\n \n EXIF.getIptcTag = function(img, tag) {\n if (!imageHasData(img)) return;\n return img.iptcdata[tag];\n }\n\n EXIF.getAllTags = function(img) {\n if (!imageHasData(img)) return {};\n var a,\n data = img.exifdata,\n tags = {};\n for (a in data) {\n if (data.hasOwnProperty(a)) {\n tags[a] = data[a];\n }\n }\n return tags;\n }\n \n EXIF.getAllIptcTags = function(img) {\n if (!imageHasData(img)) return {};\n var a,\n data = img.iptcdata,\n tags = {};\n for (a in data) {\n if (data.hasOwnProperty(a)) {\n tags[a] = data[a];\n }\n }\n return tags;\n }\n\n EXIF.pretty = function(img) {\n if (!imageHasData(img)) return \"\";\n var a,\n data = img.exifdata,\n strPretty = \"\";\n for (a in data) {\n if (data.hasOwnProperty(a)) {\n if (typeof data[a] == \"object\") {\n if (data[a] instanceof Number) {\n strPretty += a + \" : \" + data[a] + \" [\" + data[a].numerator + \"/\" + data[a].denominator + \"]\\r\\n\";\n } else {\n strPretty += a + \" : [\" + data[a].length + \" values]\\r\\n\";\n }\n } else {\n strPretty += a + \" : \" + data[a] + \"\\r\\n\";\n }\n }\n }\n return strPretty;\n }\n\n EXIF.readFromBinaryFile = function(file) {\n return findEXIFinJPEG(file);\n }\n\n if (typeof define === 'function' && define.amd) {\n define('exif-js', [], function() {\n return EXIF;\n });\n }\n}.call(this));\n\n","/* jstz.min.js Version: 2.1.0 Build date: 2018-11-04 */\n!function(e){var a=function(){\"use strict\";var e=\"s\",s={DAY:864e5,HOUR:36e5,MINUTE:6e4,SECOND:1e3,BASELINE_YEAR:2014,MAX_SCORE:864e6,AMBIGUITIES:{\"America/Denver\":[\"America/Mazatlan\"],\"Europe/London\":[\"Africa/Casablanca\"],\"America/Chicago\":[\"America/Mexico_City\"],\"America/Asuncion\":[\"America/Campo_Grande\",\"America/Santiago\"],\"America/Montevideo\":[\"America/Sao_Paulo\",\"America/Santiago\"],\"Asia/Beirut\":[\"Asia/Amman\",\"Asia/Jerusalem\",\"Europe/Helsinki\",\"Asia/Damascus\",\"Africa/Cairo\",\"Asia/Gaza\",\"Europe/Minsk\"],\"Pacific/Auckland\":[\"Pacific/Fiji\"],\"America/Los_Angeles\":[\"America/Santa_Isabel\"],\"America/New_York\":[\"America/Havana\"],\"America/Halifax\":[\"America/Goose_Bay\"],\"America/Godthab\":[\"America/Miquelon\"],\"Asia/Dubai\":[\"Asia/Yerevan\"],\"Asia/Jakarta\":[\"Asia/Krasnoyarsk\"],\"Asia/Shanghai\":[\"Asia/Irkutsk\",\"Australia/Perth\"],\"Australia/Sydney\":[\"Australia/Lord_Howe\"],\"Asia/Tokyo\":[\"Asia/Yakutsk\"],\"Asia/Dhaka\":[\"Asia/Omsk\"],\"Asia/Baku\":[\"Asia/Yerevan\"],\"Australia/Brisbane\":[\"Asia/Vladivostok\"],\"Pacific/Noumea\":[\"Asia/Vladivostok\"],\"Pacific/Majuro\":[\"Asia/Kamchatka\",\"Pacific/Fiji\"],\"Pacific/Tongatapu\":[\"Pacific/Apia\"],\"Asia/Baghdad\":[\"Europe/Minsk\",\"Europe/Moscow\"],\"Asia/Karachi\":[\"Asia/Yekaterinburg\"],\"Africa/Johannesburg\":[\"Asia/Gaza\",\"Africa/Cairo\"]}},i=function(e){var a=-e.getTimezoneOffset();return null!==a?a:0},r=function(){var a=i(new Date(s.BASELINE_YEAR,0,2)),r=i(new Date(s.BASELINE_YEAR,5,2)),n=a-r;return n<0?a+\",1\":n>0?r+\",1,\"+e:a+\",0\"},n=function(){var e,a;if(\"undefined\"!=typeof Intl&&\"undefined\"!=typeof Intl.DateTimeFormat&&(e=Intl.DateTimeFormat(),\"undefined\"!=typeof e&&\"undefined\"!=typeof e.resolvedOptions))return a=e.resolvedOptions().timeZone,a&&(a.indexOf(\"/\")>-1||\"UTC\"===a)&&0!=a.indexOf(\"Etc\")?a:void 0},o=function(e){for(var a=new Date(e,0,1,0,0,1,0).getTime(),s=new Date(e,12,31,23,59,59).getTime(),i=a,r=new Date(i).getTimezoneOffset(),n=null,o=null;i<s-864e5;){var u=new Date(i),A=u.getTimezoneOffset();A!==r&&(A<r&&(n=u),A>r&&(o=u),r=A),i+=864e5}return!(!n||!o)&&{s:t(n).getTime(),e:t(o).getTime()}},t=function l(e,a,i){\"undefined\"==typeof a&&(a=s.DAY,i=s.HOUR);for(var r=new Date(e.getTime()-a).getTime(),n=e.getTime()+a,o=new Date(r).getTimezoneOffset(),t=r,u=null;t<n-i;){var A=new Date(t),c=A.getTimezoneOffset();if(c!==o){u=A;break}t+=i}return a===s.DAY?l(u,s.HOUR,s.MINUTE):a===s.HOUR?l(u,s.MINUTE,s.SECOND):u},u=function(e,a,s,i){if(\"N/A\"!==s)return s;if(\"Asia/Beirut\"===a){if(\"Africa/Cairo\"===i.name&&13983768e5===e[6].s&&14116788e5===e[6].e)return 0;if(\"Asia/Jerusalem\"===i.name&&13959648e5===e[6].s&&14118588e5===e[6].e)return 0}else if(\"America/Santiago\"===a){if(\"America/Asuncion\"===i.name&&14124816e5===e[6].s&&1397358e6===e[6].e)return 0;if(\"America/Campo_Grande\"===i.name&&14136912e5===e[6].s&&13925196e5===e[6].e)return 0}else if(\"America/Montevideo\"===a){if(\"America/Sao_Paulo\"===i.name&&14136876e5===e[6].s&&1392516e6===e[6].e)return 0}else if(\"Pacific/Auckland\"===a&&\"Pacific/Fiji\"===i.name&&14142456e5===e[6].s&&13961016e5===e[6].e)return 0;return s},A=function(e,i){for(var r=function(a){for(var r=0,n=0;n<e.length;n++)if(a.rules[n]&&e[n]){if(!(e[n].s>=a.rules[n].s&&e[n].e<=a.rules[n].e)){r=\"N/A\";break}if(r=0,r+=Math.abs(e[n].s-a.rules[n].s),r+=Math.abs(a.rules[n].e-e[n].e),r>s.MAX_SCORE){r=\"N/A\";break}}return r=u(e,i,r,a)},n={},o=a.olson.dst_rules.zones,t=o.length,A=s.AMBIGUITIES[i],c=0;c<t;c++){var m=o[c],l=r(o[c]);\"N/A\"!==l&&(n[m.name]=l)}for(var f in n)if(n.hasOwnProperty(f))for(var d=0;d<A.length;d++)if(A[d]===f)return f;return i},c=function(e){var s=function(){for(var e=[],s=0;s<a.olson.dst_rules.years.length;s++){var i=o(a.olson.dst_rules.years[s]);e.push(i)}return e},i=function(e){for(var a=0;a<e.length;a++)if(e[a]!==!1)return!0;return!1},r=s(),n=i(r);return n?A(r,e):e},m=function(){var e=n();return e||(e=a.olson.timezones[r()],\"undefined\"!=typeof s.AMBIGUITIES[e]&&(e=c(e))),{name:function(){return e},stdTimezoneOffset:function(){return-r().split(\",\")[0]},timezoneOffset:function(){return-i(new Date)}}};return{determine:m}}();a.olson=a.olson||{},a.olson.timezones={\"-720,0\":\"Etc/GMT+12\",\"-660,0\":\"Pacific/Pago_Pago\",\"-660,1,s\":\"Pacific/Apia\",\"-600,1\":\"America/Adak\",\"-600,0\":\"Pacific/Honolulu\",\"-570,0\":\"Pacific/Marquesas\",\"-540,0\":\"Pacific/Gambier\",\"-540,1\":\"America/Anchorage\",\"-480,1\":\"America/Los_Angeles\",\"-480,0\":\"Pacific/Pitcairn\",\"-420,0\":\"America/Phoenix\",\"-420,1\":\"America/Denver\",\"-360,0\":\"America/Guatemala\",\"-360,1\":\"America/Chicago\",\"-360,1,s\":\"Pacific/Easter\",\"-300,0\":\"America/Bogota\",\"-300,1\":\"America/New_York\",\"-270,0\":\"America/Caracas\",\"-240,1\":\"America/Halifax\",\"-240,0\":\"America/Santo_Domingo\",\"-240,1,s\":\"America/Asuncion\",\"-210,1\":\"America/St_Johns\",\"-180,1\":\"America/Godthab\",\"-180,0\":\"America/Argentina/Buenos_Aires\",\"-180,1,s\":\"America/Montevideo\",\"-120,0\":\"America/Noronha\",\"-120,1\":\"America/Noronha\",\"-60,1\":\"Atlantic/Azores\",\"-60,0\":\"Atlantic/Cape_Verde\",\"0,0\":\"UTC\",\"0,1\":\"Europe/London\",\"60,1\":\"Europe/Berlin\",\"60,0\":\"Africa/Lagos\",\"60,1,s\":\"Africa/Windhoek\",\"120,1\":\"Asia/Beirut\",\"120,0\":\"Africa/Johannesburg\",\"180,0\":\"Asia/Baghdad\",\"180,1\":\"Europe/Moscow\",\"210,1\":\"Asia/Tehran\",\"240,0\":\"Asia/Dubai\",\"240,1\":\"Asia/Baku\",\"270,0\":\"Asia/Kabul\",\"300,1\":\"Asia/Yekaterinburg\",\"300,0\":\"Asia/Karachi\",\"330,0\":\"Asia/Kolkata\",\"345,0\":\"Asia/Kathmandu\",\"360,0\":\"Asia/Dhaka\",\"360,1\":\"Asia/Omsk\",\"390,0\":\"Asia/Rangoon\",\"420,1\":\"Asia/Krasnoyarsk\",\"420,0\":\"Asia/Jakarta\",\"480,0\":\"Asia/Shanghai\",\"480,1\":\"Asia/Irkutsk\",\"525,0\":\"Australia/Eucla\",\"525,1,s\":\"Australia/Eucla\",\"540,1\":\"Asia/Yakutsk\",\"540,0\":\"Asia/Tokyo\",\"570,0\":\"Australia/Darwin\",\"570,1,s\":\"Australia/Adelaide\",\"600,0\":\"Australia/Brisbane\",\"600,1\":\"Asia/Vladivostok\",\"600,1,s\":\"Australia/Sydney\",\"630,1,s\":\"Australia/Lord_Howe\",\"660,1\":\"Asia/Kamchatka\",\"660,0\":\"Pacific/Noumea\",\"690,0\":\"Pacific/Norfolk\",\"720,1,s\":\"Pacific/Auckland\",\"720,0\":\"Pacific/Majuro\",\"765,1,s\":\"Pacific/Chatham\",\"780,0\":\"Pacific/Tongatapu\",\"780,1,s\":\"Pacific/Apia\",\"840,0\":\"Pacific/Kiritimati\"},a.olson.dst_rules={years:[2008,2009,2010,2011,2012,2013,2014],zones:[{name:\"Africa/Cairo\",rules:[{e:12199572e5,s:12090744e5},{e:1250802e6,s:1240524e6},{e:12858804e5,s:12840696e5},!1,!1,!1,{e:14116788e5,s:1406844e6}]},{name:\"Africa/Casablanca\",rules:[{e:12202236e5,s:12122784e5},{e:12508092e5,s:12438144e5},{e:1281222e6,s:12727584e5},{e:13120668e5,s:13017888e5},{e:13489704e5,s:1345428e6},{e:13828392e5,s:13761e8},{e:14142888e5,s:14069448e5}]},{name:\"America/Asuncion\",rules:[{e:12050316e5,s:12243888e5},{e:12364812e5,s:12558384e5},{e:12709548e5,s:12860784e5},{e:13024044e5,s:1317528e6},{e:1333854e6,s:13495824e5},{e:1364094e6,s:1381032e6},{e:13955436e5,s:14124816e5}]},{name:\"America/Campo_Grande\",rules:[{e:12032172e5,s:12243888e5},{e:12346668e5,s:12558384e5},{e:12667212e5,s:1287288e6},{e:12981708e5,s:13187376e5},{e:13302252e5,s:1350792e6},{e:136107e7,s:13822416e5},{e:13925196e5,s:14136912e5}]},{name:\"America/Goose_Bay\",rules:[{e:122559486e4,s:120503526e4},{e:125704446e4,s:123648486e4},{e:128909886e4,s:126853926e4},{e:13205556e5,s:129998886e4},{e:13520052e5,s:13314456e5},{e:13834548e5,s:13628952e5},{e:14149044e5,s:13943448e5}]},{name:\"America/Havana\",rules:[{e:12249972e5,s:12056436e5},{e:12564468e5,s:12364884e5},{e:12885012e5,s:12685428e5},{e:13211604e5,s:13005972e5},{e:13520052e5,s:13332564e5},{e:13834548e5,s:13628916e5},{e:14149044e5,s:13943412e5}]},{name:\"America/Mazatlan\",rules:[{e:1225008e6,s:12074724e5},{e:12564576e5,s:1238922e6},{e:1288512e6,s:12703716e5},{e:13199616e5,s:13018212e5},{e:13514112e5,s:13332708e5},{e:13828608e5,s:13653252e5},{e:14143104e5,s:13967748e5}]},{name:\"America/Mexico_City\",rules:[{e:12250044e5,s:12074688e5},{e:1256454e6,s:12389184e5},{e:12885084e5,s:1270368e6},{e:1319958e6,s:13018176e5},{e:13514076e5,s:13332672e5},{e:13828572e5,s:13653216e5},{e:14143068e5,s:13967712e5}]},{name:\"America/Miquelon\",rules:[{e:12255984e5,s:12050388e5},{e:1257048e6,s:12364884e5},{e:12891024e5,s:12685428e5},{e:1320552e6,s:12999924e5},{e:13520016e5,s:1331442e6},{e:13834512e5,s:13628916e5},{e:14149008e5,s:13943412e5}]},{name:\"America/Santa_Isabel\",rules:[{e:12250116e5,s:1207476e6},{e:12564612e5,s:12389256e5},{e:12885156e5,s:12703752e5},{e:13199652e5,s:13018248e5},{e:13514148e5,s:13332744e5},{e:13828644e5,s:13653288e5},{e:1414314e6,s:13967784e5}]},{name:\"America/Santiago\",rules:[{e:1206846e6,s:1223784e6},{e:1237086e6,s:12552336e5},{e:127035e7,s:12866832e5},{e:13048236e5,s:13138992e5},{e:13356684e5,s:13465584e5},{e:1367118e6,s:13786128e5},{e:13985676e5,s:14100624e5}]},{name:\"America/Sao_Paulo\",rules:[{e:12032136e5,s:12243852e5},{e:12346632e5,s:12558348e5},{e:12667176e5,s:12872844e5},{e:12981672e5,s:1318734e6},{e:13302216e5,s:13507884e5},{e:13610664e5,s:1382238e6},{e:1392516e6,s:14136876e5}]},{name:\"Asia/Amman\",rules:[{e:1225404e6,s:12066552e5},{e:12568536e5,s:12381048e5},{e:12883032e5,s:12695544e5},{e:13197528e5,s:13016088e5},!1,!1,{e:14147064e5,s:13959576e5}]},{name:\"Asia/Damascus\",rules:[{e:12254868e5,s:120726e7},{e:125685e7,s:12381048e5},{e:12882996e5,s:12701592e5},{e:13197492e5,s:13016088e5},{e:13511988e5,s:13330584e5},{e:13826484e5,s:1364508e6},{e:14147028e5,s:13959576e5}]},{name:\"Asia/Dubai\",rules:[!1,!1,!1,!1,!1,!1,!1]},{name:\"Asia/Gaza\",rules:[{e:12199572e5,s:12066552e5},{e:12520152e5,s:12381048e5},{e:1281474e6,s:126964086e4},{e:1312146e6,s:130160886e4},{e:13481784e5,s:13330584e5},{e:13802292e5,s:1364508e6},{e:1414098e6,s:13959576e5}]},{name:\"Asia/Irkutsk\",rules:[{e:12249576e5,s:12068136e5},{e:12564072e5,s:12382632e5},{e:12884616e5,s:12697128e5},!1,!1,!1,!1]},{name:\"Asia/Jerusalem\",rules:[{e:12231612e5,s:12066624e5},{e:1254006e6,s:1238112e6},{e:1284246e6,s:12695616e5},{e:131751e7,s:1301616e6},{e:13483548e5,s:13330656e5},{e:13828284e5,s:13645152e5},{e:1414278e6,s:13959648e5}]},{name:\"Asia/Kamchatka\",rules:[{e:12249432e5,s:12067992e5},{e:12563928e5,s:12382488e5},{e:12884508e5,s:12696984e5},!1,!1,!1,!1]},{name:\"Asia/Krasnoyarsk\",rules:[{e:12249612e5,s:12068172e5},{e:12564108e5,s:12382668e5},{e:12884652e5,s:12697164e5},!1,!1,!1,!1]},{name:\"Asia/Omsk\",rules:[{e:12249648e5,s:12068208e5},{e:12564144e5,s:12382704e5},{e:12884688e5,s:126972e7},!1,!1,!1,!1]},{name:\"Asia/Vladivostok\",rules:[{e:12249504e5,s:12068064e5},{e:12564e8,s:1238256e6},{e:12884544e5,s:12697056e5},!1,!1,!1,!1]},{name:\"Asia/Yakutsk\",rules:[{e:1224954e6,s:120681e7},{e:12564036e5,s:12382596e5},{e:1288458e6,s:12697092e5},!1,!1,!1,!1]},{name:\"Asia/Yekaterinburg\",rules:[{e:12249684e5,s:12068244e5},{e:1256418e6,s:1238274e6},{e:12884724e5,s:12697236e5},!1,!1,!1,!1]},{name:\"Asia/Yerevan\",rules:[{e:1224972e6,s:1206828e6},{e:12564216e5,s:12382776e5},{e:1288476e6,s:12697272e5},{e:13199256e5,s:13011768e5},!1,!1,!1]},{name:\"Australia/Lord_Howe\",rules:[{e:12074076e5,s:12231342e5},{e:12388572e5,s:12545838e5},{e:12703068e5,s:12860334e5},{e:13017564e5,s:1317483e6},{e:1333206e6,s:13495374e5},{e:13652604e5,s:1380987e6},{e:139671e7,s:14124366e5}]},{name:\"Australia/Perth\",rules:[{e:12068136e5,s:12249576e5},!1,!1,!1,!1,!1,!1]},{name:\"Europe/Helsinki\",rules:[{e:12249828e5,s:12068388e5},{e:12564324e5,s:12382884e5},{e:12884868e5,s:1269738e6},{e:13199364e5,s:13011876e5},{e:1351386e6,s:13326372e5},{e:13828356e5,s:13646916e5},{e:14142852e5,s:13961412e5}]},{name:\"Europe/Minsk\",rules:[{e:12249792e5,s:12068352e5},{e:12564288e5,s:12382848e5},{e:12884832e5,s:12697344e5},!1,!1,!1,!1]},{name:\"Europe/Moscow\",rules:[{e:12249756e5,s:12068316e5},{e:12564252e5,s:12382812e5},{e:12884796e5,s:12697308e5},!1,!1,!1,!1]},{name:\"Pacific/Apia\",rules:[!1,!1,!1,{e:13017528e5,s:13168728e5},{e:13332024e5,s:13489272e5},{e:13652568e5,s:13803768e5},{e:13967064e5,s:14118264e5}]},{name:\"Pacific/Fiji\",rules:[!1,!1,{e:12696984e5,s:12878424e5},{e:13271544e5,s:1319292e6},{e:1358604e6,s:13507416e5},{e:139005e7,s:1382796e6},{e:14215032e5,s:14148504e5}]},{name:\"Europe/London\",rules:[{e:12249828e5,s:12068388e5},{e:12564324e5,s:12382884e5},{e:12884868e5,s:1269738e6},{e:13199364e5,s:13011876e5},{e:1351386e6,s:13326372e5},{e:13828356e5,s:13646916e5},{e:14142852e5,s:13961412e5}]}]},\"undefined\"!=typeof module&&\"undefined\"!=typeof module.exports?module.exports=a:\"undefined\"!=typeof define&&null!==define&&null!=define.amd?define([],function(){return a}):\"undefined\"==typeof e?window.jstz=a:e.jstz=a}();","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\r\n * Simplify encoding & decoding CSV\r\n *\r\n * @author Jason Mulligan <jason.mulligan@avoidwork.com>\r\n * @copyright 2018\r\n * @license BSD-3-Clause\r\n * @version 1.0.6\r\n */\n(function (global) {\n\t\"use strict\";\n\n\tvar REGEX_NL = /(\\n|\\r)$/,\n\t REGEX_OBJTYPE = /\\[object Object\\]/,\n\t REGEX_JSON = /^[\\[\\{]/;\n\n\tvar cast = function cast(obj) {\n\t\tvar key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\t\tvar ref = arguments[2];\n\n\t\tvar result = void 0;\n\n\t\tif (Array.isArray(obj)) {\n\t\t\tresult = Array.from(obj);\n\t\t} else if (key) {\n\t\t\tresult = keys(obj, ref);\n\t\t} else {\n\t\t\tresult = [];\n\t\t\titerate(obj, function (i) {\n\t\t\t\treturn result.push(i);\n\t\t\t}, ref);\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tfunction coerce(value) {\n\t\tvar result = void 0,\n\t\t tmp = void 0;\n\n\t\tif (value === null || value === undefined) {\n\t\t\tresult = undefined;\n\t\t} else if (value === \"true\") {\n\t\t\tresult = true;\n\t\t} else if (value === \"false\") {\n\t\t\tresult = false;\n\t\t} else if (value === \"null\") {\n\t\t\tresult = null;\n\t\t} else if (value === \"undefined\") {\n\t\t\tresult = undefined;\n\t\t} else if (value === \"\") {\n\t\t\tresult = value;\n\t\t} else if (!isNaN(tmp = Number(value))) {\n\t\t\tresult = tmp;\n\t\t} else if (REGEX_JSON.test(value)) {\n\t\t\tresult = parse(value);\n\t\t} else {\n\t\t\tresult = value;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction decode(arg) {\n\t\tvar delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \",\";\n\n\t\tvar regex = new RegExp(delimiter + \"(?=(?:[^\\\"]|\\\"(?:[^\\\"])[^\\\"]*\\\")*$)\"),\n\t\t rows = trim(arg).split(\"\\n\"),\n\t\t keys = rows.shift().split(delimiter),\n\t\t result = [],\n\t\t nth = rows.length,\n\t\t x = keys.length;\n\n\t\tvar i = -1;\n\n\t\twhile (++i < nth) {\n\t\t\tvar obj = {},\n\t\t\t row = rows[i].split(regex),\n\t\t\t n = -1;\n\n\t\t\twhile (++n < x) {\n\t\t\t\tobj[keys[n]] = coerce(row[n] || \"\");\n\t\t\t}\n\n\t\t\tresult.push(obj);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tfunction encode(arg) {\n\t\tvar delimiter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \",\";\n\t\tvar header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\t\tvar keyRef = arguments[3];\n\n\t\tvar obj = parse(arg);\n\t\tvar result = \"\",\n\t\t ref = void 0;\n\n\t\tif (obj instanceof Array) {\n\t\t\tif (obj.length > 0) {\n\t\t\t\tif (obj[0] instanceof Object) {\n\t\t\t\t\tif (header) {\n\t\t\t\t\t\tref = keys(obj[0]);\n\t\t\t\t\t\tresult = ref.join(delimiter) + \"\\n\";\n\t\t\t\t\t}\n\n\t\t\t\t\tresult += obj.map(function (i) {\n\t\t\t\t\t\treturn encode(i, delimiter, false, ref);\n\t\t\t\t\t}).join(\"\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tresult += prepare(obj, delimiter) + \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (header) {\n\t\t\t\tref = keys(obj, keyRef);\n\t\t\t\tresult = ref.join(delimiter) + \"\\n\";\n\t\t\t} else {\n\t\t\t\tref = keyRef;\n\t\t\t}\n\n\t\t\tresult += cast(obj, false, ref).map(function (i) {\n\t\t\t\treturn prepare(i, delimiter);\n\t\t\t}).join(delimiter) + \"\\n\";\n\t\t}\n\n\t\treturn result.replace(REGEX_NL, \"\");\n\t}\n\n\tvar iterate = function iterate(obj, fn, keyRef) {\n\t\tif (typeof fn !== \"function\") {\n\t\t\tthrow new Error(\"Invalid arguments\");\n\t\t}\n\n\t\t(keyRef || Object.keys(obj)).forEach(function (i) {\n\t\t\treturn fn.call(obj, obj[i], i);\n\t\t});\n\n\t\treturn obj;\n\t};\n\n\tvar keys = function keys(obj, ref) {\n\t\treturn ref !== void 0 ? ref.map(function (i) {\n\t\t\treturn obj[i];\n\t\t}) : Object.keys(obj);\n\t};\n\n\tfunction parse(arg) {\n\t\ttry {\n\t\t\treturn JSON.parse(arg);\n\t\t} catch (e) {\n\t\t\treturn arg;\n\t\t}\n\t}\n\n\tfunction prepare(input, delimiter) {\n\t\tvar output = void 0;\n\n\t\tif (input instanceof Array) {\n\t\t\tif (input.length === 0) {\n\t\t\t\toutput = \"\";\n\t\t\t} else {\n\t\t\t\toutput = input.toString();\n\n\t\t\t\tif (REGEX_OBJTYPE.test(output)) {\n\t\t\t\t\toutput = \"\\\"\" + encode(input, delimiter) + \"\\\"\";\n\t\t\t\t} else if (output.includes(delimiter)) {\n\t\t\t\t\toutput = \"\\\"\" + output + \"\\\"\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (input instanceof Object) {\n\t\t\toutput = \"\\\"\" + encode(input, delimiter) + \"\\\"\";\n\t\t} else if (typeof input === \"string\") {\n\t\t\toutput = input.indexOf(delimiter) > -1 && input.charAt(0) !== \"\\\"\" ? \"\\\"\" + input + \"\\\"\" : input;\n\t\t} else {\n\t\t\toutput = input;\n\t\t}\n\n\t\treturn output;\n\t}\n\n\tvar trim = function trim(arg) {\n\t\treturn arg.trim();\n\t};\n\n\tvar iface = {\n\t\tdecode: decode,\n\t\tencode: encode,\n\t\tversion: \"1.0.6\"\n\t};\n\n\t// CommonJS, AMD, script tag\n\tif (typeof exports !== \"undefined\") {\n\t\tmodule.exports = iface;\n\t} else if (typeof define === \"function\" && _typeof(define.amd) !== void 0) {\n\t\tdefine(function () {\n\t\t\treturn iface;\n\t\t});\n\t} else {\n\t\tglobal.csv = iface;\n\t}\n})(typeof window !== \"undefined\" ? window : global);\n","/*!\n * Cropper.js v1.6.2\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2024-04-21T07:43:05.335Z\n */\n!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).Cropper=e()}(this,function(){\"use strict\";function C(e,t){var i,a=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,i)),a}function S(a){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach(function(t){var e,i;e=a,i=n[t=t],(t=D(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(t){Object.defineProperty(a,t,Object.getOwnPropertyDescriptor(n,t))})}return a}function D(t){t=function(t,e){if(\"object\"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0===i)return(\"string\"===e?String:Number)(t);if(\"object\"!=typeof(i=i.call(t,e||\"default\")))return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}(t,\"string\");return\"symbol\"==typeof t?t:t+\"\"}function j(t){return(j=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function A(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(t,D(a.key),a)}}function P(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[\"@@iterator\"])return Array.from(t)}(t)||function(t,e){var i;if(t)return\"string\"==typeof t?a(t,e):\"Map\"===(i=\"Object\"===(i=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:i)||\"Set\"===i?Array.from(t):\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var t=\"undefined\"!=typeof window&&void 0!==window.document,h=t?window:{},e=!(!t||!h.document.documentElement)&&\"ontouchstart\"in h.document.documentElement,i=t&&\"PointerEvent\"in h,c=\"cropper\",I=\"all\",U=\"crop\",q=\"move\",$=\"zoom\",B=\"e\",k=\"w\",O=\"s\",T=\"n\",E=\"ne\",W=\"nw\",H=\"se\",N=\"sw\",Q=\"\".concat(c,\"-crop\"),K=\"\".concat(c,\"-disabled\"),L=\"\".concat(c,\"-hidden\"),Z=\"\".concat(c,\"-hide\"),G=\"\".concat(c,\"-invisible\"),n=\"\".concat(c,\"-modal\"),V=\"\".concat(c,\"-move\"),d=\"\".concat(c,\"Action\"),m=\"\".concat(c,\"Preview\"),F=\"crop\",J=\"move\",_=\"none\",tt=\"crop\",et=\"cropend\",it=\"cropmove\",at=\"cropstart\",nt=\"dblclick\",ot=i?\"pointerdown\":e?\"touchstart\":\"mousedown\",ht=i?\"pointermove\":e?\"touchmove\":\"mousemove\",rt=i?\"pointerup pointercancel\":e?\"touchend touchcancel\":\"mouseup\",st=\"zoom\",ct=\"image/jpeg\",dt=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,lt=/^data:/,pt=/^data:image\\/jpeg;base64,/,mt=/^img|canvas$/i,ut={viewMode:0,dragMode:F,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:\"\",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},gt=Number.isNaN||h.isNaN;function p(t){return\"number\"==typeof t&&!gt(t)}function ft(t){return 0<t&&t<1/0}function vt(t){return void 0===t}function o(t){return\"object\"===j(t)&&null!==t}var wt=Object.prototype.hasOwnProperty;function u(t){if(!o(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&wt.call(i,\"isPrototypeOf\")}catch(t){return!1}}function l(t){return\"function\"==typeof t}var bt=Array.prototype.slice;function yt(t){return Array.from?Array.from(t):bt.call(t)}function z(i,a){return i&&l(a)&&(Array.isArray(i)||p(i.length)?yt(i).forEach(function(t,e){a.call(i,t,e,i)}):o(i)&&Object.keys(i).forEach(function(t){a.call(i,i[t],t,i)})),i}var g=Object.assign||function(i){for(var t=arguments.length,e=new Array(1<t?t-1:0),a=1;a<t;a++)e[a-1]=arguments[a];return o(i)&&0<e.length&&e.forEach(function(e){o(e)&&Object.keys(e).forEach(function(t){i[t]=e[t]})}),i},xt=/\\.\\d*(?:0|9){12}\\d*$/;function Y(t,e){e=1<arguments.length&&void 0!==e?e:1e11;return xt.test(t)?Math.round(t*e)/e:t}var Mt=/^width|height|left|top|marginLeft|marginTop$/;function f(t,e){var i=t.style;z(e,function(t,e){Mt.test(e)&&p(t)&&(t=\"\".concat(t,\"px\")),i[e]=t})}function v(t,e){var i;e&&(p(t.length)?z(t,function(t){v(t,e)}):t.classList?t.classList.add(e):(i=t.className.trim())?i.indexOf(e)<0&&(t.className=\"\".concat(i,\" \").concat(e)):t.className=e)}function X(t,e){e&&(p(t.length)?z(t,function(t){X(t,e)}):t.classList?t.classList.remove(e):0<=t.className.indexOf(e)&&(t.className=t.className.replace(e,\"\")))}function r(t,e,i){e&&(p(t.length)?z(t,function(t){r(t,e,i)}):(i?v:X)(t,e))}var Ct=/([a-z\\d])([A-Z])/g;function Dt(t){return t.replace(Ct,\"$1-$2\").toLowerCase()}function Bt(t,e){return o(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute(\"data-\".concat(Dt(e)))}function w(t,e,i){o(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute(\"data-\".concat(Dt(e)),i)}var kt,Ot,Tt=/\\s\\s*/,Et=(Ot=!1,t&&(kt=!1,i=function(){},e=Object.defineProperty({},\"once\",{get:function(){return Ot=!0,kt},set:function(t){kt=t}}),h.addEventListener(\"test\",i,e),h.removeEventListener(\"test\",i,e)),Ot);function s(i,t,a,e){var n=3<arguments.length&&void 0!==e?e:{},o=a;t.trim().split(Tt).forEach(function(t){var e;Et||(e=i.listeners)&&e[t]&&e[t][a]&&(o=e[t][a],delete e[t][a],0===Object.keys(e[t]).length&&delete e[t],0===Object.keys(e).length)&&delete i.listeners,i.removeEventListener(t,o,n)})}function b(o,t,h,e){var r=3<arguments.length&&void 0!==e?e:{},s=h;t.trim().split(Tt).forEach(function(a){var t,n;r.once&&!Et&&(t=o.listeners,s=function(){delete n[a][h],o.removeEventListener(a,s,r);for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];h.apply(o,e)},(n=void 0===t?{}:t)[a]||(n[a]={}),n[a][h]&&o.removeEventListener(a,n[a][h],r),n[a][h]=s,o.listeners=n),o.addEventListener(a,s,r)})}function y(t,e,i){var a;return l(Event)&&l(CustomEvent)?a=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(a=document.createEvent(\"CustomEvent\")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(a)}function Wt(t){t=t.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Ht=h.location,Nt=/^(\\w+:)\\/\\/([^:/?#]*):?(\\d*)/i;function Lt(t){t=t.match(Nt);return null!==t&&(t[1]!==Ht.protocol||t[2]!==Ht.hostname||t[3]!==Ht.port)}function zt(t){var e=\"timestamp=\".concat((new Date).getTime());return t+(-1===t.indexOf(\"?\")?\"?\":\"&\")+e}function x(t){var e=t.rotate,i=t.scaleX,a=t.scaleY,n=t.translateX,t=t.translateY,o=[],n=(p(n)&&0!==n&&o.push(\"translateX(\".concat(n,\"px)\")),p(t)&&0!==t&&o.push(\"translateY(\".concat(t,\"px)\")),p(e)&&0!==e&&o.push(\"rotate(\".concat(e,\"deg)\")),p(i)&&1!==i&&o.push(\"scaleX(\".concat(i,\")\")),p(a)&&1!==a&&o.push(\"scaleY(\".concat(a,\")\")),o.length?o.join(\" \"):\"none\");return{WebkitTransform:n,msTransform:n,transform:n}}function M(t,e){var i=t.pageX,t=t.pageY,a={endX:i,endY:t};return e?a:S({startX:i,startY:t},a)}function R(t,e){var i,a=t.aspectRatio,n=t.height,t=t.width,e=1<arguments.length&&void 0!==e?e:\"contain\",o=ft(t),h=ft(n);return o&&h?(i=n*a,\"contain\"===e&&t<i||\"cover\"===e&&i<t?n=t/a:t=n*a):o?n=t/a:h&&(t=n*a),{width:t,height:n}}var Yt=String.fromCharCode;var Xt=/^data:.*,/;function Rt(t){var e,i,a,n,o,h,r,s=new DataView(t);try{if(255===s.getUint8(0)&&216===s.getUint8(1))for(var c=s.byteLength,d=2;d+1<c;){if(255===s.getUint8(d)&&225===s.getUint8(d+1)){i=d;break}d+=1}if(a=i&&(n=i+10,\"Exif\"===function(t,e,i){var a=\"\";i+=e;for(var n=e;n<i;n+=1)a+=Yt(t.getUint8(n));return a}(s,i+4,4))&&((r=18761===(o=s.getUint16(n)))||19789===o)&&42===s.getUint16(n+2,r)&&8<=(h=s.getUint32(n+4,r))?n+h:a)for(var l,p=s.getUint16(a,r),m=0;m<p;m+=1)if(l=a+12*m+2,274===s.getUint16(l,r)){l+=8,e=s.getUint16(l,r),s.setUint16(l,1,r);break}}catch(t){e=1}return e}var t={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,a=this.cropper,n=Number(e.minContainerWidth),e=Number(e.minContainerHeight),n=(v(a,L),X(t,L),{width:Math.max(i.offsetWidth,0<=n?n:200),height:Math.max(i.offsetHeight,0<=e?e:100)});f(a,{width:(this.containerData=n).width,height:n.height}),v(t,L),X(a,L)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,a=Math.abs(e.rotate)%180==90,n=a?e.naturalHeight:e.naturalWidth,a=a?e.naturalWidth:e.naturalHeight,e=n/a,o=t.width,h=t.height,e=(t.height*e>t.width?3===i?o=t.height*e:h=t.width/e:3===i?h=t.width/e:o=t.height*e,{aspectRatio:e,naturalWidth:n,naturalHeight:a,width:o,height:h});this.canvasData=e,this.limited=1===i||2===i,this.limitCanvas(!0,!0),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),e.left=(t.width-e.width)/2,e.top=(t.height-e.height)/2,e.oldLeft=e.left,e.oldTop=e.top,this.initialCanvasData=g({},e)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,h=i.viewMode,r=n.aspectRatio,s=this.cropped&&o;t&&(t=Number(i.minCanvasWidth)||0,i=Number(i.minCanvasHeight)||0,1<h?(t=Math.max(t,a.width),i=Math.max(i,a.height),3===h&&(t<i*r?t=i*r:i=t/r)):0<h&&(t?t=Math.max(t,s?o.width:0):i?i=Math.max(i,s?o.height:0):s&&((t=o.width)<(i=o.height)*r?t=i*r:i=t/r)),t=(r=R({aspectRatio:r,width:t,height:i})).width,i=r.height,n.minWidth=t,n.minHeight=i,n.maxWidth=1/0,n.maxHeight=1/0),e&&((s?0:1)<h?(r=a.width-n.width,t=a.height-n.height,n.minLeft=Math.min(0,r),n.minTop=Math.min(0,t),n.maxLeft=Math.max(0,r),n.maxTop=Math.max(0,t),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===h)&&(n.width>=a.width&&(n.minLeft=Math.min(0,r),n.maxLeft=Math.max(0,r)),n.height>=a.height)&&(n.minTop=Math.min(0,t),n.maxTop=Math.max(0,t))):(n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height))},renderCanvas:function(t,e){var i,a,n,o,h=this.canvasData,r=this.imageData;e&&(e={width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0},r=e.width,o=e.height,e=e.degree,i=90==(e=Math.abs(e)%180)?{width:o,height:r}:(a=e%90*Math.PI/180,i=Math.sin(a),n=r*(a=Math.cos(a))+o*i,r=r*i+o*a,90<e?{width:r,height:n}:{width:n,height:r}),a=h.width*((o=i.width)/h.naturalWidth),n=h.height*((e=i.height)/h.naturalHeight),h.left-=(a-h.width)/2,h.top-=(n-h.height)/2,h.width=a,h.height=n,h.aspectRatio=o/e,h.naturalWidth=o,h.naturalHeight=e,this.limitCanvas(!0,!1)),(h.width>h.maxWidth||h.width<h.minWidth)&&(h.left=h.oldLeft),(h.height>h.maxHeight||h.height<h.minHeight)&&(h.top=h.oldTop),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),this.limitCanvas(!1,!0),h.left=Math.min(Math.max(h.left,h.minLeft),h.maxLeft),h.top=Math.min(Math.max(h.top,h.minTop),h.maxTop),h.oldLeft=h.left,h.oldTop=h.top,f(this.canvas,g({width:h.width,height:h.height},x({translateX:h.left,translateY:h.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,a=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);g(i,{width:a,height:n,left:(e.width-a)/2,top:(e.height-n)/2}),f(this.image,g({width:i.width,height:i.height},x(g({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,t=Number(t.autoCropArea)||.8,a={width:e.width,height:e.height};i&&(e.height*i>e.width?a.height=a.width/i:a.width=a.height*i),this.cropBoxData=a,this.limitCropBox(!0,!0),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),a.width=Math.max(a.minWidth,a.width*t),a.height=Math.max(a.minHeight,a.height*t),a.left=e.left+(e.width-a.width)/2,a.top=e.top+(e.height-a.height)/2,a.oldLeft=a.left,a.oldTop=a.top,this.initialCropBoxData=g({},a)},limitCropBox:function(t,e){var i,a,n=this.options,o=this.containerData,h=this.canvasData,r=this.cropBoxData,s=this.limited,c=n.aspectRatio;t&&(t=Number(n.minCropBoxWidth)||0,n=Number(n.minCropBoxHeight)||0,i=s?Math.min(o.width,h.width,h.width+h.left,o.width-h.left):o.width,a=s?Math.min(o.height,h.height,h.height+h.top,o.height-h.top):o.height,t=Math.min(t,o.width),n=Math.min(n,o.height),c&&(t&&n?t<n*c?n=t/c:t=n*c:t?n=t/c:n&&(t=n*c),i<a*c?a=i/c:i=a*c),r.minWidth=Math.min(t,i),r.minHeight=Math.min(n,a),r.maxWidth=i,r.maxHeight=a),e&&(s?(r.minLeft=Math.max(0,h.left),r.minTop=Math.max(0,h.top),r.maxLeft=Math.min(o.width,h.left+h.width)-r.width,r.maxTop=Math.min(o.height,h.top+h.height)-r.height):(r.minLeft=0,r.minTop=0,r.maxLeft=o.width-r.width,r.maxTop=o.height-r.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&w(this.face,d,i.width>=e.width&&i.height>=e.height?q:I),f(this.cropBox,g({width:i.width,height:i.height},x({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),y(this.element,tt,this.getData())}},i={initPreview:function(){var t=this.element,i=this.crossOrigin,e=this.options.preview,a=i?this.crossOriginUrl:this.url,n=t.alt||\"The image to preview\",o=document.createElement(\"img\");i&&(o.crossOrigin=i),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,e&&(\"string\"==typeof(o=e)?o=t.ownerDocument.querySelectorAll(e):e.querySelector&&(o=[e]),z(this.previews=o,function(t){var e=document.createElement(\"img\");w(t,m,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),i&&(e.crossOrigin=i),e.src=a,e.alt=n,e.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;\"',t.innerHTML=\"\",t.appendChild(e)}))},resetPreview:function(){z(this.previews,function(e){var i=Bt(e,m),i=(f(e,{width:i.width,height:i.height}),e.innerHTML=i.html,e),e=m;if(o(i[e]))try{delete i[e]}catch(t){i[e]=void 0}else if(i.dataset)try{delete i.dataset[e]}catch(t){i.dataset[e]=void 0}else i.removeAttribute(\"data-\".concat(Dt(e)))})},preview:function(){var h=this.imageData,t=this.canvasData,e=this.cropBoxData,r=e.width,s=e.height,c=h.width,d=h.height,l=e.left-t.left-h.left,p=e.top-t.top-h.top;this.cropped&&!this.disabled&&(f(this.viewBoxImage,g({width:c,height:d},x(g({translateX:-l,translateY:-p},h)))),z(this.previews,function(t){var e=Bt(t,m),i=e.width,e=e.height,a=i,n=e,o=1;r&&(n=s*(o=i/r)),s&&e<n&&(a=r*(o=e/s),n=e),f(t,{width:a,height:n}),f(t.getElementsByTagName(\"img\")[0],g({width:c*o,height:d*o},x(g({translateX:-l*o,translateY:-p*o},h))))}))}},e={bind:function(){var t=this.element,e=this.options,i=this.cropper;l(e.cropstart)&&b(t,at,e.cropstart),l(e.cropmove)&&b(t,it,e.cropmove),l(e.cropend)&&b(t,et,e.cropend),l(e.crop)&&b(t,tt,e.crop),l(e.zoom)&&b(t,st,e.zoom),b(i,ot,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&b(i,\"wheel\",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&b(i,nt,this.onDblclick=this.dblclick.bind(this)),b(t.ownerDocument,ht,this.onCropMove=this.cropMove.bind(this)),b(t.ownerDocument,rt,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&b(window,\"resize\",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;l(e.cropstart)&&s(t,at,e.cropstart),l(e.cropmove)&&s(t,it,e.cropmove),l(e.cropend)&&s(t,et,e.cropend),l(e.crop)&&s(t,tt,e.crop),l(e.zoom)&&s(t,st,e.zoom),s(i,ot,this.onCropStart),e.zoomable&&e.zoomOnWheel&&s(i,\"wheel\",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&s(i,nt,this.onDblclick),s(t.ownerDocument,ht,this.onCropMove),s(t.ownerDocument,rt,this.onCropEnd),e.responsive&&s(window,\"resize\",this.onResize)}},St={resize:function(){var t,e,i,a,n,o,h;this.disabled||(t=this.options,a=this.container,e=this.containerData,i=a.offsetWidth/e.width,a=a.offsetHeight/e.height,1!=(n=Math.abs(i-1)>Math.abs(a-1)?i:a)&&(t.restore&&(o=this.getCanvasData(),h=this.getCropBoxData()),this.render(),t.restore)&&(this.setCanvasData(z(o,function(t,e){o[e]=t*n})),this.setCropBoxData(z(h,function(t,e){h[e]=t*n}))))},dblclick:function(){var t,e;this.disabled||this.options.dragMode===_||this.setDragMode((t=this.dragBox,e=Q,(t.classList?t.classList.contains(e):-1<t.className.indexOf(e))?J:F))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling)||(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),t.deltaY?a=0<t.deltaY?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=0<t.detail?1:-1),this.zoom(-a*i,t))},cropStart:function(t){var e,i=t.buttons,a=t.button;this.disabled||(\"mousedown\"===t.type||\"pointerdown\"===t.type&&\"mouse\"===t.pointerType)&&(p(i)&&1!==i||p(a)&&0!==a||t.ctrlKey)||(i=this.options,e=this.pointers,t.changedTouches?z(t.changedTouches,function(t){e[t.identifier]=M(t)}):e[t.pointerId||0]=M(t),a=1<Object.keys(e).length&&i.zoomable&&i.zoomOnTouch?$:Bt(t.target,d),dt.test(a)&&!1!==y(this.element,at,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===U)&&(this.cropping=!0,v(this.dragBox,n)))},cropMove:function(t){var e,i=this.action;!this.disabled&&i&&(e=this.pointers,t.preventDefault(),!1!==y(this.element,it,{originalEvent:t,action:i}))&&(t.changedTouches?z(t.changedTouches,function(t){g(e[t.identifier]||{},M(t,!0))}):g(e[t.pointerId||0]||{},M(t,!0)),this.change(t))},cropEnd:function(t){var e,i;this.disabled||(e=this.action,i=this.pointers,t.changedTouches?z(t.changedTouches,function(t){delete i[t.identifier]}):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=\"\"),this.cropping&&(this.cropping=!1,r(this.dragBox,n,this.cropped&&this.options.modal)),y(this.element,et,{originalEvent:t,action:e})))}},jt={change:function(t){function e(t){switch(t){case B:f+D.x>y&&(D.x=y-f);break;case k:p+D.x<w&&(D.x=w-p);break;case T:m+D.y<b&&(D.y=b-m);break;case O:v+D.y>x&&(D.y=x-v)}}var i,a,o,n=this.options,h=this.canvasData,r=this.containerData,s=this.cropBoxData,c=this.pointers,d=this.action,l=n.aspectRatio,p=s.left,m=s.top,u=s.width,g=s.height,f=p+u,v=m+g,w=0,b=0,y=r.width,x=r.height,M=!0,C=(!l&&t.shiftKey&&(l=u&&g?u/g:1),this.limited&&(w=s.minLeft,b=s.minTop,y=w+Math.min(r.width,h.width,h.left+h.width),x=b+Math.min(r.height,h.height,h.top+h.height)),c[Object.keys(c)[0]]),D={x:C.endX-C.startX,y:C.endY-C.startY};switch(d){case I:p+=D.x,m+=D.y;break;case B:0<=D.x&&(y<=f||l&&(m<=b||x<=v))?M=!1:(e(B),(u+=D.x)<0&&(d=k,p-=u=-u),l&&(m+=(s.height-(g=u/l))/2));break;case T:D.y<=0&&(m<=b||l&&(p<=w||y<=f))?M=!1:(e(T),g-=D.y,m+=D.y,g<0&&(d=O,m-=g=-g),l&&(p+=(s.width-(u=g*l))/2));break;case k:D.x<=0&&(p<=w||l&&(m<=b||x<=v))?M=!1:(e(k),u-=D.x,p+=D.x,u<0&&(d=B,p-=u=-u),l&&(m+=(s.height-(g=u/l))/2));break;case O:0<=D.y&&(x<=v||l&&(p<=w||y<=f))?M=!1:(e(O),(g+=D.y)<0&&(d=T,m-=g=-g),l&&(p+=(s.width-(u=g*l))/2));break;case E:if(l){if(D.y<=0&&(m<=b||y<=f)){M=!1;break}e(T),g-=D.y,m+=D.y,u=g*l}else e(T),e(B),!(0<=D.x)||f<y?u+=D.x:D.y<=0&&m<=b&&(M=!1),(!(D.y<=0)||b<m)&&(g-=D.y,m+=D.y);u<0&&g<0?(d=N,m-=g=-g,p-=u=-u):u<0?(d=W,p-=u=-u):g<0&&(d=H,m-=g=-g);break;case W:if(l){if(D.y<=0&&(m<=b||p<=w)){M=!1;break}e(T),g-=D.y,m+=D.y,p+=s.width-(u=g*l)}else e(T),e(k),!(D.x<=0)||w<p?(u-=D.x,p+=D.x):D.y<=0&&m<=b&&(M=!1),(!(D.y<=0)||b<m)&&(g-=D.y,m+=D.y);u<0&&g<0?(d=H,m-=g=-g,p-=u=-u):u<0?(d=E,p-=u=-u):g<0&&(d=N,m-=g=-g);break;case N:if(l){if(D.x<=0&&(p<=w||x<=v)){M=!1;break}e(k),u-=D.x,p+=D.x,g=u/l}else e(O),e(k),!(D.x<=0)||w<p?(u-=D.x,p+=D.x):0<=D.y&&x<=v&&(M=!1),(!(0<=D.y)||v<x)&&(g+=D.y);u<0&&g<0?(d=E,m-=g=-g,p-=u=-u):u<0?(d=H,p-=u=-u):g<0&&(d=W,m-=g=-g);break;case H:if(l){if(0<=D.x&&(y<=f||x<=v)){M=!1;break}e(B),g=(u+=D.x)/l}else e(O),e(B),!(0<=D.x)||f<y?u+=D.x:0<=D.y&&x<=v&&(M=!1),(!(0<=D.y)||v<x)&&(g+=D.y);u<0&&g<0?(d=W,m-=g=-g,p-=u=-u):u<0?(d=N,p-=u=-u):g<0&&(d=E,m-=g=-g);break;case q:this.move(D.x,D.y),M=!1;break;case $:this.zoom((a=S({},i=c),o=0,z(i,function(n,t){delete a[t],z(a,function(t){var e=Math.abs(n.startX-t.startX),i=Math.abs(n.startY-t.startY),a=Math.abs(n.endX-t.endX),t=Math.abs(n.endY-t.endY),e=Math.sqrt(e*e+i*i),i=(Math.sqrt(a*a+t*t)-e)/e;Math.abs(i)>Math.abs(o)&&(o=i)})}),o),t),M=!1;break;case U:D.x&&D.y?(i=Wt(this.cropper),p=C.startX-i.left,m=C.startY-i.top,u=s.minWidth,g=s.minHeight,0<D.x?d=0<D.y?H:E:D.x<0&&(p-=u,d=0<D.y?N:W),D.y<0&&(m-=g),this.cropped||(X(this.cropBox,L),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))):M=!1}M&&(s.width=u,s.height=g,s.left=p,s.top=m,this.action=d,this.renderCropBox()),z(c,function(t){t.startX=t.endX,t.startY=t.endY})}},At={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&v(this.dragBox,n),X(this.cropBox,L),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=g({},this.initialImageData),this.canvasData=g({},this.initialCanvasData),this.cropBoxData=g({},this.initialCropBoxData),this.renderCanvas(),this.cropped)&&this.renderCropBox(),this},clear:function(){return this.cropped&&!this.disabled&&(g(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),X(this.dragBox,n),v(this.cropBox,L)),this},replace:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,z(this.previews,function(t){t.getElementsByTagName(\"img\")[0].src=e}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,X(this.cropper,K)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,v(this.cropper,K)),this},destroy:function(){var t=this.element;return t[c]&&(t[c]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate()),this},move:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,i=i.top;return this.moveTo(vt(t)?t:a+Number(t),vt(e)?e:i+Number(e))},moveTo:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(p(t)&&(i.left=t,a=!0),p(e)&&(i.top=e,a=!0),a)&&this.renderCanvas(!0),this},zoom:function(t,e){var i=this.canvasData;return t=Number(t),this.zoomTo(i.width*(t=t<0?1/(1-t):1+t)/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a,n,o,h=this.options,r=this.canvasData,s=r.width,c=r.height,d=r.naturalWidth,l=r.naturalHeight;if(0<=(t=Number(t))&&this.ready&&!this.disabled&&h.zoomable){h=d*t,l=l*t;if(!1===y(this.element,st,{ratio:t,oldRatio:s/d,originalEvent:i}))return this;i?(t=this.pointers,d=Wt(this.cropper),t=t&&Object.keys(t).length?(o=n=a=0,z(t,function(t){var e=t.startX,t=t.startY;a+=e,n+=t,o+=1}),{pageX:a/=o,pageY:n/=o}):{pageX:i.pageX,pageY:i.pageY},r.left-=(h-s)*((t.pageX-d.left-r.left)/s),r.top-=(l-c)*((t.pageY-d.top-r.top)/c)):u(e)&&p(e.x)&&p(e.y)?(r.left-=(h-s)*((e.x-r.left)/s),r.top-=(l-c)*((e.y-r.top)/c)):(r.left-=(h-s)/2,r.top-=(l-c)/2),r.width=h,r.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return p(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,p(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(p(e)?e:1,t)},scale:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(p(t)&&(i.scaleX=t,a=!0),p(e)&&(i.scaleY=e,a=!0),a)&&this.renderCanvas(!0,!0),this},getData:function(){var i,a,t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this.options,n=this.imageData,o=this.canvasData,h=this.cropBoxData;return this.ready&&this.cropped?(i={x:h.left-o.left,y:h.top-o.top,width:h.width,height:h.height},a=n.width/n.naturalWidth,z(i,function(t,e){i[e]=t/a}),t&&(o=Math.round(i.y+i.height),h=Math.round(i.x+i.width),i.x=Math.round(i.x),i.y=Math.round(i.y),i.width=h-i.x,i.height=o-i.y)):i={x:0,y:0,width:0,height:0},e.rotatable&&(i.rotate=n.rotate||0),e.scalable&&(i.scaleX=n.scaleX||1,i.scaleY=n.scaleY||1),i},setData:function(t){var e,i=this.options,a=this.imageData,n=this.canvasData,o={};return this.ready&&!this.disabled&&u(t)&&(e=!1,i.rotatable&&p(t.rotate)&&t.rotate!==a.rotate&&(a.rotate=t.rotate,e=!0),i.scalable&&(p(t.scaleX)&&t.scaleX!==a.scaleX&&(a.scaleX=t.scaleX,e=!0),p(t.scaleY))&&t.scaleY!==a.scaleY&&(a.scaleY=t.scaleY,e=!0),e&&this.renderCanvas(!0,!0),i=a.width/a.naturalWidth,p(t.x)&&(o.left=t.x*i+n.left),p(t.y)&&(o.top=t.y*i+n.top),p(t.width)&&(o.width=t.width*i),p(t.height)&&(o.height=t.height*i),this.setCropBoxData(o)),this},getContainerData:function(){return this.ready?g({},this.containerData):{}},getImageData:function(){return this.sized?g({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,i={};return this.ready&&z([\"left\",\"top\",\"width\",\"height\",\"naturalWidth\",\"naturalHeight\"],function(t){i[t]=e[t]}),i},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&u(t)&&(p(t.left)&&(e.left=t.left),p(t.top)&&(e.top=t.top),p(t.width)?(e.width=t.width,e.height=t.width/i):p(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return(t=this.ready&&this.cropped?{left:e.left,top:e.top,width:e.width,height:e.height}:t)||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&u(t)&&(p(t.left)&&(a.left=t.left),p(t.top)&&(a.top=t.top),p(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),p(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t,e,i,a,n,o,h,r,s,c,d,l,p,m,u,g,f,v,w,b,y,x,M,C,D,B,k,O=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.ready&&window.HTMLCanvasElement?(B=this.canvasData,u=this.image,l=this.imageData,a=B,v=O,g=l.aspectRatio,e=l.naturalWidth,n=l.naturalHeight,c=void 0===(c=l.rotate)?0:c,d=void 0===(d=l.scaleX)?1:d,l=void 0===(l=l.scaleY)?1:l,i=a.aspectRatio,r=a.naturalWidth,a=a.naturalHeight,h=void 0===(h=v.fillColor)?\"transparent\":h,p=void 0===(p=v.imageSmoothingEnabled)||p,m=void 0===(m=v.imageSmoothingQuality)?\"low\":m,o=void 0===(o=v.maxWidth)?1/0:o,k=void 0===(k=v.maxHeight)?1/0:k,t=void 0===(t=v.minWidth)?0:t,v=void 0===(v=v.minHeight)?0:v,w=document.createElement(\"canvas\"),f=w.getContext(\"2d\"),s=R({aspectRatio:i,width:o,height:k}),i=R({aspectRatio:i,width:t,height:v},\"cover\"),r=Math.min(s.width,Math.max(i.width,r)),s=Math.min(s.height,Math.max(i.height,a)),i=R({aspectRatio:g,width:o,height:k}),a=R({aspectRatio:g,width:t,height:v},\"cover\"),o=Math.min(i.width,Math.max(a.width,e)),k=Math.min(i.height,Math.max(a.height,n)),g=[-o/2,-k/2,o,k],w.width=Y(r),w.height=Y(s),f.fillStyle=h,f.fillRect(0,0,r,s),f.save(),f.translate(r/2,s/2),f.rotate(c*Math.PI/180),f.scale(d,l),f.imageSmoothingEnabled=p,f.imageSmoothingQuality=m,f.drawImage.apply(f,[u].concat(P(g.map(function(t){return Math.floor(Y(t))})))),f.restore(),t=w,this.cropped?(e=(v=this.getData(O.rounded)).x,i=v.y,a=v.width,n=v.height,1!=(o=t.width/Math.floor(B.naturalWidth))&&(e*=o,i*=o,a*=o,n*=o),h=R({aspectRatio:k=a/n,width:O.maxWidth||1/0,height:O.maxHeight||1/0}),r=R({aspectRatio:k,width:O.minWidth||0,height:O.minHeight||0},\"cover\"),c=(s=R({aspectRatio:k,width:O.width||(1!=o?t.width:a),height:O.height||(1!=o?t.height:n)})).width,d=s.height,c=Math.min(h.width,Math.max(r.width,c)),d=Math.min(h.height,Math.max(r.height,d)),p=(l=document.createElement(\"canvas\")).getContext(\"2d\"),l.width=Y(c),l.height=Y(d),p.fillStyle=O.fillColor||\"transparent\",p.fillRect(0,0,c,d),m=O.imageSmoothingEnabled,u=O.imageSmoothingQuality,p.imageSmoothingEnabled=void 0===m||m,u&&(p.imageSmoothingQuality=u),g=t.width,f=t.height,w=i,(v=e)<=-a||g<v?C=x=b=v=0:v<=0?(x=-v,v=0,C=b=Math.min(g,a+v)):v<=g&&(x=0,C=b=Math.min(a,g-v)),b<=0||w<=-n||f<w?D=M=y=w=0:w<=0?(M=-w,w=0,D=y=Math.min(f,n+w)):w<=f&&(M=0,D=y=Math.min(n,f-w)),B=[v,w,b,y],0<C&&0<D&&B.push(x*(k=c/a),M*k,C*k,D*k),p.drawImage.apply(p,[t].concat(P(B.map(function(t){return Math.floor(Y(t))})))),l):t):null},setAspectRatio:function(t){var e=this.options;return this.disabled||vt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped)&&this.renderCropBox()),this},setDragMode:function(t){var e,i,a=this.options,n=this.dragBox,o=this.face;return this.ready&&!this.disabled&&(i=a.movable&&t===J,a.dragMode=t=(e=t===F)||i?t:_,w(n,d,t),r(n,Q,e),r(n,V,i),a.cropBoxMovable||(w(o,d,t),r(o,Q,e),r(o,V,i))),this}},Pt=h.Cropper,It=function(){function n(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=this,a=n;if(!(i instanceof a))throw new TypeError(\"Cannot call a class as a function\");if(!t||!mt.test(t.tagName))throw new Error(\"The first argument is required and must be an <img> or <canvas> element.\");this.element=t,this.options=g({},ut,u(e)&&e),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return t=n,i=[{key:\"noConflict\",value:function(){return window.Cropper=Pt,n}},{key:\"setDefaults\",value:function(t){g(ut,u(t)&&t)}}],(e=[{key:\"init\",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[c]){if(e[c]=this,\"img\"===i){if(this.isImg=!0,t=e.getAttribute(\"src\")||\"\",!(this.originalUrl=t))return;t=e.src}else\"canvas\"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:\"load\",value:function(t){var e,i,a,n,o,h,r=this;t&&(this.url=t,this.imageData={},e=this.element,(i=this.options).rotatable||i.scalable||(i.checkOrientation=!1),i.checkOrientation&&window.ArrayBuffer?lt.test(t)?pt.test(t)?this.read((h=(h=t).replace(Xt,\"\"),a=atob(h),h=new ArrayBuffer(a.length),z(n=new Uint8Array(h),function(t,e){n[e]=a.charCodeAt(e)}),h)):this.clone():(o=new XMLHttpRequest,h=this.clone.bind(this),this.reloading=!0,(this.xhr=o).onabort=h,o.onerror=h,o.ontimeout=h,o.onprogress=function(){o.getResponseHeader(\"content-type\")!==ct&&o.abort()},o.onload=function(){r.read(o.response)},o.onloadend=function(){r.reloading=!1,r.xhr=null},i.checkCrossOrigin&&Lt(t)&&e.crossOrigin&&(t=zt(t)),o.open(\"GET\",t,!0),o.responseType=\"arraybuffer\",o.withCredentials=\"use-credentials\"===e.crossOrigin,o.send()):this.clone())}},{key:\"read\",value:function(t){var e=this.options,i=this.imageData,a=Rt(t),n=0,o=1,h=1;1<a&&(this.url=function(t,e){for(var i=[],a=new Uint8Array(t);0<a.length;)i.push(Yt.apply(null,yt(a.subarray(0,8192)))),a=a.subarray(8192);return\"data:\".concat(e,\";base64,\").concat(btoa(i.join(\"\")))}(t,ct),n=(t=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a)).rotate,o=t.scaleX,h=t.scaleY),e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=h),this.clone()}},{key:\"clone\",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e,n=(this.options.checkCrossOrigin&&Lt(e)&&(i=i||\"anonymous\",a=zt(e)),this.crossOrigin=i,this.crossOriginUrl=a,document.createElement(\"img\"));i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||\"The image to crop\",(this.image=n).onload=this.start.bind(this),n.onerror=this.stop.bind(this),v(n,Z),t.parentNode.insertBefore(n,t.nextSibling)}},{key:\"start\",value:function(){function t(t,e){g(a.imageData,{naturalWidth:t,naturalHeight:e,aspectRatio:t/e}),a.initialImageData=g({},a.imageData),a.sizing=!1,a.sized=!0,a.build()}var e,i,a=this,n=this.image,o=(n.onload=null,n.onerror=null,this.sizing=!0,h.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(h.navigator.userAgent));n.naturalWidth&&!o?t(n.naturalWidth,n.naturalHeight):(e=document.createElement(\"img\"),i=document.body||document.documentElement,(this.sizingImage=e).onload=function(){t(e.width,e.height),o||i.removeChild(e)},e.src=n.src,o||(e.style.cssText=\"left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;\",i.appendChild(e)))}},{key:\"stop\",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:\"build\",value:function(){var t,e,i,a,n,o,h,r,s;this.sized&&!this.ready&&(t=this.element,e=this.options,i=this.image,a=t.parentNode,(n=document.createElement(\"div\")).innerHTML='<div class=\"cropper-container\" touch-action=\"none\"><div class=\"cropper-wrap-box\"><div class=\"cropper-canvas\"></div></div><div class=\"cropper-drag-box\"></div><div class=\"cropper-crop-box\"><span class=\"cropper-view-box\"></span><span class=\"cropper-dashed dashed-h\"></span><span class=\"cropper-dashed dashed-v\"></span><span class=\"cropper-center\"></span><span class=\"cropper-face\"></span><span class=\"cropper-line line-e\" data-cropper-action=\"e\"></span><span class=\"cropper-line line-n\" data-cropper-action=\"n\"></span><span class=\"cropper-line line-w\" data-cropper-action=\"w\"></span><span class=\"cropper-line line-s\" data-cropper-action=\"s\"></span><span class=\"cropper-point point-e\" data-cropper-action=\"e\"></span><span class=\"cropper-point point-n\" data-cropper-action=\"n\"></span><span class=\"cropper-point point-w\" data-cropper-action=\"w\"></span><span class=\"cropper-point point-s\" data-cropper-action=\"s\"></span><span class=\"cropper-point point-ne\" data-cropper-action=\"ne\"></span><span class=\"cropper-point point-nw\" data-cropper-action=\"nw\"></span><span class=\"cropper-point point-sw\" data-cropper-action=\"sw\"></span><span class=\"cropper-point point-se\" data-cropper-action=\"se\"></span></div></div>',o=(n=n.querySelector(\".\".concat(c,\"-container\"))).querySelector(\".\".concat(c,\"-canvas\")),h=n.querySelector(\".\".concat(c,\"-drag-box\")),s=(r=n.querySelector(\".\".concat(c,\"-crop-box\"))).querySelector(\".\".concat(c,\"-face\")),this.container=a,this.cropper=n,this.canvas=o,this.dragBox=h,this.cropBox=r,this.viewBox=n.querySelector(\".\".concat(c,\"-view-box\")),this.face=s,o.appendChild(i),v(t,L),a.insertBefore(n,t.nextSibling),X(i,Z),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,v(r,L),e.guides||v(r.getElementsByClassName(\"\".concat(c,\"-dashed\")),L),e.center||v(r.getElementsByClassName(\"\".concat(c,\"-center\")),L),e.background&&v(n,\"\".concat(c,\"-bg\")),e.highlight||v(s,G),e.cropBoxMovable&&(v(s,V),w(s,d,I)),e.cropBoxResizable||(v(r.getElementsByClassName(\"\".concat(c,\"-line\")),L),v(r.getElementsByClassName(\"\".concat(c,\"-point\")),L)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),l(e.ready)&&b(t,\"ready\",e.ready,{once:!0}),y(t,\"ready\"))}},{key:\"unbuild\",value:function(){var t;this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),(t=this.cropper.parentNode)&&t.removeChild(this.cropper),X(this.element,L))}},{key:\"uncreate\",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&A(t.prototype,e),i&&A(t,i),Object.defineProperty(t,\"prototype\",{writable:!1}),t;var t,e,i}();return g(It.prototype,t,i,e,St,jt,At),It});","!function(e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):(\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this).dragula=e()}(function(){return function o(r,i,u){function c(t,e){if(!i[t]){if(!r[t]){var n=\"function\"==typeof require&&require;if(!e&&n)return n(t,!0);if(a)return a(t,!0);throw(n=new Error(\"Cannot find module '\"+t+\"'\")).code=\"MODULE_NOT_FOUND\",n}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return c(r[t][1][e]||e)},n,n.exports,o,r,i,u)}return i[t].exports}for(var a=\"function\"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,n){\"use strict\";var o={},r=\"(?:^|\\\\s)\",i=\"(?:\\\\s|$)\";function u(e){var t=o[e];return t?t.lastIndex=0:o[e]=t=new RegExp(r+e+i,\"g\"),t}t.exports={add:function(e,t){var n=e.className;n.length?u(t).test(n)||(e.className+=\" \"+t):e.className=t},rm:function(e,t){e.className=e.className.replace(u(t),\" \").trim()}}},{}],2:[function(e,t,n){(function(r){\"use strict\";var M=e(\"contra/emitter\"),k=e(\"crossvent\"),j=e(\"./classes\"),R=document,q=R.documentElement;function U(e,t,n,o){r.navigator.pointerEnabled?k[t](e,{mouseup:\"pointerup\",mousedown:\"pointerdown\",mousemove:\"pointermove\"}[n],o):r.navigator.msPointerEnabled?k[t](e,{mouseup:\"MSPointerUp\",mousedown:\"MSPointerDown\",mousemove:\"MSPointerMove\"}[n],o):(k[t](e,{mouseup:\"touchend\",mousedown:\"touchstart\",mousemove:\"touchmove\"}[n],o),k[t](e,n,o))}function K(e){if(void 0!==e.touches)return e.touches.length;if(void 0!==e.which&&0!==e.which)return e.which;if(void 0!==e.buttons)return e.buttons;e=e.button;return void 0!==e?1&e?1:2&e?3:4&e?2:0:void 0}function z(e,t){return void 0!==r[t]?r[t]:(q.clientHeight?q:R.body)[e]}function H(e,t,n){var o=(e=e||{}).className||\"\";return e.className+=\" gu-hide\",n=R.elementFromPoint(t,n),e.className=o,n}function V(){return!1}function $(){return!0}function G(e){return e.width||e.right-e.left}function J(e){return e.height||e.bottom-e.top}function Q(e){return e.parentNode===R?null:e.parentNode}function W(e){return\"INPUT\"===e.tagName||\"TEXTAREA\"===e.tagName||\"SELECT\"===e.tagName||function e(t){if(!t)return!1;if(\"false\"===t.contentEditable)return!1;if(\"true\"===t.contentEditable)return!0;return e(Q(t))}(e)}function Z(t){return t.nextElementSibling||function(){var e=t;for(;e=e.nextSibling,e&&1!==e.nodeType;);return e}()}function ee(e,t){var t=(n=t).targetTouches&&n.targetTouches.length?n.targetTouches[0]:n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,n={pageX:\"clientX\",pageY:\"clientY\"};return e in n&&!(e in t)&&n[e]in t&&(e=n[e]),t[e]}t.exports=function(e,t){var l,f,s,d,m,o,r,v,p,h,n;1===arguments.length&&!1===Array.isArray(e)&&(t=e,e=[]);var i,g=null,y=t||{};void 0===y.moves&&(y.moves=$),void 0===y.accepts&&(y.accepts=$),void 0===y.invalid&&(y.invalid=function(){return!1}),void 0===y.containers&&(y.containers=e||[]),void 0===y.isContainer&&(y.isContainer=V),void 0===y.copy&&(y.copy=!1),void 0===y.copySortSource&&(y.copySortSource=!1),void 0===y.revertOnSpill&&(y.revertOnSpill=!1),void 0===y.removeOnSpill&&(y.removeOnSpill=!1),void 0===y.direction&&(y.direction=\"vertical\"),void 0===y.ignoreInputTextSelection&&(y.ignoreInputTextSelection=!0),void 0===y.mirrorContainer&&(y.mirrorContainer=R.body);var w=M({containers:y.containers,start:function(e){e=S(e);e&&C(e)},end:O,cancel:L,remove:X,destroy:function(){c(!0),N({})},canMove:function(e){return!!S(e)},dragging:!1});return!0===y.removeOnSpill&&w.on(\"over\",function(e){j.rm(e,\"gu-hide\")}).on(\"out\",function(e){w.dragging&&j.add(e,\"gu-hide\")}),c(),w;function u(e){return-1!==w.containers.indexOf(e)||y.isContainer(e)}function c(e){e=e?\"remove\":\"add\";U(q,e,\"mousedown\",E),U(q,e,\"mouseup\",N)}function a(e){U(q,e?\"remove\":\"add\",\"mousemove\",x)}function b(e){e=e?\"remove\":\"add\";k[e](q,\"selectstart\",T),k[e](q,\"click\",T)}function T(e){i&&e.preventDefault()}function E(e){var t,n;o=e.clientX,r=e.clientY,1!==K(e)||e.metaKey||e.ctrlKey||(n=S(t=e.target))&&(i=n,a(),\"mousedown\"===e.type&&(W(t)?t.focus():e.preventDefault()))}function x(e){if(i)if(0!==K(e)){if(!(void 0!==e.clientX&&Math.abs(e.clientX-o)<=(y.slideFactorX||0)&&void 0!==e.clientY&&Math.abs(e.clientY-r)<=(y.slideFactorY||0))){if(y.ignoreInputTextSelection){var t=ee(\"clientX\",e)||0,n=ee(\"clientY\",e)||0;if(W(R.elementFromPoint(t,n)))return}n=i;a(!0),b(),O(),C(n);n=function(e){e=e.getBoundingClientRect();return{left:e.left+z(\"scrollLeft\",\"pageXOffset\"),top:e.top+z(\"scrollTop\",\"pageYOffset\")}}(s);d=ee(\"pageX\",e)-n.left,m=ee(\"pageY\",e)-n.top,j.add(h||s,\"gu-transit\"),function(){if(l)return;var e=s.getBoundingClientRect();(l=s.cloneNode(!0)).style.width=G(e)+\"px\",l.style.height=J(e)+\"px\",j.rm(l,\"gu-transit\"),j.add(l,\"gu-mirror\"),y.mirrorContainer.appendChild(l),U(q,\"add\",\"mousemove\",P),j.add(y.mirrorContainer,\"gu-unselectable\"),w.emit(\"cloned\",l,s,\"mirror\")}(),P(e)}}else N({})}function S(e){if(!(w.dragging&&l||u(e))){for(var t=e;Q(e)&&!1===u(Q(e));){if(y.invalid(e,t))return;if(!(e=Q(e)))return}var n=Q(e);if(n)if(!y.invalid(e,t))if(y.moves(e,n,t,Z(e)))return{item:e,source:n}}}function C(e){var t,n;t=e.item,n=e.source,(\"boolean\"==typeof y.copy?y.copy:y.copy(t,n))&&(h=e.item.cloneNode(!0),w.emit(\"cloned\",h,e.item,\"copy\")),f=e.source,s=e.item,v=p=Z(e.item),w.dragging=!0,w.emit(\"drag\",s,f)}function O(){var e;w.dragging&&_(e=h||s,Q(e))}function I(){a(!(i=!1)),b(!0)}function N(e){var t,n;I(),w.dragging&&(t=h||s,n=ee(\"clientX\",e)||0,e=ee(\"clientY\",e)||0,(e=B(H(l,n,e),n,e))&&(h&&y.copySortSource||!h||e!==f)?_(t,e):(y.removeOnSpill?X:L)())}function _(e,t){var n=Q(e);h&&y.copySortSource&&t===f&&n.removeChild(s),A(t)?w.emit(\"cancel\",e,f,f):w.emit(\"drop\",e,t,f,p),Y()}function X(){var e,t;w.dragging&&((t=Q(e=h||s))&&t.removeChild(e),w.emit(h?\"cancel\":\"remove\",e,t,f),Y())}function L(e){var t,n,o;w.dragging&&(t=0<arguments.length?e:y.revertOnSpill,!1===(e=A(o=Q(n=h||s)))&&t&&(h?o&&o.removeChild(h):f.insertBefore(n,v)),e||t?w.emit(\"cancel\",n,f,f):w.emit(\"drop\",n,o,f,p),Y())}function Y(){var e=h||s;I(),l&&(j.rm(y.mirrorContainer,\"gu-unselectable\"),U(q,\"remove\",\"mousemove\",P),Q(l).removeChild(l),l=null),e&&j.rm(e,\"gu-transit\"),n&&clearTimeout(n),w.dragging=!1,g&&w.emit(\"out\",e,g,f),w.emit(\"dragend\",e),f=s=h=v=p=n=g=null}function A(e,t){t=void 0!==t?t:l?p:Z(h||s);return e===f&&t===v}function B(t,n,o){for(var r=t;r&&!function(){if(!1===u(r))return!1;var e=D(r,t),e=F(r,e,n,o);if(A(r,e))return!0;return y.accepts(s,r,f,e)}();)r=Q(r);return r}function P(e){if(l){e.preventDefault();var t=ee(\"clientX\",e)||0,n=ee(\"clientY\",e)||0,o=t-d,r=n-m;l.style.left=o+\"px\",l.style.top=r+\"px\";var i=h||s,e=H(l,t,n),o=B(e,t,n),u=null!==o&&o!==g;!u&&null!==o||(g&&a(\"out\"),g=o,u&&a(\"over\"));r=Q(i);if(o!==f||!h||y.copySortSource){var c,e=D(o,e);if(null!==e)c=F(o,e,t,n);else{if(!0!==y.revertOnSpill||h)return void(h&&r&&r.removeChild(i));c=v,o=f}(null===c&&u||c!==i&&c!==Z(i))&&(p=c,o.insertBefore(i,c),w.emit(\"shadow\",i,o,f))}else r&&r.removeChild(i)}function a(e){w.emit(e,i,g,f)}}function D(e,t){for(var n=t;n!==e&&Q(n)!==e;)n=Q(n);return n===q?null:n}function F(r,t,i,u){var c=\"horizontal\"===y.direction;return(t!==r?function(){var e=t.getBoundingClientRect();if(c)return n(i>e.left+G(e)/2);return n(u>e.top+J(e)/2)}:function(){var e,t,n,o=r.children.length;for(e=0;e<o;e++){if(t=r.children[e],n=t.getBoundingClientRect(),c&&n.left+n.width/2>i)return t;if(!c&&n.top+n.height/2>u)return t}return null})();function n(e){return e?Z(t):t}}}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./classes\":1,\"contra/emitter\":5,crossvent:6}],3:[function(e,t,n){t.exports=function(e,t){return Array.prototype.slice.call(e,t)}},{}],4:[function(e,t,n){\"use strict\";var o=e(\"ticky\");t.exports=function(e,t,n){e&&o(function(){e.apply(n||null,t||[])})}},{ticky:10}],5:[function(e,t,n){\"use strict\";var c=e(\"atoa\"),a=e(\"./debounce\");t.exports=function(r,e){var i=e||{},u={};return void 0===r&&(r={}),r.on=function(e,t){return u[e]?u[e].push(t):u[e]=[t],r},r.once=function(e,t){return t._once=!0,r.on(e,t),r},r.off=function(e,t){var n=arguments.length;if(1===n)delete u[e];else if(0===n)u={};else{e=u[e];if(!e)return r;e.splice(e.indexOf(t),1)}return r},r.emit=function(){var e=c(arguments);return r.emitterSnapshot(e.shift()).apply(this,e)},r.emitterSnapshot=function(o){var e=(u[o]||[]).slice(0);return function(){var t=c(arguments),n=this||r;if(\"error\"===o&&!1!==i.throws&&!e.length)throw 1===t.length?t[0]:t;return e.forEach(function(e){i.async?a(e,t,n):e.apply(n,t),e._once&&r.off(o,e)}),r}},r}},{\"./debounce\":4,atoa:3}],6:[function(n,o,e){(function(r){\"use strict\";var i=n(\"custom-event\"),u=n(\"./eventmap\"),c=r.document,e=function(e,t,n,o){return e.addEventListener(t,n,o)},t=function(e,t,n,o){return e.removeEventListener(t,n,o)},a=[];function l(e,t,n){t=function(e,t,n){var o,r;for(o=0;o<a.length;o++)if((r=a[o]).element===e&&r.type===t&&r.fn===n)return o}(e,t,n);if(t){n=a[t].wrapper;return a.splice(t,1),n}}r.addEventListener||(e=function(e,t,n){return e.attachEvent(\"on\"+t,function(e,t,n){var o=l(e,t,n)||function(n,o){return function(e){var t=e||r.event;t.target=t.target||t.srcElement,t.preventDefault=t.preventDefault||function(){t.returnValue=!1},t.stopPropagation=t.stopPropagation||function(){t.cancelBubble=!0},t.which=t.which||t.keyCode,o.call(n,t)}}(e,n);return a.push({wrapper:o,element:e,type:t,fn:n}),o}(e,t,n))},t=function(e,t,n){n=l(e,t,n);if(n)return e.detachEvent(\"on\"+t,n)}),o.exports={add:e,remove:t,fabricate:function(e,t,n){var o=-1===u.indexOf(t)?new i(t,{detail:n}):function(){var e;c.createEvent?(e=c.createEvent(\"Event\")).initEvent(t,!0,!0):c.createEventObject&&(e=c.createEventObject());return e}();e.dispatchEvent?e.dispatchEvent(o):e.fireEvent(\"on\"+t,o)}}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{\"./eventmap\":7,\"custom-event\":8}],7:[function(e,r,t){(function(e){\"use strict\";var t=[],n=\"\",o=/^on/;for(n in e)o.test(n)&&t.push(n.slice(2));r.exports=t}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],8:[function(e,n,t){(function(e){var t=e.CustomEvent;n.exports=function(){try{var e=new t(\"cat\",{detail:{foo:\"bar\"}});return\"cat\"===e.type&&\"bar\"===e.detail.foo}catch(e){}}()?t:\"undefined\"!=typeof document&&\"function\"==typeof document.createEvent?function(e,t){var n=document.createEvent(\"CustomEvent\");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}],9:[function(e,t,n){var o,r,t=t.exports={};function i(){throw new Error(\"setTimeout has not been defined\")}function u(){throw new Error(\"clearTimeout has not been defined\")}function c(t){if(o===setTimeout)return setTimeout(t,0);if((o===i||!o)&&setTimeout)return o=setTimeout,setTimeout(t,0);try{return o(t,0)}catch(e){try{return o.call(null,t,0)}catch(e){return o.call(this,t,0)}}}!function(){try{o=\"function\"==typeof setTimeout?setTimeout:i}catch(e){o=i}try{r=\"function\"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var a,l=[],f=!1,s=-1;function d(){f&&a&&(f=!1,a.length?l=a.concat(l):s=-1,l.length&&m())}function m(){if(!f){var e=c(d);f=!0;for(var t=l.length;t;){for(a=l,l=[];++s<t;)a&&a[s].run();s=-1,t=l.length}a=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(e)}}function v(e,t){this.fun=e,this.array=t}function p(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new v(e,t)),1!==l.length||f||c(m)},v.prototype.run=function(){this.fun.apply(null,this.array)},t.title=\"browser\",t.browser=!0,t.env={},t.argv=[],t.version=\"\",t.versions={},t.on=p,t.addListener=p,t.once=p,t.off=p,t.removeListener=p,t.removeAllListeners=p,t.emit=p,t.prependListener=p,t.prependOnceListener=p,t.listeners=function(e){return[]},t.binding=function(e){throw new Error(\"process.binding is not supported\")},t.cwd=function(){return\"/\"},t.chdir=function(e){throw new Error(\"process.chdir is not supported\")},t.umask=function(){return 0}},{}],10:[function(e,n,t){(function(t){var e=\"function\"==typeof t?function(e){t(e)}:function(e){setTimeout(e,0)};n.exports=e}).call(this,e(\"timers\").setImmediate)},{timers:11}],11:[function(a,e,l){(function(e,t){var o=a(\"process/browser.js\").nextTick,n=Function.prototype.apply,r=Array.prototype.slice,i={},u=0;function c(e,t){this._id=e,this._clearFn=t}l.setTimeout=function(){return new c(n.call(setTimeout,window,arguments),clearTimeout)},l.setInterval=function(){return new c(n.call(setInterval,window,arguments),clearInterval)},l.clearTimeout=l.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},l.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},l.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},l._unrefActive=l.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},l.setImmediate=\"function\"==typeof e?e:function(e){var t=u++,n=!(arguments.length<2)&&r.call(arguments,1);return i[t]=!0,o(function(){i[t]&&(n?e.apply(null,n):e.call(null),l.clearImmediate(t))}),t},l.clearImmediate=\"function\"==typeof t?t:function(e){delete i[e]}}).call(this,a(\"timers\").setImmediate,a(\"timers\").clearImmediate)},{\"process/browser.js\":9,timers:11}]},{},[2])(2)});","// jQuery flexImages v1.0.4\n// https://github.com/Pixabay/jQuery-flexImages\n!function(t){function e(t,a,r,n){function o(t){r.maxRows&&d>r.maxRows||r.truncate&&t&&d>1?w[g][0].style.display=\"none\":(w[g][4]&&(w[g][3].attr(\"src\",w[g][4]),w[g][4]=\"\"),w[g][0].style.width=l+\"px\",w[g][0].style.height=u+\"px\",w[g][0].style.display=\"block\")}var g,l,s=1,d=1,f=t.width()-2,w=[],c=0,u=r.rowHeight;for(f||(f=t.width()-2),i=0;i<a.length;i++)if(w.push(a[i]),c+=a[i][2]+r.margin,c>=f){var m=w.length*r.margin;for(s=(f-m)/(c-m),u=Math.ceil(r.rowHeight*s),exact_w=0,l,g=0;g<w.length;g++)l=Math.ceil(w[g][2]*s),exact_w+=l+r.margin,exact_w>f&&(l-=exact_w-f),o();w=[],c=0,d++}for(g=0;g<w.length;g++)l=Math.floor(w[g][2]*s),h=Math.floor(r.rowHeight*s),o(!0);n||f==t.width()||e(t,a,r,!0)}t.fn.flexImages=function(a){var i=t.extend({container:\".item\",object:\"img\",rowHeight:180,maxRows:0,truncate:0},a);return this.each(function(){var a=t(this),r=t(a).find(i.container),n=[],o=(new Date).getTime(),h=window.getComputedStyle?getComputedStyle(r[0],null):r[0].currentStyle;for(i.margin=(parseInt(h.marginLeft)||0)+(parseInt(h.marginRight)||0)+(Math.round(parseFloat(h.borderLeftWidth))||0)+(Math.round(parseFloat(h.borderRightWidth))||0),j=0;j<r.length;j++){var g=r[j],l=parseInt(g.getAttribute(\"data-w\")),s=l*(i.rowHeight/parseInt(g.getAttribute(\"data-h\"))),d=t(g).find(i.object);n.push([g,l,s,d,d.data(\"src\")])}e(a,n,i),t(window).off(\"resize.flexImages\"+a.data(\"flex-t\")),t(window).on(\"resize.flexImages\"+o,function(){e(a,n,i)}),a.data(\"flex-t\",o)})}}(jQuery);","/*! waitForImages jQuery Plugin 2018-02-13 */\n!function(a){\"function\"==typeof define&&define.amd?define([\"jquery\"],a):\"object\"==typeof exports?module.exports=a(require(\"jquery\")):a(jQuery)}(function(a){var b=\"waitForImages\",c=function(a){return a.srcset&&a.sizes}(new Image);a.waitForImages={hasImageProperties:[\"backgroundImage\",\"listStyleImage\",\"borderImage\",\"borderCornerImage\",\"cursor\"],hasImageAttributes:[\"srcset\"]},a.expr.pseudos[\"has-src\"]=function(b){return a(b).is('img[src][src!=\"\"]')},a.expr.pseudos.uncached=function(b){return!!a(b).is(\":has-src\")&&!b.complete},a.fn.waitForImages=function(){var d,e,f,g=0,h=0,i=a.Deferred(),j=this,k=[],l=a.waitForImages.hasImageProperties||[],m=a.waitForImages.hasImageAttributes||[],n=/url\\(\\s*(['\"]?)(.*?)\\1\\s*\\)/g;if(a.isPlainObject(arguments[0])?(f=arguments[0].waitForAll,e=arguments[0].each,d=arguments[0].finished):1===arguments.length&&\"boolean\"===a.type(arguments[0])?f=arguments[0]:(d=arguments[0],e=arguments[1],f=arguments[2]),d=d||a.noop,e=e||a.noop,f=!!f,!a.isFunction(d)||!a.isFunction(e))throw new TypeError(\"An invalid callback was supplied.\");return this.each(function(){var b=a(this);f?b.find(\"*\").addBack().each(function(){var b=a(this);b.is(\"img:has-src\")&&!b.is(\"[srcset]\")&&k.push({src:b.attr(\"src\"),element:b[0]}),a.each(l,function(a,c){var d,e=b.css(c);if(!e)return!0;for(;d=n.exec(e);)k.push({src:d[2],element:b[0]})}),a.each(m,function(a,c){var d=b.attr(c);return!d||void k.push({src:b.attr(\"src\"),srcset:b.attr(\"srcset\"),element:b[0]})})}):b.find(\"img:has-src\").each(function(){k.push({src:this.src,element:this})})}),g=k.length,h=0,0===g&&(d.call(j),i.resolveWith(j)),a.each(k,function(f,k){var l=new Image,m=\"load.\"+b+\" error.\"+b;a(l).one(m,function b(c){var f=[h,g,\"load\"==c.type];if(h++,e.apply(k.element,f),i.notifyWith(k.element,f),a(this).off(m,b),h==g)return d.call(j[0]),i.resolveWith(j[0]),!1}),c&&k.srcset&&(l.srcset=k.srcset,l.sizes=k.sizes),l.src=k.src}),i.promise()}});","/*!\n * Datepicker for Bootstrap v1.7.0 (https://github.com/uxsolutions/bootstrap-datepicker)\n *\n * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n */\n\n!function(a){\"function\"==typeof define&&define.amd?define([\"jquery\"],a):a(\"object\"==typeof exports?require(\"jquery\"):jQuery)}(function(a,b){function c(){return new Date(Date.UTC.apply(Date,arguments))}function d(){var a=new Date;return c(a.getFullYear(),a.getMonth(),a.getDate())}function e(a,b){return a.getUTCFullYear()===b.getUTCFullYear()&&a.getUTCMonth()===b.getUTCMonth()&&a.getUTCDate()===b.getUTCDate()}function f(c,d){return function(){return d!==b&&a.fn.datepicker.deprecated(d),this[c].apply(this,arguments)}}function g(a){return a&&!isNaN(a.getTime())}function h(b,c){function d(a,b){return b.toLowerCase()}var e,f=a(b).data(),g={},h=new RegExp(\"^\"+c.toLowerCase()+\"([A-Z])\");c=new RegExp(\"^\"+c.toLowerCase());for(var i in f)c.test(i)&&(e=i.replace(h,d),g[e]=f[i]);return g}function i(b){var c={};if(q[b]||(b=b.split(\"-\")[0],q[b])){var d=q[b];return a.each(p,function(a,b){b in d&&(c[b]=d[b])}),c}}var j=function(){var b={get:function(a){return this.slice(a)[0]},contains:function(a){for(var b=a&&a.valueOf(),c=0,d=this.length;c<d;c++)if(0<=this[c].valueOf()-b&&this[c].valueOf()-b<864e5)return c;return-1},remove:function(a){this.splice(a,1)},replace:function(b){b&&(a.isArray(b)||(b=[b]),this.clear(),this.push.apply(this,b))},clear:function(){this.length=0},copy:function(){var a=new j;return a.replace(this),a}};return function(){var c=[];return c.push.apply(c,arguments),a.extend(c,b),c}}(),k=function(b,c){a.data(b,\"datepicker\",this),this._process_options(c),this.dates=new j,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=a(b),this.isInput=this.element.is(\"input\"),this.inputField=this.isInput?this.element:this.element.find(\"input\"),this.component=!!this.element.hasClass(\"date\")&&this.element.find(\".add-on, .input-group-addon, .btn\"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is(\"div\"),this.picker=a(r.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(\".prev\").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(\".next\").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass(\"datepicker-inline\").appendTo(this.element):this.picker.addClass(\"datepicker-dropdown dropdown-menu\"),this.o.rtl&&this.picker.addClass(\"datepicker-rtl\"),this.o.calendarWeeks&&this.picker.find(\".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear\").attr(\"colspan\",function(a,b){return Number(b)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};k.prototype={constructor:k,_resolveViewName:function(b){return a.each(r.viewModes,function(c,d){if(b===c||a.inArray(b,d.names)!==-1)return b=c,!1}),b},_resolveDaysOfWeek:function(b){return a.isArray(b)||(b=b.split(/[,\\s]*/)),a.map(b,Number)},_check_template:function(c){try{if(c===b||\"\"===c)return!1;if((c.match(/[<>]/g)||[]).length<=0)return!0;var d=a(c);return d.length>0}catch(a){return!1}},_process_options:function(b){this._o=a.extend({},this._o,b);var e=this.o=a.extend({},this._o),f=e.language;q[f]||(f=f.split(\"-\")[0],q[f]||(f=o.language)),e.language=f,e.startView=this._resolveViewName(e.startView),e.minViewMode=this._resolveViewName(e.minViewMode),e.maxViewMode=this._resolveViewName(e.maxViewMode),e.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,e.startView)),e.multidate!==!0&&(e.multidate=Number(e.multidate)||!1,e.multidate!==!1&&(e.multidate=Math.max(0,e.multidate))),e.multidateSeparator=String(e.multidateSeparator),e.weekStart%=7,e.weekEnd=(e.weekStart+6)%7;var g=r.parseFormat(e.format);e.startDate!==-(1/0)&&(e.startDate?e.startDate instanceof Date?e.startDate=this._local_to_utc(this._zero_time(e.startDate)):e.startDate=r.parseDate(e.startDate,g,e.language,e.assumeNearbyYear):e.startDate=-(1/0)),e.endDate!==1/0&&(e.endDate?e.endDate instanceof Date?e.endDate=this._local_to_utc(this._zero_time(e.endDate)):e.endDate=r.parseDate(e.endDate,g,e.language,e.assumeNearbyYear):e.endDate=1/0),e.daysOfWeekDisabled=this._resolveDaysOfWeek(e.daysOfWeekDisabled||[]),e.daysOfWeekHighlighted=this._resolveDaysOfWeek(e.daysOfWeekHighlighted||[]),e.datesDisabled=e.datesDisabled||[],a.isArray(e.datesDisabled)||(e.datesDisabled=e.datesDisabled.split(\",\")),e.datesDisabled=a.map(e.datesDisabled,function(a){return r.parseDate(a,g,e.language,e.assumeNearbyYear)});var h=String(e.orientation).toLowerCase().split(/\\s+/g),i=e.orientation.toLowerCase();if(h=a.grep(h,function(a){return/^auto|left|right|top|bottom$/.test(a)}),e.orientation={x:\"auto\",y:\"auto\"},i&&\"auto\"!==i)if(1===h.length)switch(h[0]){case\"top\":case\"bottom\":e.orientation.y=h[0];break;case\"left\":case\"right\":e.orientation.x=h[0]}else i=a.grep(h,function(a){return/^left|right$/.test(a)}),e.orientation.x=i[0]||\"auto\",i=a.grep(h,function(a){return/^top|bottom$/.test(a)}),e.orientation.y=i[0]||\"auto\";else;if(e.defaultViewDate instanceof Date||\"string\"==typeof e.defaultViewDate)e.defaultViewDate=r.parseDate(e.defaultViewDate,g,e.language,e.assumeNearbyYear);else if(e.defaultViewDate){var j=e.defaultViewDate.year||(new Date).getFullYear(),k=e.defaultViewDate.month||0,l=e.defaultViewDate.day||1;e.defaultViewDate=c(j,k,l)}else e.defaultViewDate=d()},_events:[],_secondaryEvents:[],_applyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(d=b,e=a[f][1]):3===a[f].length&&(d=a[f][1],e=a[f][2]),c.on(e,d)},_unapplyEvents:function(a){for(var c,d,e,f=0;f<a.length;f++)c=a[f][0],2===a[f].length?(e=b,d=a[f][1]):3===a[f].length&&(e=a[f][1],d=a[f][2]),c.off(d,e)},_buildEvents:function(){var b={keyup:a.proxy(function(b){a.inArray(b.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:a.proxy(this.keydown,this),paste:a.proxy(this.paste,this)};this.o.showOnFocus===!0&&(b.focus=a.proxy(this.show,this)),this.isInput?this._events=[[this.element,b]]:this.component&&this.inputField.length?this._events=[[this.inputField,b],[this.component,{click:a.proxy(this.show,this)}]]:this._events=[[this.element,{click:a.proxy(this.show,this),keydown:a.proxy(this.keydown,this)}]],this._events.push([this.element,\"*\",{blur:a.proxy(function(a){this._focused_from=a.target},this)}],[this.element,{blur:a.proxy(function(a){this._focused_from=a.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{\"changeYear changeMonth\":a.proxy(function(a){this.update(a.date)},this)}]),this._secondaryEvents=[[this.picker,{click:a.proxy(this.click,this)}],[this.picker,\".prev, .next\",{click:a.proxy(this.navArrowsClick,this)}],[this.picker,\".day:not(.disabled)\",{click:a.proxy(this.dayCellClick,this)}],[a(window),{resize:a.proxy(this.place,this)}],[a(document),{\"mousedown touchstart\":a.proxy(function(a){this.element.is(a.target)||this.element.find(a.target).length||this.picker.is(a.target)||this.picker.find(a.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(b,c){var d=c||this.dates.get(-1),e=this._utc_to_local(d);this.element.trigger({type:b,date:e,viewMode:this.viewMode,dates:a.map(this.dates,this._utc_to_local),format:a.proxy(function(a,b){0===arguments.length?(a=this.dates.length-1,b=this.o.format):\"string\"==typeof a&&(b=a,a=this.dates.length-1),b=b||this.o.format;var c=this.dates.get(a);return r.formatDate(c,b,this.o.language)},this)})},show:function(){if(!(this.inputField.prop(\"disabled\")||this.inputField.prop(\"readonly\")&&this.o.enableOnReadonly===!1))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger(\"show\"),(window.navigator.msMaxTouchPoints||\"ontouchstart\"in document)&&this.o.disableTouchKeyboard&&a(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(\":visible\")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger(\"hide\"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(b){var c;if(b.originalEvent.clipboardData&&b.originalEvent.clipboardData.types&&a.inArray(\"text/plain\",b.originalEvent.clipboardData.types)!==-1)c=b.originalEvent.clipboardData.getData(\"text/plain\");else{if(!window.clipboardData)return;c=window.clipboardData.getData(\"Text\")}this.setDate(c),this.update(),b.preventDefault()},_utc_to_local:function(a){if(!a)return a;var b=new Date(a.getTime()+6e4*a.getTimezoneOffset());return b.getTimezoneOffset()!==a.getTimezoneOffset()&&(b=new Date(a.getTime()+6e4*b.getTimezoneOffset())),b},_local_to_utc:function(a){return a&&new Date(a.getTime()-6e4*a.getTimezoneOffset())},_zero_time:function(a){return a&&new Date(a.getFullYear(),a.getMonth(),a.getDate())},_zero_utc_time:function(a){return a&&c(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate())},getDates:function(){return a.map(this.dates,this._utc_to_local)},getUTCDates:function(){return a.map(this.dates,function(a){return new Date(a)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var a=this.dates.get(-1);return a!==b?new Date(a):null},clearDates:function(){this.inputField.val(\"\"),this.update(),this._trigger(\"changeDate\"),this.o.autoclose&&this.hide()},setDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,b),this._trigger(\"changeDate\"),this.setValue(),this},setUTCDates:function(){var b=a.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,a.map(b,this._utc_to_local)),this},setDate:f(\"setDates\"),setUTCDate:f(\"setUTCDates\"),remove:f(\"destroy\",\"Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead\"),setValue:function(){var a=this.getFormattedDate();return this.inputField.val(a),this},getFormattedDate:function(c){c===b&&(c=this.o.format);var d=this.o.language;return a.map(this.dates,function(a){return r.formatDate(a,c,d)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(a){return this._process_options({startDate:a}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(a){return this._process_options({endDate:a}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(a){return this._process_options({daysOfWeekDisabled:a}),this.update(),this},setDaysOfWeekHighlighted:function(a){return this._process_options({daysOfWeekHighlighted:a}),this.update(),this},setDatesDisabled:function(a){return this._process_options({datesDisabled:a}),this.update(),this},place:function(){if(this.isInline)return this;var b=this.picker.outerWidth(),c=this.picker.outerHeight(),d=10,e=a(this.o.container),f=e.width(),g=\"body\"===this.o.container?a(document).scrollTop():e.scrollTop(),h=e.offset(),i=[0];this.element.parents().each(function(){var b=a(this).css(\"z-index\");\"auto\"!==b&&0!==Number(b)&&i.push(Number(b))});var j=Math.max.apply(Math,i)+this.o.zIndexOffset,k=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),m=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),n=k.left-h.left,o=k.top-h.top;\"body\"!==this.o.container&&(o+=g),this.picker.removeClass(\"datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left\"),\"auto\"!==this.o.orientation.x?(this.picker.addClass(\"datepicker-orient-\"+this.o.orientation.x),\"right\"===this.o.orientation.x&&(n-=b-m)):k.left<0?(this.picker.addClass(\"datepicker-orient-left\"),n-=k.left-d):n+b>f?(this.picker.addClass(\"datepicker-orient-right\"),n+=m-b):this.o.rtl?this.picker.addClass(\"datepicker-orient-right\"):this.picker.addClass(\"datepicker-orient-left\");var p,q=this.o.orientation.y;if(\"auto\"===q&&(p=-g+o-c,q=p<0?\"bottom\":\"top\"),this.picker.addClass(\"datepicker-orient-\"+q),\"top\"===q?o-=c+parseInt(this.picker.css(\"padding-top\")):o+=l,this.o.rtl){var r=f-(n+m);this.picker.css({top:o,right:r,zIndex:j})}else this.picker.css({top:o,left:n,zIndex:j});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var b=this.dates.copy(),c=[],d=!1;return arguments.length?(a.each(arguments,a.proxy(function(a,b){b instanceof Date&&(b=this._local_to_utc(b)),c.push(b)},this)),d=!0):(c=this.isInput?this.element.val():this.element.data(\"date\")||this.inputField.val(),c=c&&this.o.multidate?c.split(this.o.multidateSeparator):[c],delete this.element.data().date),c=a.map(c,a.proxy(function(a){return r.parseDate(a,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),c=a.grep(c,a.proxy(function(a){return!this.dateWithinRange(a)||!a},this),!0),this.dates.replace(c),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),d?(this.setValue(),this.element.change()):this.dates.length&&String(b)!==String(this.dates)&&d&&(this._trigger(\"changeDate\"),this.element.change()),!this.dates.length&&b.length&&(this._trigger(\"clearDate\"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var b=this.o.weekStart,c=\"<tr>\";for(this.o.calendarWeeks&&(c+='<th class=\"cw\"> </th>');b<this.o.weekStart+7;)c+='<th class=\"dow',a.inArray(b,this.o.daysOfWeekDisabled)!==-1&&(c+=\" disabled\"),c+='\">'+q[this.o.language].daysMin[b++%7]+\"</th>\";c+=\"</tr>\",this.picker.find(\".datepicker-days thead\").append(c)}},fillMonths:function(){for(var a,b=this._utc_to_local(this.viewDate),c=\"\",d=0;d<12;d++)a=b&&b.getMonth()===d?\" focused\":\"\",c+='<span class=\"month'+a+'\">'+q[this.o.language].monthsShort[d]+\"</span>\";this.picker.find(\".datepicker-months td\").html(c)},setRange:function(b){b&&b.length?this.range=a.map(b,function(a){return a.valueOf()}):delete this.range,this.fill()},getClassNames:function(b){var c=[],f=this.viewDate.getUTCFullYear(),g=this.viewDate.getUTCMonth(),h=d();return b.getUTCFullYear()<f||b.getUTCFullYear()===f&&b.getUTCMonth()<g?c.push(\"old\"):(b.getUTCFullYear()>f||b.getUTCFullYear()===f&&b.getUTCMonth()>g)&&c.push(\"new\"),this.focusDate&&b.valueOf()===this.focusDate.valueOf()&&c.push(\"focused\"),this.o.todayHighlight&&e(b,h)&&c.push(\"today\"),this.dates.contains(b)!==-1&&c.push(\"active\"),this.dateWithinRange(b)||c.push(\"disabled\"),this.dateIsDisabled(b)&&c.push(\"disabled\",\"disabled-date\"),a.inArray(b.getUTCDay(),this.o.daysOfWeekHighlighted)!==-1&&c.push(\"highlighted\"),this.range&&(b>this.range[0]&&b<this.range[this.range.length-1]&&c.push(\"range\"),a.inArray(b.valueOf(),this.range)!==-1&&c.push(\"selected\"),b.valueOf()===this.range[0]&&c.push(\"range-start\"),b.valueOf()===this.range[this.range.length-1]&&c.push(\"range-end\")),c},_fill_yearsView:function(c,d,e,f,g,h,i){for(var j,k,l,m=\"\",n=e/10,o=this.picker.find(c),p=Math.floor(f/e)*e,q=p+9*n,r=Math.floor(this.viewDate.getFullYear()/n)*n,s=a.map(this.dates,function(a){return Math.floor(a.getUTCFullYear()/n)*n}),t=p-n;t<=q+n;t+=n)j=[d],k=null,t===p-n?j.push(\"old\"):t===q+n&&j.push(\"new\"),a.inArray(t,s)!==-1&&j.push(\"active\"),(t<g||t>h)&&j.push(\"disabled\"),t===r&&j.push(\"focused\"),i!==a.noop&&(l=i(new Date(t,0,1)),l===b?l={}:\"boolean\"==typeof l?l={enabled:l}:\"string\"==typeof l&&(l={classes:l}),l.enabled===!1&&j.push(\"disabled\"),l.classes&&(j=j.concat(l.classes.split(/\\s+/))),l.tooltip&&(k=l.tooltip)),m+='<span class=\"'+j.join(\" \")+'\"'+(k?' title=\"'+k+'\"':\"\")+\">\"+t+\"</span>\";o.find(\".datepicker-switch\").text(p+\"-\"+q),o.find(\"td\").html(m)},fill:function(){var d,e,f=new Date(this.viewDate),g=f.getUTCFullYear(),h=f.getUTCMonth(),i=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),j=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),k=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,m=q[this.o.language].today||q.en.today||\"\",n=q[this.o.language].clear||q.en.clear||\"\",o=q[this.o.language].titleFormat||q.en.titleFormat;if(!isNaN(g)&&!isNaN(h)){this.picker.find(\".datepicker-days .datepicker-switch\").text(r.formatDate(f,o,this.o.language)),this.picker.find(\"tfoot .today\").text(m).css(\"display\",this.o.todayBtn===!0||\"linked\"===this.o.todayBtn?\"table-cell\":\"none\"),this.picker.find(\"tfoot .clear\").text(n).css(\"display\",this.o.clearBtn===!0?\"table-cell\":\"none\"),this.picker.find(\"thead .datepicker-title\").text(this.o.title).css(\"display\",\"string\"==typeof this.o.title&&\"\"!==this.o.title?\"table-cell\":\"none\"),this.updateNavArrows(),this.fillMonths();var p=c(g,h,0),s=p.getUTCDate();p.setUTCDate(s-(p.getUTCDay()-this.o.weekStart+7)%7);var t=new Date(p);p.getUTCFullYear()<100&&t.setUTCFullYear(p.getUTCFullYear()),t.setUTCDate(t.getUTCDate()+42),t=t.valueOf();for(var u,v,w=[];p.valueOf()<t;){if(u=p.getUTCDay(),u===this.o.weekStart&&(w.push(\"<tr>\"),this.o.calendarWeeks)){var x=new Date(+p+(this.o.weekStart-u-7)%7*864e5),y=new Date(Number(x)+(11-x.getUTCDay())%7*864e5),z=new Date(Number(z=c(y.getUTCFullYear(),0,1))+(11-z.getUTCDay())%7*864e5),A=(y-z)/864e5/7+1;w.push('<td class=\"cw\">'+A+\"</td>\")}v=this.getClassNames(p),v.push(\"day\");var B=p.getUTCDate();this.o.beforeShowDay!==a.noop&&(e=this.o.beforeShowDay(this._utc_to_local(p)),e===b?e={}:\"boolean\"==typeof e?e={enabled:e}:\"string\"==typeof e&&(e={classes:e}),e.enabled===!1&&v.push(\"disabled\"),e.classes&&(v=v.concat(e.classes.split(/\\s+/))),e.tooltip&&(d=e.tooltip),e.content&&(B=e.content)),v=a.isFunction(a.uniqueSort)?a.uniqueSort(v):a.unique(v),w.push('<td class=\"'+v.join(\" \")+'\"'+(d?' title=\"'+d+'\"':\"\")+' data-date=\"'+p.getTime().toString()+'\">'+B+\"</td>\"),d=null,u===this.o.weekEnd&&w.push(\"</tr>\"),p.setUTCDate(p.getUTCDate()+1)}this.picker.find(\".datepicker-days tbody\").html(w.join(\"\"));var C=q[this.o.language].monthsTitle||q.en.monthsTitle||\"Months\",D=this.picker.find(\".datepicker-months\").find(\".datepicker-switch\").text(this.o.maxViewMode<2?C:g).end().find(\"tbody span\").removeClass(\"active\");if(a.each(this.dates,function(a,b){b.getUTCFullYear()===g&&D.eq(b.getUTCMonth()).addClass(\"active\")}),(g<i||g>k)&&D.addClass(\"disabled\"),g===i&&D.slice(0,j).addClass(\"disabled\"),g===k&&D.slice(l+1).addClass(\"disabled\"),this.o.beforeShowMonth!==a.noop){var E=this;a.each(D,function(c,d){var e=new Date(g,c,1),f=E.o.beforeShowMonth(e);f===b?f={}:\"boolean\"==typeof f?f={enabled:f}:\"string\"==typeof f&&(f={classes:f}),f.enabled!==!1||a(d).hasClass(\"disabled\")||a(d).addClass(\"disabled\"),f.classes&&a(d).addClass(f.classes),f.tooltip&&a(d).prop(\"title\",f.tooltip)})}this._fill_yearsView(\".datepicker-years\",\"year\",10,g,i,k,this.o.beforeShowYear),this._fill_yearsView(\".datepicker-decades\",\"decade\",100,g,i,k,this.o.beforeShowDecade),this._fill_yearsView(\".datepicker-centuries\",\"century\",1e3,g,i,k,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var a,b,c=new Date(this.viewDate),d=c.getUTCFullYear(),e=c.getUTCMonth(),f=this.o.startDate!==-(1/0)?this.o.startDate.getUTCFullYear():-(1/0),g=this.o.startDate!==-(1/0)?this.o.startDate.getUTCMonth():-(1/0),h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,i=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,j=1;switch(this.viewMode){case 0:a=d<=f&&e<=g,b=d>=h&&e>=i;break;case 4:j*=10;case 3:j*=10;case 2:j*=10;case 1:a=Math.floor(d/j)*j<=f,b=Math.floor(d/j)*j+j>=h}this.picker.find(\".prev\").toggleClass(\"disabled\",a),this.picker.find(\".next\").toggleClass(\"disabled\",b)}},click:function(b){b.preventDefault(),b.stopPropagation();var e,f,g,h;e=a(b.target),e.hasClass(\"datepicker-switch\")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),e.hasClass(\"today\")&&!e.hasClass(\"day\")&&(this.setViewMode(0),this._setDate(d(),\"linked\"===this.o.todayBtn?null:\"view\")),e.hasClass(\"clear\")&&this.clearDates(),e.hasClass(\"disabled\")||(e.hasClass(\"month\")||e.hasClass(\"year\")||e.hasClass(\"decade\")||e.hasClass(\"century\"))&&(this.viewDate.setUTCDate(1),f=1,1===this.viewMode?(h=e.parent().find(\"span\").index(e),g=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(h)):(h=0,g=Number(e.text()),this.viewDate.setUTCFullYear(g)),this._trigger(r.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(c(g,h,f)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(\":visible\")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(b){var c=a(b.currentTarget),d=c.data(\"date\"),e=new Date(d);this.o.updateViewDate&&(e.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger(\"changeYear\",this.viewDate),e.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger(\"changeMonth\",this.viewDate)),this._setDate(e)},navArrowsClick:function(b){var c=a(b.currentTarget),d=c.hasClass(\"prev\")?-1:1;0!==this.viewMode&&(d*=12*r.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,d),this._trigger(r.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(a){var b=this.dates.contains(a);if(a||this.dates.clear(),b!==-1?(this.o.multidate===!0||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(b):this.o.multidate===!1?(this.dates.clear(),this.dates.push(a)):this.dates.push(a),\"number\"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(a,b){b&&\"date\"!==b||this._toggle_multidate(a&&new Date(a)),(!b&&this.o.updateViewDate||\"view\"===b)&&(this.viewDate=a&&new Date(a)),this.fill(),this.setValue(),b&&\"view\"===b||this._trigger(\"changeDate\"),this.inputField.trigger(\"change\"),!this.o.autoclose||b&&\"date\"!==b||this.hide()},moveDay:function(a,b){var c=new Date(a);return c.setUTCDate(a.getUTCDate()+b),c},moveWeek:function(a,b){return this.moveDay(a,7*b)},moveMonth:function(a,b){if(!g(a))return this.o.defaultViewDate;if(!b)return a;var c,d,e=new Date(a.valueOf()),f=e.getUTCDate(),h=e.getUTCMonth(),i=Math.abs(b);if(b=b>0?1:-1,1===i)d=b===-1?function(){return e.getUTCMonth()===h}:function(){return e.getUTCMonth()!==c},c=h+b,e.setUTCMonth(c),c=(c+12)%12;else{for(var j=0;j<i;j++)e=this.moveMonth(e,b);c=e.getUTCMonth(),e.setUTCDate(f),d=function(){return c!==e.getUTCMonth()}}for(;d();)e.setUTCDate(--f),e.setUTCMonth(c);return e},moveYear:function(a,b){return this.moveMonth(a,12*b)},moveAvailableDate:function(a,b,c){do{if(a=this[c](a,b),!this.dateWithinRange(a))return!1;c=\"moveDay\"}while(this.dateIsDisabled(a));return a},weekOfDateIsDisabled:function(b){return a.inArray(b.getUTCDay(),this.o.daysOfWeekDisabled)!==-1},dateIsDisabled:function(b){return this.weekOfDateIsDisabled(b)||a.grep(this.o.datesDisabled,function(a){return e(b,a)}).length>0},dateWithinRange:function(a){return a>=this.o.startDate&&a<=this.o.endDate},keydown:function(a){if(!this.picker.is(\":visible\"))return void(40!==a.keyCode&&27!==a.keyCode||(this.show(),a.stopPropagation()));var b,c,d=!1,e=this.focusDate||this.viewDate;switch(a.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),a.preventDefault(),a.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;b=37===a.keyCode||38===a.keyCode?-1:1,0===this.viewMode?a.ctrlKey?(c=this.moveAvailableDate(e,b,\"moveYear\"),c&&this._trigger(\"changeYear\",this.viewDate)):a.shiftKey?(c=this.moveAvailableDate(e,b,\"moveMonth\"),c&&this._trigger(\"changeMonth\",this.viewDate)):37===a.keyCode||39===a.keyCode?c=this.moveAvailableDate(e,b,\"moveDay\"):this.weekOfDateIsDisabled(e)||(c=this.moveAvailableDate(e,b,\"moveWeek\")):1===this.viewMode?(38!==a.keyCode&&40!==a.keyCode||(b*=4),c=this.moveAvailableDate(e,b,\"moveMonth\")):2===this.viewMode&&(38!==a.keyCode&&40!==a.keyCode||(b*=4),c=this.moveAvailableDate(e,b,\"moveYear\")),c&&(this.focusDate=this.viewDate=c,this.setValue(),this.fill(),a.preventDefault());break;case 13:if(!this.o.forceParse)break;e=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(e),d=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(\":visible\")&&(a.preventDefault(),a.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}d&&(this.dates.length?this._trigger(\"changeDate\"):this._trigger(\"clearDate\"),this.inputField.trigger(\"change\"))},setViewMode:function(a){this.viewMode=a,this.picker.children(\"div\").hide().filter(\".datepicker-\"+r.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger(\"changeViewMode\",new Date(this.viewDate))}};var l=function(b,c){a.data(b,\"datepicker\",this),this.element=a(b),this.inputs=a.map(c.inputs,function(a){return a.jquery?a[0]:a}),delete c.inputs,this.keepEmptyValues=c.keepEmptyValues,delete c.keepEmptyValues,n.call(a(this.inputs),c).on(\"changeDate\",a.proxy(this.dateUpdated,this)),this.pickers=a.map(this.inputs,function(b){return a.data(b,\"datepicker\")}),this.updateDates()};l.prototype={updateDates:function(){this.dates=a.map(this.pickers,function(a){return a.getUTCDate()}),this.updateRanges()},updateRanges:function(){var b=a.map(this.dates,function(a){return a.valueOf()});a.each(this.pickers,function(a,c){c.setRange(b)})},dateUpdated:function(c){if(!this.updating){this.updating=!0;var d=a.data(c.target,\"datepicker\");if(d!==b){var e=d.getUTCDate(),f=this.keepEmptyValues,g=a.inArray(c.target,this.inputs),h=g-1,i=g+1,j=this.inputs.length;if(g!==-1){if(a.each(this.pickers,function(a,b){b.getUTCDate()||b!==d&&f||b.setUTCDate(e)}),e<this.dates[h])for(;h>=0&&e<this.dates[h];)this.pickers[h--].setUTCDate(e);else if(e>this.dates[i])for(;i<j&&e>this.dates[i];)this.pickers[i++].setUTCDate(e);this.updateDates(),delete this.updating}}}},destroy:function(){a.map(this.pickers,function(a){a.destroy()}),a(this.inputs).off(\"changeDate\",this.dateUpdated),delete this.element.data().datepicker},remove:f(\"destroy\",\"Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead\")};var m=a.fn.datepicker,n=function(c){var d=Array.apply(null,arguments);d.shift();var e;if(this.each(function(){var b=a(this),f=b.data(\"datepicker\"),g=\"object\"==typeof c&&c;if(!f){var j=h(this,\"date\"),m=a.extend({},o,j,g),n=i(m.language),p=a.extend({},o,n,j,g);b.hasClass(\"input-daterange\")||p.inputs?(a.extend(p,{inputs:p.inputs||b.find(\"input\").toArray()}),f=new l(this,p)):f=new k(this,p),b.data(\"datepicker\",f)}\"string\"==typeof c&&\"function\"==typeof f[c]&&(e=f[c].apply(f,d))}),e===b||e instanceof k||e instanceof l)return this;if(this.length>1)throw new Error(\"Using only allowed for the collection of a single element (\"+c+\" function)\");return e};a.fn.datepicker=n;var o=a.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:a.noop,beforeShowMonth:a.noop,beforeShowYear:a.noop,beforeShowDecade:a.noop,beforeShowCentury:a.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:\"mm/dd/yyyy\",keepEmptyValues:!1,keyboardNavigation:!0,language:\"en\",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:\",\",orientation:\"auto\",rtl:!1,startDate:-(1/0),startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:\"body\",immediateUpdates:!1,title:\"\",templates:{leftArrow:\"«\",rightArrow:\"»\"},showWeekDays:!0},p=a.fn.datepicker.locale_opts=[\"format\",\"rtl\",\"weekStart\"];a.fn.datepicker.Constructor=k;var q=a.fn.datepicker.dates={en:{days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],daysShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],daysMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthsShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],today:\"Today\",clear:\"Clear\",titleFormat:\"MM yyyy\"}},r={viewModes:[{names:[\"days\",\"month\"],clsName:\"days\",e:\"changeMonth\"},{names:[\"months\",\"year\"],clsName:\"months\",e:\"changeYear\",navStep:1},{names:[\"years\",\"decade\"],clsName:\"years\",e:\"changeDecade\",navStep:10},{names:[\"decades\",\"century\"],clsName:\"decades\",e:\"changeCentury\",navStep:100},{names:[\"centuries\",\"millennium\"],clsName:\"centuries\",e:\"changeMillennium\",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\\/:-@\\u5e74\\u6708\\u65e5\\[-`{-~\\t\\n\\r]+/g,parseFormat:function(a){if(\"function\"==typeof a.toValue&&\"function\"==typeof a.toDisplay)return a;var b=a.replace(this.validParts,\"\\0\").split(\"\\0\"),c=a.match(this.validParts);if(!b||!b.length||!c||0===c.length)throw new Error(\"Invalid date format.\");return{separators:b,parts:c}},parseDate:function(c,e,f,g){function h(a,b){return b===!0&&(b=10),a<100&&(a+=2e3,a>(new Date).getFullYear()+b&&(a-=100)),a}function i(){var a=this.slice(0,j[n].length),b=j[n].slice(0,a.length);return a.toLowerCase()===b.toLowerCase()}if(!c)return b;if(c instanceof Date)return c;if(\"string\"==typeof e&&(e=r.parseFormat(e)),e.toValue)return e.toValue(c,e,f);var j,l,m,n,o,p={d:\"moveDay\",m:\"moveMonth\",w:\"moveWeek\",y:\"moveYear\"},s={yesterday:\"-1d\",today:\"+0d\",tomorrow:\"+1d\"};if(c in s&&(c=s[c]),/^[\\-+]\\d+[dmwy]([\\s,]+[\\-+]\\d+[dmwy])*$/i.test(c)){for(j=c.match(/([\\-+]\\d+)([dmwy])/gi),c=new Date,n=0;n<j.length;n++)l=j[n].match(/([\\-+]\\d+)([dmwy])/i),m=Number(l[1]),o=p[l[2].toLowerCase()],c=k.prototype[o](c,m);return k.prototype._zero_utc_time(c)}j=c&&c.match(this.nonpunctuation)||[];var t,u,v={},w=[\"yyyy\",\"yy\",\"M\",\"MM\",\"m\",\"mm\",\"d\",\"dd\"],x={yyyy:function(a,b){return a.setUTCFullYear(g?h(b,g):b)},m:function(a,b){if(isNaN(a))return a;for(b-=1;b<0;)b+=12;for(b%=12,a.setUTCMonth(b);a.getUTCMonth()!==b;)a.setUTCDate(a.getUTCDate()-1);return a},d:function(a,b){return a.setUTCDate(b)}};x.yy=x.yyyy,x.M=x.MM=x.mm=x.m,x.dd=x.d,c=d();var y=e.parts.slice();if(j.length!==y.length&&(y=a(y).filter(function(b,c){return a.inArray(c,w)!==-1}).toArray()),j.length===y.length){var z;for(n=0,z=y.length;n<z;n++){if(t=parseInt(j[n],10),l=y[n],isNaN(t))switch(l){case\"MM\":u=a(q[f].months).filter(i),t=a.inArray(u[0],q[f].months)+1;break;case\"M\":u=a(q[f].monthsShort).filter(i),t=a.inArray(u[0],q[f].monthsShort)+1}v[l]=t}var A,B;for(n=0;n<w.length;n++)B=w[n],B in v&&!isNaN(v[B])&&(A=new Date(c),x[B](A,v[B]),isNaN(A)||(c=A))}return c},formatDate:function(b,c,d){if(!b)return\"\";if(\"string\"==typeof c&&(c=r.parseFormat(c)),c.toDisplay)return c.toDisplay(b,c,d);var e={d:b.getUTCDate(),D:q[d].daysShort[b.getUTCDay()],DD:q[d].days[b.getUTCDay()],m:b.getUTCMonth()+1,M:q[d].monthsShort[b.getUTCMonth()],MM:q[d].months[b.getUTCMonth()],yy:b.getUTCFullYear().toString().substring(2),yyyy:b.getUTCFullYear()};e.dd=(e.d<10?\"0\":\"\")+e.d,e.mm=(e.m<10?\"0\":\"\")+e.m,b=[];for(var f=a.extend([],c.separators),g=0,h=c.parts.length;g<=h;g++)f.length&&b.push(f.shift()),b.push(e[c.parts[g]]);return b.join(\"\")},headTemplate:'<thead><tr><th colspan=\"7\" class=\"datepicker-title\"></th></tr><tr><th class=\"prev\">'+o.templates.leftArrow+'</th><th colspan=\"5\" class=\"datepicker-switch\"></th><th class=\"next\">'+o.templates.rightArrow+\"</th></tr></thead>\",\ncontTemplate:'<tbody><tr><td colspan=\"7\"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan=\"7\" class=\"today\"></th></tr><tr><th colspan=\"7\" class=\"clear\"></th></tr></tfoot>'};r.template='<div class=\"datepicker\"><div class=\"datepicker-days\"><table class=\"table-condensed\">'+r.headTemplate+\"<tbody></tbody>\"+r.footTemplate+'</table></div><div class=\"datepicker-months\"><table class=\"table-condensed\">'+r.headTemplate+r.contTemplate+r.footTemplate+'</table></div><div class=\"datepicker-years\"><table class=\"table-condensed\">'+r.headTemplate+r.contTemplate+r.footTemplate+'</table></div><div class=\"datepicker-decades\"><table class=\"table-condensed\">'+r.headTemplate+r.contTemplate+r.footTemplate+'</table></div><div class=\"datepicker-centuries\"><table class=\"table-condensed\">'+r.headTemplate+r.contTemplate+r.footTemplate+\"</table></div></div>\",a.fn.datepicker.DPGlobal=r,a.fn.datepicker.noConflict=function(){return a.fn.datepicker=m,this},a.fn.datepicker.version=\"1.7.0\",a.fn.datepicker.deprecated=function(a){var b=window.console;b&&b.warn&&b.warn(\"DEPRECATED: \"+a)},a(document).on(\"focus.datepicker.data-api click.datepicker.data-api\",'[data-provide=\"datepicker\"]',function(b){var c=a(this);c.data(\"datepicker\")||(b.preventDefault(),n.call(c,\"show\"))}),a(function(){n.call(a('[data-provide=\"datepicker-inline\"]'))})});","/*!\n * ClockPicker v0.0.7 (http://weareoutman.github.io/clockpicker/)\n * Copyright 2014 Wang Shenwei.\n * Licensed under MIT (https://github.com/weareoutman/clockpicker/blob/gh-pages/LICENSE)\n */\n!function(){function t(t){return document.createElementNS(p,t)}function i(t){return(10>t?\"0\":\"\")+t}function e(t){var i=++m+\"\";return t?t+i:i}function s(s,r){function p(t,i){var e=u.offset(),s=/^touch/.test(t.type),o=e.left+b,n=e.top+b,p=(s?t.originalEvent.touches[0]:t).pageX-o,h=(s?t.originalEvent.touches[0]:t).pageY-n,k=Math.sqrt(p*p+h*h),v=!1;if(!i||!(g-y>k||k>g+y)){t.preventDefault();var m=setTimeout(function(){c.addClass(\"clockpicker-moving\")},200);l&&u.append(x.canvas),x.setHand(p,h,!i,!0),a.off(d).on(d,function(t){t.preventDefault();var i=/^touch/.test(t.type),e=(i?t.originalEvent.touches[0]:t).pageX-o,s=(i?t.originalEvent.touches[0]:t).pageY-n;(v||e!==p||s!==h)&&(v=!0,x.setHand(e,s,!1,!0))}),a.off(f).on(f,function(t){a.off(f),t.preventDefault();var e=/^touch/.test(t.type),s=(e?t.originalEvent.changedTouches[0]:t).pageX-o,l=(e?t.originalEvent.changedTouches[0]:t).pageY-n;(i||v)&&s===p&&l===h&&x.setHand(s,l),\"hours\"===x.currentView?x.toggleView(\"minutes\",A/2):r.autoclose&&(x.minutesView.addClass(\"clockpicker-dial-out\"),setTimeout(function(){x.done()},A/2)),u.prepend(j),clearTimeout(m),c.removeClass(\"clockpicker-moving\"),a.off(d)})}}var h=n(V),u=h.find(\".clockpicker-plate\"),v=h.find(\".clockpicker-hours\"),m=h.find(\".clockpicker-minutes\"),T=h.find(\".clockpicker-am-pm-block\"),C=\"INPUT\"===s.prop(\"tagName\"),H=C?s:s.find(\"input\"),P=s.find(\".input-group-addon\"),x=this;if(this.id=e(\"cp\"),this.element=s,this.options=r,this.isAppended=!1,this.isShown=!1,this.currentView=\"hours\",this.isInput=C,this.input=H,this.addon=P,this.popover=h,this.plate=u,this.hoursView=v,this.minutesView=m,this.amPmBlock=T,this.spanHours=h.find(\".clockpicker-span-hours\"),this.spanMinutes=h.find(\".clockpicker-span-minutes\"),this.spanAmPm=h.find(\".clockpicker-span-am-pm\"),this.amOrPm=\"PM\",r.twelvehour){{var S=['<div class=\"clockpicker-am-pm-block\">','<button type=\"button\" class=\"btn btn-sm btn-default clockpicker-button clockpicker-am-button\">',\"AM</button>\",'<button type=\"button\" class=\"btn btn-sm btn-default clockpicker-button clockpicker-pm-button\">',\"PM</button>\",\"</div>\"].join(\"\");n(S)}n('<button type=\"button\" class=\"btn btn-sm btn-default clockpicker-button am-button\">AM</button>').on(\"click\",function(){x.amOrPm=\"AM\",n(\".clockpicker-span-am-pm\").empty().append(\"AM\")}).appendTo(this.amPmBlock),n('<button type=\"button\" class=\"btn btn-sm btn-default clockpicker-button pm-button\">PM</button>').on(\"click\",function(){x.amOrPm=\"PM\",n(\".clockpicker-span-am-pm\").empty().append(\"PM\")}).appendTo(this.amPmBlock)}r.autoclose||n('<button type=\"button\" class=\"btn btn-sm btn-default btn-block clockpicker-button\">'+r.donetext+\"</button>\").click(n.proxy(this.done,this)).appendTo(h),\"top\"!==r.placement&&\"bottom\"!==r.placement||\"top\"!==r.align&&\"bottom\"!==r.align||(r.align=\"left\"),\"left\"!==r.placement&&\"right\"!==r.placement||\"left\"!==r.align&&\"right\"!==r.align||(r.align=\"top\"),h.addClass(r.placement),h.addClass(\"clockpicker-align-\"+r.align),this.spanHours.click(n.proxy(this.toggleView,this,\"hours\")),this.spanMinutes.click(n.proxy(this.toggleView,this,\"minutes\")),H.on(\"focus.clockpicker click.clockpicker\",n.proxy(this.show,this)),P.on(\"click.clockpicker\",n.proxy(this.toggle,this));var E,D,I,B,z=n('<div class=\"clockpicker-tick\"></div>');if(r.twelvehour)for(E=1;13>E;E+=1)D=z.clone(),I=E/6*Math.PI,B=g,D.css(\"font-size\",\"120%\"),D.css({left:b+Math.sin(I)*B-y,top:b-Math.cos(I)*B-y}),D.html(0===E?\"00\":E),v.append(D),D.on(k,p);else for(E=0;24>E;E+=1){D=z.clone(),I=E/6*Math.PI;var O=E>0&&13>E;B=O?w:g,D.css({left:b+Math.sin(I)*B-y,top:b-Math.cos(I)*B-y}),O&&D.css(\"font-size\",\"120%\"),D.html(0===E?\"00\":E),v.append(D),D.on(k,p)}for(E=0;60>E;E+=5)D=z.clone(),I=E/30*Math.PI,D.css({left:b+Math.sin(I)*g-y,top:b-Math.cos(I)*g-y}),D.css(\"font-size\",\"120%\"),D.html(i(E)),m.append(D),D.on(k,p);if(u.on(k,function(t){0===n(t.target).closest(\".clockpicker-tick\").length&&p(t,!0)}),l){var j=h.find(\".clockpicker-canvas\"),L=t(\"svg\");L.setAttribute(\"class\",\"clockpicker-svg\"),L.setAttribute(\"width\",M),L.setAttribute(\"height\",M);var U=t(\"g\");U.setAttribute(\"transform\",\"translate(\"+b+\",\"+b+\")\");var W=t(\"circle\");W.setAttribute(\"class\",\"clockpicker-canvas-bearing\"),W.setAttribute(\"cx\",0),W.setAttribute(\"cy\",0),W.setAttribute(\"r\",2);var N=t(\"line\");N.setAttribute(\"x1\",0),N.setAttribute(\"y1\",0);var X=t(\"circle\");X.setAttribute(\"class\",\"clockpicker-canvas-bg\"),X.setAttribute(\"r\",y);var Y=t(\"circle\");Y.setAttribute(\"class\",\"clockpicker-canvas-fg\"),Y.setAttribute(\"r\",3.5),U.appendChild(N),U.appendChild(X),U.appendChild(Y),U.appendChild(W),L.appendChild(U),j.append(L),this.hand=N,this.bg=X,this.fg=Y,this.bearing=W,this.g=U,this.canvas=j}o(this.options.init)}function o(t){t&&\"function\"==typeof t&&t()}var c,n=window.jQuery,r=n(window),a=n(document),p=\"http://www.w3.org/2000/svg\",l=\"SVGAngle\"in window&&function(){var t,i=document.createElement(\"div\");return i.innerHTML=\"<svg/>\",t=(i.firstChild&&i.firstChild.namespaceURI)==p,i.innerHTML=\"\",t}(),h=function(){var t=document.createElement(\"div\").style;return\"transition\"in t||\"WebkitTransition\"in t||\"MozTransition\"in t||\"msTransition\"in t||\"OTransition\"in t}(),u=\"ontouchstart\"in window,k=\"mousedown\"+(u?\" touchstart\":\"\"),d=\"mousemove.clockpicker\"+(u?\" touchmove.clockpicker\":\"\"),f=\"mouseup.clockpicker\"+(u?\" touchend.clockpicker\":\"\"),v=navigator.vibrate?\"vibrate\":navigator.webkitVibrate?\"webkitVibrate\":null,m=0,b=100,g=80,w=54,y=13,M=2*b,A=h?350:1,V=['<div class=\"popover clockpicker-popover\">','<div class=\"arrow\"></div>','<div class=\"popover-title\">','<span class=\"clockpicker-span-hours text-primary\"></span>',\" : \",'<span class=\"clockpicker-span-minutes\"></span>','<span class=\"clockpicker-span-am-pm\"></span>',\"</div>\",'<div class=\"popover-content\">','<div class=\"clockpicker-plate\">','<div class=\"clockpicker-canvas\"></div>','<div class=\"clockpicker-dial clockpicker-hours\"></div>','<div class=\"clockpicker-dial clockpicker-minutes clockpicker-dial-out\"></div>',\"</div>\",'<span class=\"clockpicker-am-pm-block\">',\"</span>\",\"</div>\",\"</div>\"].join(\"\");s.DEFAULTS={\"default\":\"\",fromnow:0,placement:\"bottom\",align:\"left\",donetext:\"完成\",autoclose:!1,twelvehour:!1,vibrate:!0},s.prototype.toggle=function(){this[this.isShown?\"hide\":\"show\"]()},s.prototype.locate=function(){var t=this.element,i=this.popover,e=t.offset(),s=t.outerWidth(),o=t.outerHeight(),c=this.options.placement,n=this.options.align,r={};switch(i.show(),c){case\"bottom\":r.top=e.top+o;break;case\"right\":r.left=e.left+s;break;case\"top\":r.top=e.top-i.outerHeight();break;case\"left\":r.left=e.left-i.outerWidth()}switch(n){case\"left\":r.left=e.left;break;case\"right\":r.left=e.left+s-i.outerWidth();break;case\"top\":r.top=e.top;break;case\"bottom\":r.top=e.top+o-i.outerHeight()}i.css(r)},s.prototype.show=function(){if(!this.isShown){o(this.options.beforeShow);var t=this;this.isAppended||(c=n(document.body).append(this.popover),r.on(\"resize.clockpicker\"+this.id,function(){t.isShown&&t.locate()}),this.isAppended=!0);var e=((this.input.prop(\"value\")||this.options[\"default\"]||\"\")+\"\").split(\":\");if(\"now\"===e[0]){var s=new Date(+new Date+this.options.fromnow);e=[s.getHours(),s.getMinutes()]}this.hours=+e[0]||0,this.minutes=+e[1]||0,this.spanHours.html(i(this.hours)),this.spanMinutes.html(i(this.minutes)),this.toggleView(\"hours\"),this.locate(),this.isShown=!0,a.on(\"click.clockpicker.\"+this.id+\" focusin.clockpicker.\"+this.id,function(i){var e=n(i.target);0===e.closest(t.popover).length&&0===e.closest(t.addon).length&&0===e.closest(t.input).length&&t.hide()}),a.on(\"keyup.clockpicker.\"+this.id,function(i){27===i.keyCode&&t.hide()}),o(this.options.afterShow)}},s.prototype.hide=function(){o(this.options.beforeHide),this.isShown=!1,a.off(\"click.clockpicker.\"+this.id+\" focusin.clockpicker.\"+this.id),a.off(\"keyup.clockpicker.\"+this.id),this.popover.hide(),o(this.options.afterHide)},s.prototype.toggleView=function(t,i){var e=!1;\"minutes\"===t&&\"visible\"===n(this.hoursView).css(\"visibility\")&&(o(this.options.beforeHourSelect),e=!0);var s=\"hours\"===t,c=s?this.hoursView:this.minutesView,r=s?this.minutesView:this.hoursView;this.currentView=t,this.spanHours.toggleClass(\"text-primary\",s),this.spanMinutes.toggleClass(\"text-primary\",!s),r.addClass(\"clockpicker-dial-out\"),c.css(\"visibility\",\"visible\").removeClass(\"clockpicker-dial-out\"),this.resetClock(i),clearTimeout(this.toggleViewTimer),this.toggleViewTimer=setTimeout(function(){r.css(\"visibility\",\"hidden\")},A),e&&o(this.options.afterHourSelect)},s.prototype.resetClock=function(t){var i=this.currentView,e=this[i],s=\"hours\"===i,o=Math.PI/(s?6:30),c=e*o,n=s&&e>0&&13>e?w:g,r=Math.sin(c)*n,a=-Math.cos(c)*n,p=this;l&&t?(p.canvas.addClass(\"clockpicker-canvas-out\"),setTimeout(function(){p.canvas.removeClass(\"clockpicker-canvas-out\"),p.setHand(r,a)},t)):this.setHand(r,a)},s.prototype.setHand=function(t,e,s,o){var c,r=Math.atan2(t,-e),a=\"hours\"===this.currentView,p=Math.PI/(a||s?6:30),h=Math.sqrt(t*t+e*e),u=this.options,k=a&&(g+w)/2>h,d=k?w:g;if(u.twelvehour&&(d=g),0>r&&(r=2*Math.PI+r),c=Math.round(r/p),r=c*p,u.twelvehour?a?0===c&&(c=12):(s&&(c*=5),60===c&&(c=0)):a?(12===c&&(c=0),c=k?0===c?12:c:0===c?0:c+12):(s&&(c*=5),60===c&&(c=0)),this[this.currentView]!==c&&v&&this.options.vibrate&&(this.vibrateTimer||(navigator[v](10),this.vibrateTimer=setTimeout(n.proxy(function(){this.vibrateTimer=null},this),100))),this[this.currentView]=c,this[a?\"spanHours\":\"spanMinutes\"].html(i(c)),!l)return void this[a?\"hoursView\":\"minutesView\"].find(\".clockpicker-tick\").each(function(){var t=n(this);t.toggleClass(\"active\",c===+t.html())});o||!a&&c%5?(this.g.insertBefore(this.hand,this.bearing),this.g.insertBefore(this.bg,this.fg),this.bg.setAttribute(\"class\",\"clockpicker-canvas-bg clockpicker-canvas-bg-trans\")):(this.g.insertBefore(this.hand,this.bg),this.g.insertBefore(this.fg,this.bg),this.bg.setAttribute(\"class\",\"clockpicker-canvas-bg\"));var f=Math.sin(r)*d,m=-Math.cos(r)*d;this.hand.setAttribute(\"x2\",f),this.hand.setAttribute(\"y2\",m),this.bg.setAttribute(\"cx\",f),this.bg.setAttribute(\"cy\",m),this.fg.setAttribute(\"cx\",f),this.fg.setAttribute(\"cy\",m)},s.prototype.done=function(){o(this.options.beforeDone),this.hide();var t=this.input.prop(\"value\"),e=i(this.hours)+\":\"+i(this.minutes);this.options.twelvehour&&(e+=this.amOrPm),this.input.prop(\"value\",e),e!==t&&(this.input.triggerHandler(\"change\"),this.isInput||this.element.trigger(\"change\")),this.options.autoclose&&this.input.trigger(\"blur\"),o(this.options.afterDone)},s.prototype.remove=function(){this.element.removeData(\"clockpicker\"),this.input.off(\"focus.clockpicker click.clockpicker\"),this.addon.off(\"click.clockpicker\"),this.isShown&&this.hide(),this.isAppended&&(r.off(\"resize.clockpicker\"+this.id),this.popover.remove())},n.fn.clockpicker=function(t){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=n(this),o=e.data(\"clockpicker\");if(o)\"function\"==typeof o[t]&&o[t].apply(o,i);else{var c=n.extend({},s.DEFAULTS,e.data(),\"object\"==typeof t&&t);e.data(\"clockpicker\",new s(e,c))}})}}();","/*!\n* jquery.inputmask.bundle.js\n* https://github.com/RobinHerbots/jquery.inputmask\n* Copyright (c) 2010 - 2016 Robin Herbots\n* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)\n* Version: 3.3.4\n*/\n!function($) {\n function Inputmask(alias, options) {\n return this instanceof Inputmask ? ($.isPlainObject(alias) ? options = alias : (options = options || {}, \n options.alias = alias), this.el = void 0, this.opts = $.extend(!0, {}, this.defaults, options), \n this.maskset = void 0, this.noMasksCache = options && void 0 !== options.definitions, \n this.userOptions = options || {}, this.events = {}, this.dataAttribute = \"data-inputmask\", \n this.isRTL = this.opts.numericInput, void resolveAlias(this.opts.alias, options, this.opts)) : new Inputmask(alias, options);\n }\n function resolveAlias(aliasStr, options, opts) {\n var aliasDefinition = opts.aliases[aliasStr];\n return aliasDefinition ? (aliasDefinition.alias && resolveAlias(aliasDefinition.alias, void 0, opts), \n $.extend(!0, opts, aliasDefinition), $.extend(!0, opts, options), !0) : (null === opts.mask && (opts.mask = aliasStr), \n !1);\n }\n function generateMaskSet(opts, nocache) {\n function generateMask(mask, metadata, opts) {\n if (null !== mask && \"\" !== mask) {\n if (1 === mask.length && opts.greedy === !1 && 0 !== opts.repeat && (opts.placeholder = \"\"), \n opts.repeat > 0 || \"*\" === opts.repeat || \"+\" === opts.repeat) {\n var repeatStart = \"*\" === opts.repeat ? 0 : \"+\" === opts.repeat ? 1 : opts.repeat;\n mask = opts.groupmarker.start + mask + opts.groupmarker.end + opts.quantifiermarker.start + repeatStart + \",\" + opts.repeat + opts.quantifiermarker.end;\n }\n var masksetDefinition;\n return void 0 === Inputmask.prototype.masksCache[mask] || nocache === !0 ? (masksetDefinition = {\n mask: mask,\n maskToken: Inputmask.prototype.analyseMask(mask, opts),\n validPositions: {},\n _buffer: void 0,\n buffer: void 0,\n tests: {},\n metadata: metadata,\n maskLength: void 0\n }, nocache !== !0 && (Inputmask.prototype.masksCache[opts.numericInput ? mask.split(\"\").reverse().join(\"\") : mask] = masksetDefinition, \n masksetDefinition = $.extend(!0, {}, Inputmask.prototype.masksCache[opts.numericInput ? mask.split(\"\").reverse().join(\"\") : mask]))) : masksetDefinition = $.extend(!0, {}, Inputmask.prototype.masksCache[opts.numericInput ? mask.split(\"\").reverse().join(\"\") : mask]), \n masksetDefinition;\n }\n }\n var ms;\n if ($.isFunction(opts.mask) && (opts.mask = opts.mask(opts)), $.isArray(opts.mask)) {\n if (opts.mask.length > 1) {\n opts.keepStatic = null === opts.keepStatic || opts.keepStatic;\n var altMask = opts.groupmarker.start;\n return $.each(opts.numericInput ? opts.mask.reverse() : opts.mask, function(ndx, msk) {\n altMask.length > 1 && (altMask += opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start), \n altMask += void 0 === msk.mask || $.isFunction(msk.mask) ? msk : msk.mask;\n }), altMask += opts.groupmarker.end, generateMask(altMask, opts.mask, opts);\n }\n opts.mask = opts.mask.pop();\n }\n return opts.mask && (ms = void 0 === opts.mask.mask || $.isFunction(opts.mask.mask) ? generateMask(opts.mask, opts.mask, opts) : generateMask(opts.mask.mask, opts.mask, opts)), \n ms;\n }\n function maskScope(actionObj, maskset, opts) {\n function getMaskTemplate(baseOnInput, minimalPos, includeMode) {\n minimalPos = minimalPos || 0;\n var ndxIntlzr, test, testPos, maskTemplate = [], pos = 0, lvp = getLastValidPosition();\n maxLength = void 0 !== el ? el.maxLength : void 0, maxLength === -1 && (maxLength = void 0);\n do baseOnInput === !0 && getMaskSet().validPositions[pos] ? (testPos = getMaskSet().validPositions[pos], \n test = testPos.match, ndxIntlzr = testPos.locator.slice(), maskTemplate.push(includeMode === !0 ? testPos.input : includeMode === !1 ? test.nativeDef : getPlaceholder(pos, test))) : (testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), \n test = testPos.match, ndxIntlzr = testPos.locator.slice(), (opts.jitMasking === !1 || pos < lvp || \"number\" == typeof opts.jitMasking && isFinite(opts.jitMasking) && opts.jitMasking > pos) && maskTemplate.push(includeMode === !1 ? test.nativeDef : getPlaceholder(pos, test))), \n pos++; while ((void 0 === maxLength || pos < maxLength) && (null !== test.fn || \"\" !== test.def) || minimalPos > pos);\n return \"\" === maskTemplate[maskTemplate.length - 1] && maskTemplate.pop(), getMaskSet().maskLength = pos + 1, \n maskTemplate;\n }\n function getMaskSet() {\n return maskset;\n }\n function resetMaskSet(soft) {\n var maskset = getMaskSet();\n maskset.buffer = void 0, soft !== !0 && (maskset._buffer = void 0, maskset.validPositions = {}, \n maskset.p = 0);\n }\n function getLastValidPosition(closestTo, strict, validPositions) {\n var before = -1, after = -1, valids = validPositions || getMaskSet().validPositions;\n void 0 === closestTo && (closestTo = -1);\n for (var posNdx in valids) {\n var psNdx = parseInt(posNdx);\n valids[psNdx] && (strict || null !== valids[psNdx].match.fn) && (psNdx <= closestTo && (before = psNdx), \n psNdx >= closestTo && (after = psNdx));\n }\n return before !== -1 && closestTo - before > 1 || after < closestTo ? before : after;\n }\n function stripValidPositions(start, end, nocheck, strict) {\n function IsEnclosedStatic(pos) {\n var posMatch = getMaskSet().validPositions[pos];\n if (void 0 !== posMatch && null === posMatch.match.fn) {\n var prevMatch = getMaskSet().validPositions[pos - 1], nextMatch = getMaskSet().validPositions[pos + 1];\n return void 0 !== prevMatch && void 0 !== nextMatch;\n }\n return !1;\n }\n var i, startPos = start, positionsClone = $.extend(!0, {}, getMaskSet().validPositions), needsValidation = !1;\n for (getMaskSet().p = start, i = end - 1; i >= startPos; i--) void 0 !== getMaskSet().validPositions[i] && (nocheck !== !0 && (!getMaskSet().validPositions[i].match.optionality && IsEnclosedStatic(i) || opts.canClearPosition(getMaskSet(), i, getLastValidPosition(), strict, opts) === !1) || delete getMaskSet().validPositions[i]);\n for (resetMaskSet(!0), i = startPos + 1; i <= getLastValidPosition(); ) {\n for (;void 0 !== getMaskSet().validPositions[startPos]; ) startPos++;\n if (i < startPos && (i = startPos + 1), void 0 === getMaskSet().validPositions[i] && isMask(i)) i++; else {\n var t = getTestTemplate(i);\n needsValidation === !1 && positionsClone[startPos] && positionsClone[startPos].match.def === t.match.def ? (getMaskSet().validPositions[startPos] = $.extend(!0, {}, positionsClone[startPos]), \n getMaskSet().validPositions[startPos].input = t.input, delete getMaskSet().validPositions[i], \n i++) : positionCanMatchDefinition(startPos, t.match.def) ? isValid(startPos, t.input || getPlaceholder(i), !0) !== !1 && (delete getMaskSet().validPositions[i], \n i++, needsValidation = !0) : isMask(i) || (i++, startPos--), startPos++;\n }\n }\n resetMaskSet(!0);\n }\n function determineTestTemplate(tests, guessNextBest) {\n for (var testPos, testPositions = tests, lvp = getLastValidPosition(), lvTest = getMaskSet().validPositions[lvp] || getTests(0)[0], lvTestAltArr = void 0 !== lvTest.alternation ? lvTest.locator[lvTest.alternation].toString().split(\",\") : [], ndx = 0; ndx < testPositions.length && (testPos = testPositions[ndx], \n !(testPos.match && (opts.greedy && testPos.match.optionalQuantifier !== !0 || (testPos.match.optionality === !1 || testPos.match.newBlockMarker === !1) && testPos.match.optionalQuantifier !== !0) && (void 0 === lvTest.alternation || lvTest.alternation !== testPos.alternation || void 0 !== testPos.locator[lvTest.alternation] && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(\",\"), lvTestAltArr))) || guessNextBest === !0 && (null !== testPos.match.fn || /[0-9a-bA-Z]/.test(testPos.match.def))); ndx++) ;\n return testPos;\n }\n function getTestTemplate(pos, ndxIntlzr, tstPs) {\n return getMaskSet().validPositions[pos] || determineTestTemplate(getTests(pos, ndxIntlzr ? ndxIntlzr.slice() : ndxIntlzr, tstPs));\n }\n function getTest(pos) {\n return getMaskSet().validPositions[pos] ? getMaskSet().validPositions[pos] : getTests(pos)[0];\n }\n function positionCanMatchDefinition(pos, def) {\n for (var valid = !1, tests = getTests(pos), tndx = 0; tndx < tests.length; tndx++) if (tests[tndx].match && tests[tndx].match.def === def) {\n valid = !0;\n break;\n }\n return valid;\n }\n function getTests(pos, ndxIntlzr, tstPs) {\n function resolveTestFromToken(maskToken, ndxInitializer, loopNdx, quantifierRecurse) {\n function handleMatch(match, loopNdx, quantifierRecurse) {\n function isFirstMatch(latestMatch, tokenGroup) {\n var firstMatch = 0 === $.inArray(latestMatch, tokenGroup.matches);\n return firstMatch || $.each(tokenGroup.matches, function(ndx, match) {\n if (match.isQuantifier === !0 && (firstMatch = isFirstMatch(latestMatch, tokenGroup.matches[ndx - 1]))) return !1;\n }), firstMatch;\n }\n function resolveNdxInitializer(pos, alternateNdx, targetAlternation) {\n var bestMatch, indexPos;\n return (getMaskSet().tests[pos] || getMaskSet().validPositions[pos]) && $.each(getMaskSet().tests[pos] || [ getMaskSet().validPositions[pos] ], function(ndx, lmnt) {\n var alternation = void 0 !== targetAlternation ? targetAlternation : lmnt.alternation, ndxPos = void 0 !== lmnt.locator[alternation] ? lmnt.locator[alternation].toString().indexOf(alternateNdx) : -1;\n (void 0 === indexPos || ndxPos < indexPos) && ndxPos !== -1 && (bestMatch = lmnt, \n indexPos = ndxPos);\n }), bestMatch ? bestMatch.locator.slice((void 0 !== targetAlternation ? targetAlternation : bestMatch.alternation) + 1) : void 0 !== targetAlternation ? resolveNdxInitializer(pos, alternateNdx) : void 0;\n }\n function staticCanMatchDefinition(source, target) {\n return null === source.match.fn && null !== target.match.fn && target.match.fn.test(source.match.def, getMaskSet(), pos, !1, opts, !1);\n }\n if (testPos > 1e4) throw \"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. \" + getMaskSet().mask;\n if (testPos === pos && void 0 === match.matches) return matches.push({\n match: match,\n locator: loopNdx.reverse(),\n cd: cacheDependency\n }), !0;\n if (void 0 !== match.matches) {\n if (match.isGroup && quantifierRecurse !== match) {\n if (match = handleMatch(maskToken.matches[$.inArray(match, maskToken.matches) + 1], loopNdx)) return !0;\n } else if (match.isOptional) {\n var optionalToken = match;\n if (match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) {\n if (latestMatch = matches[matches.length - 1].match, !isFirstMatch(latestMatch, optionalToken)) return !0;\n insertStop = !0, testPos = pos;\n }\n } else if (match.isAlternator) {\n var maltMatches, alternateToken = match, malternateMatches = [], currentMatches = matches.slice(), loopNdxCnt = loopNdx.length, altIndex = ndxInitializer.length > 0 ? ndxInitializer.shift() : -1;\n if (altIndex === -1 || \"string\" == typeof altIndex) {\n var amndx, currentPos = testPos, ndxInitializerClone = ndxInitializer.slice(), altIndexArr = [];\n if (\"string\" == typeof altIndex) altIndexArr = altIndex.split(\",\"); else for (amndx = 0; amndx < alternateToken.matches.length; amndx++) altIndexArr.push(amndx);\n for (var ndx = 0; ndx < altIndexArr.length; ndx++) {\n if (amndx = parseInt(altIndexArr[ndx]), matches = [], ndxInitializer = resolveNdxInitializer(testPos, amndx, loopNdxCnt) || ndxInitializerClone.slice(), \n match = handleMatch(alternateToken.matches[amndx] || maskToken.matches[amndx], [ amndx ].concat(loopNdx), quantifierRecurse) || match, \n match !== !0 && void 0 !== match && altIndexArr[altIndexArr.length - 1] < alternateToken.matches.length) {\n var ntndx = $.inArray(match, maskToken.matches) + 1;\n maskToken.matches.length > ntndx && (match = handleMatch(maskToken.matches[ntndx], [ ntndx ].concat(loopNdx.slice(1, loopNdx.length)), quantifierRecurse), \n match && (altIndexArr.push(ntndx.toString()), $.each(matches, function(ndx, lmnt) {\n lmnt.alternation = loopNdx.length - 1;\n })));\n }\n maltMatches = matches.slice(), testPos = currentPos, matches = [];\n for (var ndx1 = 0; ndx1 < maltMatches.length; ndx1++) {\n var altMatch = maltMatches[ndx1], hasMatch = !1;\n altMatch.alternation = altMatch.alternation || loopNdxCnt;\n for (var ndx2 = 0; ndx2 < malternateMatches.length; ndx2++) {\n var altMatch2 = malternateMatches[ndx2];\n if ((\"string\" != typeof altIndex || $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr) !== -1) && (altMatch.match.def === altMatch2.match.def || staticCanMatchDefinition(altMatch, altMatch2))) {\n hasMatch = altMatch.match.nativeDef === altMatch2.match.nativeDef, altMatch.alternation == altMatch2.alternation && altMatch2.locator[altMatch2.alternation].toString().indexOf(altMatch.locator[altMatch.alternation]) === -1 && (altMatch2.locator[altMatch2.alternation] = altMatch2.locator[altMatch2.alternation] + \",\" + altMatch.locator[altMatch.alternation], \n altMatch2.alternation = altMatch.alternation, null == altMatch.match.fn && (altMatch2.na = altMatch2.na || altMatch.locator[altMatch.alternation].toString(), \n altMatch2.na.indexOf(altMatch.locator[altMatch.alternation]) === -1 && (altMatch2.na = altMatch2.na + \",\" + altMatch.locator[altMatch.alternation])));\n break;\n }\n }\n hasMatch || malternateMatches.push(altMatch);\n }\n }\n \"string\" == typeof altIndex && (malternateMatches = $.map(malternateMatches, function(lmnt, ndx) {\n if (isFinite(ndx)) {\n var mamatch, alternation = lmnt.alternation, altLocArr = lmnt.locator[alternation].toString().split(\",\");\n lmnt.locator[alternation] = void 0, lmnt.alternation = void 0;\n for (var alndx = 0; alndx < altLocArr.length; alndx++) mamatch = $.inArray(altLocArr[alndx], altIndexArr) !== -1, \n mamatch && (void 0 !== lmnt.locator[alternation] ? (lmnt.locator[alternation] += \",\", \n lmnt.locator[alternation] += altLocArr[alndx]) : lmnt.locator[alternation] = parseInt(altLocArr[alndx]), \n lmnt.alternation = alternation);\n if (void 0 !== lmnt.locator[alternation]) return lmnt;\n }\n })), matches = currentMatches.concat(malternateMatches), testPos = pos, insertStop = matches.length > 0, \n ndxInitializer = ndxInitializerClone.slice();\n } else match = handleMatch(alternateToken.matches[altIndex] || maskToken.matches[altIndex], [ altIndex ].concat(loopNdx), quantifierRecurse);\n if (match) return !0;\n } else if (match.isQuantifier && quantifierRecurse !== maskToken.matches[$.inArray(match, maskToken.matches) - 1]) for (var qt = match, qndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; qndx < (isNaN(qt.quantifier.max) ? qndx + 1 : qt.quantifier.max) && testPos <= pos; qndx++) {\n var tokenGroup = maskToken.matches[$.inArray(qt, maskToken.matches) - 1];\n if (match = handleMatch(tokenGroup, [ qndx ].concat(loopNdx), tokenGroup)) {\n if (latestMatch = matches[matches.length - 1].match, latestMatch.optionalQuantifier = qndx > qt.quantifier.min - 1, \n isFirstMatch(latestMatch, tokenGroup)) {\n if (qndx > qt.quantifier.min - 1) {\n insertStop = !0, testPos = pos;\n break;\n }\n return !0;\n }\n return !0;\n }\n } else if (match = resolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) return !0;\n } else testPos++;\n }\n for (var tndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; tndx < maskToken.matches.length; tndx++) if (maskToken.matches[tndx].isQuantifier !== !0) {\n var match = handleMatch(maskToken.matches[tndx], [ tndx ].concat(loopNdx), quantifierRecurse);\n if (match && testPos === pos) return match;\n if (testPos > pos) break;\n }\n }\n function mergeLocators(tests) {\n var locator = [];\n return $.isArray(tests) || (tests = [ tests ]), tests.length > 0 && (void 0 === tests[0].alternation ? (locator = determineTestTemplate(tests.slice()).locator.slice(), \n 0 === locator.length && (locator = tests[0].locator.slice())) : $.each(tests, function(ndx, tst) {\n if (\"\" !== tst.def) if (0 === locator.length) locator = tst.locator.slice(); else for (var i = 0; i < locator.length; i++) tst.locator[i] && locator[i].toString().indexOf(tst.locator[i]) === -1 && (locator[i] += \",\" + tst.locator[i]);\n })), locator;\n }\n function filterTests(tests) {\n return opts.keepStatic && pos > 0 && tests.length > 1 + (\"\" === tests[tests.length - 1].match.def ? 1 : 0) && tests[0].match.optionality !== !0 && tests[0].match.optionalQuantifier !== !0 && null === tests[0].match.fn && !/[0-9a-bA-Z]/.test(tests[0].match.def) ? [ determineTestTemplate(tests) ] : tests;\n }\n var latestMatch, maskTokens = getMaskSet().maskToken, testPos = ndxIntlzr ? tstPs : 0, ndxInitializer = ndxIntlzr ? ndxIntlzr.slice() : [ 0 ], matches = [], insertStop = !1, cacheDependency = ndxIntlzr ? ndxIntlzr.join(\"\") : \"\";\n if (pos > -1) {\n if (void 0 === ndxIntlzr) {\n for (var test, previousPos = pos - 1; void 0 === (test = getMaskSet().validPositions[previousPos] || getMaskSet().tests[previousPos]) && previousPos > -1; ) previousPos--;\n void 0 !== test && previousPos > -1 && (ndxInitializer = mergeLocators(test), cacheDependency = ndxInitializer.join(\"\"), \n testPos = previousPos);\n }\n if (getMaskSet().tests[pos] && getMaskSet().tests[pos][0].cd === cacheDependency) return filterTests(getMaskSet().tests[pos]);\n for (var mtndx = ndxInitializer.shift(); mtndx < maskTokens.length; mtndx++) {\n var match = resolveTestFromToken(maskTokens[mtndx], ndxInitializer, [ mtndx ]);\n if (match && testPos === pos || testPos > pos) break;\n }\n }\n return (0 === matches.length || insertStop) && matches.push({\n match: {\n fn: null,\n cardinality: 0,\n optionality: !0,\n casing: null,\n def: \"\",\n placeholder: \"\"\n },\n locator: [],\n cd: cacheDependency\n }), void 0 !== ndxIntlzr && getMaskSet().tests[pos] ? filterTests($.extend(!0, [], matches)) : (getMaskSet().tests[pos] = $.extend(!0, [], matches), \n filterTests(getMaskSet().tests[pos]));\n }\n function getBufferTemplate() {\n return void 0 === getMaskSet()._buffer && (getMaskSet()._buffer = getMaskTemplate(!1, 1), \n void 0 === getMaskSet().buffer && getMaskSet()._buffer.slice()), getMaskSet()._buffer;\n }\n function getBuffer(noCache) {\n return void 0 !== getMaskSet().buffer && noCache !== !0 || (getMaskSet().buffer = getMaskTemplate(!0, getLastValidPosition(), !0)), \n getMaskSet().buffer;\n }\n function refreshFromBuffer(start, end, buffer) {\n var i;\n if (start === !0) resetMaskSet(), start = 0, end = buffer.length; else for (i = start; i < end; i++) delete getMaskSet().validPositions[i];\n for (i = start; i < end; i++) resetMaskSet(!0), buffer[i] !== opts.skipOptionalPartCharacter && isValid(i, buffer[i], !0, !0);\n }\n function casing(elem, test, pos) {\n switch (opts.casing || test.casing) {\n case \"upper\":\n elem = elem.toUpperCase();\n break;\n\n case \"lower\":\n elem = elem.toLowerCase();\n break;\n\n case \"title\":\n var posBefore = getMaskSet().validPositions[pos - 1];\n elem = 0 === pos || posBefore && posBefore.input === String.fromCharCode(Inputmask.keyCode.SPACE) ? elem.toUpperCase() : elem.toLowerCase();\n }\n return elem;\n }\n function checkAlternationMatch(altArr1, altArr2) {\n for (var altArrC = opts.greedy ? altArr2 : altArr2.slice(0, 1), isMatch = !1, alndx = 0; alndx < altArr1.length; alndx++) if ($.inArray(altArr1[alndx], altArrC) !== -1) {\n isMatch = !0;\n break;\n }\n return isMatch;\n }\n function isValid(pos, c, strict, fromSetValid, fromAlternate) {\n function isSelection(posObj) {\n var selection = isRTL ? posObj.begin - posObj.end > 1 || posObj.begin - posObj.end === 1 && opts.insertMode : posObj.end - posObj.begin > 1 || posObj.end - posObj.begin === 1 && opts.insertMode;\n return selection && 0 === posObj.begin && posObj.end === getMaskSet().maskLength ? \"full\" : selection;\n }\n function _isValid(position, c, strict) {\n var rslt = !1;\n return $.each(getTests(position), function(ndx, tst) {\n for (var test = tst.match, loopend = c ? 1 : 0, chrs = \"\", i = test.cardinality; i > loopend; i--) chrs += getBufferElement(position - (i - 1));\n if (c && (chrs += c), getBuffer(!0), rslt = null != test.fn ? test.fn.test(chrs, getMaskSet(), position, strict, opts, isSelection(pos)) : (c === test.def || c === opts.skipOptionalPartCharacter) && \"\" !== test.def && {\n c: test.placeholder || test.def,\n pos: position\n }, rslt !== !1) {\n var elem = void 0 !== rslt.c ? rslt.c : c;\n elem = elem === opts.skipOptionalPartCharacter && null === test.fn ? test.placeholder || test.def : elem;\n var validatedPos = position, possibleModifiedBuffer = getBuffer();\n if (void 0 !== rslt.remove && ($.isArray(rslt.remove) || (rslt.remove = [ rslt.remove ]), \n $.each(rslt.remove.sort(function(a, b) {\n return b - a;\n }), function(ndx, lmnt) {\n stripValidPositions(lmnt, lmnt + 1, !0);\n })), void 0 !== rslt.insert && ($.isArray(rslt.insert) || (rslt.insert = [ rslt.insert ]), \n $.each(rslt.insert.sort(function(a, b) {\n return a - b;\n }), function(ndx, lmnt) {\n isValid(lmnt.pos, lmnt.c, !0, fromSetValid);\n })), rslt.refreshFromBuffer) {\n var refresh = rslt.refreshFromBuffer;\n if (strict = !0, refreshFromBuffer(refresh === !0 ? refresh : refresh.start, refresh.end, possibleModifiedBuffer), \n void 0 === rslt.pos && void 0 === rslt.c) return rslt.pos = getLastValidPosition(), \n !1;\n if (validatedPos = void 0 !== rslt.pos ? rslt.pos : position, validatedPos !== position) return rslt = $.extend(rslt, isValid(validatedPos, elem, !0, fromSetValid)), \n !1;\n } else if (rslt !== !0 && void 0 !== rslt.pos && rslt.pos !== position && (validatedPos = rslt.pos, \n refreshFromBuffer(position, validatedPos, getBuffer().slice()), validatedPos !== position)) return rslt = $.extend(rslt, isValid(validatedPos, elem, !0)), \n !1;\n return (rslt === !0 || void 0 !== rslt.pos || void 0 !== rslt.c) && (ndx > 0 && resetMaskSet(!0), \n setValidPosition(validatedPos, $.extend({}, tst, {\n input: casing(elem, test, validatedPos)\n }), fromSetValid, isSelection(pos)) || (rslt = !1), !1);\n }\n }), rslt;\n }\n function alternate(pos, c, strict) {\n var lastAlt, alternation, altPos, prevAltPos, i, validPos, altNdxs, decisionPos, validPsClone = $.extend(!0, {}, getMaskSet().validPositions), isValidRslt = !1, lAltPos = getLastValidPosition();\n for (prevAltPos = getMaskSet().validPositions[lAltPos]; lAltPos >= 0; lAltPos--) if (altPos = getMaskSet().validPositions[lAltPos], \n altPos && void 0 !== altPos.alternation) {\n if (lastAlt = lAltPos, alternation = getMaskSet().validPositions[lastAlt].alternation, \n prevAltPos.locator[altPos.alternation] !== altPos.locator[altPos.alternation]) break;\n prevAltPos = altPos;\n }\n if (void 0 !== alternation) {\n decisionPos = parseInt(lastAlt);\n var decisionTaker = void 0 !== prevAltPos.locator[prevAltPos.alternation || alternation] ? prevAltPos.locator[prevAltPos.alternation || alternation] : altNdxs[0];\n decisionTaker.length > 0 && (decisionTaker = decisionTaker.split(\",\")[0]);\n var possibilityPos = getMaskSet().validPositions[decisionPos], prevPos = getMaskSet().validPositions[decisionPos - 1];\n $.each(getTests(decisionPos, prevPos ? prevPos.locator : void 0, decisionPos - 1), function(ndx, test) {\n altNdxs = test.locator[alternation] ? test.locator[alternation].toString().split(\",\") : [];\n for (var mndx = 0; mndx < altNdxs.length; mndx++) {\n var validInputs = [], staticInputsBeforePos = 0, staticInputsBeforePosAlternate = 0, verifyValidInput = !1;\n if (decisionTaker < altNdxs[mndx] && (void 0 === test.na || $.inArray(altNdxs[mndx], test.na.split(\",\")) === -1)) {\n getMaskSet().validPositions[decisionPos] = $.extend(!0, {}, test);\n var possibilities = getMaskSet().validPositions[decisionPos].locator;\n for (getMaskSet().validPositions[decisionPos].locator[alternation] = parseInt(altNdxs[mndx]), \n null == test.match.fn ? (possibilityPos.input !== test.match.def && (verifyValidInput = !0, \n possibilityPos.generatedInput !== !0 && validInputs.push(possibilityPos.input)), \n staticInputsBeforePosAlternate++, getMaskSet().validPositions[decisionPos].generatedInput = !/[0-9a-bA-Z]/.test(test.match.def), \n getMaskSet().validPositions[decisionPos].input = test.match.def) : getMaskSet().validPositions[decisionPos].input = possibilityPos.input, \n i = decisionPos + 1; i < getLastValidPosition(void 0, !0) + 1; i++) validPos = getMaskSet().validPositions[i], \n validPos && validPos.generatedInput !== !0 && /[0-9a-bA-Z]/.test(validPos.input) ? validInputs.push(validPos.input) : i < pos && staticInputsBeforePos++, \n delete getMaskSet().validPositions[i];\n for (verifyValidInput && validInputs[0] === test.match.def && validInputs.shift(), \n resetMaskSet(!0), isValidRslt = !0; validInputs.length > 0; ) {\n var input = validInputs.shift();\n if (input !== opts.skipOptionalPartCharacter && !(isValidRslt = isValid(getLastValidPosition(void 0, !0) + 1, input, !1, fromSetValid, !0))) break;\n }\n if (isValidRslt) {\n getMaskSet().validPositions[decisionPos].locator = possibilities;\n var targetLvp = getLastValidPosition(pos) + 1;\n for (i = decisionPos + 1; i < getLastValidPosition() + 1; i++) validPos = getMaskSet().validPositions[i], \n (void 0 === validPos || null == validPos.match.fn) && i < pos + (staticInputsBeforePosAlternate - staticInputsBeforePos) && staticInputsBeforePosAlternate++;\n pos += staticInputsBeforePosAlternate - staticInputsBeforePos, isValidRslt = isValid(pos > targetLvp ? targetLvp : pos, c, strict, fromSetValid, !0);\n }\n if (isValidRslt) return !1;\n resetMaskSet(), getMaskSet().validPositions = $.extend(!0, {}, validPsClone);\n }\n }\n });\n }\n return isValidRslt;\n }\n function trackbackAlternations(originalPos, newPos) {\n var vp = getMaskSet().validPositions[newPos];\n if (vp) for (var targetLocator = vp.locator, tll = targetLocator.length, ps = originalPos; ps < newPos; ps++) if (void 0 === getMaskSet().validPositions[ps] && !isMask(ps, !0)) {\n var tests = getTests(ps), bestMatch = tests[0], equality = -1;\n $.each(tests, function(ndx, tst) {\n for (var i = 0; i < tll && (void 0 !== tst.locator[i] && checkAlternationMatch(tst.locator[i].toString().split(\",\"), targetLocator[i].toString().split(\",\"))); i++) equality < i && (equality = i, \n bestMatch = tst);\n }), setValidPosition(ps, $.extend({}, bestMatch, {\n input: bestMatch.match.placeholder || bestMatch.match.def\n }), !0);\n }\n }\n function setValidPosition(pos, validTest, fromSetValid, isSelection) {\n if (isSelection || opts.insertMode && void 0 !== getMaskSet().validPositions[pos] && void 0 === fromSetValid) {\n var i, positionsClone = $.extend(!0, {}, getMaskSet().validPositions), lvp = getLastValidPosition(void 0, !0);\n for (i = pos; i <= lvp; i++) delete getMaskSet().validPositions[i];\n getMaskSet().validPositions[pos] = $.extend(!0, {}, validTest);\n var j, valid = !0, vps = getMaskSet().validPositions, needsValidation = !1, initialLength = getMaskSet().maskLength;\n for (i = j = pos; i <= lvp; i++) {\n var t = positionsClone[i];\n if (void 0 !== t) for (var posMatch = j; posMatch < getMaskSet().maskLength && (null === t.match.fn && vps[i] && (vps[i].match.optionalQuantifier === !0 || vps[i].match.optionality === !0) || null != t.match.fn); ) {\n if (posMatch++, needsValidation === !1 && positionsClone[posMatch] && positionsClone[posMatch].match.def === t.match.def) getMaskSet().validPositions[posMatch] = $.extend(!0, {}, positionsClone[posMatch]), \n getMaskSet().validPositions[posMatch].input = t.input, fillMissingNonMask(posMatch), \n j = posMatch, valid = !0; else if (positionCanMatchDefinition(posMatch, t.match.def)) {\n var result = isValid(posMatch, t.input, !0, !0);\n valid = result !== !1, j = result.caret || result.insert ? getLastValidPosition() : posMatch, \n needsValidation = !0;\n } else valid = t.generatedInput === !0;\n if (getMaskSet().maskLength < initialLength && (getMaskSet().maskLength = initialLength), \n valid) break;\n }\n if (!valid) break;\n }\n if (!valid) return getMaskSet().validPositions = $.extend(!0, {}, positionsClone), \n resetMaskSet(!0), !1;\n } else getMaskSet().validPositions[pos] = $.extend(!0, {}, validTest);\n return resetMaskSet(!0), !0;\n }\n function fillMissingNonMask(maskPos) {\n for (var pndx = maskPos - 1; pndx > -1 && !getMaskSet().validPositions[pndx]; pndx--) ;\n var testTemplate, testsFromPos;\n for (pndx++; pndx < maskPos; pndx++) void 0 === getMaskSet().validPositions[pndx] && (opts.jitMasking === !1 || opts.jitMasking > pndx) && (testsFromPos = getTests(pndx, getTestTemplate(pndx - 1).locator, pndx - 1).slice(), \n \"\" === testsFromPos[testsFromPos.length - 1].match.def && testsFromPos.pop(), testTemplate = determineTestTemplate(testsFromPos), \n testTemplate && (testTemplate.match.def === opts.radixPointDefinitionSymbol || !isMask(pndx, !0) || $.inArray(opts.radixPoint, getBuffer()) < pndx && testTemplate.match.fn && testTemplate.match.fn.test(getPlaceholder(pndx), getMaskSet(), pndx, !1, opts)) && (result = _isValid(pndx, testTemplate.match.placeholder || (null == testTemplate.match.fn ? testTemplate.match.def : \"\" !== getPlaceholder(pndx) ? getPlaceholder(pndx) : getBuffer()[pndx]), !0), \n result !== !1 && (getMaskSet().validPositions[result.pos || pndx].generatedInput = !0)));\n }\n strict = strict === !0;\n var maskPos = pos;\n void 0 !== pos.begin && (maskPos = isRTL && !isSelection(pos) ? pos.end : pos.begin);\n var result = !1, positionsClone = $.extend(!0, {}, getMaskSet().validPositions);\n if (fillMissingNonMask(maskPos), isSelection(pos) && (handleRemove(void 0, Inputmask.keyCode.DELETE, pos), \n maskPos = getMaskSet().p), maskPos < getMaskSet().maskLength && (result = _isValid(maskPos, c, strict), \n (!strict || fromSetValid === !0) && result === !1)) {\n var currentPosValid = getMaskSet().validPositions[maskPos];\n if (!currentPosValid || null !== currentPosValid.match.fn || currentPosValid.match.def !== c && c !== opts.skipOptionalPartCharacter) {\n if ((opts.insertMode || void 0 === getMaskSet().validPositions[seekNext(maskPos)]) && !isMask(maskPos, !0)) {\n var testsFromPos = getTests(maskPos).slice();\n \"\" === testsFromPos[testsFromPos.length - 1].match.def && testsFromPos.pop();\n var staticChar = determineTestTemplate(testsFromPos, !0);\n staticChar && null === staticChar.match.fn && (staticChar = staticChar.match.placeholder || staticChar.match.def, \n _isValid(maskPos, staticChar, strict), getMaskSet().validPositions[maskPos].generatedInput = !0);\n for (var nPos = maskPos + 1, snPos = seekNext(maskPos); nPos <= snPos; nPos++) if (result = _isValid(nPos, c, strict), \n result !== !1) {\n trackbackAlternations(maskPos, void 0 !== result.pos ? result.pos : nPos), maskPos = nPos;\n break;\n }\n }\n } else result = {\n caret: seekNext(maskPos)\n };\n }\n return result === !1 && opts.keepStatic && !strict && fromAlternate !== !0 && (result = alternate(maskPos, c, strict)), \n result === !0 && (result = {\n pos: maskPos\n }), $.isFunction(opts.postValidation) && result !== !1 && !strict && fromSetValid !== !0 && (result = !!opts.postValidation(getBuffer(!0), result, opts) && result), \n void 0 === result.pos && (result.pos = maskPos), result === !1 && (resetMaskSet(!0), \n getMaskSet().validPositions = $.extend(!0, {}, positionsClone)), result;\n }\n function isMask(pos, strict) {\n var test;\n if (strict ? (test = getTestTemplate(pos).match, \"\" === test.def && (test = getTest(pos).match)) : test = getTest(pos).match, \n null != test.fn) return test.fn;\n if (strict !== !0 && pos > -1) {\n var tests = getTests(pos);\n return tests.length > 1 + (\"\" === tests[tests.length - 1].match.def ? 1 : 0);\n }\n return !1;\n }\n function seekNext(pos, newBlock) {\n var maskL = getMaskSet().maskLength;\n if (pos >= maskL) return maskL;\n for (var position = pos; ++position < maskL && (newBlock === !0 && (getTest(position).match.newBlockMarker !== !0 || !isMask(position)) || newBlock !== !0 && !isMask(position)); ) ;\n return position;\n }\n function seekPrevious(pos, newBlock) {\n var tests, position = pos;\n if (position <= 0) return 0;\n for (;--position > 0 && (newBlock === !0 && getTest(position).match.newBlockMarker !== !0 || newBlock !== !0 && !isMask(position) && (tests = getTests(position), \n tests.length < 2 || 2 === tests.length && \"\" === tests[1].match.def)); ) ;\n return position;\n }\n function getBufferElement(position) {\n return void 0 === getMaskSet().validPositions[position] ? getPlaceholder(position) : getMaskSet().validPositions[position].input;\n }\n function writeBuffer(input, buffer, caretPos, event, triggerInputEvent) {\n if (event && $.isFunction(opts.onBeforeWrite)) {\n var result = opts.onBeforeWrite(event, buffer, caretPos, opts);\n if (result) {\n if (result.refreshFromBuffer) {\n var refresh = result.refreshFromBuffer;\n refreshFromBuffer(refresh === !0 ? refresh : refresh.start, refresh.end, result.buffer || buffer), \n buffer = getBuffer(!0);\n }\n void 0 !== caretPos && (caretPos = void 0 !== result.caret ? result.caret : caretPos);\n }\n }\n input.inputmask._valueSet(buffer.join(\"\")), void 0 === caretPos || void 0 !== event && \"blur\" === event.type ? renderColorMask(input, buffer, caretPos) : caret(input, caretPos), \n triggerInputEvent === !0 && (skipInputEvent = !0, $(input).trigger(\"input\"));\n }\n function getPlaceholder(pos, test) {\n if (test = test || getTest(pos).match, void 0 !== test.placeholder) return test.placeholder;\n if (null === test.fn) {\n if (pos > -1 && void 0 === getMaskSet().validPositions[pos]) {\n var prevTest, tests = getTests(pos), staticAlternations = [];\n if (tests.length > 1 + (\"\" === tests[tests.length - 1].match.def ? 1 : 0)) for (var i = 0; i < tests.length; i++) if (tests[i].match.optionality !== !0 && tests[i].match.optionalQuantifier !== !0 && (null === tests[i].match.fn || void 0 === prevTest || tests[i].match.fn.test(prevTest.match.def, getMaskSet(), pos, !0, opts) !== !1) && (staticAlternations.push(tests[i]), \n null === tests[i].match.fn && (prevTest = tests[i]), staticAlternations.length > 1 && /[0-9a-bA-Z]/.test(staticAlternations[0].match.def))) return opts.placeholder.charAt(pos % opts.placeholder.length);\n }\n return test.def;\n }\n return opts.placeholder.charAt(pos % opts.placeholder.length);\n }\n function checkVal(input, writeOut, strict, nptvl, initiatingEvent, stickyCaret) {\n function isTemplateMatch() {\n var isMatch = !1, charCodeNdx = getBufferTemplate().slice(initialNdx, seekNext(initialNdx)).join(\"\").indexOf(charCodes);\n if (charCodeNdx !== -1 && !isMask(initialNdx)) {\n isMatch = !0;\n for (var bufferTemplateArr = getBufferTemplate().slice(initialNdx, initialNdx + charCodeNdx), i = 0; i < bufferTemplateArr.length; i++) if (\" \" !== bufferTemplateArr[i]) {\n isMatch = !1;\n break;\n }\n }\n return isMatch;\n }\n var inputValue = nptvl.slice(), charCodes = \"\", initialNdx = 0, result = void 0;\n if (resetMaskSet(), getMaskSet().p = seekNext(-1), !strict) if (opts.autoUnmask !== !0) {\n var staticInput = getBufferTemplate().slice(0, seekNext(-1)).join(\"\"), matches = inputValue.join(\"\").match(new RegExp(\"^\" + Inputmask.escapeRegex(staticInput), \"g\"));\n matches && matches.length > 0 && (inputValue.splice(0, matches.length * staticInput.length), \n initialNdx = seekNext(initialNdx));\n } else initialNdx = seekNext(initialNdx);\n if ($.each(inputValue, function(ndx, charCode) {\n if (void 0 !== charCode) {\n var keypress = new $.Event(\"keypress\");\n keypress.which = charCode.charCodeAt(0), charCodes += charCode;\n var lvp = getLastValidPosition(void 0, !0), lvTest = getMaskSet().validPositions[lvp], nextTest = getTestTemplate(lvp + 1, lvTest ? lvTest.locator.slice() : void 0, lvp);\n if (!isTemplateMatch() || strict || opts.autoUnmask) {\n var pos = strict ? ndx : null == nextTest.match.fn && nextTest.match.optionality && lvp + 1 < getMaskSet().p ? lvp + 1 : getMaskSet().p;\n result = EventHandlers.keypressEvent.call(input, keypress, !0, !1, strict, pos), \n initialNdx = pos + 1, charCodes = \"\";\n } else result = EventHandlers.keypressEvent.call(input, keypress, !0, !1, !0, lvp + 1);\n if (!strict && $.isFunction(opts.onBeforeWrite) && (result = opts.onBeforeWrite(keypress, getBuffer(), result.forwardPosition, opts), \n result && result.refreshFromBuffer)) {\n var refresh = result.refreshFromBuffer;\n refreshFromBuffer(refresh === !0 ? refresh : refresh.start, refresh.end, result.buffer), \n resetMaskSet(!0), result.caret && (getMaskSet().p = result.caret);\n }\n }\n }), writeOut) {\n var caretPos = void 0, lvp = getLastValidPosition();\n document.activeElement === input && (initiatingEvent || result) && (caretPos = caret(input).begin, \n initiatingEvent && result === !1 && (caretPos = seekNext(getLastValidPosition(caretPos))), \n result && stickyCaret !== !0 && (caretPos < lvp + 1 || lvp === -1) && (caretPos = opts.numericInput && void 0 === result.caret ? seekPrevious(result.forwardPosition) : result.forwardPosition)), \n writeBuffer(input, getBuffer(), caretPos, initiatingEvent || new $.Event(\"checkval\"));\n }\n }\n function unmaskedvalue(input) {\n if (input && void 0 === input.inputmask) return input.value;\n var umValue = [], vps = getMaskSet().validPositions;\n for (var pndx in vps) vps[pndx].match && null != vps[pndx].match.fn && umValue.push(vps[pndx].input);\n var unmaskedValue = 0 === umValue.length ? \"\" : (isRTL ? umValue.reverse() : umValue).join(\"\");\n if ($.isFunction(opts.onUnMask)) {\n var bufferValue = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join(\"\");\n unmaskedValue = opts.onUnMask(bufferValue, unmaskedValue, opts) || unmaskedValue;\n }\n return unmaskedValue;\n }\n function caret(input, begin, end, notranslate) {\n function translatePosition(pos) {\n if (notranslate !== !0 && isRTL && \"number\" == typeof pos && (!opts.greedy || \"\" !== opts.placeholder)) {\n var bffrLght = getBuffer().join(\"\").length;\n pos = bffrLght - pos;\n }\n return pos;\n }\n var range;\n if (\"number\" != typeof begin) return input.setSelectionRange ? (begin = input.selectionStart, \n end = input.selectionEnd) : window.getSelection ? (range = window.getSelection().getRangeAt(0), \n range.commonAncestorContainer.parentNode !== input && range.commonAncestorContainer !== input || (begin = range.startOffset, \n end = range.endOffset)) : document.selection && document.selection.createRange && (range = document.selection.createRange(), \n begin = 0 - range.duplicate().moveStart(\"character\", -input.inputmask._valueGet().length), \n end = begin + range.text.length), {\n begin: translatePosition(begin),\n end: translatePosition(end)\n };\n begin = translatePosition(begin), end = translatePosition(end), end = \"number\" == typeof end ? end : begin;\n var scrollCalc = parseInt(((input.ownerDocument.defaultView || window).getComputedStyle ? (input.ownerDocument.defaultView || window).getComputedStyle(input, null) : input.currentStyle).fontSize) * end;\n if (input.scrollLeft = scrollCalc > input.scrollWidth ? scrollCalc : 0, mobile || opts.insertMode !== !1 || begin !== end || end++, \n input.setSelectionRange) input.selectionStart = begin, input.selectionEnd = end; else if (window.getSelection) {\n if (range = document.createRange(), void 0 === input.firstChild || null === input.firstChild) {\n var textNode = document.createTextNode(\"\");\n input.appendChild(textNode);\n }\n range.setStart(input.firstChild, begin < input.inputmask._valueGet().length ? begin : input.inputmask._valueGet().length), \n range.setEnd(input.firstChild, end < input.inputmask._valueGet().length ? end : input.inputmask._valueGet().length), \n range.collapse(!0);\n var sel = window.getSelection();\n sel.removeAllRanges(), sel.addRange(range);\n } else input.createTextRange && (range = input.createTextRange(), range.collapse(!0), \n range.moveEnd(\"character\", end), range.moveStart(\"character\", begin), range.select());\n renderColorMask(input, void 0, {\n begin: begin,\n end: end\n });\n }\n function determineLastRequiredPosition(returnDefinition) {\n var pos, testPos, buffer = getBuffer(), bl = buffer.length, lvp = getLastValidPosition(), positions = {}, lvTest = getMaskSet().validPositions[lvp], ndxIntlzr = void 0 !== lvTest ? lvTest.locator.slice() : void 0;\n for (pos = lvp + 1; pos < buffer.length; pos++) testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), \n ndxIntlzr = testPos.locator.slice(), positions[pos] = $.extend(!0, {}, testPos);\n var lvTestAlt = lvTest && void 0 !== lvTest.alternation ? lvTest.locator[lvTest.alternation] : void 0;\n for (pos = bl - 1; pos > lvp && (testPos = positions[pos], (testPos.match.optionality || testPos.match.optionalQuantifier || lvTestAlt && (lvTestAlt !== positions[pos].locator[lvTest.alternation] && null != testPos.match.fn || null === testPos.match.fn && testPos.locator[lvTest.alternation] && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(\",\"), lvTestAlt.toString().split(\",\")) && \"\" !== getTests(pos)[0].def)) && buffer[pos] === getPlaceholder(pos, testPos.match)); pos--) bl--;\n return returnDefinition ? {\n l: bl,\n def: positions[bl] ? positions[bl].match : void 0\n } : bl;\n }\n function clearOptionalTail(buffer) {\n for (var rl = determineLastRequiredPosition(), lmib = buffer.length - 1; lmib > rl && !isMask(lmib); lmib--) ;\n return buffer.splice(rl, lmib + 1 - rl), buffer;\n }\n function isComplete(buffer) {\n if ($.isFunction(opts.isComplete)) return opts.isComplete(buffer, opts);\n if (\"*\" !== opts.repeat) {\n var complete = !1, lrp = determineLastRequiredPosition(!0), aml = seekPrevious(lrp.l);\n if (void 0 === lrp.def || lrp.def.newBlockMarker || lrp.def.optionality || lrp.def.optionalQuantifier) {\n complete = !0;\n for (var i = 0; i <= aml; i++) {\n var test = getTestTemplate(i).match;\n if (null !== test.fn && void 0 === getMaskSet().validPositions[i] && test.optionality !== !0 && test.optionalQuantifier !== !0 || null === test.fn && buffer[i] !== getPlaceholder(i, test)) {\n complete = !1;\n break;\n }\n }\n }\n return complete;\n }\n }\n function handleRemove(input, k, pos, strict) {\n function generalize() {\n if (opts.keepStatic) {\n for (var validInputs = [], lastAlt = getLastValidPosition(-1, !0), positionsClone = $.extend(!0, {}, getMaskSet().validPositions), prevAltPos = getMaskSet().validPositions[lastAlt]; lastAlt >= 0; lastAlt--) {\n var altPos = getMaskSet().validPositions[lastAlt];\n if (altPos) {\n if (altPos.generatedInput !== !0 && /[0-9a-bA-Z]/.test(altPos.input) && validInputs.push(altPos.input), \n delete getMaskSet().validPositions[lastAlt], void 0 !== altPos.alternation && altPos.locator[altPos.alternation] !== prevAltPos.locator[altPos.alternation]) break;\n prevAltPos = altPos;\n }\n }\n if (lastAlt > -1) for (getMaskSet().p = seekNext(getLastValidPosition(-1, !0)); validInputs.length > 0; ) {\n var keypress = new $.Event(\"keypress\");\n keypress.which = validInputs.pop().charCodeAt(0), EventHandlers.keypressEvent.call(input, keypress, !0, !1, !1, getMaskSet().p);\n } else getMaskSet().validPositions = $.extend(!0, {}, positionsClone);\n }\n }\n if ((opts.numericInput || isRTL) && (k === Inputmask.keyCode.BACKSPACE ? k = Inputmask.keyCode.DELETE : k === Inputmask.keyCode.DELETE && (k = Inputmask.keyCode.BACKSPACE), \n isRTL)) {\n var pend = pos.end;\n pos.end = pos.begin, pos.begin = pend;\n }\n k === Inputmask.keyCode.BACKSPACE && (pos.end - pos.begin < 1 || opts.insertMode === !1) ? (pos.begin = seekPrevious(pos.begin), \n void 0 === getMaskSet().validPositions[pos.begin] || getMaskSet().validPositions[pos.begin].input !== opts.groupSeparator && getMaskSet().validPositions[pos.begin].input !== opts.radixPoint || pos.begin--) : k === Inputmask.keyCode.DELETE && pos.begin === pos.end && (pos.end = isMask(pos.end, !0) ? pos.end + 1 : seekNext(pos.end) + 1, \n void 0 === getMaskSet().validPositions[pos.begin] || getMaskSet().validPositions[pos.begin].input !== opts.groupSeparator && getMaskSet().validPositions[pos.begin].input !== opts.radixPoint || pos.end++), \n stripValidPositions(pos.begin, pos.end, !1, strict), strict !== !0 && generalize();\n var lvp = getLastValidPosition(pos.begin, !0);\n lvp < pos.begin ? getMaskSet().p = seekNext(lvp) : strict !== !0 && (getMaskSet().p = pos.begin);\n }\n function initializeColorMask(input) {\n function findCaretPos(clientx) {\n var caretPos, e = document.createElement(\"span\");\n for (var style in computedStyle) isNaN(style) && style.indexOf(\"font\") !== -1 && (e.style[style] = computedStyle[style]);\n e.style.textTransform = computedStyle.textTransform, e.style.letterSpacing = computedStyle.letterSpacing, \n e.style.position = \"absolute\", e.style.height = \"auto\", e.style.width = \"auto\", \n e.style.visibility = \"hidden\", e.style.whiteSpace = \"nowrap\", document.body.appendChild(e);\n var itl, inputText = input.inputmask._valueGet(), previousWidth = 0;\n for (caretPos = 0, itl = inputText.length; caretPos <= itl; caretPos++) {\n if (e.innerHTML += inputText.charAt(caretPos) || \"_\", e.offsetWidth >= clientx) {\n var offset1 = clientx - previousWidth, offset2 = e.offsetWidth - clientx;\n e.innerHTML = inputText.charAt(caretPos), offset1 -= e.offsetWidth / 3, caretPos = offset1 < offset2 ? caretPos - 1 : caretPos;\n break;\n }\n previousWidth = e.offsetWidth;\n }\n return document.body.removeChild(e), caretPos;\n }\n function position() {\n colorMask.style.position = \"absolute\", colorMask.style.top = offset.top + \"px\", \n colorMask.style.left = offset.left + \"px\", colorMask.style.width = parseInt(input.offsetWidth) - parseInt(computedStyle.paddingLeft) - parseInt(computedStyle.paddingRight) - parseInt(computedStyle.borderLeftWidth) - parseInt(computedStyle.borderRightWidth) + \"px\", \n colorMask.style.height = parseInt(input.offsetHeight) - parseInt(computedStyle.paddingTop) - parseInt(computedStyle.paddingBottom) - parseInt(computedStyle.borderTopWidth) - parseInt(computedStyle.borderBottomWidth) + \"px\", \n colorMask.style.lineHeight = colorMask.style.height, colorMask.style.zIndex = isNaN(computedStyle.zIndex) ? -1 : computedStyle.zIndex - 1, \n colorMask.style.webkitAppearance = \"textfield\", colorMask.style.mozAppearance = \"textfield\", \n colorMask.style.Appearance = \"textfield\";\n }\n var offset = $(input).position(), computedStyle = (input.ownerDocument.defaultView || window).getComputedStyle(input, null);\n input.parentNode;\n colorMask = document.createElement(\"div\"), document.body.appendChild(colorMask);\n for (var style in computedStyle) isNaN(style) && \"cssText\" !== style && style.indexOf(\"webkit\") == -1 && (colorMask.style[style] = computedStyle[style]);\n input.style.backgroundColor = \"transparent\", input.style.color = \"transparent\", \n input.style.webkitAppearance = \"caret\", input.style.mozAppearance = \"caret\", input.style.Appearance = \"caret\", \n position(), $(window).on(\"resize\", function(e) {\n offset = $(input).position(), computedStyle = (input.ownerDocument.defaultView || window).getComputedStyle(input, null), \n position();\n }), $(input).on(\"click\", function(e) {\n return caret(input, findCaretPos(e.clientX)), EventHandlers.clickEvent.call(this, [ e ]);\n }), $(input).on(\"keydown\", function(e) {\n e.shiftKey || opts.insertMode === !1 || setTimeout(function() {\n renderColorMask(input);\n }, 0);\n });\n }\n function renderColorMask(input, buffer, caretPos) {\n function handleStatic() {\n static || null !== test.fn && void 0 !== testPos.input ? static && null !== test.fn && void 0 !== testPos.input && (static = !1, \n maskTemplate += \"</span>\") : (static = !0, maskTemplate += \"<span class='im-static''>\");\n }\n if (void 0 !== colorMask) {\n buffer = buffer || getBuffer(), void 0 === caretPos ? caretPos = caret(input) : void 0 === caretPos.begin && (caretPos = {\n begin: caretPos,\n end: caretPos\n });\n var maskTemplate = \"\", static = !1;\n if (\"\" != buffer) {\n var ndxIntlzr, test, testPos, pos = 0, lvp = getLastValidPosition();\n do pos === caretPos.begin && document.activeElement === input && (maskTemplate += \"<span class='im-caret' style='border-right-width: 1px;border-right-style: solid;'></span>\"), \n getMaskSet().validPositions[pos] ? (testPos = getMaskSet().validPositions[pos], \n test = testPos.match, ndxIntlzr = testPos.locator.slice(), handleStatic(), maskTemplate += testPos.input) : (testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), \n test = testPos.match, ndxIntlzr = testPos.locator.slice(), (opts.jitMasking === !1 || pos < lvp || \"number\" == typeof opts.jitMasking && isFinite(opts.jitMasking) && opts.jitMasking > pos) && (handleStatic(), \n maskTemplate += getPlaceholder(pos, test))), pos++; while ((void 0 === maxLength || pos < maxLength) && (null !== test.fn || \"\" !== test.def) || lvp > pos);\n }\n colorMask.innerHTML = maskTemplate;\n }\n }\n function mask(elem) {\n function isElementTypeSupported(input, opts) {\n function patchValueProperty(npt) {\n function patchValhook(type) {\n if ($.valHooks && (void 0 === $.valHooks[type] || $.valHooks[type].inputmaskpatch !== !0)) {\n var valhookGet = $.valHooks[type] && $.valHooks[type].get ? $.valHooks[type].get : function(elem) {\n return elem.value;\n }, valhookSet = $.valHooks[type] && $.valHooks[type].set ? $.valHooks[type].set : function(elem, value) {\n return elem.value = value, elem;\n };\n $.valHooks[type] = {\n get: function(elem) {\n if (elem.inputmask) {\n if (elem.inputmask.opts.autoUnmask) return elem.inputmask.unmaskedvalue();\n var result = valhookGet(elem);\n return getLastValidPosition(void 0, void 0, elem.inputmask.maskset.validPositions) !== -1 || opts.nullable !== !0 ? result : \"\";\n }\n return valhookGet(elem);\n },\n set: function(elem, value) {\n var result, $elem = $(elem);\n return result = valhookSet(elem, value), elem.inputmask && $elem.trigger(\"setvalue\"), \n result;\n },\n inputmaskpatch: !0\n };\n }\n }\n function getter() {\n return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : getLastValidPosition() !== -1 || opts.nullable !== !0 ? document.activeElement === this && opts.clearMaskOnLostFocus ? (isRTL ? clearOptionalTail(getBuffer().slice()).reverse() : clearOptionalTail(getBuffer().slice())).join(\"\") : valueGet.call(this) : \"\" : valueGet.call(this);\n }\n function setter(value) {\n valueSet.call(this, value), this.inputmask && $(this).trigger(\"setvalue\");\n }\n function installNativeValueSetFallback(npt) {\n EventRuler.on(npt, \"mouseenter\", function(event) {\n var $input = $(this), input = this, value = input.inputmask._valueGet();\n value !== getBuffer().join(\"\") && $input.trigger(\"setvalue\");\n });\n }\n var valueGet, valueSet;\n if (!npt.inputmask.__valueGet) {\n if (opts.noValuePatching !== !0) {\n if (Object.getOwnPropertyDescriptor) {\n \"function\" != typeof Object.getPrototypeOf && (Object.getPrototypeOf = \"object\" == typeof \"test\".__proto__ ? function(object) {\n return object.__proto__;\n } : function(object) {\n return object.constructor.prototype;\n });\n var valueProperty = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(npt), \"value\") : void 0;\n valueProperty && valueProperty.get && valueProperty.set ? (valueGet = valueProperty.get, \n valueSet = valueProperty.set, Object.defineProperty(npt, \"value\", {\n get: getter,\n set: setter,\n configurable: !0\n })) : \"INPUT\" !== npt.tagName && (valueGet = function() {\n return this.textContent;\n }, valueSet = function(value) {\n this.textContent = value;\n }, Object.defineProperty(npt, \"value\", {\n get: getter,\n set: setter,\n configurable: !0\n }));\n } else document.__lookupGetter__ && npt.__lookupGetter__(\"value\") && (valueGet = npt.__lookupGetter__(\"value\"), \n valueSet = npt.__lookupSetter__(\"value\"), npt.__defineGetter__(\"value\", getter), \n npt.__defineSetter__(\"value\", setter));\n npt.inputmask.__valueGet = valueGet, npt.inputmask.__valueSet = valueSet;\n }\n npt.inputmask._valueGet = function(overruleRTL) {\n return isRTL && overruleRTL !== !0 ? valueGet.call(this.el).split(\"\").reverse().join(\"\") : valueGet.call(this.el);\n }, npt.inputmask._valueSet = function(value, overruleRTL) {\n valueSet.call(this.el, null === value || void 0 === value ? \"\" : overruleRTL !== !0 && isRTL ? value.split(\"\").reverse().join(\"\") : value);\n }, void 0 === valueGet && (valueGet = function() {\n return this.value;\n }, valueSet = function(value) {\n this.value = value;\n }, patchValhook(npt.type), installNativeValueSetFallback(npt));\n }\n }\n var elementType = input.getAttribute(\"type\"), isSupported = \"INPUT\" === input.tagName && $.inArray(elementType, opts.supportsInputType) !== -1 || input.isContentEditable || \"TEXTAREA\" === input.tagName;\n if (!isSupported) if (\"INPUT\" === input.tagName) {\n var el = document.createElement(\"input\");\n el.setAttribute(\"type\", elementType), isSupported = \"text\" === el.type, el = null;\n } else isSupported = \"partial\";\n return isSupported !== !1 && patchValueProperty(input), isSupported;\n }\n var isSupported = isElementTypeSupported(elem, opts);\n if (isSupported !== !1 && (el = elem, $el = $(el), (\"rtl\" === el.dir || opts.rightAlign) && (el.style.textAlign = \"right\"), \n (\"rtl\" === el.dir || opts.numericInput) && (el.dir = \"ltr\", el.removeAttribute(\"dir\"), \n el.inputmask.isRTL = !0, isRTL = !0), opts.colorMask === !0 && initializeColorMask(el), \n android && (el.hasOwnProperty(\"inputmode\") && (el.inputmode = opts.inputmode, el.setAttribute(\"inputmode\", opts.inputmode)), \n \"rtfm\" === opts.androidHack && (opts.colorMask !== !0 && initializeColorMask(el), \n el.type = \"password\")), EventRuler.off(el), isSupported === !0 && (EventRuler.on(el, \"submit\", EventHandlers.submitEvent), \n EventRuler.on(el, \"reset\", EventHandlers.resetEvent), EventRuler.on(el, \"mouseenter\", EventHandlers.mouseenterEvent), \n EventRuler.on(el, \"blur\", EventHandlers.blurEvent), EventRuler.on(el, \"focus\", EventHandlers.focusEvent), \n EventRuler.on(el, \"mouseleave\", EventHandlers.mouseleaveEvent), opts.colorMask !== !0 && EventRuler.on(el, \"click\", EventHandlers.clickEvent), \n EventRuler.on(el, \"dblclick\", EventHandlers.dblclickEvent), EventRuler.on(el, \"paste\", EventHandlers.pasteEvent), \n EventRuler.on(el, \"dragdrop\", EventHandlers.pasteEvent), EventRuler.on(el, \"drop\", EventHandlers.pasteEvent), \n EventRuler.on(el, \"cut\", EventHandlers.cutEvent), EventRuler.on(el, \"complete\", opts.oncomplete), \n EventRuler.on(el, \"incomplete\", opts.onincomplete), EventRuler.on(el, \"cleared\", opts.oncleared), \n opts.inputEventOnly !== !0 && (EventRuler.on(el, \"keydown\", EventHandlers.keydownEvent), \n EventRuler.on(el, \"keypress\", EventHandlers.keypressEvent)), EventRuler.on(el, \"compositionstart\", $.noop), \n EventRuler.on(el, \"compositionupdate\", $.noop), EventRuler.on(el, \"compositionend\", $.noop), \n EventRuler.on(el, \"keyup\", $.noop), EventRuler.on(el, \"input\", EventHandlers.inputFallBackEvent)), \n EventRuler.on(el, \"setvalue\", EventHandlers.setValueEvent), getBufferTemplate(), \n \"\" !== el.inputmask._valueGet() || opts.clearMaskOnLostFocus === !1 || document.activeElement === el)) {\n var initialValue = $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask(el.inputmask._valueGet(), opts) || el.inputmask._valueGet() : el.inputmask._valueGet();\n checkVal(el, !0, !1, initialValue.split(\"\"));\n var buffer = getBuffer().slice();\n undoValue = buffer.join(\"\"), isComplete(buffer) === !1 && opts.clearIncomplete && resetMaskSet(), \n opts.clearMaskOnLostFocus && document.activeElement !== el && (getLastValidPosition() === -1 ? buffer = [] : clearOptionalTail(buffer)), \n writeBuffer(el, buffer), document.activeElement === el && caret(el, seekNext(getLastValidPosition()));\n }\n }\n maskset = maskset || this.maskset, opts = opts || this.opts;\n var undoValue, $el, maxLength, colorMask, valueBuffer, el = this.el, isRTL = this.isRTL, skipKeyPressEvent = !1, skipInputEvent = !1, ignorable = !1, mouseEnter = !1, EventRuler = {\n on: function(input, eventName, eventHandler) {\n var ev = function(e) {\n if (void 0 === this.inputmask && \"FORM\" !== this.nodeName) {\n var imOpts = $.data(this, \"_inputmask_opts\");\n imOpts ? new Inputmask(imOpts).mask(this) : EventRuler.off(this);\n } else {\n if (\"setvalue\" === e.type || !(this.disabled || this.readOnly && !(\"keydown\" === e.type && e.ctrlKey && 67 === e.keyCode || opts.tabThrough === !1 && e.keyCode === Inputmask.keyCode.TAB))) {\n switch (e.type) {\n case \"input\":\n if (skipInputEvent === !0) return skipInputEvent = !1, e.preventDefault();\n break;\n\n case \"keydown\":\n skipKeyPressEvent = !1, skipInputEvent = !1;\n break;\n\n case \"keypress\":\n if (skipKeyPressEvent === !0) return e.preventDefault();\n skipKeyPressEvent = !0;\n break;\n\n case \"click\":\n if (iemobile || iphone) {\n var that = this, args = arguments;\n return setTimeout(function() {\n eventHandler.apply(that, args);\n }, 0), !1;\n }\n }\n var returnVal = eventHandler.apply(this, arguments);\n return returnVal === !1 && (e.preventDefault(), e.stopPropagation()), returnVal;\n }\n e.preventDefault();\n }\n };\n input.inputmask.events[eventName] = input.inputmask.events[eventName] || [], input.inputmask.events[eventName].push(ev), \n $.inArray(eventName, [ \"submit\", \"reset\" ]) !== -1 ? null != input.form && $(input.form).on(eventName, ev) : $(input).on(eventName, ev);\n },\n off: function(input, event) {\n if (input.inputmask && input.inputmask.events) {\n var events;\n event ? (events = [], events[event] = input.inputmask.events[event]) : events = input.inputmask.events, \n $.each(events, function(eventName, evArr) {\n for (;evArr.length > 0; ) {\n var ev = evArr.pop();\n $.inArray(eventName, [ \"submit\", \"reset\" ]) !== -1 ? null != input.form && $(input.form).off(eventName, ev) : $(input).off(eventName, ev);\n }\n delete input.inputmask.events[eventName];\n });\n }\n }\n }, EventHandlers = {\n keydownEvent: function(e) {\n function isInputEventSupported(eventName) {\n var el = document.createElement(\"input\"), evName = \"on\" + eventName, isSupported = evName in el;\n return isSupported || (el.setAttribute(evName, \"return;\"), isSupported = \"function\" == typeof el[evName]), \n el = null, isSupported;\n }\n var input = this, $input = $(input), k = e.keyCode, pos = caret(input);\n if (k === Inputmask.keyCode.BACKSPACE || k === Inputmask.keyCode.DELETE || iphone && k === Inputmask.keyCode.BACKSPACE_SAFARI || e.ctrlKey && k === Inputmask.keyCode.X && !isInputEventSupported(\"cut\")) e.preventDefault(), \n handleRemove(input, k, pos), writeBuffer(input, getBuffer(!0), getMaskSet().p, e, input.inputmask._valueGet() !== getBuffer().join(\"\")), \n input.inputmask._valueGet() === getBufferTemplate().join(\"\") ? $input.trigger(\"cleared\") : isComplete(getBuffer()) === !0 && $input.trigger(\"complete\"); else if (k === Inputmask.keyCode.END || k === Inputmask.keyCode.PAGE_DOWN) {\n e.preventDefault();\n var caretPos = seekNext(getLastValidPosition());\n opts.insertMode || caretPos !== getMaskSet().maskLength || e.shiftKey || caretPos--, \n caret(input, e.shiftKey ? pos.begin : caretPos, caretPos, !0);\n } else k === Inputmask.keyCode.HOME && !e.shiftKey || k === Inputmask.keyCode.PAGE_UP ? (e.preventDefault(), \n caret(input, 0, e.shiftKey ? pos.begin : 0, !0)) : (opts.undoOnEscape && k === Inputmask.keyCode.ESCAPE || 90 === k && e.ctrlKey) && e.altKey !== !0 ? (checkVal(input, !0, !1, undoValue.split(\"\")), \n $input.trigger(\"click\")) : k !== Inputmask.keyCode.INSERT || e.shiftKey || e.ctrlKey ? opts.tabThrough === !0 && k === Inputmask.keyCode.TAB ? (e.shiftKey === !0 ? (null === getTest(pos.begin).match.fn && (pos.begin = seekNext(pos.begin)), \n pos.end = seekPrevious(pos.begin, !0), pos.begin = seekPrevious(pos.end, !0)) : (pos.begin = seekNext(pos.begin, !0), \n pos.end = seekNext(pos.begin, !0), pos.end < getMaskSet().maskLength && pos.end--), \n pos.begin < getMaskSet().maskLength && (e.preventDefault(), caret(input, pos.begin, pos.end))) : e.shiftKey || opts.insertMode === !1 && (k === Inputmask.keyCode.RIGHT ? setTimeout(function() {\n var caretPos = caret(input);\n caret(input, caretPos.begin);\n }, 0) : k === Inputmask.keyCode.LEFT && setTimeout(function() {\n var caretPos = caret(input);\n caret(input, isRTL ? caretPos.begin + 1 : caretPos.begin - 1);\n }, 0)) : (opts.insertMode = !opts.insertMode, caret(input, opts.insertMode || pos.begin !== getMaskSet().maskLength ? pos.begin : pos.begin - 1));\n opts.onKeyDown.call(this, e, getBuffer(), caret(input).begin, opts), ignorable = $.inArray(k, opts.ignorables) !== -1;\n },\n keypressEvent: function(e, checkval, writeOut, strict, ndx) {\n var input = this, $input = $(input), k = e.which || e.charCode || e.keyCode;\n if (!(checkval === !0 || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable)) return k === Inputmask.keyCode.ENTER && undoValue !== getBuffer().join(\"\") && (undoValue = getBuffer().join(\"\"), \n setTimeout(function() {\n $input.trigger(\"change\");\n }, 0)), !0;\n if (k) {\n 46 === k && e.shiftKey === !1 && \",\" === opts.radixPoint && (k = 44);\n var forwardPosition, pos = checkval ? {\n begin: ndx,\n end: ndx\n } : caret(input), c = String.fromCharCode(k);\n getMaskSet().writeOutBuffer = !0;\n var valResult = isValid(pos, c, strict);\n if (valResult !== !1 && (resetMaskSet(!0), forwardPosition = void 0 !== valResult.caret ? valResult.caret : checkval ? valResult.pos + 1 : seekNext(valResult.pos), \n getMaskSet().p = forwardPosition), writeOut !== !1) {\n var self = this;\n if (setTimeout(function() {\n opts.onKeyValidation.call(self, k, valResult, opts);\n }, 0), getMaskSet().writeOutBuffer && valResult !== !1) {\n var buffer = getBuffer();\n writeBuffer(input, buffer, opts.numericInput && void 0 === valResult.caret ? seekPrevious(forwardPosition) : forwardPosition, e, checkval !== !0), \n checkval !== !0 && setTimeout(function() {\n isComplete(buffer) === !0 && $input.trigger(\"complete\");\n }, 0);\n }\n }\n if (e.preventDefault(), checkval) return valResult.forwardPosition = forwardPosition, \n valResult;\n }\n },\n pasteEvent: function(e) {\n var tempValue, input = this, ev = e.originalEvent || e, $input = $(input), inputValue = input.inputmask._valueGet(!0), caretPos = caret(input);\n isRTL && (tempValue = caretPos.end, caretPos.end = caretPos.begin, caretPos.begin = tempValue);\n var valueBeforeCaret = inputValue.substr(0, caretPos.begin), valueAfterCaret = inputValue.substr(caretPos.end, inputValue.length);\n if (valueBeforeCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(0, caretPos.begin).join(\"\") && (valueBeforeCaret = \"\"), \n valueAfterCaret === (isRTL ? getBufferTemplate().reverse() : getBufferTemplate()).slice(caretPos.end).join(\"\") && (valueAfterCaret = \"\"), \n isRTL && (tempValue = valueBeforeCaret, valueBeforeCaret = valueAfterCaret, valueAfterCaret = tempValue), \n window.clipboardData && window.clipboardData.getData) inputValue = valueBeforeCaret + window.clipboardData.getData(\"Text\") + valueAfterCaret; else {\n if (!ev.clipboardData || !ev.clipboardData.getData) return !0;\n inputValue = valueBeforeCaret + ev.clipboardData.getData(\"text/plain\") + valueAfterCaret;\n }\n var pasteValue = inputValue;\n if ($.isFunction(opts.onBeforePaste)) {\n if (pasteValue = opts.onBeforePaste(inputValue, opts), pasteValue === !1) return e.preventDefault();\n pasteValue || (pasteValue = inputValue);\n }\n return checkVal(input, !1, !1, isRTL ? pasteValue.split(\"\").reverse() : pasteValue.toString().split(\"\")), \n writeBuffer(input, getBuffer(), seekNext(getLastValidPosition()), e, undoValue !== getBuffer().join(\"\")), \n isComplete(getBuffer()) === !0 && $input.trigger(\"complete\"), e.preventDefault();\n },\n inputFallBackEvent: function(e) {\n var input = this, inputValue = input.inputmask._valueGet();\n if (getBuffer().join(\"\") !== inputValue) {\n var caretPos = caret(input);\n if (inputValue = inputValue.replace(new RegExp(\"(\" + Inputmask.escapeRegex(getBufferTemplate().join(\"\")) + \")*\"), \"\"), \n iemobile) {\n var inputChar = inputValue.replace(getBuffer().join(\"\"), \"\");\n if (1 === inputChar.length) {\n var keypress = new $.Event(\"keypress\");\n return keypress.which = inputChar.charCodeAt(0), EventHandlers.keypressEvent.call(input, keypress, !0, !0, !1, getMaskSet().validPositions[caretPos.begin - 1] ? caretPos.begin : caretPos.begin - 1), \n !1;\n }\n }\n if (caretPos.begin > inputValue.length && (caret(input, inputValue.length), caretPos = caret(input)), \n getBuffer().length - inputValue.length !== 1 || inputValue.charAt(caretPos.begin) === getBuffer()[caretPos.begin] || inputValue.charAt(caretPos.begin + 1) === getBuffer()[caretPos.begin] || isMask(caretPos.begin)) {\n for (var lvp = getLastValidPosition() + 1, bufferTemplate = getBufferTemplate().join(\"\"); null === inputValue.match(Inputmask.escapeRegex(bufferTemplate) + \"$\"); ) bufferTemplate = bufferTemplate.slice(1);\n inputValue = inputValue.replace(bufferTemplate, \"\"), inputValue = inputValue.split(\"\"), \n checkVal(input, !0, !1, inputValue, e, caretPos.begin < lvp), isComplete(getBuffer()) === !0 && $(input).trigger(\"complete\");\n } else e.keyCode = Inputmask.keyCode.BACKSPACE, EventHandlers.keydownEvent.call(input, e);\n e.preventDefault();\n }\n },\n setValueEvent: function(e) {\n var input = this, value = input.inputmask._valueGet();\n checkVal(input, !0, !1, ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask(value, opts) || value : value).split(\"\")), \n undoValue = getBuffer().join(\"\"), (opts.clearMaskOnLostFocus || opts.clearIncomplete) && input.inputmask._valueGet() === getBufferTemplate().join(\"\") && input.inputmask._valueSet(\"\");\n },\n focusEvent: function(e) {\n var input = this, nptValue = input.inputmask._valueGet();\n opts.showMaskOnFocus && (!opts.showMaskOnHover || opts.showMaskOnHover && \"\" === nptValue) && (input.inputmask._valueGet() !== getBuffer().join(\"\") ? writeBuffer(input, getBuffer(), seekNext(getLastValidPosition())) : mouseEnter === !1 && caret(input, seekNext(getLastValidPosition()))), \n opts.positionCaretOnTab === !0 && EventHandlers.clickEvent.apply(input, [ e, !0 ]), \n undoValue = getBuffer().join(\"\");\n },\n mouseleaveEvent: function(e) {\n var input = this;\n if (mouseEnter = !1, opts.clearMaskOnLostFocus && document.activeElement !== input) {\n var buffer = getBuffer().slice(), nptValue = input.inputmask._valueGet();\n nptValue !== input.getAttribute(\"placeholder\") && \"\" !== nptValue && (getLastValidPosition() === -1 && nptValue === getBufferTemplate().join(\"\") ? buffer = [] : clearOptionalTail(buffer), \n writeBuffer(input, buffer));\n }\n },\n clickEvent: function(e, tabbed) {\n function doRadixFocus(clickPos) {\n if (\"\" !== opts.radixPoint) {\n var vps = getMaskSet().validPositions;\n if (void 0 === vps[clickPos] || vps[clickPos].input === getPlaceholder(clickPos)) {\n if (clickPos < seekNext(-1)) return !0;\n var radixPos = $.inArray(opts.radixPoint, getBuffer());\n if (radixPos !== -1) {\n for (var vp in vps) if (radixPos < vp && vps[vp].input !== getPlaceholder(vp)) return !1;\n return !0;\n }\n }\n }\n return !1;\n }\n var input = this;\n setTimeout(function() {\n if (document.activeElement === input) {\n var selectedCaret = caret(input);\n if (tabbed && (selectedCaret.begin = selectedCaret.end), selectedCaret.begin === selectedCaret.end) switch (opts.positionCaretOnClick) {\n case \"none\":\n break;\n\n case \"radixFocus\":\n if (doRadixFocus(selectedCaret.begin)) {\n var radixPos = $.inArray(opts.radixPoint, getBuffer().join(\"\"));\n caret(input, opts.numericInput ? seekNext(radixPos) : radixPos);\n break;\n }\n\n default:\n var clickPosition = selectedCaret.begin, lvclickPosition = getLastValidPosition(clickPosition, !0), lastPosition = seekNext(lvclickPosition);\n if (clickPosition < lastPosition) caret(input, isMask(clickPosition) || isMask(clickPosition - 1) ? clickPosition : seekNext(clickPosition)); else {\n var placeholder = getPlaceholder(lastPosition);\n (\"\" !== placeholder && getBuffer()[lastPosition] !== placeholder && getTest(lastPosition).match.optionalQuantifier !== !0 || !isMask(lastPosition) && getTest(lastPosition).match.def === placeholder) && (lastPosition = seekNext(lastPosition)), \n caret(input, lastPosition);\n }\n }\n }\n }, 0);\n },\n dblclickEvent: function(e) {\n var input = this;\n setTimeout(function() {\n caret(input, 0, seekNext(getLastValidPosition()));\n }, 0);\n },\n cutEvent: function(e) {\n var input = this, $input = $(input), pos = caret(input), ev = e.originalEvent || e, clipboardData = window.clipboardData || ev.clipboardData, clipData = isRTL ? getBuffer().slice(pos.end, pos.begin) : getBuffer().slice(pos.begin, pos.end);\n clipboardData.setData(\"text\", isRTL ? clipData.reverse().join(\"\") : clipData.join(\"\")), \n document.execCommand && document.execCommand(\"copy\"), handleRemove(input, Inputmask.keyCode.DELETE, pos), \n writeBuffer(input, getBuffer(), getMaskSet().p, e, undoValue !== getBuffer().join(\"\")), \n input.inputmask._valueGet() === getBufferTemplate().join(\"\") && $input.trigger(\"cleared\");\n },\n blurEvent: function(e) {\n var $input = $(this), input = this;\n if (input.inputmask) {\n var nptValue = input.inputmask._valueGet(), buffer = getBuffer().slice();\n undoValue !== buffer.join(\"\") && setTimeout(function() {\n $input.trigger(\"change\"), undoValue = buffer.join(\"\");\n }, 0), \"\" !== nptValue && (opts.clearMaskOnLostFocus && (getLastValidPosition() === -1 && nptValue === getBufferTemplate().join(\"\") ? buffer = [] : clearOptionalTail(buffer)), \n isComplete(buffer) === !1 && (setTimeout(function() {\n $input.trigger(\"incomplete\");\n }, 0), opts.clearIncomplete && (resetMaskSet(), buffer = opts.clearMaskOnLostFocus ? [] : getBufferTemplate().slice())), \n writeBuffer(input, buffer, void 0, e));\n }\n },\n mouseenterEvent: function(e) {\n var input = this;\n mouseEnter = !0, document.activeElement !== input && opts.showMaskOnHover && input.inputmask._valueGet() !== getBuffer().join(\"\") && writeBuffer(input, getBuffer());\n },\n submitEvent: function(e) {\n undoValue !== getBuffer().join(\"\") && $el.trigger(\"change\"), opts.clearMaskOnLostFocus && getLastValidPosition() === -1 && el.inputmask._valueGet && el.inputmask._valueGet() === getBufferTemplate().join(\"\") && el.inputmask._valueSet(\"\"), \n opts.removeMaskOnSubmit && (el.inputmask._valueSet(el.inputmask.unmaskedvalue(), !0), \n setTimeout(function() {\n writeBuffer(el, getBuffer());\n }, 0));\n },\n resetEvent: function(e) {\n setTimeout(function() {\n $el.trigger(\"setvalue\");\n }, 0);\n }\n };\n if (void 0 !== actionObj) switch (actionObj.action) {\n case \"isComplete\":\n return el = actionObj.el, isComplete(getBuffer());\n\n case \"unmaskedvalue\":\n return void 0 !== el && void 0 === actionObj.value || (valueBuffer = actionObj.value, \n valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask(valueBuffer, opts) || valueBuffer : valueBuffer).split(\"\"), \n checkVal(void 0, !1, !1, isRTL ? valueBuffer.reverse() : valueBuffer), $.isFunction(opts.onBeforeWrite) && opts.onBeforeWrite(void 0, getBuffer(), 0, opts)), \n unmaskedvalue(el);\n\n case \"mask\":\n mask(el);\n break;\n\n case \"format\":\n return valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask(actionObj.value, opts) || actionObj.value : actionObj.value).split(\"\"), \n checkVal(void 0, !1, !1, isRTL ? valueBuffer.reverse() : valueBuffer), $.isFunction(opts.onBeforeWrite) && opts.onBeforeWrite(void 0, getBuffer(), 0, opts), \n actionObj.metadata ? {\n value: isRTL ? getBuffer().slice().reverse().join(\"\") : getBuffer().join(\"\"),\n metadata: maskScope.call(this, {\n action: \"getmetadata\"\n }, maskset, opts)\n } : isRTL ? getBuffer().slice().reverse().join(\"\") : getBuffer().join(\"\");\n\n case \"isValid\":\n actionObj.value ? (valueBuffer = actionObj.value.split(\"\"), checkVal(void 0, !1, !0, isRTL ? valueBuffer.reverse() : valueBuffer)) : actionObj.value = getBuffer().join(\"\");\n for (var buffer = getBuffer(), rl = determineLastRequiredPosition(), lmib = buffer.length - 1; lmib > rl && !isMask(lmib); lmib--) ;\n return buffer.splice(rl, lmib + 1 - rl), isComplete(buffer) && actionObj.value === getBuffer().join(\"\");\n\n case \"getemptymask\":\n return getBufferTemplate().join(\"\");\n\n case \"remove\":\n if (el) {\n $el = $(el), el.inputmask._valueSet(unmaskedvalue(el)), EventRuler.off(el);\n var valueProperty;\n Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? (valueProperty = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(el), \"value\"), \n valueProperty && el.inputmask.__valueGet && Object.defineProperty(el, \"value\", {\n get: el.inputmask.__valueGet,\n set: el.inputmask.__valueSet,\n configurable: !0\n })) : document.__lookupGetter__ && el.__lookupGetter__(\"value\") && el.inputmask.__valueGet && (el.__defineGetter__(\"value\", el.inputmask.__valueGet), \n el.__defineSetter__(\"value\", el.inputmask.__valueSet)), el.inputmask = void 0;\n }\n return el;\n\n case \"getmetadata\":\n if ($.isArray(maskset.metadata)) {\n var maskTarget = getMaskTemplate(!0, 0, !1).join(\"\");\n return $.each(maskset.metadata, function(ndx, mtdt) {\n if (mtdt.mask === maskTarget) return maskTarget = mtdt, !1;\n }), maskTarget;\n }\n return maskset.metadata;\n }\n }\n var ua = navigator.userAgent, mobile = /mobile/i.test(ua), iemobile = /iemobile/i.test(ua), iphone = /iphone/i.test(ua) && !iemobile, android = /android/i.test(ua) && !iemobile;\n return Inputmask.prototype = {\n defaults: {\n placeholder: \"_\",\n optionalmarker: {\n start: \"[\",\n end: \"]\"\n },\n quantifiermarker: {\n start: \"{\",\n end: \"}\"\n },\n groupmarker: {\n start: \"(\",\n end: \")\"\n },\n alternatormarker: \"|\",\n escapeChar: \"\\\\\",\n mask: null,\n oncomplete: $.noop,\n onincomplete: $.noop,\n oncleared: $.noop,\n repeat: 0,\n greedy: !0,\n autoUnmask: !1,\n removeMaskOnSubmit: !1,\n clearMaskOnLostFocus: !0,\n insertMode: !0,\n clearIncomplete: !1,\n aliases: {},\n alias: null,\n onKeyDown: $.noop,\n onBeforeMask: null,\n onBeforePaste: function(pastedValue, opts) {\n return $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask(pastedValue, opts) : pastedValue;\n },\n onBeforeWrite: null,\n onUnMask: null,\n showMaskOnFocus: !0,\n showMaskOnHover: !0,\n onKeyValidation: $.noop,\n skipOptionalPartCharacter: \" \",\n numericInput: !1,\n rightAlign: !1,\n undoOnEscape: !0,\n radixPoint: \"\",\n radixPointDefinitionSymbol: void 0,\n groupSeparator: \"\",\n keepStatic: null,\n positionCaretOnTab: !0,\n tabThrough: !1,\n supportsInputType: [ \"text\", \"tel\", \"password\" ],\n definitions: {\n \"9\": {\n validator: \"[0-9]\",\n cardinality: 1,\n definitionSymbol: \"*\"\n },\n a: {\n validator: \"[A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n cardinality: 1,\n definitionSymbol: \"*\"\n },\n \"*\": {\n validator: \"[0-9A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n cardinality: 1\n }\n },\n ignorables: [ 8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123 ],\n isComplete: null,\n canClearPosition: $.noop,\n postValidation: null,\n staticDefinitionSymbol: void 0,\n jitMasking: !1,\n nullable: !0,\n inputEventOnly: !1,\n noValuePatching: !1,\n positionCaretOnClick: \"lvp\",\n casing: null,\n inputmode: \"verbatim\",\n colorMask: !1,\n androidHack: !1\n },\n masksCache: {},\n mask: function(elems) {\n function importAttributeOptions(npt, opts, userOptions, dataAttribute) {\n function importOption(option, optionData) {\n optionData = void 0 !== optionData ? optionData : npt.getAttribute(dataAttribute + \"-\" + option), \n null !== optionData && (\"string\" == typeof optionData && (0 === option.indexOf(\"on\") ? optionData = window[optionData] : \"false\" === optionData ? optionData = !1 : \"true\" === optionData && (optionData = !0)), \n userOptions[option] = optionData);\n }\n var option, dataoptions, optionData, p, attrOptions = npt.getAttribute(dataAttribute);\n if (attrOptions && \"\" !== attrOptions && (attrOptions = attrOptions.replace(new RegExp(\"'\", \"g\"), '\"'), \n dataoptions = JSON.parse(\"{\" + attrOptions + \"}\")), dataoptions) {\n optionData = void 0;\n for (p in dataoptions) if (\"alias\" === p.toLowerCase()) {\n optionData = dataoptions[p];\n break;\n }\n }\n importOption(\"alias\", optionData), userOptions.alias && resolveAlias(userOptions.alias, userOptions, opts);\n for (option in opts) {\n if (dataoptions) {\n optionData = void 0;\n for (p in dataoptions) if (p.toLowerCase() === option.toLowerCase()) {\n optionData = dataoptions[p];\n break;\n }\n }\n importOption(option, optionData);\n }\n return $.extend(!0, opts, userOptions), opts;\n }\n var that = this;\n return \"string\" == typeof elems && (elems = document.getElementById(elems) || document.querySelectorAll(elems)), \n elems = elems.nodeName ? [ elems ] : elems, $.each(elems, function(ndx, el) {\n var scopedOpts = $.extend(!0, {}, that.opts);\n importAttributeOptions(el, scopedOpts, $.extend(!0, {}, that.userOptions), that.dataAttribute);\n var maskset = generateMaskSet(scopedOpts, that.noMasksCache);\n void 0 !== maskset && (void 0 !== el.inputmask && el.inputmask.remove(), el.inputmask = new Inputmask(), \n el.inputmask.opts = scopedOpts, el.inputmask.noMasksCache = that.noMasksCache, el.inputmask.userOptions = $.extend(!0, {}, that.userOptions), \n el.inputmask.el = el, el.inputmask.maskset = maskset, $.data(el, \"_inputmask_opts\", scopedOpts), \n maskScope.call(el.inputmask, {\n action: \"mask\"\n }));\n }), elems && elems[0] ? elems[0].inputmask || this : this;\n },\n option: function(options, noremask) {\n return \"string\" == typeof options ? this.opts[options] : \"object\" == typeof options ? ($.extend(this.userOptions, options), \n this.el && noremask !== !0 && this.mask(this.el), this) : void 0;\n },\n unmaskedvalue: function(value) {\n return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), \n maskScope.call(this, {\n action: \"unmaskedvalue\",\n value: value\n });\n },\n remove: function() {\n return maskScope.call(this, {\n action: \"remove\"\n });\n },\n getemptymask: function() {\n return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), \n maskScope.call(this, {\n action: \"getemptymask\"\n });\n },\n hasMaskedValue: function() {\n return !this.opts.autoUnmask;\n },\n isComplete: function() {\n return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), \n maskScope.call(this, {\n action: \"isComplete\"\n });\n },\n getmetadata: function() {\n return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), \n maskScope.call(this, {\n action: \"getmetadata\"\n });\n },\n isValid: function(value) {\n return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), \n maskScope.call(this, {\n action: \"isValid\",\n value: value\n });\n },\n format: function(value, metadata) {\n return this.maskset = this.maskset || generateMaskSet(this.opts, this.noMasksCache), \n maskScope.call(this, {\n action: \"format\",\n value: value,\n metadata: metadata\n });\n },\n analyseMask: function(mask, opts) {\n function MaskToken(isGroup, isOptional, isQuantifier, isAlternator) {\n this.matches = [], this.openGroup = isGroup || !1, this.isGroup = isGroup || !1, \n this.isOptional = isOptional || !1, this.isQuantifier = isQuantifier || !1, this.isAlternator = isAlternator || !1, \n this.quantifier = {\n min: 1,\n max: 1\n };\n }\n function insertTestDefinition(mtoken, element, position) {\n var maskdef = opts.definitions[element];\n position = void 0 !== position ? position : mtoken.matches.length;\n var prevMatch = mtoken.matches[position - 1];\n if (maskdef && !escaped) {\n maskdef.placeholder = $.isFunction(maskdef.placeholder) ? maskdef.placeholder(opts) : maskdef.placeholder;\n for (var prevalidators = maskdef.prevalidator, prevalidatorsL = prevalidators ? prevalidators.length : 0, i = 1; i < maskdef.cardinality; i++) {\n var prevalidator = prevalidatorsL >= i ? prevalidators[i - 1] : [], validator = prevalidator.validator, cardinality = prevalidator.cardinality;\n mtoken.matches.splice(position++, 0, {\n fn: validator ? \"string\" == typeof validator ? new RegExp(validator) : new function() {\n this.test = validator;\n }() : new RegExp(\".\"),\n cardinality: cardinality ? cardinality : 1,\n optionality: mtoken.isOptional,\n newBlockMarker: void 0 === prevMatch || prevMatch.def !== (maskdef.definitionSymbol || element),\n casing: maskdef.casing,\n def: maskdef.definitionSymbol || element,\n placeholder: maskdef.placeholder,\n nativeDef: element\n }), prevMatch = mtoken.matches[position - 1];\n }\n mtoken.matches.splice(position++, 0, {\n fn: maskdef.validator ? \"string\" == typeof maskdef.validator ? new RegExp(maskdef.validator) : new function() {\n this.test = maskdef.validator;\n }() : new RegExp(\".\"),\n cardinality: maskdef.cardinality,\n optionality: mtoken.isOptional,\n newBlockMarker: void 0 === prevMatch || prevMatch.def !== (maskdef.definitionSymbol || element),\n casing: maskdef.casing,\n def: maskdef.definitionSymbol || element,\n placeholder: maskdef.placeholder,\n nativeDef: element\n });\n } else mtoken.matches.splice(position++, 0, {\n fn: null,\n cardinality: 0,\n optionality: mtoken.isOptional,\n newBlockMarker: void 0 === prevMatch || prevMatch.def !== element,\n casing: null,\n def: opts.staticDefinitionSymbol || element,\n placeholder: void 0 !== opts.staticDefinitionSymbol ? element : void 0,\n nativeDef: element\n }), escaped = !1;\n }\n function verifyGroupMarker(maskToken) {\n maskToken && maskToken.matches && $.each(maskToken.matches, function(ndx, token) {\n var nextToken = maskToken.matches[ndx + 1];\n (void 0 === nextToken || void 0 === nextToken.matches || nextToken.isQuantifier === !1) && token && token.isGroup && (token.isGroup = !1, \n insertTestDefinition(token, opts.groupmarker.start, 0), token.openGroup !== !0 && insertTestDefinition(token, opts.groupmarker.end)), \n verifyGroupMarker(token);\n });\n }\n function defaultCase() {\n if (openenings.length > 0) {\n if (currentOpeningToken = openenings[openenings.length - 1], insertTestDefinition(currentOpeningToken, m), \n currentOpeningToken.isAlternator) {\n alternator = openenings.pop();\n for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1;\n openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1], \n currentOpeningToken.matches.push(alternator)) : currentToken.matches.push(alternator);\n }\n } else insertTestDefinition(currentToken, m);\n }\n function reverseTokens(maskToken) {\n function reverseStatic(st) {\n return st === opts.optionalmarker.start ? st = opts.optionalmarker.end : st === opts.optionalmarker.end ? st = opts.optionalmarker.start : st === opts.groupmarker.start ? st = opts.groupmarker.end : st === opts.groupmarker.end && (st = opts.groupmarker.start), \n st;\n }\n maskToken.matches = maskToken.matches.reverse();\n for (var match in maskToken.matches) {\n var intMatch = parseInt(match);\n if (maskToken.matches[match].isQuantifier && maskToken.matches[intMatch + 1] && maskToken.matches[intMatch + 1].isGroup) {\n var qt = maskToken.matches[match];\n maskToken.matches.splice(match, 1), maskToken.matches.splice(intMatch + 1, 0, qt);\n }\n void 0 !== maskToken.matches[match].matches ? maskToken.matches[match] = reverseTokens(maskToken.matches[match]) : maskToken.matches[match] = reverseStatic(maskToken.matches[match]);\n }\n return maskToken;\n }\n for (var match, m, openingToken, currentOpeningToken, alternator, lastMatch, groupToken, tokenizer = /(?:[?*+]|\\{[0-9\\+\\*]+(?:,[0-9\\+\\*]*)?\\})|[^.?*+^${[]()|\\\\]+|./g, escaped = !1, currentToken = new MaskToken(), openenings = [], maskTokens = []; match = tokenizer.exec(mask); ) if (m = match[0], \n escaped) defaultCase(); else switch (m.charAt(0)) {\n case opts.escapeChar:\n escaped = !0;\n break;\n\n case opts.optionalmarker.end:\n case opts.groupmarker.end:\n if (openingToken = openenings.pop(), openingToken.openGroup = !1, void 0 !== openingToken) if (openenings.length > 0) {\n if (currentOpeningToken = openenings[openenings.length - 1], currentOpeningToken.matches.push(openingToken), \n currentOpeningToken.isAlternator) {\n alternator = openenings.pop();\n for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1;\n openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1], \n currentOpeningToken.matches.push(alternator)) : currentToken.matches.push(alternator);\n }\n } else currentToken.matches.push(openingToken); else defaultCase();\n break;\n\n case opts.optionalmarker.start:\n openenings.push(new MaskToken((!1), (!0)));\n break;\n\n case opts.groupmarker.start:\n openenings.push(new MaskToken((!0)));\n break;\n\n case opts.quantifiermarker.start:\n var quantifier = new MaskToken((!1), (!1), (!0));\n m = m.replace(/[{}]/g, \"\");\n var mq = m.split(\",\"), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 === mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]);\n if (\"*\" !== mq1 && \"+\" !== mq1 || (mq0 = \"*\" === mq1 ? 0 : 1), quantifier.quantifier = {\n min: mq0,\n max: mq1\n }, openenings.length > 0) {\n var matches = openenings[openenings.length - 1].matches;\n match = matches.pop(), match.isGroup || (groupToken = new MaskToken((!0)), groupToken.matches.push(match), \n match = groupToken), matches.push(match), matches.push(quantifier);\n } else match = currentToken.matches.pop(), match.isGroup || (groupToken = new MaskToken((!0)), \n groupToken.matches.push(match), match = groupToken), currentToken.matches.push(match), \n currentToken.matches.push(quantifier);\n break;\n\n case opts.alternatormarker:\n openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1], \n lastMatch = currentOpeningToken.matches.pop()) : lastMatch = currentToken.matches.pop(), \n lastMatch.isAlternator ? openenings.push(lastMatch) : (alternator = new MaskToken((!1), (!1), (!1), (!0)), \n alternator.matches.push(lastMatch), openenings.push(alternator));\n break;\n\n default:\n defaultCase();\n }\n for (;openenings.length > 0; ) openingToken = openenings.pop(), currentToken.matches.push(openingToken);\n return currentToken.matches.length > 0 && (verifyGroupMarker(currentToken), maskTokens.push(currentToken)), \n opts.numericInput && reverseTokens(maskTokens[0]), maskTokens;\n }\n }, Inputmask.extendDefaults = function(options) {\n $.extend(!0, Inputmask.prototype.defaults, options);\n }, Inputmask.extendDefinitions = function(definition) {\n $.extend(!0, Inputmask.prototype.defaults.definitions, definition);\n }, Inputmask.extendAliases = function(alias) {\n $.extend(!0, Inputmask.prototype.defaults.aliases, alias);\n }, Inputmask.format = function(value, options, metadata) {\n return Inputmask(options).format(value, metadata);\n }, Inputmask.unmask = function(value, options) {\n return Inputmask(options).unmaskedvalue(value);\n }, Inputmask.isValid = function(value, options) {\n return Inputmask(options).isValid(value);\n }, Inputmask.remove = function(elems) {\n $.each(elems, function(ndx, el) {\n el.inputmask && el.inputmask.remove();\n });\n }, Inputmask.escapeRegex = function(str) {\n var specials = [ \"/\", \".\", \"*\", \"+\", \"?\", \"|\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", \"\\\\\", \"$\", \"^\" ];\n return str.replace(new RegExp(\"(\\\\\" + specials.join(\"|\\\\\") + \")\", \"gim\"), \"\\\\$1\");\n }, Inputmask.keyCode = {\n ALT: 18,\n BACKSPACE: 8,\n BACKSPACE_SAFARI: 127,\n CAPS_LOCK: 20,\n COMMA: 188,\n COMMAND: 91,\n COMMAND_LEFT: 91,\n COMMAND_RIGHT: 93,\n CONTROL: 17,\n DELETE: 46,\n DOWN: 40,\n END: 35,\n ENTER: 13,\n ESCAPE: 27,\n HOME: 36,\n INSERT: 45,\n LEFT: 37,\n MENU: 93,\n NUMPAD_ADD: 107,\n NUMPAD_DECIMAL: 110,\n NUMPAD_DIVIDE: 111,\n NUMPAD_ENTER: 108,\n NUMPAD_MULTIPLY: 106,\n NUMPAD_SUBTRACT: 109,\n PAGE_DOWN: 34,\n PAGE_UP: 33,\n PERIOD: 190,\n RIGHT: 39,\n SHIFT: 16,\n SPACE: 32,\n TAB: 9,\n UP: 38,\n WINDOWS: 91,\n X: 88\n }, window.Inputmask = Inputmask, Inputmask;\n}(jQuery), function($, Inputmask) {\n return void 0 === $.fn.inputmask && ($.fn.inputmask = function(fn, options) {\n var nptmask, input = this[0];\n if (void 0 === options && (options = {}), \"string\" == typeof fn) switch (fn) {\n case \"unmaskedvalue\":\n return input && input.inputmask ? input.inputmask.unmaskedvalue() : $(input).val();\n\n case \"remove\":\n return this.each(function() {\n this.inputmask && this.inputmask.remove();\n });\n\n case \"getemptymask\":\n return input && input.inputmask ? input.inputmask.getemptymask() : \"\";\n\n case \"hasMaskedValue\":\n return !(!input || !input.inputmask) && input.inputmask.hasMaskedValue();\n\n case \"isComplete\":\n return !input || !input.inputmask || input.inputmask.isComplete();\n\n case \"getmetadata\":\n return input && input.inputmask ? input.inputmask.getmetadata() : void 0;\n\n case \"setvalue\":\n $(input).val(options), input && void 0 === input.inputmask && $(input).triggerHandler(\"setvalue\");\n break;\n\n case \"option\":\n if (\"string\" != typeof options) return this.each(function() {\n if (void 0 !== this.inputmask) return this.inputmask.option(options);\n });\n if (input && void 0 !== input.inputmask) return input.inputmask.option(options);\n break;\n\n default:\n return options.alias = fn, nptmask = new Inputmask(options), this.each(function() {\n nptmask.mask(this);\n });\n } else {\n if (\"object\" == typeof fn) return nptmask = new Inputmask(fn), void 0 === fn.mask && void 0 === fn.alias ? this.each(function() {\n return void 0 !== this.inputmask ? this.inputmask.option(fn) : void nptmask.mask(this);\n }) : this.each(function() {\n nptmask.mask(this);\n });\n if (void 0 === fn) return this.each(function() {\n nptmask = new Inputmask(options), nptmask.mask(this);\n });\n }\n }), $.fn.inputmask;\n}(jQuery, Inputmask), function($, Inputmask) {}(jQuery, Inputmask), function($, Inputmask) {\n function isLeapYear(year) {\n return isNaN(year) || 29 === new Date(year, 2, 0).getDate();\n }\n return Inputmask.extendAliases({\n \"dd/mm/yyyy\": {\n mask: \"1/2/y\",\n placeholder: \"dd/mm/yyyy\",\n regex: {\n val1pre: new RegExp(\"[0-3]\"),\n val1: new RegExp(\"0[1-9]|[12][0-9]|3[01]\"),\n val2pre: function(separator) {\n var escapedSeparator = Inputmask.escapeRegex.call(this, separator);\n return new RegExp(\"((0[1-9]|[12][0-9]|3[01])\" + escapedSeparator + \"[01])\");\n },\n val2: function(separator) {\n var escapedSeparator = Inputmask.escapeRegex.call(this, separator);\n return new RegExp(\"((0[1-9]|[12][0-9])\" + escapedSeparator + \"(0[1-9]|1[012]))|(30\" + escapedSeparator + \"(0[13-9]|1[012]))|(31\" + escapedSeparator + \"(0[13578]|1[02]))\");\n }\n },\n leapday: \"29/02/\",\n separator: \"/\",\n yearrange: {\n minyear: 1900,\n maxyear: 2099\n },\n isInYearRange: function(chrs, minyear, maxyear) {\n if (isNaN(chrs)) return !1;\n var enteredyear = parseInt(chrs.concat(minyear.toString().slice(chrs.length))), enteredyear2 = parseInt(chrs.concat(maxyear.toString().slice(chrs.length)));\n return !isNaN(enteredyear) && (minyear <= enteredyear && enteredyear <= maxyear) || !isNaN(enteredyear2) && (minyear <= enteredyear2 && enteredyear2 <= maxyear);\n },\n determinebaseyear: function(minyear, maxyear, hint) {\n var currentyear = new Date().getFullYear();\n if (minyear > currentyear) return minyear;\n if (maxyear < currentyear) {\n for (var maxYearPrefix = maxyear.toString().slice(0, 2), maxYearPostfix = maxyear.toString().slice(2, 4); maxyear < maxYearPrefix + hint; ) maxYearPrefix--;\n var maxxYear = maxYearPrefix + maxYearPostfix;\n return minyear > maxxYear ? minyear : maxxYear;\n }\n if (minyear <= currentyear && currentyear <= maxyear) {\n for (var currentYearPrefix = currentyear.toString().slice(0, 2); maxyear < currentYearPrefix + hint; ) currentYearPrefix--;\n var currentYearAndHint = currentYearPrefix + hint;\n return currentYearAndHint < minyear ? minyear : currentYearAndHint;\n }\n return currentyear;\n },\n onKeyDown: function(e, buffer, caretPos, opts) {\n var $input = $(this);\n if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {\n var today = new Date();\n $input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString()), \n $input.trigger(\"setvalue\");\n }\n },\n getFrontValue: function(mask, buffer, opts) {\n for (var start = 0, length = 0, i = 0; i < mask.length && \"2\" !== mask.charAt(i); i++) {\n var definition = opts.definitions[mask.charAt(i)];\n definition ? (start += length, length = definition.cardinality) : length++;\n }\n return buffer.join(\"\").substr(start, length);\n },\n postValidation: function(buffer, currentResult, opts) {\n var dayMonthValue, year, bufferStr = buffer.join(\"\");\n return 0 === opts.mask.indexOf(\"y\") ? (year = bufferStr.substr(0, 4), dayMonthValue = bufferStr.substr(4, 11)) : (year = bufferStr.substr(6, 11), \n dayMonthValue = bufferStr.substr(0, 6)), currentResult && (dayMonthValue !== opts.leapday || isLeapYear(year));\n },\n definitions: {\n \"1\": {\n validator: function(chrs, maskset, pos, strict, opts) {\n var isValid = opts.regex.val1.test(chrs);\n return strict || isValid || chrs.charAt(1) !== opts.separator && \"-./\".indexOf(chrs.charAt(1)) === -1 || !(isValid = opts.regex.val1.test(\"0\" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = \"0\", \n {\n refreshFromBuffer: {\n start: pos - 1,\n end: pos\n },\n pos: pos,\n c: chrs.charAt(0)\n });\n },\n cardinality: 2,\n prevalidator: [ {\n validator: function(chrs, maskset, pos, strict, opts) {\n var pchrs = chrs;\n isNaN(maskset.buffer[pos + 1]) || (pchrs += maskset.buffer[pos + 1]);\n var isValid = 1 === pchrs.length ? opts.regex.val1pre.test(pchrs) : opts.regex.val1.test(pchrs);\n if (!strict && !isValid) {\n if (isValid = opts.regex.val1.test(chrs + \"0\")) return maskset.buffer[pos] = chrs, \n maskset.buffer[++pos] = \"0\", {\n pos: pos,\n c: \"0\"\n };\n if (isValid = opts.regex.val1.test(\"0\" + chrs)) return maskset.buffer[pos] = \"0\", \n pos++, {\n pos: pos\n };\n }\n return isValid;\n },\n cardinality: 1\n } ]\n },\n \"2\": {\n validator: function(chrs, maskset, pos, strict, opts) {\n var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);\n frontValue.indexOf(opts.placeholder[0]) !== -1 && (frontValue = \"01\" + opts.separator);\n var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);\n return strict || isValid || chrs.charAt(1) !== opts.separator && \"-./\".indexOf(chrs.charAt(1)) === -1 || !(isValid = opts.regex.val2(opts.separator).test(frontValue + \"0\" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = \"0\", \n {\n refreshFromBuffer: {\n start: pos - 1,\n end: pos\n },\n pos: pos,\n c: chrs.charAt(0)\n });\n },\n cardinality: 2,\n prevalidator: [ {\n validator: function(chrs, maskset, pos, strict, opts) {\n isNaN(maskset.buffer[pos + 1]) || (chrs += maskset.buffer[pos + 1]);\n var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);\n frontValue.indexOf(opts.placeholder[0]) !== -1 && (frontValue = \"01\" + opts.separator);\n var isValid = 1 === chrs.length ? opts.regex.val2pre(opts.separator).test(frontValue + chrs) : opts.regex.val2(opts.separator).test(frontValue + chrs);\n return strict || isValid || !(isValid = opts.regex.val2(opts.separator).test(frontValue + \"0\" + chrs)) ? isValid : (maskset.buffer[pos] = \"0\", \n pos++, {\n pos: pos\n });\n },\n cardinality: 1\n } ]\n },\n y: {\n validator: function(chrs, maskset, pos, strict, opts) {\n return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);\n },\n cardinality: 4,\n prevalidator: [ {\n validator: function(chrs, maskset, pos, strict, opts) {\n var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);\n if (!strict && !isValid) {\n var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + \"0\").toString().slice(0, 1);\n if (isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0), \n {\n pos: pos\n };\n if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + \"0\").toString().slice(0, 2), \n isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0), \n maskset.buffer[pos++] = yearPrefix.charAt(1), {\n pos: pos\n };\n }\n return isValid;\n },\n cardinality: 1\n }, {\n validator: function(chrs, maskset, pos, strict, opts) {\n var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);\n if (!strict && !isValid) {\n var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2);\n if (isValid = opts.isInYearRange(chrs[0] + yearPrefix[1] + chrs[1], opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(1), \n {\n pos: pos\n };\n if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2), \n isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos - 1] = yearPrefix.charAt(0), \n maskset.buffer[pos++] = yearPrefix.charAt(1), maskset.buffer[pos++] = chrs.charAt(0), \n {\n refreshFromBuffer: {\n start: pos - 3,\n end: pos\n },\n pos: pos\n };\n }\n return isValid;\n },\n cardinality: 2\n }, {\n validator: function(chrs, maskset, pos, strict, opts) {\n return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);\n },\n cardinality: 3\n } ]\n }\n },\n insertMode: !1,\n autoUnmask: !1\n },\n \"mm/dd/yyyy\": {\n placeholder: \"mm/dd/yyyy\",\n alias: \"dd/mm/yyyy\",\n regex: {\n val2pre: function(separator) {\n var escapedSeparator = Inputmask.escapeRegex.call(this, separator);\n return new RegExp(\"((0[13-9]|1[012])\" + escapedSeparator + \"[0-3])|(02\" + escapedSeparator + \"[0-2])\");\n },\n val2: function(separator) {\n var escapedSeparator = Inputmask.escapeRegex.call(this, separator);\n return new RegExp(\"((0[1-9]|1[012])\" + escapedSeparator + \"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])\" + escapedSeparator + \"30)|((0[13578]|1[02])\" + escapedSeparator + \"31)\");\n },\n val1pre: new RegExp(\"[01]\"),\n val1: new RegExp(\"0[1-9]|1[012]\")\n },\n leapday: \"02/29/\",\n onKeyDown: function(e, buffer, caretPos, opts) {\n var $input = $(this);\n if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {\n var today = new Date();\n $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()), \n $input.trigger(\"setvalue\");\n }\n }\n },\n \"yyyy/mm/dd\": {\n mask: \"y/1/2\",\n placeholder: \"yyyy/mm/dd\",\n alias: \"mm/dd/yyyy\",\n leapday: \"/02/29\",\n onKeyDown: function(e, buffer, caretPos, opts) {\n var $input = $(this);\n if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {\n var today = new Date();\n $input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString()), \n $input.trigger(\"setvalue\");\n }\n }\n },\n \"dd.mm.yyyy\": {\n mask: \"1.2.y\",\n placeholder: \"dd.mm.yyyy\",\n leapday: \"29.02.\",\n separator: \".\",\n alias: \"dd/mm/yyyy\"\n },\n \"dd-mm-yyyy\": {\n mask: \"1-2-y\",\n placeholder: \"dd-mm-yyyy\",\n leapday: \"29-02-\",\n separator: \"-\",\n alias: \"dd/mm/yyyy\"\n },\n \"mm.dd.yyyy\": {\n mask: \"1.2.y\",\n placeholder: \"mm.dd.yyyy\",\n leapday: \"02.29.\",\n separator: \".\",\n alias: \"mm/dd/yyyy\"\n },\n \"mm-dd-yyyy\": {\n mask: \"1-2-y\",\n placeholder: \"mm-dd-yyyy\",\n leapday: \"02-29-\",\n separator: \"-\",\n alias: \"mm/dd/yyyy\"\n },\n \"yyyy.mm.dd\": {\n mask: \"y.1.2\",\n placeholder: \"yyyy.mm.dd\",\n leapday: \".02.29\",\n separator: \".\",\n alias: \"yyyy/mm/dd\"\n },\n \"yyyy-mm-dd\": {\n mask: \"y-1-2\",\n placeholder: \"yyyy-mm-dd\",\n leapday: \"-02-29\",\n separator: \"-\",\n alias: \"yyyy/mm/dd\"\n },\n datetime: {\n mask: \"1/2/y h:s\",\n placeholder: \"dd/mm/yyyy hh:mm\",\n alias: \"dd/mm/yyyy\",\n regex: {\n hrspre: new RegExp(\"[012]\"),\n hrs24: new RegExp(\"2[0-4]|1[3-9]\"),\n hrs: new RegExp(\"[01][0-9]|2[0-4]\"),\n ampm: new RegExp(\"^[a|p|A|P][m|M]\"),\n mspre: new RegExp(\"[0-5]\"),\n ms: new RegExp(\"[0-5][0-9]\")\n },\n timeseparator: \":\",\n hourFormat: \"24\",\n definitions: {\n h: {\n validator: function(chrs, maskset, pos, strict, opts) {\n if (\"24\" === opts.hourFormat && 24 === parseInt(chrs, 10)) return maskset.buffer[pos - 1] = \"0\", \n maskset.buffer[pos] = \"0\", {\n refreshFromBuffer: {\n start: pos - 1,\n end: pos\n },\n c: \"0\"\n };\n var isValid = opts.regex.hrs.test(chrs);\n if (!strict && !isValid && (chrs.charAt(1) === opts.timeseparator || \"-.:\".indexOf(chrs.charAt(1)) !== -1) && (isValid = opts.regex.hrs.test(\"0\" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = \"0\", \n maskset.buffer[pos] = chrs.charAt(0), pos++, {\n refreshFromBuffer: {\n start: pos - 2,\n end: pos\n },\n pos: pos,\n c: opts.timeseparator\n };\n if (isValid && \"24\" !== opts.hourFormat && opts.regex.hrs24.test(chrs)) {\n var tmp = parseInt(chrs, 10);\n return 24 === tmp ? (maskset.buffer[pos + 5] = \"a\", maskset.buffer[pos + 6] = \"m\") : (maskset.buffer[pos + 5] = \"p\", \n maskset.buffer[pos + 6] = \"m\"), tmp -= 12, tmp < 10 ? (maskset.buffer[pos] = tmp.toString(), \n maskset.buffer[pos - 1] = \"0\") : (maskset.buffer[pos] = tmp.toString().charAt(1), \n maskset.buffer[pos - 1] = tmp.toString().charAt(0)), {\n refreshFromBuffer: {\n start: pos - 1,\n end: pos + 6\n },\n c: maskset.buffer[pos]\n };\n }\n return isValid;\n },\n cardinality: 2,\n prevalidator: [ {\n validator: function(chrs, maskset, pos, strict, opts) {\n var isValid = opts.regex.hrspre.test(chrs);\n return strict || isValid || !(isValid = opts.regex.hrs.test(\"0\" + chrs)) ? isValid : (maskset.buffer[pos] = \"0\", \n pos++, {\n pos: pos\n });\n },\n cardinality: 1\n } ]\n },\n s: {\n validator: \"[0-5][0-9]\",\n cardinality: 2,\n prevalidator: [ {\n validator: function(chrs, maskset, pos, strict, opts) {\n var isValid = opts.regex.mspre.test(chrs);\n return strict || isValid || !(isValid = opts.regex.ms.test(\"0\" + chrs)) ? isValid : (maskset.buffer[pos] = \"0\", \n pos++, {\n pos: pos\n });\n },\n cardinality: 1\n } ]\n },\n t: {\n validator: function(chrs, maskset, pos, strict, opts) {\n return opts.regex.ampm.test(chrs + \"m\");\n },\n casing: \"lower\",\n cardinality: 1\n }\n },\n insertMode: !1,\n autoUnmask: !1\n },\n datetime12: {\n mask: \"1/2/y h:s t\\\\m\",\n placeholder: \"dd/mm/yyyy hh:mm xm\",\n alias: \"datetime\",\n hourFormat: \"12\"\n },\n \"mm/dd/yyyy hh:mm xm\": {\n mask: \"1/2/y h:s t\\\\m\",\n placeholder: \"mm/dd/yyyy hh:mm xm\",\n alias: \"datetime12\",\n regex: {\n val2pre: function(separator) {\n var escapedSeparator = Inputmask.escapeRegex.call(this, separator);\n return new RegExp(\"((0[13-9]|1[012])\" + escapedSeparator + \"[0-3])|(02\" + escapedSeparator + \"[0-2])\");\n },\n val2: function(separator) {\n var escapedSeparator = Inputmask.escapeRegex.call(this, separator);\n return new RegExp(\"((0[1-9]|1[012])\" + escapedSeparator + \"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])\" + escapedSeparator + \"30)|((0[13578]|1[02])\" + escapedSeparator + \"31)\");\n },\n val1pre: new RegExp(\"[01]\"),\n val1: new RegExp(\"0[1-9]|1[012]\")\n },\n leapday: \"02/29/\",\n onKeyDown: function(e, buffer, caretPos, opts) {\n var $input = $(this);\n if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {\n var today = new Date();\n $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()), \n $input.trigger(\"setvalue\");\n }\n }\n },\n \"hh:mm t\": {\n mask: \"h:s t\\\\m\",\n placeholder: \"hh:mm xm\",\n alias: \"datetime\",\n hourFormat: \"12\"\n },\n \"h:s t\": {\n mask: \"h:s t\\\\m\",\n placeholder: \"hh:mm xm\",\n alias: \"datetime\",\n hourFormat: \"12\"\n },\n \"hh:mm:ss\": {\n mask: \"h:s:s\",\n placeholder: \"hh:mm:ss\",\n alias: \"datetime\",\n autoUnmask: !1\n },\n \"hh:mm\": {\n mask: \"h:s\",\n placeholder: \"hh:mm\",\n alias: \"datetime\",\n autoUnmask: !1\n },\n date: {\n alias: \"dd/mm/yyyy\"\n },\n \"mm/yyyy\": {\n mask: \"1/y\",\n placeholder: \"mm/yyyy\",\n leapday: \"donotuse\",\n separator: \"/\",\n alias: \"mm/dd/yyyy\"\n },\n shamsi: {\n regex: {\n val2pre: function(separator) {\n var escapedSeparator = Inputmask.escapeRegex.call(this, separator);\n return new RegExp(\"((0[1-9]|1[012])\" + escapedSeparator + \"[0-3])\");\n },\n val2: function(separator) {\n var escapedSeparator = Inputmask.escapeRegex.call(this, separator);\n return new RegExp(\"((0[1-9]|1[012])\" + escapedSeparator + \"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])\" + escapedSeparator + \"30)|((0[1-6])\" + escapedSeparator + \"31)\");\n },\n val1pre: new RegExp(\"[01]\"),\n val1: new RegExp(\"0[1-9]|1[012]\")\n },\n yearrange: {\n minyear: 1300,\n maxyear: 1499\n },\n mask: \"y/1/2\",\n leapday: \"/12/30\",\n placeholder: \"yyyy/mm/dd\",\n alias: \"mm/dd/yyyy\",\n clearIncomplete: !0\n }\n }), Inputmask;\n}(jQuery, Inputmask), function($, Inputmask) {\n return Inputmask.extendDefinitions({\n A: {\n validator: \"[A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n cardinality: 1,\n casing: \"upper\"\n },\n \"&\": {\n validator: \"[0-9A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n cardinality: 1,\n casing: \"upper\"\n },\n \"#\": {\n validator: \"[0-9A-Fa-f]\",\n cardinality: 1,\n casing: \"upper\"\n }\n }), Inputmask.extendAliases({\n url: {\n definitions: {\n i: {\n validator: \".\",\n cardinality: 1\n }\n },\n mask: \"(\\\\http://)|(\\\\http\\\\s://)|(ftp://)|(ftp\\\\s://)i{+}\",\n insertMode: !1,\n autoUnmask: !1,\n inputmode: \"url\"\n },\n ip: {\n mask: \"i[i[i]].i[i[i]].i[i[i]].i[i[i]]\",\n definitions: {\n i: {\n validator: function(chrs, maskset, pos, strict, opts) {\n return pos - 1 > -1 && \".\" !== maskset.buffer[pos - 1] ? (chrs = maskset.buffer[pos - 1] + chrs, \n chrs = pos - 2 > -1 && \".\" !== maskset.buffer[pos - 2] ? maskset.buffer[pos - 2] + chrs : \"0\" + chrs) : chrs = \"00\" + chrs, \n new RegExp(\"25[0-5]|2[0-4][0-9]|[01][0-9][0-9]\").test(chrs);\n },\n cardinality: 1\n }\n },\n onUnMask: function(maskedValue, unmaskedValue, opts) {\n return maskedValue;\n },\n inputmode: \"numeric\"\n },\n email: {\n mask: \"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]\",\n greedy: !1,\n onBeforePaste: function(pastedValue, opts) {\n return pastedValue = pastedValue.toLowerCase(), pastedValue.replace(\"mailto:\", \"\");\n },\n definitions: {\n \"*\": {\n validator: \"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]\",\n cardinality: 1,\n casing: \"lower\"\n },\n \"-\": {\n validator: \"[0-9A-Za-z-]\",\n cardinality: 1,\n casing: \"lower\"\n }\n },\n onUnMask: function(maskedValue, unmaskedValue, opts) {\n return maskedValue;\n },\n inputmode: \"email\"\n },\n mac: {\n mask: \"##:##:##:##:##:##\"\n },\n vin: {\n mask: \"V{13}9{4}\",\n definitions: {\n V: {\n validator: \"[A-HJ-NPR-Za-hj-npr-z\\\\d]\",\n cardinality: 1,\n casing: \"upper\"\n }\n },\n clearIncomplete: !0,\n autoUnmask: !0\n }\n }), Inputmask;\n}(jQuery, Inputmask), function($, Inputmask) {\n return Inputmask.extendAliases({\n numeric: {\n mask: function(opts) {\n function autoEscape(txt) {\n for (var escapedTxt = \"\", i = 0; i < txt.length; i++) escapedTxt += opts.definitions[txt.charAt(i)] || opts.optionalmarker.start === txt.charAt(i) || opts.optionalmarker.end === txt.charAt(i) || opts.quantifiermarker.start === txt.charAt(i) || opts.quantifiermarker.end === txt.charAt(i) || opts.groupmarker.start === txt.charAt(i) || opts.groupmarker.end === txt.charAt(i) || opts.alternatormarker === txt.charAt(i) ? \"\\\\\" + txt.charAt(i) : txt.charAt(i);\n return escapedTxt;\n }\n if (0 !== opts.repeat && isNaN(opts.integerDigits) && (opts.integerDigits = opts.repeat), \n opts.repeat = 0, opts.groupSeparator === opts.radixPoint && (\".\" === opts.radixPoint ? opts.groupSeparator = \",\" : \",\" === opts.radixPoint ? opts.groupSeparator = \".\" : opts.groupSeparator = \"\"), \n \" \" === opts.groupSeparator && (opts.skipOptionalPartCharacter = void 0), opts.autoGroup = opts.autoGroup && \"\" !== opts.groupSeparator, \n opts.autoGroup && (\"string\" == typeof opts.groupSize && isFinite(opts.groupSize) && (opts.groupSize = parseInt(opts.groupSize)), \n isFinite(opts.integerDigits))) {\n var seps = Math.floor(opts.integerDigits / opts.groupSize), mod = opts.integerDigits % opts.groupSize;\n opts.integerDigits = parseInt(opts.integerDigits) + (0 === mod ? seps - 1 : seps), \n opts.integerDigits < 1 && (opts.integerDigits = \"*\");\n }\n opts.placeholder.length > 1 && (opts.placeholder = opts.placeholder.charAt(0)), \n \"radixFocus\" === opts.positionCaretOnClick && \"\" === opts.placeholder && opts.integerOptional === !1 && (opts.positionCaretOnClick = \"lvp\"), \n opts.definitions[\";\"] = opts.definitions[\"~\"], opts.definitions[\";\"].definitionSymbol = \"~\", \n opts.numericInput === !0 && (opts.positionCaretOnClick = \"radixFocus\" === opts.positionCaretOnClick ? \"lvp\" : opts.positionCaretOnClick, \n opts.digitsOptional = !1, isNaN(opts.digits) && (opts.digits = 2), opts.decimalProtect = !1);\n var mask = \"[+]\";\n if (mask += autoEscape(opts.prefix), mask += opts.integerOptional === !0 ? \"~{1,\" + opts.integerDigits + \"}\" : \"~{\" + opts.integerDigits + \"}\", \n void 0 !== opts.digits) {\n opts.decimalProtect && (opts.radixPointDefinitionSymbol = \":\");\n var dq = opts.digits.toString().split(\",\");\n isFinite(dq[0] && dq[1] && isFinite(dq[1])) ? mask += (opts.decimalProtect ? \":\" : opts.radixPoint) + \";{\" + opts.digits + \"}\" : (isNaN(opts.digits) || parseInt(opts.digits) > 0) && (mask += opts.digitsOptional ? \"[\" + (opts.decimalProtect ? \":\" : opts.radixPoint) + \";{1,\" + opts.digits + \"}]\" : (opts.decimalProtect ? \":\" : opts.radixPoint) + \";{\" + opts.digits + \"}\");\n }\n return mask += autoEscape(opts.suffix), mask += \"[-]\", opts.greedy = !1, null !== opts.min && (opts.min = opts.min.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n \",\" === opts.radixPoint && (opts.min = opts.min.replace(opts.radixPoint, \".\"))), \n null !== opts.max && (opts.max = opts.max.toString().replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n \",\" === opts.radixPoint && (opts.max = opts.max.replace(opts.radixPoint, \".\"))), \n mask;\n },\n placeholder: \"\",\n greedy: !1,\n digits: \"*\",\n digitsOptional: !0,\n radixPoint: \".\",\n positionCaretOnClick: \"radixFocus\",\n groupSize: 3,\n groupSeparator: \"\",\n autoGroup: !1,\n allowPlus: !0,\n allowMinus: !0,\n negationSymbol: {\n front: \"-\",\n back: \"\"\n },\n integerDigits: \"+\",\n integerOptional: !0,\n prefix: \"\",\n suffix: \"\",\n rightAlign: !0,\n decimalProtect: !0,\n min: null,\n max: null,\n step: 1,\n insertMode: !0,\n autoUnmask: !1,\n unmaskAsNumber: !1,\n inputmode: \"numeric\",\n postFormat: function(buffer, pos, opts) {\n opts.numericInput === !0 && (buffer = buffer.reverse(), isFinite(pos) && (pos = buffer.join(\"\").length - pos - 1));\n var i, l;\n pos = pos >= buffer.length ? buffer.length - 1 : pos < 0 ? 0 : pos;\n var charAtPos = buffer[pos], cbuf = buffer.slice();\n charAtPos === opts.groupSeparator && (cbuf.splice(pos--, 1), charAtPos = cbuf[pos]);\n var isNegative = cbuf.join(\"\").match(new RegExp(\"^\" + Inputmask.escapeRegex(opts.negationSymbol.front)));\n isNegative = null !== isNegative && 1 === isNegative.length, pos > (isNegative ? opts.negationSymbol.front.length : 0) + opts.prefix.length && pos < cbuf.length - opts.suffix.length && (cbuf[pos] = \"!\");\n var bufVal = cbuf.join(\"\"), bufValOrigin = cbuf.join();\n if (isNegative && (bufVal = bufVal.replace(new RegExp(\"^\" + Inputmask.escapeRegex(opts.negationSymbol.front)), \"\"), \n bufVal = bufVal.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + \"$\"), \"\")), \n bufVal = bufVal.replace(new RegExp(Inputmask.escapeRegex(opts.suffix) + \"$\"), \"\"), \n bufVal = bufVal.replace(new RegExp(\"^\" + Inputmask.escapeRegex(opts.prefix)), \"\"), \n bufVal.length > 0 && opts.autoGroup || bufVal.indexOf(opts.groupSeparator) !== -1) {\n var escapedGroupSeparator = Inputmask.escapeRegex(opts.groupSeparator);\n bufVal = bufVal.replace(new RegExp(escapedGroupSeparator, \"g\"), \"\");\n var radixSplit = bufVal.split(charAtPos === opts.radixPoint ? \"!\" : opts.radixPoint);\n if (bufVal = \"\" === opts.radixPoint ? bufVal : radixSplit[0], charAtPos !== opts.negationSymbol.front && (bufVal = bufVal.replace(\"!\", \"?\")), \n bufVal.length > opts.groupSize) for (var reg = new RegExp(\"([-+]?[\\\\d?]+)([\\\\d?]{\" + opts.groupSize + \"})\"); reg.test(bufVal) && \"\" !== opts.groupSeparator; ) bufVal = bufVal.replace(reg, \"$1\" + opts.groupSeparator + \"$2\"), \n bufVal = bufVal.replace(opts.groupSeparator + opts.groupSeparator, opts.groupSeparator);\n bufVal = bufVal.replace(\"?\", \"!\"), \"\" !== opts.radixPoint && radixSplit.length > 1 && (bufVal += (charAtPos === opts.radixPoint ? \"!\" : opts.radixPoint) + radixSplit[1]);\n }\n bufVal = opts.prefix + bufVal + opts.suffix, isNegative && (bufVal = opts.negationSymbol.front + bufVal + opts.negationSymbol.back);\n var needsRefresh = bufValOrigin !== bufVal.split(\"\").join(), newPos = $.inArray(\"!\", bufVal);\n if (newPos === -1 && (newPos = pos), needsRefresh) {\n for (buffer.length = bufVal.length, i = 0, l = bufVal.length; i < l; i++) buffer[i] = bufVal.charAt(i);\n buffer[newPos] = charAtPos;\n }\n return newPos = opts.numericInput && isFinite(pos) ? buffer.join(\"\").length - newPos - 1 : newPos, \n opts.numericInput && (buffer = buffer.reverse(), $.inArray(opts.radixPoint, buffer) < newPos && buffer.join(\"\").length - opts.suffix.length !== newPos && (newPos -= 1)), \n {\n pos: newPos,\n refreshFromBuffer: needsRefresh,\n buffer: buffer,\n isNegative: isNegative\n };\n },\n onBeforeWrite: function(e, buffer, caretPos, opts) {\n var rslt;\n if (e && (\"blur\" === e.type || \"checkval\" === e.type || \"keydown\" === e.type)) {\n var maskedValue = opts.numericInput ? buffer.slice().reverse().join(\"\") : buffer.join(\"\"), processValue = maskedValue.replace(opts.prefix, \"\");\n processValue = processValue.replace(opts.suffix, \"\"), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n \",\" === opts.radixPoint && (processValue = processValue.replace(opts.radixPoint, \".\"));\n var isNegative = processValue.match(new RegExp(\"[-\" + Inputmask.escapeRegex(opts.negationSymbol.front) + \"]\", \"g\"));\n if (isNegative = null !== isNegative && 1 === isNegative.length, processValue = processValue.replace(new RegExp(\"[-\" + Inputmask.escapeRegex(opts.negationSymbol.front) + \"]\", \"g\"), \"\"), \n processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + \"$\"), \"\"), \n isNaN(opts.placeholder) && (processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.placeholder), \"g\"), \"\")), \n processValue = processValue === opts.negationSymbol.front ? processValue + \"0\" : processValue, \n \"\" !== processValue && isFinite(processValue)) {\n var floatValue = parseFloat(processValue), signedFloatValue = isNegative ? floatValue * -1 : floatValue;\n if (null !== opts.min && isFinite(opts.min) && signedFloatValue < parseFloat(opts.min) ? (floatValue = Math.abs(opts.min), \n isNegative = opts.min < 0, maskedValue = void 0) : null !== opts.max && isFinite(opts.max) && signedFloatValue > parseFloat(opts.max) && (floatValue = Math.abs(opts.max), \n isNegative = opts.max < 0, maskedValue = void 0), processValue = floatValue.toString().replace(\".\", opts.radixPoint).split(\"\"), \n isFinite(opts.digits)) {\n var radixPosition = $.inArray(opts.radixPoint, processValue), rpb = $.inArray(opts.radixPoint, maskedValue);\n radixPosition === -1 && (processValue.push(opts.radixPoint), radixPosition = processValue.length - 1);\n for (var i = 1; i <= opts.digits; i++) opts.digitsOptional || void 0 !== processValue[radixPosition + i] && processValue[radixPosition + i] !== opts.placeholder.charAt(0) ? rpb !== -1 && void 0 !== maskedValue[rpb + i] && (processValue[radixPosition + i] = processValue[radixPosition + i] || maskedValue[rpb + i]) : processValue[radixPosition + i] = \"0\";\n processValue[processValue.length - 1] === opts.radixPoint && delete processValue[processValue.length - 1];\n }\n if (floatValue.toString() !== processValue && floatValue.toString() + \".\" !== processValue || isNegative) return processValue = (opts.prefix + processValue.join(\"\")).split(\"\"), \n !isNegative || 0 === floatValue && \"blur\" === e.type || (processValue.unshift(opts.negationSymbol.front), \n processValue.push(opts.negationSymbol.back)), opts.numericInput && (processValue = processValue.reverse()), \n rslt = opts.postFormat(processValue, opts.numericInput ? caretPos : caretPos - 1, opts), \n rslt.buffer && (rslt.refreshFromBuffer = rslt.buffer.join(\"\") !== buffer.join(\"\")), \n rslt;\n }\n }\n if (opts.autoGroup) return rslt = opts.postFormat(buffer, opts.numericInput ? caretPos : caretPos - 1, opts), \n rslt.caret = caretPos < (rslt.isNegative ? opts.negationSymbol.front.length : 0) + opts.prefix.length || caretPos > rslt.buffer.length - (rslt.isNegative ? opts.negationSymbol.back.length : 0) ? rslt.pos : rslt.pos + 1, \n rslt;\n },\n regex: {\n integerPart: function(opts) {\n return new RegExp(\"[\" + Inputmask.escapeRegex(opts.negationSymbol.front) + \"+]?\\\\d+\");\n },\n integerNPart: function(opts) {\n return new RegExp(\"[\\\\d\" + Inputmask.escapeRegex(opts.groupSeparator) + Inputmask.escapeRegex(opts.placeholder.charAt(0)) + \"]+\");\n }\n },\n signHandler: function(chrs, maskset, pos, strict, opts) {\n if (!strict && opts.allowMinus && \"-\" === chrs || opts.allowPlus && \"+\" === chrs) {\n var matchRslt = maskset.buffer.join(\"\").match(opts.regex.integerPart(opts));\n if (matchRslt && matchRslt[0].length > 0) return maskset.buffer[matchRslt.index] === (\"-\" === chrs ? \"+\" : opts.negationSymbol.front) ? \"-\" === chrs ? \"\" !== opts.negationSymbol.back ? {\n pos: 0,\n c: opts.negationSymbol.front,\n remove: 0,\n caret: pos,\n insert: {\n pos: maskset.buffer.length - 1,\n c: opts.negationSymbol.back\n }\n } : {\n pos: 0,\n c: opts.negationSymbol.front,\n remove: 0,\n caret: pos\n } : \"\" !== opts.negationSymbol.back ? {\n pos: 0,\n c: \"+\",\n remove: [ 0, maskset.buffer.length - 1 ],\n caret: pos\n } : {\n pos: 0,\n c: \"+\",\n remove: 0,\n caret: pos\n } : maskset.buffer[0] === (\"-\" === chrs ? opts.negationSymbol.front : \"+\") ? \"-\" === chrs && \"\" !== opts.negationSymbol.back ? {\n remove: [ 0, maskset.buffer.length - 1 ],\n caret: pos - 1\n } : {\n remove: 0,\n caret: pos - 1\n } : \"-\" === chrs ? \"\" !== opts.negationSymbol.back ? {\n pos: 0,\n c: opts.negationSymbol.front,\n caret: pos + 1,\n insert: {\n pos: maskset.buffer.length,\n c: opts.negationSymbol.back\n }\n } : {\n pos: 0,\n c: opts.negationSymbol.front,\n caret: pos + 1\n } : {\n pos: 0,\n c: chrs,\n caret: pos + 1\n };\n }\n return !1;\n },\n radixHandler: function(chrs, maskset, pos, strict, opts) {\n if (!strict && opts.numericInput !== !0 && chrs === opts.radixPoint && void 0 !== opts.digits && (isNaN(opts.digits) || parseInt(opts.digits) > 0)) {\n var radixPos = $.inArray(opts.radixPoint, maskset.buffer), integerValue = maskset.buffer.join(\"\").match(opts.regex.integerPart(opts));\n if (radixPos !== -1 && maskset.validPositions[radixPos]) return maskset.validPositions[radixPos - 1] ? {\n caret: radixPos + 1\n } : {\n pos: integerValue.index,\n c: integerValue[0],\n caret: radixPos + 1\n };\n if (!integerValue || \"0\" === integerValue[0] && integerValue.index + 1 !== pos) return maskset.buffer[integerValue ? integerValue.index : pos] = \"0\", \n {\n pos: (integerValue ? integerValue.index : pos) + 1,\n c: opts.radixPoint\n };\n }\n return !1;\n },\n leadingZeroHandler: function(chrs, maskset, pos, strict, opts, isSelection) {\n if (!strict) {\n var buffer = maskset.buffer.slice(\"\");\n if (buffer.splice(0, opts.prefix.length), buffer.splice(buffer.length - opts.suffix.length, opts.suffix.length), \n opts.numericInput === !0) {\n var buffer = buffer.reverse(), bufferChar = buffer[0];\n if (\"0\" === bufferChar && void 0 === maskset.validPositions[pos - 1]) return {\n pos: pos,\n remove: buffer.length - 1\n };\n } else {\n pos -= opts.prefix.length;\n var radixPosition = $.inArray(opts.radixPoint, buffer), matchRslt = buffer.slice(0, radixPosition !== -1 ? radixPosition : void 0).join(\"\").match(opts.regex.integerNPart(opts));\n if (matchRslt && (radixPosition === -1 || pos <= radixPosition)) {\n var decimalPart = radixPosition === -1 ? 0 : parseInt(buffer.slice(radixPosition + 1).join(\"\"));\n if (0 === matchRslt[0].indexOf(\"\" !== opts.placeholder ? opts.placeholder.charAt(0) : \"0\") && (matchRslt.index + 1 === pos || isSelection !== !0 && 0 === decimalPart)) return maskset.buffer.splice(matchRslt.index + opts.prefix.length, 1), \n {\n pos: matchRslt.index + opts.prefix.length,\n remove: matchRslt.index + opts.prefix.length\n };\n if (\"0\" === chrs && pos <= matchRslt.index && matchRslt[0] !== opts.groupSeparator) return !1;\n }\n }\n }\n return !0;\n },\n definitions: {\n \"~\": {\n validator: function(chrs, maskset, pos, strict, opts, isSelection) {\n var isValid = opts.signHandler(chrs, maskset, pos, strict, opts);\n if (!isValid && (isValid = opts.radixHandler(chrs, maskset, pos, strict, opts), \n !isValid && (isValid = strict ? new RegExp(\"[0-9\" + Inputmask.escapeRegex(opts.groupSeparator) + \"]\").test(chrs) : new RegExp(\"[0-9]\").test(chrs), \n isValid === !0 && (isValid = opts.leadingZeroHandler(chrs, maskset, pos, strict, opts, isSelection), \n isValid === !0)))) {\n var radixPosition = $.inArray(opts.radixPoint, maskset.buffer);\n isValid = radixPosition !== -1 && (opts.digitsOptional === !1 || maskset.validPositions[pos]) && opts.numericInput !== !0 && pos > radixPosition && !strict ? {\n pos: pos,\n remove: pos\n } : {\n pos: pos\n };\n }\n return isValid;\n },\n cardinality: 1\n },\n \"+\": {\n validator: function(chrs, maskset, pos, strict, opts) {\n var isValid = opts.signHandler(chrs, maskset, pos, strict, opts);\n return !isValid && (strict && opts.allowMinus && chrs === opts.negationSymbol.front || opts.allowMinus && \"-\" === chrs || opts.allowPlus && \"+\" === chrs) && (isValid = !(!strict && \"-\" === chrs) || (\"\" !== opts.negationSymbol.back ? {\n pos: pos,\n c: \"-\" === chrs ? opts.negationSymbol.front : \"+\",\n caret: pos + 1,\n insert: {\n pos: maskset.buffer.length,\n c: opts.negationSymbol.back\n }\n } : {\n pos: pos,\n c: \"-\" === chrs ? opts.negationSymbol.front : \"+\",\n caret: pos + 1\n })), isValid;\n },\n cardinality: 1,\n placeholder: \"\"\n },\n \"-\": {\n validator: function(chrs, maskset, pos, strict, opts) {\n var isValid = opts.signHandler(chrs, maskset, pos, strict, opts);\n return !isValid && strict && opts.allowMinus && chrs === opts.negationSymbol.back && (isValid = !0), \n isValid;\n },\n cardinality: 1,\n placeholder: \"\"\n },\n \":\": {\n validator: function(chrs, maskset, pos, strict, opts) {\n var isValid = opts.signHandler(chrs, maskset, pos, strict, opts);\n if (!isValid) {\n var radix = \"[\" + Inputmask.escapeRegex(opts.radixPoint) + \"]\";\n isValid = new RegExp(radix).test(chrs), isValid && maskset.validPositions[pos] && maskset.validPositions[pos].match.placeholder === opts.radixPoint && (isValid = {\n caret: pos + 1\n });\n }\n return isValid;\n },\n cardinality: 1,\n placeholder: function(opts) {\n return opts.radixPoint;\n }\n }\n },\n onUnMask: function(maskedValue, unmaskedValue, opts) {\n if (\"\" === unmaskedValue && opts.nullable === !0) return unmaskedValue;\n var processValue = maskedValue.replace(opts.prefix, \"\");\n return processValue = processValue.replace(opts.suffix, \"\"), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n opts.unmaskAsNumber ? (\"\" !== opts.radixPoint && processValue.indexOf(opts.radixPoint) !== -1 && (processValue = processValue.replace(Inputmask.escapeRegex.call(this, opts.radixPoint), \".\")), \n Number(processValue)) : processValue;\n },\n isComplete: function(buffer, opts) {\n var maskedValue = buffer.join(\"\"), bufClone = buffer.slice();\n if (opts.postFormat(bufClone, 0, opts), bufClone.join(\"\") !== maskedValue) return !1;\n var processValue = maskedValue.replace(opts.prefix, \"\");\n return processValue = processValue.replace(opts.suffix, \"\"), processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n \",\" === opts.radixPoint && (processValue = processValue.replace(Inputmask.escapeRegex(opts.radixPoint), \".\")), \n isFinite(processValue);\n },\n onBeforeMask: function(initialValue, opts) {\n if (opts.numericInput === !0 && (initialValue = initialValue.split(\"\").reverse().join(\"\")), \n \"\" !== opts.radixPoint && isFinite(initialValue)) {\n var vs = initialValue.split(\".\"), groupSize = \"\" !== opts.groupSeparator ? parseInt(opts.groupSize) : 0;\n 2 === vs.length && (vs[0].length > groupSize || vs[1].length > groupSize) && (initialValue = initialValue.toString().replace(\".\", opts.radixPoint));\n }\n var kommaMatches = initialValue.match(/,/g), dotMatches = initialValue.match(/\\./g);\n if (dotMatches && kommaMatches ? dotMatches.length > kommaMatches.length ? (initialValue = initialValue.replace(/\\./g, \"\"), \n initialValue = initialValue.replace(\",\", opts.radixPoint)) : kommaMatches.length > dotMatches.length ? (initialValue = initialValue.replace(/,/g, \"\"), \n initialValue = initialValue.replace(\".\", opts.radixPoint)) : initialValue = initialValue.indexOf(\".\") < initialValue.indexOf(\",\") ? initialValue.replace(/\\./g, \"\") : initialValue = initialValue.replace(/,/g, \"\") : initialValue = initialValue.replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n 0 === opts.digits && (initialValue.indexOf(\".\") !== -1 ? initialValue = initialValue.substring(0, initialValue.indexOf(\".\")) : initialValue.indexOf(\",\") !== -1 && (initialValue = initialValue.substring(0, initialValue.indexOf(\",\")))), \n \"\" !== opts.radixPoint && isFinite(opts.digits) && initialValue.indexOf(opts.radixPoint) !== -1) {\n var valueParts = initialValue.split(opts.radixPoint), decPart = valueParts[1].match(new RegExp(\"\\\\d*\"))[0];\n if (parseInt(opts.digits) < decPart.toString().length) {\n var digitsFactor = Math.pow(10, parseInt(opts.digits));\n initialValue = initialValue.replace(Inputmask.escapeRegex(opts.radixPoint), \".\"), \n initialValue = Math.round(parseFloat(initialValue) * digitsFactor) / digitsFactor, \n initialValue = initialValue.toString().replace(\".\", opts.radixPoint);\n }\n }\n return opts.numericInput === !0 && (initialValue = initialValue.split(\"\").reverse().join(\"\")), \n initialValue.toString();\n },\n canClearPosition: function(maskset, position, lvp, strict, opts) {\n var positionInput = maskset.validPositions[position].input, canClear = positionInput !== opts.radixPoint || null !== maskset.validPositions[position].match.fn && opts.decimalProtect === !1 || isFinite(positionInput) || position === lvp || positionInput === opts.groupSeparator || positionInput === opts.negationSymbol.front || positionInput === opts.negationSymbol.back;\n return canClear;\n },\n onKeyDown: function(e, buffer, caretPos, opts) {\n var $input = $(this);\n if (e.ctrlKey) switch (e.keyCode) {\n case Inputmask.keyCode.UP:\n $input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)), $input.trigger(\"setvalue\");\n break;\n\n case Inputmask.keyCode.DOWN:\n $input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)), $input.trigger(\"setvalue\");\n }\n }\n },\n currency: {\n prefix: \"$ \",\n groupSeparator: \",\",\n alias: \"numeric\",\n placeholder: \"0\",\n autoGroup: !0,\n digits: 2,\n digitsOptional: !1,\n clearMaskOnLostFocus: !1\n },\n decimal: {\n alias: \"numeric\"\n },\n integer: {\n alias: \"numeric\",\n digits: 0,\n radixPoint: \"\"\n },\n percentage: {\n alias: \"numeric\",\n digits: 2,\n radixPoint: \".\",\n placeholder: \"0\",\n autoGroup: !1,\n min: 0,\n max: 100,\n suffix: \" %\",\n allowPlus: !1,\n allowMinus: !1\n }\n }), Inputmask;\n}(jQuery, Inputmask), function($, Inputmask) {\n function maskSort(a, b) {\n var maska = (a.mask || a).replace(/#/g, \"9\").replace(/\\)/, \"9\").replace(/[+()#-]/g, \"\"), maskb = (b.mask || b).replace(/#/g, \"9\").replace(/\\)/, \"9\").replace(/[+()#-]/g, \"\"), maskas = (a.mask || a).split(\"#\")[0], maskbs = (b.mask || b).split(\"#\")[0];\n return 0 === maskbs.indexOf(maskas) ? -1 : 0 === maskas.indexOf(maskbs) ? 1 : maska.localeCompare(maskb);\n }\n var analyseMaskBase = Inputmask.prototype.analyseMask;\n return Inputmask.prototype.analyseMask = function(mask, opts) {\n function reduceVariations(masks, previousVariation, previousmaskGroup) {\n previousVariation = previousVariation || \"\", previousmaskGroup = previousmaskGroup || maskGroups, \n \"\" !== previousVariation && (previousmaskGroup[previousVariation] = {});\n for (var variation = \"\", maskGroup = previousmaskGroup[previousVariation] || previousmaskGroup, i = masks.length - 1; i >= 0; i--) mask = masks[i].mask || masks[i], \n variation = mask.substr(0, 1), maskGroup[variation] = maskGroup[variation] || [], \n maskGroup[variation].unshift(mask.substr(1)), masks.splice(i, 1);\n for (var ndx in maskGroup) maskGroup[ndx].length > 500 && reduceVariations(maskGroup[ndx].slice(), ndx, maskGroup);\n }\n function rebuild(maskGroup) {\n var mask = \"\", submasks = [];\n for (var ndx in maskGroup) $.isArray(maskGroup[ndx]) ? 1 === maskGroup[ndx].length ? submasks.push(ndx + maskGroup[ndx]) : submasks.push(ndx + opts.groupmarker.start + maskGroup[ndx].join(opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start) + opts.groupmarker.end) : submasks.push(ndx + rebuild(maskGroup[ndx]));\n return mask += 1 === submasks.length ? submasks[0] : opts.groupmarker.start + submasks.join(opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start) + opts.groupmarker.end;\n }\n var maskGroups = {};\n opts.phoneCodes && opts.phoneCodes.length > 1e3 && (mask = mask.substr(1, mask.length - 2), \n reduceVariations(mask.split(opts.groupmarker.end + opts.alternatormarker + opts.groupmarker.start)), \n mask = rebuild(maskGroups));\n var mt = analyseMaskBase.call(this, mask, opts);\n return mt;\n }, Inputmask.extendAliases({\n abstractphone: {\n groupmarker: {\n start: \"<\",\n end: \">\"\n },\n countrycode: \"\",\n phoneCodes: [],\n mask: function(opts) {\n return opts.definitions = {\n \"#\": opts.definitions[9]\n }, opts.phoneCodes.sort(maskSort);\n },\n keepStatic: !0,\n onBeforeMask: function(value, opts) {\n var processedValue = value.replace(/^0{1,2}/, \"\").replace(/[\\s]/g, \"\");\n return (processedValue.indexOf(opts.countrycode) > 1 || processedValue.indexOf(opts.countrycode) === -1) && (processedValue = \"+\" + opts.countrycode + processedValue), \n processedValue;\n },\n onUnMask: function(maskedValue, unmaskedValue, opts) {\n return unmaskedValue;\n },\n inputmode: \"tel\"\n }\n }), Inputmask;\n}(jQuery, Inputmask), function($, Inputmask) {\n return Inputmask.extendAliases({\n Regex: {\n mask: \"r\",\n greedy: !1,\n repeat: \"*\",\n regex: null,\n regexTokens: null,\n tokenizer: /\\[\\^?]?(?:[^\\\\\\]]+|\\\\[\\S\\s]?)*]?|\\\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\\S\\s]?)|\\((?:\\?[:=!]?)?|(?:[?*+]|\\{[0-9]+(?:,[0-9]*)?\\})\\??|[^.?*+^${[()|\\\\]+|./g,\n quantifierFilter: /[0-9]+[^,]/,\n isComplete: function(buffer, opts) {\n return new RegExp(opts.regex).test(buffer.join(\"\"));\n },\n definitions: {\n r: {\n validator: function(chrs, maskset, pos, strict, opts) {\n function RegexToken(isGroup, isQuantifier) {\n this.matches = [], this.isGroup = isGroup || !1, this.isQuantifier = isQuantifier || !1, \n this.quantifier = {\n min: 1,\n max: 1\n }, this.repeaterPart = void 0;\n }\n function analyseRegex() {\n var match, m, currentToken = new RegexToken(), opengroups = [];\n for (opts.regexTokens = []; match = opts.tokenizer.exec(opts.regex); ) switch (m = match[0], \n m.charAt(0)) {\n case \"(\":\n opengroups.push(new RegexToken((!0)));\n break;\n\n case \")\":\n groupToken = opengroups.pop(), opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(groupToken) : currentToken.matches.push(groupToken);\n break;\n\n case \"{\":\n case \"+\":\n case \"*\":\n var quantifierToken = new RegexToken((!1), (!0));\n m = m.replace(/[{}]/g, \"\");\n var mq = m.split(\",\"), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 === mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]);\n if (quantifierToken.quantifier = {\n min: mq0,\n max: mq1\n }, opengroups.length > 0) {\n var matches = opengroups[opengroups.length - 1].matches;\n match = matches.pop(), match.isGroup || (groupToken = new RegexToken((!0)), groupToken.matches.push(match), \n match = groupToken), matches.push(match), matches.push(quantifierToken);\n } else match = currentToken.matches.pop(), match.isGroup || (groupToken = new RegexToken((!0)), \n groupToken.matches.push(match), match = groupToken), currentToken.matches.push(match), \n currentToken.matches.push(quantifierToken);\n break;\n\n default:\n opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(m) : currentToken.matches.push(m);\n }\n currentToken.matches.length > 0 && opts.regexTokens.push(currentToken);\n }\n function validateRegexToken(token, fromGroup) {\n var isvalid = !1;\n fromGroup && (regexPart += \"(\", openGroupCount++);\n for (var mndx = 0; mndx < token.matches.length; mndx++) {\n var matchToken = token.matches[mndx];\n if (matchToken.isGroup === !0) isvalid = validateRegexToken(matchToken, !0); else if (matchToken.isQuantifier === !0) {\n var crrntndx = $.inArray(matchToken, token.matches), matchGroup = token.matches[crrntndx - 1], regexPartBak = regexPart;\n if (isNaN(matchToken.quantifier.max)) {\n for (;matchToken.repeaterPart && matchToken.repeaterPart !== regexPart && matchToken.repeaterPart.length > regexPart.length && !(isvalid = validateRegexToken(matchGroup, !0)); ) ;\n isvalid = isvalid || validateRegexToken(matchGroup, !0), isvalid && (matchToken.repeaterPart = regexPart), \n regexPart = regexPartBak + matchToken.quantifier.max;\n } else {\n for (var i = 0, qm = matchToken.quantifier.max - 1; i < qm && !(isvalid = validateRegexToken(matchGroup, !0)); i++) ;\n regexPart = regexPartBak + \"{\" + matchToken.quantifier.min + \",\" + matchToken.quantifier.max + \"}\";\n }\n } else if (void 0 !== matchToken.matches) for (var k = 0; k < matchToken.length && !(isvalid = validateRegexToken(matchToken[k], fromGroup)); k++) ; else {\n var testExp;\n if (\"[\" == matchToken.charAt(0)) {\n testExp = regexPart, testExp += matchToken;\n for (var j = 0; j < openGroupCount; j++) testExp += \")\";\n var exp = new RegExp(\"^(\" + testExp + \")$\");\n isvalid = exp.test(bufferStr);\n } else for (var l = 0, tl = matchToken.length; l < tl; l++) if (\"\\\\\" !== matchToken.charAt(l)) {\n testExp = regexPart, testExp += matchToken.substr(0, l + 1), testExp = testExp.replace(/\\|$/, \"\");\n for (var j = 0; j < openGroupCount; j++) testExp += \")\";\n var exp = new RegExp(\"^(\" + testExp + \")$\");\n if (isvalid = exp.test(bufferStr)) break;\n }\n regexPart += matchToken;\n }\n if (isvalid) break;\n }\n return fromGroup && (regexPart += \")\", openGroupCount--), isvalid;\n }\n var bufferStr, groupToken, cbuffer = maskset.buffer.slice(), regexPart = \"\", isValid = !1, openGroupCount = 0;\n null === opts.regexTokens && analyseRegex(), cbuffer.splice(pos, 0, chrs), bufferStr = cbuffer.join(\"\");\n for (var i = 0; i < opts.regexTokens.length; i++) {\n var regexToken = opts.regexTokens[i];\n if (isValid = validateRegexToken(regexToken, regexToken.isGroup)) break;\n }\n return isValid;\n },\n cardinality: 1\n }\n }\n }\n }), Inputmask;\n}(jQuery, Inputmask);","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n// This is CodeMirror (https://codemirror.net/5), a code editor\n// implemented in JavaScript on top of the browser's DOM.\n//\n// You can find some technical background for some of the code below\n// at http://marijnhaverbeke.nl/blog/#cm-internals .\n\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.CodeMirror = factory());\n}(this, (function () { 'use strict';\n\n // Kludges for bugs and behavior differences that can't be feature\n // detected are enabled based on userAgent etc sniffing.\n var userAgent = navigator.userAgent;\n var platform = navigator.platform;\n\n var gecko = /gecko\\/\\d/i.test(userAgent);\n var ie_upto10 = /MSIE \\d/.test(userAgent);\n var ie_11up = /Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(userAgent);\n var edge = /Edge\\/(\\d+)/.exec(userAgent);\n var ie = ie_upto10 || ie_11up || edge;\n var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);\n var webkit = !edge && /WebKit\\//.test(userAgent);\n var qtwebkit = webkit && /Qt\\/\\d+\\.\\d+/.test(userAgent);\n var chrome = !edge && /Chrome\\/(\\d+)/.exec(userAgent);\n var chrome_version = chrome && +chrome[1];\n var presto = /Opera\\//.test(userAgent);\n var safari = /Apple Computer/.test(navigator.vendor);\n var mac_geMountainLion = /Mac OS X 1\\d\\D([8-9]|\\d\\d)\\D/.test(userAgent);\n var phantom = /PhantomJS/.test(userAgent);\n\n var ios = safari && (/Mobile\\/\\w+/.test(userAgent) || navigator.maxTouchPoints > 2);\n var android = /Android/.test(userAgent);\n // This is woefully incomplete. Suggestions for alternative methods welcome.\n var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);\n var mac = ios || /Mac/.test(platform);\n var chromeOS = /\\bCrOS\\b/.test(userAgent);\n var windows = /win/i.test(platform);\n\n var presto_version = presto && userAgent.match(/Version\\/(\\d*\\.\\d*)/);\n if (presto_version) { presto_version = Number(presto_version[1]); }\n if (presto_version && presto_version >= 15) { presto = false; webkit = true; }\n // Some browsers use the wrong event properties to signal cmd/ctrl on OS X\n var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));\n var captureRightClick = gecko || (ie && ie_version >= 9);\n\n function classTest(cls) { return new RegExp(\"(^|\\\\s)\" + cls + \"(?:$|\\\\s)\\\\s*\") }\n\n var rmClass = function(node, cls) {\n var current = node.className;\n var match = classTest(cls).exec(current);\n if (match) {\n var after = current.slice(match.index + match[0].length);\n node.className = current.slice(0, match.index) + (after ? match[1] + after : \"\");\n }\n };\n\n function removeChildren(e) {\n for (var count = e.childNodes.length; count > 0; --count)\n { e.removeChild(e.firstChild); }\n return e\n }\n\n function removeChildrenAndAdd(parent, e) {\n return removeChildren(parent).appendChild(e)\n }\n\n function elt(tag, content, className, style) {\n var e = document.createElement(tag);\n if (className) { e.className = className; }\n if (style) { e.style.cssText = style; }\n if (typeof content == \"string\") { e.appendChild(document.createTextNode(content)); }\n else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }\n return e\n }\n // wrapper for elt, which removes the elt from the accessibility tree\n function eltP(tag, content, className, style) {\n var e = elt(tag, content, className, style);\n e.setAttribute(\"role\", \"presentation\");\n return e\n }\n\n var range;\n if (document.createRange) { range = function(node, start, end, endNode) {\n var r = document.createRange();\n r.setEnd(endNode || node, end);\n r.setStart(node, start);\n return r\n }; }\n else { range = function(node, start, end) {\n var r = document.body.createTextRange();\n try { r.moveToElementText(node.parentNode); }\n catch(e) { return r }\n r.collapse(true);\n r.moveEnd(\"character\", end);\n r.moveStart(\"character\", start);\n return r\n }; }\n\n function contains(parent, child) {\n if (child.nodeType == 3) // Android browser always returns false when child is a textnode\n { child = child.parentNode; }\n if (parent.contains)\n { return parent.contains(child) }\n do {\n if (child.nodeType == 11) { child = child.host; }\n if (child == parent) { return true }\n } while (child = child.parentNode)\n }\n\n function activeElt(rootNode) {\n // IE and Edge may throw an \"Unspecified Error\" when accessing document.activeElement.\n // IE < 10 will throw when accessed while the page is loading or in an iframe.\n // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.\n var doc = rootNode.ownerDocument || rootNode;\n var activeElement;\n try {\n activeElement = rootNode.activeElement;\n } catch(e) {\n activeElement = doc.body || null;\n }\n while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)\n { activeElement = activeElement.shadowRoot.activeElement; }\n return activeElement\n }\n\n function addClass(node, cls) {\n var current = node.className;\n if (!classTest(cls).test(current)) { node.className += (current ? \" \" : \"\") + cls; }\n }\n function joinClasses(a, b) {\n var as = a.split(\" \");\n for (var i = 0; i < as.length; i++)\n { if (as[i] && !classTest(as[i]).test(b)) { b += \" \" + as[i]; } }\n return b\n }\n\n var selectInput = function(node) { node.select(); };\n if (ios) // Mobile Safari apparently has a bug where select() is broken.\n { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }\n else if (ie) // Suppress mysterious IE10 errors\n { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }\n\n function doc(cm) { return cm.display.wrapper.ownerDocument }\n\n function root(cm) {\n return rootNode(cm.display.wrapper)\n }\n\n function rootNode(element) {\n // Detect modern browsers (2017+).\n return element.getRootNode ? element.getRootNode() : element.ownerDocument\n }\n\n function win(cm) { return doc(cm).defaultView }\n\n function bind(f) {\n var args = Array.prototype.slice.call(arguments, 1);\n return function(){return f.apply(null, args)}\n }\n\n function copyObj(obj, target, overwrite) {\n if (!target) { target = {}; }\n for (var prop in obj)\n { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))\n { target[prop] = obj[prop]; } }\n return target\n }\n\n // Counts the column offset in a string, taking tabs into account.\n // Used mostly to find indentation.\n function countColumn(string, end, tabSize, startIndex, startValue) {\n if (end == null) {\n end = string.search(/[^\\s\\u00a0]/);\n if (end == -1) { end = string.length; }\n }\n for (var i = startIndex || 0, n = startValue || 0;;) {\n var nextTab = string.indexOf(\"\\t\", i);\n if (nextTab < 0 || nextTab >= end)\n { return n + (end - i) }\n n += nextTab - i;\n n += tabSize - (n % tabSize);\n i = nextTab + 1;\n }\n }\n\n var Delayed = function() {\n this.id = null;\n this.f = null;\n this.time = 0;\n this.handler = bind(this.onTimeout, this);\n };\n Delayed.prototype.onTimeout = function (self) {\n self.id = 0;\n if (self.time <= +new Date) {\n self.f();\n } else {\n setTimeout(self.handler, self.time - +new Date);\n }\n };\n Delayed.prototype.set = function (ms, f) {\n this.f = f;\n var time = +new Date + ms;\n if (!this.id || time < this.time) {\n clearTimeout(this.id);\n this.id = setTimeout(this.handler, ms);\n this.time = time;\n }\n };\n\n function indexOf(array, elt) {\n for (var i = 0; i < array.length; ++i)\n { if (array[i] == elt) { return i } }\n return -1\n }\n\n // Number of pixels added to scroller and sizer to hide scrollbar\n var scrollerGap = 50;\n\n // Returned or thrown by various protocols to signal 'I'm not\n // handling this'.\n var Pass = {toString: function(){return \"CodeMirror.Pass\"}};\n\n // Reused option objects for setSelection & friends\n var sel_dontScroll = {scroll: false}, sel_mouse = {origin: \"*mouse\"}, sel_move = {origin: \"+move\"};\n\n // The inverse of countColumn -- find the offset that corresponds to\n // a particular column.\n function findColumn(string, goal, tabSize) {\n for (var pos = 0, col = 0;;) {\n var nextTab = string.indexOf(\"\\t\", pos);\n if (nextTab == -1) { nextTab = string.length; }\n var skipped = nextTab - pos;\n if (nextTab == string.length || col + skipped >= goal)\n { return pos + Math.min(skipped, goal - col) }\n col += nextTab - pos;\n col += tabSize - (col % tabSize);\n pos = nextTab + 1;\n if (col >= goal) { return pos }\n }\n }\n\n var spaceStrs = [\"\"];\n function spaceStr(n) {\n while (spaceStrs.length <= n)\n { spaceStrs.push(lst(spaceStrs) + \" \"); }\n return spaceStrs[n]\n }\n\n function lst(arr) { return arr[arr.length-1] }\n\n function map(array, f) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }\n return out\n }\n\n function insertSorted(array, value, score) {\n var pos = 0, priority = score(value);\n while (pos < array.length && score(array[pos]) <= priority) { pos++; }\n array.splice(pos, 0, value);\n }\n\n function nothing() {}\n\n function createObj(base, props) {\n var inst;\n if (Object.create) {\n inst = Object.create(base);\n } else {\n nothing.prototype = base;\n inst = new nothing();\n }\n if (props) { copyObj(props, inst); }\n return inst\n }\n\n var nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\n function isWordCharBasic(ch) {\n return /\\w/.test(ch) || ch > \"\\x80\" &&\n (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))\n }\n function isWordChar(ch, helper) {\n if (!helper) { return isWordCharBasic(ch) }\n if (helper.source.indexOf(\"\\\\w\") > -1 && isWordCharBasic(ch)) { return true }\n return helper.test(ch)\n }\n\n function isEmpty(obj) {\n for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }\n return true\n }\n\n // Extending unicode characters. A series of a non-extending char +\n // any number of extending chars is treated as a single unit as far\n // as editing and measuring is concerned. This is not fully correct,\n // since some scripts/fonts/browsers also treat other configurations\n // of code points as a group.\n var extendingChars = /[\\u0300-\\u036f\\u0483-\\u0489\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u065e\\u0670\\u06d6-\\u06dc\\u06de-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07eb-\\u07f3\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0900-\\u0902\\u093c\\u0941-\\u0948\\u094d\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09bc\\u09be\\u09c1-\\u09c4\\u09cd\\u09d7\\u09e2\\u09e3\\u0a01\\u0a02\\u0a3c\\u0a41\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a70\\u0a71\\u0a75\\u0a81\\u0a82\\u0abc\\u0ac1-\\u0ac5\\u0ac7\\u0ac8\\u0acd\\u0ae2\\u0ae3\\u0b01\\u0b3c\\u0b3e\\u0b3f\\u0b41-\\u0b44\\u0b4d\\u0b56\\u0b57\\u0b62\\u0b63\\u0b82\\u0bbe\\u0bc0\\u0bcd\\u0bd7\\u0c3e-\\u0c40\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0cbc\\u0cbf\\u0cc2\\u0cc6\\u0ccc\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0d3e\\u0d41-\\u0d44\\u0d4d\\u0d57\\u0d62\\u0d63\\u0dca\\u0dcf\\u0dd2-\\u0dd4\\u0dd6\\u0ddf\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0eb1\\u0eb4-\\u0eb9\\u0ebb\\u0ebc\\u0ec8-\\u0ecd\\u0f18\\u0f19\\u0f35\\u0f37\\u0f39\\u0f71-\\u0f7e\\u0f80-\\u0f84\\u0f86\\u0f87\\u0f90-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102d-\\u1030\\u1032-\\u1037\\u1039\\u103a\\u103d\\u103e\\u1058\\u1059\\u105e-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108d\\u109d\\u135f\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b7-\\u17bd\\u17c6\\u17c9-\\u17d3\\u17dd\\u180b-\\u180d\\u18a9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193b\\u1a17\\u1a18\\u1a56\\u1a58-\\u1a5e\\u1a60\\u1a62\\u1a65-\\u1a6c\\u1a73-\\u1a7c\\u1a7f\\u1b00-\\u1b03\\u1b34\\u1b36-\\u1b3a\\u1b3c\\u1b42\\u1b6b-\\u1b73\\u1b80\\u1b81\\u1ba2-\\u1ba5\\u1ba8\\u1ba9\\u1c2c-\\u1c33\\u1c36\\u1c37\\u1cd0-\\u1cd2\\u1cd4-\\u1ce0\\u1ce2-\\u1ce8\\u1ced\\u1dc0-\\u1de6\\u1dfd-\\u1dff\\u200c\\u200d\\u20d0-\\u20f0\\u2cef-\\u2cf1\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua66f-\\ua672\\ua67c\\ua67d\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua825\\ua826\\ua8c4\\ua8e0-\\ua8f1\\ua926-\\ua92d\\ua947-\\ua951\\ua980-\\ua982\\ua9b3\\ua9b6-\\ua9b9\\ua9bc\\uaa29-\\uaa2e\\uaa31\\uaa32\\uaa35\\uaa36\\uaa43\\uaa4c\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uabe5\\uabe8\\uabed\\udc00-\\udfff\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe26\\uff9e\\uff9f]/;\n function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }\n\n // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.\n function skipExtendingChars(str, pos, dir) {\n while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }\n return pos\n }\n\n // Returns the value from the range [`from`; `to`] that satisfies\n // `pred` and is closest to `from`. Assumes that at least `to`\n // satisfies `pred`. Supports `from` being greater than `to`.\n function findFirst(pred, from, to) {\n // At any point we are certain `to` satisfies `pred`, don't know\n // whether `from` does.\n var dir = from > to ? -1 : 1;\n for (;;) {\n if (from == to) { return from }\n var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);\n if (mid == from) { return pred(mid) ? from : to }\n if (pred(mid)) { to = mid; }\n else { from = mid + dir; }\n }\n }\n\n // BIDI HELPERS\n\n function iterateBidiSections(order, from, to, f) {\n if (!order) { return f(from, to, \"ltr\", 0) }\n var found = false;\n for (var i = 0; i < order.length; ++i) {\n var part = order[i];\n if (part.from < to && part.to > from || from == to && part.to == from) {\n f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? \"rtl\" : \"ltr\", i);\n found = true;\n }\n }\n if (!found) { f(from, to, \"ltr\"); }\n }\n\n var bidiOther = null;\n function getBidiPartAt(order, ch, sticky) {\n var found;\n bidiOther = null;\n for (var i = 0; i < order.length; ++i) {\n var cur = order[i];\n if (cur.from < ch && cur.to > ch) { return i }\n if (cur.to == ch) {\n if (cur.from != cur.to && sticky == \"before\") { found = i; }\n else { bidiOther = i; }\n }\n if (cur.from == ch) {\n if (cur.from != cur.to && sticky != \"before\") { found = i; }\n else { bidiOther = i; }\n }\n }\n return found != null ? found : bidiOther\n }\n\n // Bidirectional ordering algorithm\n // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm\n // that this (partially) implements.\n\n // One-char codes used for character types:\n // L (L): Left-to-Right\n // R (R): Right-to-Left\n // r (AL): Right-to-Left Arabic\n // 1 (EN): European Number\n // + (ES): European Number Separator\n // % (ET): European Number Terminator\n // n (AN): Arabic Number\n // , (CS): Common Number Separator\n // m (NSM): Non-Spacing Mark\n // b (BN): Boundary Neutral\n // s (B): Paragraph Separator\n // t (S): Segment Separator\n // w (WS): Whitespace\n // N (ON): Other Neutrals\n\n // Returns null if characters are ordered as they appear\n // (left-to-right), or an array of sections ({from, to, level}\n // objects) in the order in which they occur visually.\n var bidiOrdering = (function() {\n // Character types for codepoints 0 to 0xff\n var lowTypes = \"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN\";\n // Character types for codepoints 0x600 to 0x6f9\n var arabicTypes = \"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111\";\n function charType(code) {\n if (code <= 0xf7) { return lowTypes.charAt(code) }\n else if (0x590 <= code && code <= 0x5f4) { return \"R\" }\n else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }\n else if (0x6ee <= code && code <= 0x8ac) { return \"r\" }\n else if (0x2000 <= code && code <= 0x200b) { return \"w\" }\n else if (code == 0x200c) { return \"b\" }\n else { return \"L\" }\n }\n\n var bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\n var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;\n\n function BidiSpan(level, from, to) {\n this.level = level;\n this.from = from; this.to = to;\n }\n\n return function(str, direction) {\n var outerType = direction == \"ltr\" ? \"L\" : \"R\";\n\n if (str.length == 0 || direction == \"ltr\" && !bidiRE.test(str)) { return false }\n var len = str.length, types = [];\n for (var i = 0; i < len; ++i)\n { types.push(charType(str.charCodeAt(i))); }\n\n // W1. Examine each non-spacing mark (NSM) in the level run, and\n // change the type of the NSM to the type of the previous\n // character. If the NSM is at the start of the level run, it will\n // get the type of sor.\n for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {\n var type = types[i$1];\n if (type == \"m\") { types[i$1] = prev; }\n else { prev = type; }\n }\n\n // W2. Search backwards from each instance of a European number\n // until the first strong type (R, L, AL, or sor) is found. If an\n // AL is found, change the type of the European number to Arabic\n // number.\n // W3. Change all ALs to R.\n for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {\n var type$1 = types[i$2];\n if (type$1 == \"1\" && cur == \"r\") { types[i$2] = \"n\"; }\n else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == \"r\") { types[i$2] = \"R\"; } }\n }\n\n // W4. A single European separator between two European numbers\n // changes to a European number. A single common separator between\n // two numbers of the same type changes to that type.\n for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {\n var type$2 = types[i$3];\n if (type$2 == \"+\" && prev$1 == \"1\" && types[i$3+1] == \"1\") { types[i$3] = \"1\"; }\n else if (type$2 == \",\" && prev$1 == types[i$3+1] &&\n (prev$1 == \"1\" || prev$1 == \"n\")) { types[i$3] = prev$1; }\n prev$1 = type$2;\n }\n\n // W5. A sequence of European terminators adjacent to European\n // numbers changes to all European numbers.\n // W6. Otherwise, separators and terminators change to Other\n // Neutral.\n for (var i$4 = 0; i$4 < len; ++i$4) {\n var type$3 = types[i$4];\n if (type$3 == \",\") { types[i$4] = \"N\"; }\n else if (type$3 == \"%\") {\n var end = (void 0);\n for (end = i$4 + 1; end < len && types[end] == \"%\"; ++end) {}\n var replace = (i$4 && types[i$4-1] == \"!\") || (end < len && types[end] == \"1\") ? \"1\" : \"N\";\n for (var j = i$4; j < end; ++j) { types[j] = replace; }\n i$4 = end - 1;\n }\n }\n\n // W7. Search backwards from each instance of a European number\n // until the first strong type (R, L, or sor) is found. If an L is\n // found, then change the type of the European number to L.\n for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {\n var type$4 = types[i$5];\n if (cur$1 == \"L\" && type$4 == \"1\") { types[i$5] = \"L\"; }\n else if (isStrong.test(type$4)) { cur$1 = type$4; }\n }\n\n // N1. A sequence of neutrals takes the direction of the\n // surrounding strong text if the text on both sides has the same\n // direction. European and Arabic numbers act as if they were R in\n // terms of their influence on neutrals. Start-of-level-run (sor)\n // and end-of-level-run (eor) are used at level run boundaries.\n // N2. Any remaining neutrals take the embedding direction.\n for (var i$6 = 0; i$6 < len; ++i$6) {\n if (isNeutral.test(types[i$6])) {\n var end$1 = (void 0);\n for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}\n var before = (i$6 ? types[i$6-1] : outerType) == \"L\";\n var after = (end$1 < len ? types[end$1] : outerType) == \"L\";\n var replace$1 = before == after ? (before ? \"L\" : \"R\") : outerType;\n for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }\n i$6 = end$1 - 1;\n }\n }\n\n // Here we depart from the documented algorithm, in order to avoid\n // building up an actual levels array. Since there are only three\n // levels (0, 1, 2) in an implementation that doesn't take\n // explicit embedding into account, we can build up the order on\n // the fly, without following the level-based algorithm.\n var order = [], m;\n for (var i$7 = 0; i$7 < len;) {\n if (countsAsLeft.test(types[i$7])) {\n var start = i$7;\n for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}\n order.push(new BidiSpan(0, start, i$7));\n } else {\n var pos = i$7, at = order.length, isRTL = direction == \"rtl\" ? 1 : 0;\n for (++i$7; i$7 < len && types[i$7] != \"L\"; ++i$7) {}\n for (var j$2 = pos; j$2 < i$7;) {\n if (countsAsNum.test(types[j$2])) {\n if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; }\n var nstart = j$2;\n for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}\n order.splice(at, 0, new BidiSpan(2, nstart, j$2));\n at += isRTL;\n pos = j$2;\n } else { ++j$2; }\n }\n if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }\n }\n }\n if (direction == \"ltr\") {\n if (order[0].level == 1 && (m = str.match(/^\\s+/))) {\n order[0].from = m[0].length;\n order.unshift(new BidiSpan(0, 0, m[0].length));\n }\n if (lst(order).level == 1 && (m = str.match(/\\s+$/))) {\n lst(order).to -= m[0].length;\n order.push(new BidiSpan(0, len - m[0].length, len));\n }\n }\n\n return direction == \"rtl\" ? order.reverse() : order\n }\n })();\n\n // Get the bidi ordering for the given line (and cache it). Returns\n // false for lines that are fully left-to-right, and an array of\n // BidiSpan objects otherwise.\n function getOrder(line, direction) {\n var order = line.order;\n if (order == null) { order = line.order = bidiOrdering(line.text, direction); }\n return order\n }\n\n // EVENT HANDLING\n\n // Lightweight event framework. on/off also work on DOM nodes,\n // registering native DOM handlers.\n\n var noHandlers = [];\n\n var on = function(emitter, type, f) {\n if (emitter.addEventListener) {\n emitter.addEventListener(type, f, false);\n } else if (emitter.attachEvent) {\n emitter.attachEvent(\"on\" + type, f);\n } else {\n var map = emitter._handlers || (emitter._handlers = {});\n map[type] = (map[type] || noHandlers).concat(f);\n }\n };\n\n function getHandlers(emitter, type) {\n return emitter._handlers && emitter._handlers[type] || noHandlers\n }\n\n function off(emitter, type, f) {\n if (emitter.removeEventListener) {\n emitter.removeEventListener(type, f, false);\n } else if (emitter.detachEvent) {\n emitter.detachEvent(\"on\" + type, f);\n } else {\n var map = emitter._handlers, arr = map && map[type];\n if (arr) {\n var index = indexOf(arr, f);\n if (index > -1)\n { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }\n }\n }\n }\n\n function signal(emitter, type /*, values...*/) {\n var handlers = getHandlers(emitter, type);\n if (!handlers.length) { return }\n var args = Array.prototype.slice.call(arguments, 2);\n for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }\n }\n\n // The DOM events that CodeMirror handles can be overridden by\n // registering a (non-DOM) handler on the editor for the event name,\n // and preventDefault-ing the event in that handler.\n function signalDOMEvent(cm, e, override) {\n if (typeof e == \"string\")\n { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }\n signal(cm, override || e.type, cm, e);\n return e_defaultPrevented(e) || e.codemirrorIgnore\n }\n\n function signalCursorActivity(cm) {\n var arr = cm._handlers && cm._handlers.cursorActivity;\n if (!arr) { return }\n var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);\n for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)\n { set.push(arr[i]); } }\n }\n\n function hasHandler(emitter, type) {\n return getHandlers(emitter, type).length > 0\n }\n\n // Add on and off methods to a constructor's prototype, to make\n // registering events on such objects more convenient.\n function eventMixin(ctor) {\n ctor.prototype.on = function(type, f) {on(this, type, f);};\n ctor.prototype.off = function(type, f) {off(this, type, f);};\n }\n\n // Due to the fact that we still support jurassic IE versions, some\n // compatibility wrappers are needed.\n\n function e_preventDefault(e) {\n if (e.preventDefault) { e.preventDefault(); }\n else { e.returnValue = false; }\n }\n function e_stopPropagation(e) {\n if (e.stopPropagation) { e.stopPropagation(); }\n else { e.cancelBubble = true; }\n }\n function e_defaultPrevented(e) {\n return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false\n }\n function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}\n\n function e_target(e) {return e.target || e.srcElement}\n function e_button(e) {\n var b = e.which;\n if (b == null) {\n if (e.button & 1) { b = 1; }\n else if (e.button & 2) { b = 3; }\n else if (e.button & 4) { b = 2; }\n }\n if (mac && e.ctrlKey && b == 1) { b = 3; }\n return b\n }\n\n // Detect drag-and-drop\n var dragAndDrop = function() {\n // There is *some* kind of drag-and-drop support in IE6-8, but I\n // couldn't get it to work yet.\n if (ie && ie_version < 9) { return false }\n var div = elt('div');\n return \"draggable\" in div || \"dragDrop\" in div\n }();\n\n var zwspSupported;\n function zeroWidthElement(measure) {\n if (zwspSupported == null) {\n var test = elt(\"span\", \"\\u200b\");\n removeChildrenAndAdd(measure, elt(\"span\", [test, document.createTextNode(\"x\")]));\n if (measure.firstChild.offsetHeight != 0)\n { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }\n }\n var node = zwspSupported ? elt(\"span\", \"\\u200b\") :\n elt(\"span\", \"\\u00a0\", null, \"display: inline-block; width: 1px; margin-right: -1px\");\n node.setAttribute(\"cm-text\", \"\");\n return node\n }\n\n // Feature-detect IE's crummy client rect reporting for bidi text\n var badBidiRects;\n function hasBadBidiRects(measure) {\n if (badBidiRects != null) { return badBidiRects }\n var txt = removeChildrenAndAdd(measure, document.createTextNode(\"A\\u062eA\"));\n var r0 = range(txt, 0, 1).getBoundingClientRect();\n var r1 = range(txt, 1, 2).getBoundingClientRect();\n removeChildren(measure);\n if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)\n return badBidiRects = (r1.right - r0.right < 3)\n }\n\n // See if \"\".split is the broken IE version, if so, provide an\n // alternative way to split lines.\n var splitLinesAuto = \"\\n\\nb\".split(/\\n/).length != 3 ? function (string) {\n var pos = 0, result = [], l = string.length;\n while (pos <= l) {\n var nl = string.indexOf(\"\\n\", pos);\n if (nl == -1) { nl = string.length; }\n var line = string.slice(pos, string.charAt(nl - 1) == \"\\r\" ? nl - 1 : nl);\n var rt = line.indexOf(\"\\r\");\n if (rt != -1) {\n result.push(line.slice(0, rt));\n pos += rt + 1;\n } else {\n result.push(line);\n pos = nl + 1;\n }\n }\n return result\n } : function (string) { return string.split(/\\r\\n?|\\n/); };\n\n var hasSelection = window.getSelection ? function (te) {\n try { return te.selectionStart != te.selectionEnd }\n catch(e) { return false }\n } : function (te) {\n var range;\n try {range = te.ownerDocument.selection.createRange();}\n catch(e) {}\n if (!range || range.parentElement() != te) { return false }\n return range.compareEndPoints(\"StartToEnd\", range) != 0\n };\n\n var hasCopyEvent = (function () {\n var e = elt(\"div\");\n if (\"oncopy\" in e) { return true }\n e.setAttribute(\"oncopy\", \"return;\");\n return typeof e.oncopy == \"function\"\n })();\n\n var badZoomedRects = null;\n function hasBadZoomedRects(measure) {\n if (badZoomedRects != null) { return badZoomedRects }\n var node = removeChildrenAndAdd(measure, elt(\"span\", \"x\"));\n var normal = node.getBoundingClientRect();\n var fromRange = range(node, 0, 1).getBoundingClientRect();\n return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1\n }\n\n // Known modes, by name and by MIME\n var modes = {}, mimeModes = {};\n\n // Extra arguments are stored as the mode's dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n function defineMode(name, mode) {\n if (arguments.length > 2)\n { mode.dependencies = Array.prototype.slice.call(arguments, 2); }\n modes[name] = mode;\n }\n\n function defineMIME(mime, spec) {\n mimeModes[mime] = spec;\n }\n\n // Given a MIME type, a {name, ...options} config object, or a name\n // string, return a mode config object.\n function resolveMode(spec) {\n if (typeof spec == \"string\" && mimeModes.hasOwnProperty(spec)) {\n spec = mimeModes[spec];\n } else if (spec && typeof spec.name == \"string\" && mimeModes.hasOwnProperty(spec.name)) {\n var found = mimeModes[spec.name];\n if (typeof found == \"string\") { found = {name: found}; }\n spec = createObj(found, spec);\n spec.name = found.name;\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+xml$/.test(spec)) {\n return resolveMode(\"application/xml\")\n } else if (typeof spec == \"string\" && /^[\\w\\-]+\\/[\\w\\-]+\\+json$/.test(spec)) {\n return resolveMode(\"application/json\")\n }\n if (typeof spec == \"string\") { return {name: spec} }\n else { return spec || {name: \"null\"} }\n }\n\n // Given a mode spec (anything that resolveMode accepts), find and\n // initialize an actual mode object.\n function getMode(options, spec) {\n spec = resolveMode(spec);\n var mfactory = modes[spec.name];\n if (!mfactory) { return getMode(options, \"text/plain\") }\n var modeObj = mfactory(options, spec);\n if (modeExtensions.hasOwnProperty(spec.name)) {\n var exts = modeExtensions[spec.name];\n for (var prop in exts) {\n if (!exts.hasOwnProperty(prop)) { continue }\n if (modeObj.hasOwnProperty(prop)) { modeObj[\"_\" + prop] = modeObj[prop]; }\n modeObj[prop] = exts[prop];\n }\n }\n modeObj.name = spec.name;\n if (spec.helperType) { modeObj.helperType = spec.helperType; }\n if (spec.modeProps) { for (var prop$1 in spec.modeProps)\n { modeObj[prop$1] = spec.modeProps[prop$1]; } }\n\n return modeObj\n }\n\n // This can be used to attach properties to mode objects from\n // outside the actual mode definition.\n var modeExtensions = {};\n function extendMode(mode, properties) {\n var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});\n copyObj(properties, exts);\n }\n\n function copyState(mode, state) {\n if (state === true) { return state }\n if (mode.copyState) { return mode.copyState(state) }\n var nstate = {};\n for (var n in state) {\n var val = state[n];\n if (val instanceof Array) { val = val.concat([]); }\n nstate[n] = val;\n }\n return nstate\n }\n\n // Given a mode and a state (for that mode), find the inner mode and\n // state at the position that the state refers to.\n function innerMode(mode, state) {\n var info;\n while (mode.innerMode) {\n info = mode.innerMode(state);\n if (!info || info.mode == mode) { break }\n state = info.state;\n mode = info.mode;\n }\n return info || {mode: mode, state: state}\n }\n\n function startState(mode, a1, a2) {\n return mode.startState ? mode.startState(a1, a2) : true\n }\n\n // STRING STREAM\n\n // Fed to the mode parsers, provides helper functions to make\n // parsers more succinct.\n\n var StringStream = function(string, tabSize, lineOracle) {\n this.pos = this.start = 0;\n this.string = string;\n this.tabSize = tabSize || 8;\n this.lastColumnPos = this.lastColumnValue = 0;\n this.lineStart = 0;\n this.lineOracle = lineOracle;\n };\n\n StringStream.prototype.eol = function () {return this.pos >= this.string.length};\n StringStream.prototype.sol = function () {return this.pos == this.lineStart};\n StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};\n StringStream.prototype.next = function () {\n if (this.pos < this.string.length)\n { return this.string.charAt(this.pos++) }\n };\n StringStream.prototype.eat = function (match) {\n var ch = this.string.charAt(this.pos);\n var ok;\n if (typeof match == \"string\") { ok = ch == match; }\n else { ok = ch && (match.test ? match.test(ch) : match(ch)); }\n if (ok) {++this.pos; return ch}\n };\n StringStream.prototype.eatWhile = function (match) {\n var start = this.pos;\n while (this.eat(match)){}\n return this.pos > start\n };\n StringStream.prototype.eatSpace = function () {\n var start = this.pos;\n while (/[\\s\\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; }\n return this.pos > start\n };\n StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};\n StringStream.prototype.skipTo = function (ch) {\n var found = this.string.indexOf(ch, this.pos);\n if (found > -1) {this.pos = found; return true}\n };\n StringStream.prototype.backUp = function (n) {this.pos -= n;};\n StringStream.prototype.column = function () {\n if (this.lastColumnPos < this.start) {\n this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);\n this.lastColumnPos = this.start;\n }\n return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.indentation = function () {\n return countColumn(this.string, null, this.tabSize) -\n (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)\n };\n StringStream.prototype.match = function (pattern, consume, caseInsensitive) {\n if (typeof pattern == \"string\") {\n var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };\n var substr = this.string.substr(this.pos, pattern.length);\n if (cased(substr) == cased(pattern)) {\n if (consume !== false) { this.pos += pattern.length; }\n return true\n }\n } else {\n var match = this.string.slice(this.pos).match(pattern);\n if (match && match.index > 0) { return null }\n if (match && consume !== false) { this.pos += match[0].length; }\n return match\n }\n };\n StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};\n StringStream.prototype.hideFirstChars = function (n, inner) {\n this.lineStart += n;\n try { return inner() }\n finally { this.lineStart -= n; }\n };\n StringStream.prototype.lookAhead = function (n) {\n var oracle = this.lineOracle;\n return oracle && oracle.lookAhead(n)\n };\n StringStream.prototype.baseToken = function () {\n var oracle = this.lineOracle;\n return oracle && oracle.baseToken(this.pos)\n };\n\n // Find the line object corresponding to the given line number.\n function getLine(doc, n) {\n n -= doc.first;\n if (n < 0 || n >= doc.size) { throw new Error(\"There is no line \" + (n + doc.first) + \" in the document.\") }\n var chunk = doc;\n while (!chunk.lines) {\n for (var i = 0;; ++i) {\n var child = chunk.children[i], sz = child.chunkSize();\n if (n < sz) { chunk = child; break }\n n -= sz;\n }\n }\n return chunk.lines[n]\n }\n\n // Get the part of a document between two positions, as an array of\n // strings.\n function getBetween(doc, start, end) {\n var out = [], n = start.line;\n doc.iter(start.line, end.line + 1, function (line) {\n var text = line.text;\n if (n == end.line) { text = text.slice(0, end.ch); }\n if (n == start.line) { text = text.slice(start.ch); }\n out.push(text);\n ++n;\n });\n return out\n }\n // Get the lines between from and to, as array of strings.\n function getLines(doc, from, to) {\n var out = [];\n doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value\n return out\n }\n\n // Update the height of a line, propagating the height change\n // upwards to parent nodes.\n function updateLineHeight(line, height) {\n var diff = height - line.height;\n if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }\n }\n\n // Given a line object, find its line number by walking up through\n // its parent links.\n function lineNo(line) {\n if (line.parent == null) { return null }\n var cur = line.parent, no = indexOf(cur.lines, line);\n for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {\n for (var i = 0;; ++i) {\n if (chunk.children[i] == cur) { break }\n no += chunk.children[i].chunkSize();\n }\n }\n return no + cur.first\n }\n\n // Find the line at the given vertical position, using the height\n // information in the document tree.\n function lineAtHeight(chunk, h) {\n var n = chunk.first;\n outer: do {\n for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {\n var child = chunk.children[i$1], ch = child.height;\n if (h < ch) { chunk = child; continue outer }\n h -= ch;\n n += child.chunkSize();\n }\n return n\n } while (!chunk.lines)\n var i = 0;\n for (; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i], lh = line.height;\n if (h < lh) { break }\n h -= lh;\n }\n return n + i\n }\n\n function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}\n\n function lineNumberFor(options, i) {\n return String(options.lineNumberFormatter(i + options.firstLineNumber))\n }\n\n // A Pos instance represents a position within the text.\n function Pos(line, ch, sticky) {\n if ( sticky === void 0 ) sticky = null;\n\n if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }\n this.line = line;\n this.ch = ch;\n this.sticky = sticky;\n }\n\n // Compare two positions, return 0 if they are the same, a negative\n // number when a is less, and a positive number otherwise.\n function cmp(a, b) { return a.line - b.line || a.ch - b.ch }\n\n function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }\n\n function copyPos(x) {return Pos(x.line, x.ch)}\n function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }\n function minPos(a, b) { return cmp(a, b) < 0 ? a : b }\n\n // Most of the external API clips given positions to make sure they\n // actually exist within the document.\n function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}\n function clipPos(doc, pos) {\n if (pos.line < doc.first) { return Pos(doc.first, 0) }\n var last = doc.first + doc.size - 1;\n if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }\n return clipToLen(pos, getLine(doc, pos.line).text.length)\n }\n function clipToLen(pos, linelen) {\n var ch = pos.ch;\n if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }\n else if (ch < 0) { return Pos(pos.line, 0) }\n else { return pos }\n }\n function clipPosArray(doc, array) {\n var out = [];\n for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }\n return out\n }\n\n var SavedContext = function(state, lookAhead) {\n this.state = state;\n this.lookAhead = lookAhead;\n };\n\n var Context = function(doc, state, line, lookAhead) {\n this.state = state;\n this.doc = doc;\n this.line = line;\n this.maxLookAhead = lookAhead || 0;\n this.baseTokens = null;\n this.baseTokenPos = 1;\n };\n\n Context.prototype.lookAhead = function (n) {\n var line = this.doc.getLine(this.line + n);\n if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }\n return line\n };\n\n Context.prototype.baseToken = function (n) {\n if (!this.baseTokens) { return null }\n while (this.baseTokens[this.baseTokenPos] <= n)\n { this.baseTokenPos += 2; }\n var type = this.baseTokens[this.baseTokenPos + 1];\n return {type: type && type.replace(/( |^)overlay .*/, \"\"),\n size: this.baseTokens[this.baseTokenPos] - n}\n };\n\n Context.prototype.nextLine = function () {\n this.line++;\n if (this.maxLookAhead > 0) { this.maxLookAhead--; }\n };\n\n Context.fromSaved = function (doc, saved, line) {\n if (saved instanceof SavedContext)\n { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }\n else\n { return new Context(doc, copyState(doc.mode, saved), line) }\n };\n\n Context.prototype.save = function (copy) {\n var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;\n return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state\n };\n\n\n // Compute a style array (an array starting with a mode generation\n // -- for invalidation -- followed by pairs of end positions and\n // style strings), which is used to highlight the tokens on the\n // line.\n function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n }\n\n function getLineStyles(cm, line, updateFrontier) {\n if (!line.styles || line.styles[0] != cm.state.modeGen) {\n var context = getContextBefore(cm, lineNo(line));\n var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);\n var result = highlightLine(cm, line, context);\n if (resetState) { context.state = resetState; }\n line.stateAfter = context.save(!resetState);\n line.styles = result.styles;\n if (result.classes) { line.styleClasses = result.classes; }\n else if (line.styleClasses) { line.styleClasses = null; }\n if (updateFrontier === cm.doc.highlightFrontier)\n { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }\n }\n return line.styles\n }\n\n function getContextBefore(cm, n, precise) {\n var doc = cm.doc, display = cm.display;\n if (!doc.mode.startState) { return new Context(doc, true, n) }\n var start = findStartLine(cm, n, precise);\n var saved = start > doc.first && getLine(doc, start - 1).stateAfter;\n var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);\n\n doc.iter(start, n, function (line) {\n processLine(cm, line.text, context);\n var pos = context.line;\n line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;\n context.nextLine();\n });\n if (precise) { doc.modeFrontier = context.line; }\n return context\n }\n\n // Lightweight form of highlight -- proceed over this line and\n // update state, but don't save a style array. Used for lines that\n // aren't currently visible.\n function processLine(cm, text, context, startAt) {\n var mode = cm.doc.mode;\n var stream = new StringStream(text, cm.options.tabSize, context);\n stream.start = stream.pos = startAt || 0;\n if (text == \"\") { callBlankLine(mode, context.state); }\n while (!stream.eol()) {\n readToken(mode, stream, context.state);\n stream.start = stream.pos;\n }\n }\n\n function callBlankLine(mode, state) {\n if (mode.blankLine) { return mode.blankLine(state) }\n if (!mode.innerMode) { return }\n var inner = innerMode(mode, state);\n if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }\n }\n\n function readToken(mode, stream, state, inner) {\n for (var i = 0; i < 10; i++) {\n if (inner) { inner[0] = innerMode(mode, state).mode; }\n var style = mode.token(stream, state);\n if (stream.pos > stream.start) { return style }\n }\n throw new Error(\"Mode \" + mode.name + \" failed to advance stream.\")\n }\n\n var Token = function(stream, type, state) {\n this.start = stream.start; this.end = stream.pos;\n this.string = stream.current();\n this.type = type || null;\n this.state = state;\n };\n\n // Utility for getTokenAt and getLineTokens\n function takeToken(cm, pos, precise, asArray) {\n var doc = cm.doc, mode = doc.mode, style;\n pos = clipPos(doc, pos);\n var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);\n var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;\n if (asArray) { tokens = []; }\n while ((asArray || stream.pos < pos.ch) && !stream.eol()) {\n stream.start = stream.pos;\n style = readToken(mode, stream, context.state);\n if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }\n }\n return asArray ? tokens : new Token(stream, style, context.state)\n }\n\n function extractLineClasses(type, output) {\n if (type) { for (;;) {\n var lineClass = type.match(/(?:^|\\s+)line-(background-)?(\\S+)/);\n if (!lineClass) { break }\n type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);\n var prop = lineClass[1] ? \"bgClass\" : \"textClass\";\n if (output[prop] == null)\n { output[prop] = lineClass[2]; }\n else if (!(new RegExp(\"(?:^|\\\\s)\" + lineClass[2] + \"(?:$|\\\\s)\")).test(output[prop]))\n { output[prop] += \" \" + lineClass[2]; }\n } }\n return type\n }\n\n // Run the given mode's parser over a line, calling f for each token.\n function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {\n var flattenSpans = mode.flattenSpans;\n if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }\n var curStart = 0, curStyle = null;\n var stream = new StringStream(text, cm.options.tabSize, context), style;\n var inner = cm.options.addModeClass && [null];\n if (text == \"\") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }\n while (!stream.eol()) {\n if (stream.pos > cm.options.maxHighlightLength) {\n flattenSpans = false;\n if (forceToEnd) { processLine(cm, text, context, stream.pos); }\n stream.pos = text.length;\n style = null;\n } else {\n style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);\n }\n if (inner) {\n var mName = inner[0].name;\n if (mName) { style = \"m-\" + (style ? mName + \" \" + style : mName); }\n }\n if (!flattenSpans || curStyle != style) {\n while (curStart < stream.start) {\n curStart = Math.min(stream.start, curStart + 5000);\n f(curStart, curStyle);\n }\n curStyle = style;\n }\n stream.start = stream.pos;\n }\n while (curStart < stream.pos) {\n // Webkit seems to refuse to render text nodes longer than 57444\n // characters, and returns inaccurate measurements in nodes\n // starting around 5000 chars.\n var pos = Math.min(stream.pos, curStart + 5000);\n f(pos, curStyle);\n curStart = pos;\n }\n }\n\n // Finds the line to start with when starting a parse. Tries to\n // find a line with a stateAfter, so that it can start with a\n // valid state. If that fails, it returns the line with the\n // smallest indentation, which tends to need the least context to\n // parse correctly.\n function findStartLine(cm, n, precise) {\n var minindent, minline, doc = cm.doc;\n var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);\n for (var search = n; search > lim; --search) {\n if (search <= doc.first) { return doc.first }\n var line = getLine(doc, search - 1), after = line.stateAfter;\n if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))\n { return search }\n var indented = countColumn(line.text, null, cm.options.tabSize);\n if (minline == null || minindent > indented) {\n minline = search - 1;\n minindent = indented;\n }\n }\n return minline\n }\n\n function retreatFrontier(doc, n) {\n doc.modeFrontier = Math.min(doc.modeFrontier, n);\n if (doc.highlightFrontier < n - 10) { return }\n var start = doc.first;\n for (var line = n - 1; line > start; line--) {\n var saved = getLine(doc, line).stateAfter;\n // change is on 3\n // state on line 1 looked ahead 2 -- so saw 3\n // test 1 + 2 < 3 should cover this\n if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {\n start = line + 1;\n break\n }\n }\n doc.highlightFrontier = Math.min(doc.highlightFrontier, start);\n }\n\n // Optimize some code when these features are not used.\n var sawReadOnlySpans = false, sawCollapsedSpans = false;\n\n function seeReadOnlySpans() {\n sawReadOnlySpans = true;\n }\n\n function seeCollapsedSpans() {\n sawCollapsedSpans = true;\n }\n\n // TEXTMARKER SPANS\n\n function MarkedSpan(marker, from, to) {\n this.marker = marker;\n this.from = from; this.to = to;\n }\n\n // Search an array of spans for a span matching the given marker.\n function getMarkedSpanFor(spans, marker) {\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.marker == marker) { return span }\n } }\n }\n\n // Remove a span from an array, returning undefined if no spans are\n // left (we don't store arrays for lines without spans).\n function removeMarkedSpan(spans, span) {\n var r;\n for (var i = 0; i < spans.length; ++i)\n { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }\n return r\n }\n\n // Add a span to a line.\n function addMarkedSpan(line, span, op) {\n var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet));\n if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) {\n line.markedSpans.push(span);\n } else {\n line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];\n if (inThisOp) { inThisOp.add(line.markedSpans); }\n }\n span.marker.attachLine(line);\n }\n\n // Used for the algorithm that adjusts markers for a change in the\n // document. These functions cut an array of spans at a given\n // character position, returning an array of remaining chunks (or\n // undefined if nothing remains).\n function markedSpansBefore(old, startCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);\n if (startsBefore || span.from == startCh && marker.type == \"bookmark\" && (!isInsert || !span.marker.insertLeft)) {\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));\n }\n } }\n return nw\n }\n function markedSpansAfter(old, endCh, isInsert) {\n var nw;\n if (old) { for (var i = 0; i < old.length; ++i) {\n var span = old[i], marker = span.marker;\n var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);\n if (endsAfter || span.from == endCh && marker.type == \"bookmark\" && (!isInsert || span.marker.insertLeft)) {\n var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)\n ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,\n span.to == null ? null : span.to - endCh));\n }\n } }\n return nw\n }\n\n // Given a change object, compute the new set of marker spans that\n // cover the line in which the change took place. Removes spans\n // entirely within the change, reconnects spans belonging to the\n // same marker that appear on both sides of the change, and cuts off\n // spans partially within the change. Returns an array of span\n // arrays with one element for each line in (after) the change.\n function stretchSpansOverChange(doc, change) {\n if (change.full) { return null }\n var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;\n var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;\n if (!oldFirst && !oldLast) { return null }\n\n var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;\n // Get the spans that 'stick out' on both sides\n var first = markedSpansBefore(oldFirst, startCh, isInsert);\n var last = markedSpansAfter(oldLast, endCh, isInsert);\n\n // Next, merge those two ends\n var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);\n if (first) {\n // Fix up .to properties of first\n for (var i = 0; i < first.length; ++i) {\n var span = first[i];\n if (span.to == null) {\n var found = getMarkedSpanFor(last, span.marker);\n if (!found) { span.to = startCh; }\n else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }\n }\n }\n }\n if (last) {\n // Fix up .from in last (or move them into first in case of sameLine)\n for (var i$1 = 0; i$1 < last.length; ++i$1) {\n var span$1 = last[i$1];\n if (span$1.to != null) { span$1.to += offset; }\n if (span$1.from == null) {\n var found$1 = getMarkedSpanFor(first, span$1.marker);\n if (!found$1) {\n span$1.from = offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n } else {\n span$1.from += offset;\n if (sameLine) { (first || (first = [])).push(span$1); }\n }\n }\n }\n // Make sure we didn't create any zero-length spans\n if (first) { first = clearEmptySpans(first); }\n if (last && last != first) { last = clearEmptySpans(last); }\n\n var newMarkers = [first];\n if (!sameLine) {\n // Fill gap with whole-line-spans\n var gap = change.text.length - 2, gapMarkers;\n if (gap > 0 && first)\n { for (var i$2 = 0; i$2 < first.length; ++i$2)\n { if (first[i$2].to == null)\n { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }\n for (var i$3 = 0; i$3 < gap; ++i$3)\n { newMarkers.push(gapMarkers); }\n newMarkers.push(last);\n }\n return newMarkers\n }\n\n // Remove spans that are empty and don't have a clearWhenEmpty\n // option of false.\n function clearEmptySpans(spans) {\n for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)\n { spans.splice(i--, 1); }\n }\n if (!spans.length) { return null }\n return spans\n }\n\n // Used to 'clip' out readOnly ranges when making a change.\n function removeReadOnlyRanges(doc, from, to) {\n var markers = null;\n doc.iter(from.line, to.line + 1, function (line) {\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var mark = line.markedSpans[i].marker;\n if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))\n { (markers || (markers = [])).push(mark); }\n } }\n });\n if (!markers) { return null }\n var parts = [{from: from, to: to}];\n for (var i = 0; i < markers.length; ++i) {\n var mk = markers[i], m = mk.find(0);\n for (var j = 0; j < parts.length; ++j) {\n var p = parts[j];\n if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }\n var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);\n if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)\n { newParts.push({from: p.from, to: m.from}); }\n if (dto > 0 || !mk.inclusiveRight && !dto)\n { newParts.push({from: m.to, to: p.to}); }\n parts.splice.apply(parts, newParts);\n j += newParts.length - 3;\n }\n }\n return parts\n }\n\n // Connect or disconnect spans from a line.\n function detachMarkedSpans(line) {\n var spans = line.markedSpans;\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.detachLine(line); }\n line.markedSpans = null;\n }\n function attachMarkedSpans(line, spans) {\n if (!spans) { return }\n for (var i = 0; i < spans.length; ++i)\n { spans[i].marker.attachLine(line); }\n line.markedSpans = spans;\n }\n\n // Helpers used when computing which overlapping collapsed span\n // counts as the larger one.\n function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }\n function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }\n\n // Returns a number indicating which of two overlapping collapsed\n // spans is larger (and thus includes the other). Falls back to\n // comparing ids when the spans cover exactly the same range.\n function compareCollapsedMarkers(a, b) {\n var lenDiff = a.lines.length - b.lines.length;\n if (lenDiff != 0) { return lenDiff }\n var aPos = a.find(), bPos = b.find();\n var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);\n if (fromCmp) { return -fromCmp }\n var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);\n if (toCmp) { return toCmp }\n return b.id - a.id\n }\n\n // Find out whether a line ends or starts in a collapsed span. If\n // so, return the marker for that span.\n function collapsedSpanAtSide(line, start) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0))\n { found = sp.marker; }\n } }\n return found\n }\n function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }\n function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }\n\n function collapsedSpanAround(line, ch) {\n var sps = sawCollapsedSpans && line.markedSpans, found;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&\n (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }\n } }\n return found\n }\n\n // Test whether there exists a collapsed span that partially\n // overlaps (covers the start or end, but not both) of a new span.\n // Such overlap is not allowed.\n function conflictingCollapsedRange(doc, lineNo, from, to, marker) {\n var line = getLine(doc, lineNo);\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i) {\n var sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n var found = sp.marker.find(0);\n var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);\n var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);\n if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }\n if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||\n fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))\n { return true }\n } }\n }\n\n // A visual line is a line as drawn on the screen. Folding, for\n // example, can cause multiple logical lines to appear on the same\n // visual line. This finds the start of the visual line that the\n // given line is part of (usually that is the line itself).\n function visualLine(line) {\n var merged;\n while (merged = collapsedSpanAtStart(line))\n { line = merged.find(-1, true).line; }\n return line\n }\n\n function visualLineEnd(line) {\n var merged;\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return line\n }\n\n // Returns an array of logical lines that continue the visual line\n // started by the argument, or undefined if there are no such lines.\n function visualLineContinued(line) {\n var merged, lines;\n while (merged = collapsedSpanAtEnd(line)) {\n line = merged.find(1, true).line\n ;(lines || (lines = [])).push(line);\n }\n return lines\n }\n\n // Get the line number of the start of the visual line that the\n // given line number is part of.\n function visualLineNo(doc, lineN) {\n var line = getLine(doc, lineN), vis = visualLine(line);\n if (line == vis) { return lineN }\n return lineNo(vis)\n }\n\n // Get the line number of the start of the next visual line after\n // the given line.\n function visualLineEndNo(doc, lineN) {\n if (lineN > doc.lastLine()) { return lineN }\n var line = getLine(doc, lineN), merged;\n if (!lineIsHidden(doc, line)) { return lineN }\n while (merged = collapsedSpanAtEnd(line))\n { line = merged.find(1, true).line; }\n return lineNo(line) + 1\n }\n\n // Compute whether a line is hidden. Lines count as hidden when they\n // are part of a visual line that starts with another line, or when\n // they are entirely covered by collapsed, non-widget span.\n function lineIsHidden(doc, line) {\n var sps = sawCollapsedSpans && line.markedSpans;\n if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {\n sp = sps[i];\n if (!sp.marker.collapsed) { continue }\n if (sp.from == null) { return true }\n if (sp.marker.widgetNode) { continue }\n if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))\n { return true }\n } }\n }\n function lineIsHiddenInner(doc, line, span) {\n if (span.to == null) {\n var end = span.marker.find(1, true);\n return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))\n }\n if (span.marker.inclusiveRight && span.to == line.text.length)\n { return true }\n for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {\n sp = line.markedSpans[i];\n if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&\n (sp.to == null || sp.to != span.from) &&\n (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&\n lineIsHiddenInner(doc, line, sp)) { return true }\n }\n }\n\n // Find the height above the given line.\n function heightAtLine(lineObj) {\n lineObj = visualLine(lineObj);\n\n var h = 0, chunk = lineObj.parent;\n for (var i = 0; i < chunk.lines.length; ++i) {\n var line = chunk.lines[i];\n if (line == lineObj) { break }\n else { h += line.height; }\n }\n for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {\n for (var i$1 = 0; i$1 < p.children.length; ++i$1) {\n var cur = p.children[i$1];\n if (cur == chunk) { break }\n else { h += cur.height; }\n }\n }\n return h\n }\n\n // Compute the character length of a line, taking into account\n // collapsed ranges (see markText) that might hide parts, and join\n // other lines onto it.\n function lineLength(line) {\n if (line.height == 0) { return 0 }\n var len = line.text.length, merged, cur = line;\n while (merged = collapsedSpanAtStart(cur)) {\n var found = merged.find(0, true);\n cur = found.from.line;\n len += found.from.ch - found.to.ch;\n }\n cur = line;\n while (merged = collapsedSpanAtEnd(cur)) {\n var found$1 = merged.find(0, true);\n len -= cur.text.length - found$1.from.ch;\n cur = found$1.to.line;\n len += cur.text.length - found$1.to.ch;\n }\n return len\n }\n\n // Find the longest line in the document.\n function findMaxLine(cm) {\n var d = cm.display, doc = cm.doc;\n d.maxLine = getLine(doc, doc.first);\n d.maxLineLength = lineLength(d.maxLine);\n d.maxLineChanged = true;\n doc.iter(function (line) {\n var len = lineLength(line);\n if (len > d.maxLineLength) {\n d.maxLineLength = len;\n d.maxLine = line;\n }\n });\n }\n\n // LINE DATA STRUCTURE\n\n // Line objects. These hold state related to a line, including\n // highlighting info (the styles array).\n var Line = function(text, markedSpans, estimateHeight) {\n this.text = text;\n attachMarkedSpans(this, markedSpans);\n this.height = estimateHeight ? estimateHeight(this) : 1;\n };\n\n Line.prototype.lineNo = function () { return lineNo(this) };\n eventMixin(Line);\n\n // Change the content (text, markers) of a line. Automatically\n // invalidates cached information and tries to re-estimate the\n // line's height.\n function updateLine(line, text, markedSpans, estimateHeight) {\n line.text = text;\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n if (line.order != null) { line.order = null; }\n detachMarkedSpans(line);\n attachMarkedSpans(line, markedSpans);\n var estHeight = estimateHeight ? estimateHeight(line) : 1;\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n }\n\n // Detach a line from the document tree and its markers.\n function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }\n\n // Convert a style as returned by a mode (either null, or a string\n // containing one or more styles) to a CSS style. This is cached,\n // and also looks for line-wide styles.\n var styleToClassCache = {}, styleToClassCacheWithMode = {};\n function interpretTokenStyle(style, options) {\n if (!style || /^\\s*$/.test(style)) { return null }\n var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;\n return cache[style] ||\n (cache[style] = style.replace(/\\S+/g, \"cm-$&\"))\n }\n\n // Render the DOM representation of the text of a line. Also builds\n // up a 'line map', which points at the DOM nodes that represent\n // specific stretches of text, and is used by the measuring code.\n // The returned object contains the DOM node, this map, and\n // information about line-wide styles that were set by the mode.\n function buildLineContent(cm, lineView) {\n // The padding-right forces the element to have a 'border', which\n // is needed on Webkit to be able to get line-level bounding\n // rectangles for it (in measureChar).\n var content = eltP(\"span\", null, null, webkit ? \"padding-right: .1px\" : null);\n var builder = {pre: eltP(\"pre\", [content], \"CodeMirror-line\"), content: content,\n col: 0, pos: 0, cm: cm,\n trailingSpace: false,\n splitSpaces: cm.getOption(\"lineWrapping\")};\n lineView.measure = {};\n\n // Iterate over the logical lines that make up this visual line.\n for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {\n var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);\n builder.pos = 0;\n builder.addToken = buildToken;\n // Optionally wire in some hacks into the token-rendering\n // algorithm, to deal with browser quirks.\n if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))\n { builder.addToken = buildTokenBadBidi(builder.addToken, order); }\n builder.map = [];\n var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);\n insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));\n if (line.styleClasses) {\n if (line.styleClasses.bgClass)\n { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || \"\"); }\n if (line.styleClasses.textClass)\n { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || \"\"); }\n }\n\n // Ensure at least a single node is present, for measuring.\n if (builder.map.length == 0)\n { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }\n\n // Store the map and a cache object for the current logical line\n if (i == 0) {\n lineView.measure.map = builder.map;\n lineView.measure.cache = {};\n } else {\n (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)\n ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});\n }\n }\n\n // See issue #2901\n if (webkit) {\n var last = builder.content.lastChild;\n if (/\\bcm-tab\\b/.test(last.className) || (last.querySelector && last.querySelector(\".cm-tab\")))\n { builder.content.className = \"cm-tab-wrap-hack\"; }\n }\n\n signal(cm, \"renderLine\", cm, lineView.line, builder.pre);\n if (builder.pre.className)\n { builder.textClass = joinClasses(builder.pre.className, builder.textClass || \"\"); }\n\n return builder\n }\n\n function defaultSpecialCharPlaceholder(ch) {\n var token = elt(\"span\", \"\\u2022\", \"cm-invalidchar\");\n token.title = \"\\\\u\" + ch.charCodeAt(0).toString(16);\n token.setAttribute(\"aria-label\", token.title);\n return token\n }\n\n // Build up the DOM representation for a single token, and add it to\n // the line map. Takes care to render special characters separately.\n function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {\n if (!text) { return }\n var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;\n var special = builder.cm.state.specialChars, mustWrap = false;\n var content;\n if (!special.test(text)) {\n builder.col += text.length;\n content = document.createTextNode(displayText);\n builder.map.push(builder.pos, builder.pos + text.length, content);\n if (ie && ie_version < 9) { mustWrap = true; }\n builder.pos += text.length;\n } else {\n content = document.createDocumentFragment();\n var pos = 0;\n while (true) {\n special.lastIndex = pos;\n var m = special.exec(text);\n var skipped = m ? m.index - pos : text.length - pos;\n if (skipped) {\n var txt = document.createTextNode(displayText.slice(pos, pos + skipped));\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt])); }\n else { content.appendChild(txt); }\n builder.map.push(builder.pos, builder.pos + skipped, txt);\n builder.col += skipped;\n builder.pos += skipped;\n }\n if (!m) { break }\n pos += skipped + 1;\n var txt$1 = (void 0);\n if (m[0] == \"\\t\") {\n var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;\n txt$1 = content.appendChild(elt(\"span\", spaceStr(tabWidth), \"cm-tab\"));\n txt$1.setAttribute(\"role\", \"presentation\");\n txt$1.setAttribute(\"cm-text\", \"\\t\");\n builder.col += tabWidth;\n } else if (m[0] == \"\\r\" || m[0] == \"\\n\") {\n txt$1 = content.appendChild(elt(\"span\", m[0] == \"\\r\" ? \"\\u240d\" : \"\\u2424\", \"cm-invalidchar\"));\n txt$1.setAttribute(\"cm-text\", m[0]);\n builder.col += 1;\n } else {\n txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);\n txt$1.setAttribute(\"cm-text\", m[0]);\n if (ie && ie_version < 9) { content.appendChild(elt(\"span\", [txt$1])); }\n else { content.appendChild(txt$1); }\n builder.col += 1;\n }\n builder.map.push(builder.pos, builder.pos + 1, txt$1);\n builder.pos++;\n }\n }\n builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;\n if (style || startStyle || endStyle || mustWrap || css || attributes) {\n var fullStyle = style || \"\";\n if (startStyle) { fullStyle += startStyle; }\n if (endStyle) { fullStyle += endStyle; }\n var token = elt(\"span\", [content], fullStyle, css);\n if (attributes) {\n for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != \"style\" && attr != \"class\")\n { token.setAttribute(attr, attributes[attr]); } }\n }\n return builder.content.appendChild(token)\n }\n builder.content.appendChild(content);\n }\n\n // Change some spaces to NBSP to prevent the browser from collapsing\n // trailing spaces at the end of a line when rendering text (issue #1362).\n function splitSpaces(text, trailingBefore) {\n if (text.length > 1 && !/ /.test(text)) { return text }\n var spaceBefore = trailingBefore, result = \"\";\n for (var i = 0; i < text.length; i++) {\n var ch = text.charAt(i);\n if (ch == \" \" && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))\n { ch = \"\\u00a0\"; }\n result += ch;\n spaceBefore = ch == \" \";\n }\n return result\n }\n\n // Work around nonsense dimensions being reported for stretches of\n // right-to-left text.\n function buildTokenBadBidi(inner, order) {\n return function (builder, text, style, startStyle, endStyle, css, attributes) {\n style = style ? style + \" cm-force-border\" : \"cm-force-border\";\n var start = builder.pos, end = start + text.length;\n for (;;) {\n // Find the part that overlaps with the start of this text\n var part = (void 0);\n for (var i = 0; i < order.length; i++) {\n part = order[i];\n if (part.to > start && part.from <= start) { break }\n }\n if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }\n inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);\n startStyle = null;\n text = text.slice(part.to - start);\n start = part.to;\n }\n }\n }\n\n function buildCollapsedSpan(builder, size, marker, ignoreWidget) {\n var widget = !ignoreWidget && marker.widgetNode;\n if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }\n if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {\n if (!widget)\n { widget = builder.content.appendChild(document.createElement(\"span\")); }\n widget.setAttribute(\"cm-marker\", marker.id);\n }\n if (widget) {\n builder.cm.display.input.setUneditable(widget);\n builder.content.appendChild(widget);\n }\n builder.pos += size;\n builder.trailingSpace = false;\n }\n\n // Outputs a number of spans to make up a line, taking highlighting\n // and marked text into account.\n function insertLineContent(line, builder, styles) {\n var spans = line.markedSpans, allText = line.text, at = 0;\n if (!spans) {\n for (var i$1 = 1; i$1 < styles.length; i$1+=2)\n { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }\n return\n }\n\n var len = allText.length, pos = 0, i = 1, text = \"\", style, css;\n var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;\n for (;;) {\n if (nextChange == pos) { // Update current marker set\n spanStyle = spanEndStyle = spanStartStyle = css = \"\";\n attributes = null;\n collapsed = null; nextChange = Infinity;\n var foundBookmarks = [], endStyles = (void 0);\n for (var j = 0; j < spans.length; ++j) {\n var sp = spans[j], m = sp.marker;\n if (m.type == \"bookmark\" && sp.from == pos && m.widgetNode) {\n foundBookmarks.push(m);\n } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {\n if (sp.to != null && sp.to != pos && nextChange > sp.to) {\n nextChange = sp.to;\n spanEndStyle = \"\";\n }\n if (m.className) { spanStyle += \" \" + m.className; }\n if (m.css) { css = (css ? css + \";\" : \"\") + m.css; }\n if (m.startStyle && sp.from == pos) { spanStartStyle += \" \" + m.startStyle; }\n if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }\n // support for the old title property\n // https://github.com/codemirror/CodeMirror/pull/5673\n if (m.title) { (attributes || (attributes = {})).title = m.title; }\n if (m.attributes) {\n for (var attr in m.attributes)\n { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }\n }\n if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))\n { collapsed = sp; }\n } else if (sp.from > pos && nextChange > sp.from) {\n nextChange = sp.from;\n }\n }\n if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)\n { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += \" \" + endStyles[j$1]; } } }\n\n if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)\n { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }\n if (collapsed && (collapsed.from || 0) == pos) {\n buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,\n collapsed.marker, collapsed.from == null);\n if (collapsed.to == null) { return }\n if (collapsed.to == pos) { collapsed = false; }\n }\n }\n if (pos >= len) { break }\n\n var upto = Math.min(len, nextChange);\n while (true) {\n if (text) {\n var end = pos + text.length;\n if (!collapsed) {\n var tokenText = end > upto ? text.slice(0, upto - pos) : text;\n builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,\n spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : \"\", css, attributes);\n }\n if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}\n pos = end;\n spanStartStyle = \"\";\n }\n text = allText.slice(at, at = styles[i++]);\n style = interpretTokenStyle(styles[i++], builder.cm.options);\n }\n }\n }\n\n\n // These objects are used to represent the visible (currently drawn)\n // part of the document. A LineView may correspond to multiple\n // logical lines, if those are connected by collapsed ranges.\n function LineView(doc, line, lineN) {\n // The starting line\n this.line = line;\n // Continuing lines, if any\n this.rest = visualLineContinued(line);\n // Number of logical lines in this visual line\n this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;\n this.node = this.text = null;\n this.hidden = lineIsHidden(doc, line);\n }\n\n // Create a range of LineView objects for the given lines.\n function buildViewArray(cm, from, to) {\n var array = [], nextPos;\n for (var pos = from; pos < to; pos = nextPos) {\n var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);\n nextPos = pos + view.size;\n array.push(view);\n }\n return array\n }\n\n var operationGroup = null;\n\n function pushOperation(op) {\n if (operationGroup) {\n operationGroup.ops.push(op);\n } else {\n op.ownsGroup = operationGroup = {\n ops: [op],\n delayedCallbacks: []\n };\n }\n }\n\n function fireCallbacksForOps(group) {\n // Calls delayed callbacks and cursorActivity handlers until no\n // new ones appear\n var callbacks = group.delayedCallbacks, i = 0;\n do {\n for (; i < callbacks.length; i++)\n { callbacks[i].call(null); }\n for (var j = 0; j < group.ops.length; j++) {\n var op = group.ops[j];\n if (op.cursorActivityHandlers)\n { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)\n { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }\n }\n } while (i < callbacks.length)\n }\n\n function finishOperation(op, endCb) {\n var group = op.ownsGroup;\n if (!group) { return }\n\n try { fireCallbacksForOps(group); }\n finally {\n operationGroup = null;\n endCb(group);\n }\n }\n\n var orphanDelayedCallbacks = null;\n\n // Often, we want to signal events at a point where we are in the\n // middle of some work, but don't want the handler to start calling\n // other methods on the editor, which might be in an inconsistent\n // state or simply not expect any other events to happen.\n // signalLater looks whether there are any handlers, and schedules\n // them to be executed when the last operation ends, or, if no\n // operation is active, when a timeout fires.\n function signalLater(emitter, type /*, values...*/) {\n var arr = getHandlers(emitter, type);\n if (!arr.length) { return }\n var args = Array.prototype.slice.call(arguments, 2), list;\n if (operationGroup) {\n list = operationGroup.delayedCallbacks;\n } else if (orphanDelayedCallbacks) {\n list = orphanDelayedCallbacks;\n } else {\n list = orphanDelayedCallbacks = [];\n setTimeout(fireOrphanDelayed, 0);\n }\n var loop = function ( i ) {\n list.push(function () { return arr[i].apply(null, args); });\n };\n\n for (var i = 0; i < arr.length; ++i)\n loop( i );\n }\n\n function fireOrphanDelayed() {\n var delayed = orphanDelayedCallbacks;\n orphanDelayedCallbacks = null;\n for (var i = 0; i < delayed.length; ++i) { delayed[i](); }\n }\n\n // When an aspect of a line changes, a string is added to\n // lineView.changes. This updates the relevant part of the line's\n // DOM structure.\n function updateLineForChanges(cm, lineView, lineN, dims) {\n for (var j = 0; j < lineView.changes.length; j++) {\n var type = lineView.changes[j];\n if (type == \"text\") { updateLineText(cm, lineView); }\n else if (type == \"gutter\") { updateLineGutter(cm, lineView, lineN, dims); }\n else if (type == \"class\") { updateLineClasses(cm, lineView); }\n else if (type == \"widget\") { updateLineWidgets(cm, lineView, dims); }\n }\n lineView.changes = null;\n }\n\n // Lines with gutter elements, widgets or a background class need to\n // be wrapped, and have the extra elements added to the wrapper div\n function ensureLineWrapped(lineView) {\n if (lineView.node == lineView.text) {\n lineView.node = elt(\"div\", null, null, \"position: relative\");\n if (lineView.text.parentNode)\n { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }\n lineView.node.appendChild(lineView.text);\n if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }\n }\n return lineView.node\n }\n\n function updateLineBackground(cm, lineView) {\n var cls = lineView.bgClass ? lineView.bgClass + \" \" + (lineView.line.bgClass || \"\") : lineView.line.bgClass;\n if (cls) { cls += \" CodeMirror-linebackground\"; }\n if (lineView.background) {\n if (cls) { lineView.background.className = cls; }\n else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }\n } else if (cls) {\n var wrap = ensureLineWrapped(lineView);\n lineView.background = wrap.insertBefore(elt(\"div\", null, cls), wrap.firstChild);\n cm.display.input.setUneditable(lineView.background);\n }\n }\n\n // Wrapper around buildLineContent which will reuse the structure\n // in display.externalMeasured when possible.\n function getLineContent(cm, lineView) {\n var ext = cm.display.externalMeasured;\n if (ext && ext.line == lineView.line) {\n cm.display.externalMeasured = null;\n lineView.measure = ext.measure;\n return ext.built\n }\n return buildLineContent(cm, lineView)\n }\n\n // Redraw the line's text. Interacts with the background and text\n // classes because the mode may output tokens that influence these\n // classes.\n function updateLineText(cm, lineView) {\n var cls = lineView.text.className;\n var built = getLineContent(cm, lineView);\n if (lineView.text == lineView.node) { lineView.node = built.pre; }\n lineView.text.parentNode.replaceChild(built.pre, lineView.text);\n lineView.text = built.pre;\n if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {\n lineView.bgClass = built.bgClass;\n lineView.textClass = built.textClass;\n updateLineClasses(cm, lineView);\n } else if (cls) {\n lineView.text.className = cls;\n }\n }\n\n function updateLineClasses(cm, lineView) {\n updateLineBackground(cm, lineView);\n if (lineView.line.wrapClass)\n { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }\n else if (lineView.node != lineView.text)\n { lineView.node.className = \"\"; }\n var textClass = lineView.textClass ? lineView.textClass + \" \" + (lineView.line.textClass || \"\") : lineView.line.textClass;\n lineView.text.className = textClass || \"\";\n }\n\n function updateLineGutter(cm, lineView, lineN, dims) {\n if (lineView.gutter) {\n lineView.node.removeChild(lineView.gutter);\n lineView.gutter = null;\n }\n if (lineView.gutterBackground) {\n lineView.node.removeChild(lineView.gutterBackground);\n lineView.gutterBackground = null;\n }\n if (lineView.line.gutterClass) {\n var wrap = ensureLineWrapped(lineView);\n lineView.gutterBackground = elt(\"div\", null, \"CodeMirror-gutter-background \" + lineView.line.gutterClass,\n (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px; width: \" + (dims.gutterTotalWidth) + \"px\"));\n cm.display.input.setUneditable(lineView.gutterBackground);\n wrap.insertBefore(lineView.gutterBackground, lineView.text);\n }\n var markers = lineView.line.gutterMarkers;\n if (cm.options.lineNumbers || markers) {\n var wrap$1 = ensureLineWrapped(lineView);\n var gutterWrap = lineView.gutter = elt(\"div\", null, \"CodeMirror-gutter-wrapper\", (\"left: \" + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + \"px\"));\n gutterWrap.setAttribute(\"aria-hidden\", \"true\");\n cm.display.input.setUneditable(gutterWrap);\n wrap$1.insertBefore(gutterWrap, lineView.text);\n if (lineView.line.gutterClass)\n { gutterWrap.className += \" \" + lineView.line.gutterClass; }\n if (cm.options.lineNumbers && (!markers || !markers[\"CodeMirror-linenumbers\"]))\n { lineView.lineNumber = gutterWrap.appendChild(\n elt(\"div\", lineNumberFor(cm.options, lineN),\n \"CodeMirror-linenumber CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[\"CodeMirror-linenumbers\"]) + \"px; width: \" + (cm.display.lineNumInnerWidth) + \"px\"))); }\n if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {\n var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];\n if (found)\n { gutterWrap.appendChild(elt(\"div\", [found], \"CodeMirror-gutter-elt\",\n (\"left: \" + (dims.gutterLeft[id]) + \"px; width: \" + (dims.gutterWidth[id]) + \"px\"))); }\n } }\n }\n }\n\n function updateLineWidgets(cm, lineView, dims) {\n if (lineView.alignable) { lineView.alignable = null; }\n var isWidget = classTest(\"CodeMirror-linewidget\");\n for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {\n next = node.nextSibling;\n if (isWidget.test(node.className)) { lineView.node.removeChild(node); }\n }\n insertLineWidgets(cm, lineView, dims);\n }\n\n // Build a line's DOM representation from scratch\n function buildLineElement(cm, lineView, lineN, dims) {\n var built = getLineContent(cm, lineView);\n lineView.text = lineView.node = built.pre;\n if (built.bgClass) { lineView.bgClass = built.bgClass; }\n if (built.textClass) { lineView.textClass = built.textClass; }\n\n updateLineClasses(cm, lineView);\n updateLineGutter(cm, lineView, lineN, dims);\n insertLineWidgets(cm, lineView, dims);\n return lineView.node\n }\n\n // A lineView may contain multiple logical lines (when merged by\n // collapsed spans). The widgets for all of them need to be drawn.\n function insertLineWidgets(cm, lineView, dims) {\n insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }\n }\n\n function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {\n if (!line.widgets) { return }\n var wrap = ensureLineWrapped(lineView);\n for (var i = 0, ws = line.widgets; i < ws.length; ++i) {\n var widget = ws[i], node = elt(\"div\", [widget.node], \"CodeMirror-linewidget\" + (widget.className ? \" \" + widget.className : \"\"));\n if (!widget.handleMouseEvents) { node.setAttribute(\"cm-ignore-events\", \"true\"); }\n positionLineWidget(widget, node, lineView, dims);\n cm.display.input.setUneditable(node);\n if (allowAbove && widget.above)\n { wrap.insertBefore(node, lineView.gutter || lineView.text); }\n else\n { wrap.appendChild(node); }\n signalLater(widget, \"redraw\");\n }\n }\n\n function positionLineWidget(widget, node, lineView, dims) {\n if (widget.noHScroll) {\n (lineView.alignable || (lineView.alignable = [])).push(node);\n var width = dims.wrapperWidth;\n node.style.left = dims.fixedPos + \"px\";\n if (!widget.coverGutter) {\n width -= dims.gutterTotalWidth;\n node.style.paddingLeft = dims.gutterTotalWidth + \"px\";\n }\n node.style.width = width + \"px\";\n }\n if (widget.coverGutter) {\n node.style.zIndex = 5;\n node.style.position = \"relative\";\n if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + \"px\"; }\n }\n }\n\n function widgetHeight(widget) {\n if (widget.height != null) { return widget.height }\n var cm = widget.doc.cm;\n if (!cm) { return 0 }\n if (!contains(document.body, widget.node)) {\n var parentStyle = \"position: relative;\";\n if (widget.coverGutter)\n { parentStyle += \"margin-left: -\" + cm.display.gutters.offsetWidth + \"px;\"; }\n if (widget.noHScroll)\n { parentStyle += \"width: \" + cm.display.wrapper.clientWidth + \"px;\"; }\n removeChildrenAndAdd(cm.display.measure, elt(\"div\", [widget.node], null, parentStyle));\n }\n return widget.height = widget.node.parentNode.offsetHeight\n }\n\n // Return true when the given mouse event happened in a widget\n function eventInWidget(display, e) {\n for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {\n if (!n || (n.nodeType == 1 && n.getAttribute(\"cm-ignore-events\") == \"true\") ||\n (n.parentNode == display.sizer && n != display.mover))\n { return true }\n }\n }\n\n // POSITION MEASUREMENT\n\n function paddingTop(display) {return display.lineSpace.offsetTop}\n function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}\n function paddingH(display) {\n if (display.cachedPaddingH) { return display.cachedPaddingH }\n var e = removeChildrenAndAdd(display.measure, elt(\"pre\", \"x\", \"CodeMirror-line-like\"));\n var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;\n var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};\n if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }\n return data\n }\n\n function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }\n function displayWidth(cm) {\n return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth\n }\n function displayHeight(cm) {\n return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight\n }\n\n // Ensure the lineView.wrapping.heights array is populated. This is\n // an array of bottom offsets for the lines that make up a drawn\n // line. When lineWrapping is on, there might be more than one\n // height.\n function ensureLineHeights(cm, lineView, rect) {\n var wrapping = cm.options.lineWrapping;\n var curWidth = wrapping && displayWidth(cm);\n if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {\n var heights = lineView.measure.heights = [];\n if (wrapping) {\n lineView.measure.width = curWidth;\n var rects = lineView.text.firstChild.getClientRects();\n for (var i = 0; i < rects.length - 1; i++) {\n var cur = rects[i], next = rects[i + 1];\n if (Math.abs(cur.bottom - next.bottom) > 2)\n { heights.push((cur.bottom + next.top) / 2 - rect.top); }\n }\n }\n heights.push(rect.bottom - rect.top);\n }\n }\n\n // Find a line map (mapping character offsets to text nodes) and a\n // measurement cache for the given line number. (A line view might\n // contain multiple lines when collapsed ranges are present.)\n function mapFromLineView(lineView, line, lineN) {\n if (lineView.line == line)\n { return {map: lineView.measure.map, cache: lineView.measure.cache} }\n if (lineView.rest) {\n for (var i = 0; i < lineView.rest.length; i++)\n { if (lineView.rest[i] == line)\n { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }\n for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)\n { if (lineNo(lineView.rest[i$1]) > lineN)\n { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }\n }\n }\n\n // Render a line into the hidden node display.externalMeasured. Used\n // when measurement is needed for a line that's not in the viewport.\n function updateExternalMeasurement(cm, line) {\n line = visualLine(line);\n var lineN = lineNo(line);\n var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);\n view.lineN = lineN;\n var built = view.built = buildLineContent(cm, view);\n view.text = built.pre;\n removeChildrenAndAdd(cm.display.lineMeasure, built.pre);\n return view\n }\n\n // Get a {top, bottom, left, right} box (in line-local coordinates)\n // for a given character.\n function measureChar(cm, line, ch, bias) {\n return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)\n }\n\n // Find a line view that corresponds to the given line number.\n function findViewForLine(cm, lineN) {\n if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)\n { return cm.display.view[findViewIndex(cm, lineN)] }\n var ext = cm.display.externalMeasured;\n if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)\n { return ext }\n }\n\n // Measurement can be split in two steps, the set-up work that\n // applies to the whole line, and the measurement of the actual\n // character. Functions like coordsChar, that need to do a lot of\n // measurements in a row, can thus ensure that the set-up work is\n // only done once.\n function prepareMeasureForLine(cm, line) {\n var lineN = lineNo(line);\n var view = findViewForLine(cm, lineN);\n if (view && !view.text) {\n view = null;\n } else if (view && view.changes) {\n updateLineForChanges(cm, view, lineN, getDimensions(cm));\n cm.curOp.forceUpdate = true;\n }\n if (!view)\n { view = updateExternalMeasurement(cm, line); }\n\n var info = mapFromLineView(view, line, lineN);\n return {\n line: line, view: view, rect: null,\n map: info.map, cache: info.cache, before: info.before,\n hasHeights: false\n }\n }\n\n // Given a prepared measurement object, measures the position of an\n // actual character (or fetches it from the cache).\n function measureCharPrepared(cm, prepared, ch, bias, varHeight) {\n if (prepared.before) { ch = -1; }\n var key = ch + (bias || \"\"), found;\n if (prepared.cache.hasOwnProperty(key)) {\n found = prepared.cache[key];\n } else {\n if (!prepared.rect)\n { prepared.rect = prepared.view.text.getBoundingClientRect(); }\n if (!prepared.hasHeights) {\n ensureLineHeights(cm, prepared.view, prepared.rect);\n prepared.hasHeights = true;\n }\n found = measureCharInner(cm, prepared, ch, bias);\n if (!found.bogus) { prepared.cache[key] = found; }\n }\n return {left: found.left, right: found.right,\n top: varHeight ? found.rtop : found.top,\n bottom: varHeight ? found.rbottom : found.bottom}\n }\n\n var nullRect = {left: 0, right: 0, top: 0, bottom: 0};\n\n function nodeAndOffsetInLineMap(map, ch, bias) {\n var node, start, end, collapse, mStart, mEnd;\n // First, search the line map for the text node corresponding to,\n // or closest to, the target character.\n for (var i = 0; i < map.length; i += 3) {\n mStart = map[i];\n mEnd = map[i + 1];\n if (ch < mStart) {\n start = 0; end = 1;\n collapse = \"left\";\n } else if (ch < mEnd) {\n start = ch - mStart;\n end = start + 1;\n } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) {\n end = mEnd - mStart;\n start = end - 1;\n if (ch >= mEnd) { collapse = \"right\"; }\n }\n if (start != null) {\n node = map[i + 2];\n if (mStart == mEnd && bias == (node.insertLeft ? \"left\" : \"right\"))\n { collapse = bias; }\n if (bias == \"left\" && start == 0)\n { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) {\n node = map[(i -= 3) + 2];\n collapse = \"left\";\n } }\n if (bias == \"right\" && start == mEnd - mStart)\n { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) {\n node = map[(i += 3) + 2];\n collapse = \"right\";\n } }\n break\n }\n }\n return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}\n }\n\n function getUsefulRect(rects, bias) {\n var rect = nullRect;\n if (bias == \"left\") { for (var i = 0; i < rects.length; i++) {\n if ((rect = rects[i]).left != rect.right) { break }\n } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {\n if ((rect = rects[i$1]).left != rect.right) { break }\n } }\n return rect\n }\n\n function measureCharInner(cm, prepared, ch, bias) {\n var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);\n var node = place.node, start = place.start, end = place.end, collapse = place.collapse;\n\n var rect;\n if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.\n for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned\n while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }\n while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }\n if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)\n { rect = node.parentNode.getBoundingClientRect(); }\n else\n { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }\n if (rect.left || rect.right || start == 0) { break }\n end = start;\n start = start - 1;\n collapse = \"right\";\n }\n if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }\n } else { // If it is a widget, simply get the box for the whole widget.\n if (start > 0) { collapse = bias = \"right\"; }\n var rects;\n if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)\n { rect = rects[bias == \"right\" ? rects.length - 1 : 0]; }\n else\n { rect = node.getBoundingClientRect(); }\n }\n if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {\n var rSpan = node.parentNode.getClientRects()[0];\n if (rSpan)\n { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }\n else\n { rect = nullRect; }\n }\n\n var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;\n var mid = (rtop + rbot) / 2;\n var heights = prepared.view.measure.heights;\n var i = 0;\n for (; i < heights.length - 1; i++)\n { if (mid < heights[i]) { break } }\n var top = i ? heights[i - 1] : 0, bot = heights[i];\n var result = {left: (collapse == \"right\" ? rect.right : rect.left) - prepared.rect.left,\n right: (collapse == \"left\" ? rect.left : rect.right) - prepared.rect.left,\n top: top, bottom: bot};\n if (!rect.left && !rect.right) { result.bogus = true; }\n if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }\n\n return result\n }\n\n // Work around problem with bounding client rects on ranges being\n // returned incorrectly when zoomed on IE10 and below.\n function maybeUpdateRectForZooming(measure, rect) {\n if (!window.screen || screen.logicalXDPI == null ||\n screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))\n { return rect }\n var scaleX = screen.logicalXDPI / screen.deviceXDPI;\n var scaleY = screen.logicalYDPI / screen.deviceYDPI;\n return {left: rect.left * scaleX, right: rect.right * scaleX,\n top: rect.top * scaleY, bottom: rect.bottom * scaleY}\n }\n\n function clearLineMeasurementCacheFor(lineView) {\n if (lineView.measure) {\n lineView.measure.cache = {};\n lineView.measure.heights = null;\n if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)\n { lineView.measure.caches[i] = {}; } }\n }\n }\n\n function clearLineMeasurementCache(cm) {\n cm.display.externalMeasure = null;\n removeChildren(cm.display.lineMeasure);\n for (var i = 0; i < cm.display.view.length; i++)\n { clearLineMeasurementCacheFor(cm.display.view[i]); }\n }\n\n function clearCaches(cm) {\n clearLineMeasurementCache(cm);\n cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;\n if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }\n cm.display.lineNumChars = null;\n }\n\n function pageScrollX(doc) {\n // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206\n // which causes page_Offset and bounding client rects to use\n // different reference viewports and invalidate our calculations.\n if (chrome && android) { return -(doc.body.getBoundingClientRect().left - parseInt(getComputedStyle(doc.body).marginLeft)) }\n return doc.defaultView.pageXOffset || (doc.documentElement || doc.body).scrollLeft\n }\n function pageScrollY(doc) {\n if (chrome && android) { return -(doc.body.getBoundingClientRect().top - parseInt(getComputedStyle(doc.body).marginTop)) }\n return doc.defaultView.pageYOffset || (doc.documentElement || doc.body).scrollTop\n }\n\n function widgetTopHeight(lineObj) {\n var ref = visualLine(lineObj);\n var widgets = ref.widgets;\n var height = 0;\n if (widgets) { for (var i = 0; i < widgets.length; ++i) { if (widgets[i].above)\n { height += widgetHeight(widgets[i]); } } }\n return height\n }\n\n // Converts a {top, bottom, left, right} box from line-local\n // coordinates into another coordinate system. Context may be one of\n // \"line\", \"div\" (display.lineDiv), \"local\"./null (editor), \"window\",\n // or \"page\".\n function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {\n if (!includeWidgets) {\n var height = widgetTopHeight(lineObj);\n rect.top += height; rect.bottom += height;\n }\n if (context == \"line\") { return rect }\n if (!context) { context = \"local\"; }\n var yOff = heightAtLine(lineObj);\n if (context == \"local\") { yOff += paddingTop(cm.display); }\n else { yOff -= cm.display.viewOffset; }\n if (context == \"page\" || context == \"window\") {\n var lOff = cm.display.lineSpace.getBoundingClientRect();\n yOff += lOff.top + (context == \"window\" ? 0 : pageScrollY(doc(cm)));\n var xOff = lOff.left + (context == \"window\" ? 0 : pageScrollX(doc(cm)));\n rect.left += xOff; rect.right += xOff;\n }\n rect.top += yOff; rect.bottom += yOff;\n return rect\n }\n\n // Coverts a box from \"div\" coords to another coordinate system.\n // Context may be \"window\", \"page\", \"div\", or \"local\"./null.\n function fromCoordSystem(cm, coords, context) {\n if (context == \"div\") { return coords }\n var left = coords.left, top = coords.top;\n // First move into \"page\" coordinate system\n if (context == \"page\") {\n left -= pageScrollX(doc(cm));\n top -= pageScrollY(doc(cm));\n } else if (context == \"local\" || !context) {\n var localBox = cm.display.sizer.getBoundingClientRect();\n left += localBox.left;\n top += localBox.top;\n }\n\n var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();\n return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}\n }\n\n function charCoords(cm, pos, context, lineObj, bias) {\n if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }\n return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)\n }\n\n // Returns a box for a given cursor position, which may have an\n // 'other' property containing the position of the secondary cursor\n // on a bidi boundary.\n // A cursor Pos(line, char, \"before\") is on the same visual line as `char - 1`\n // and after `char - 1` in writing order of `char - 1`\n // A cursor Pos(line, char, \"after\") is on the same visual line as `char`\n // and before `char` in writing order of `char`\n // Examples (upper-case letters are RTL, lower-case are LTR):\n // Pos(0, 1, ...)\n // before after\n // ab a|b a|b\n // aB a|B aB|\n // Ab |Ab A|b\n // AB B|A B|A\n // Every position after the last character on a line is considered to stick\n // to the last character on the line.\n function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {\n lineObj = lineObj || getLine(cm.doc, pos.line);\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n function get(ch, right) {\n var m = measureCharPrepared(cm, preparedMeasure, ch, right ? \"right\" : \"left\", varHeight);\n if (right) { m.left = m.right; } else { m.right = m.left; }\n return intoCoordSystem(cm, lineObj, m, context)\n }\n var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;\n if (ch >= lineObj.text.length) {\n ch = lineObj.text.length;\n sticky = \"before\";\n } else if (ch <= 0) {\n ch = 0;\n sticky = \"after\";\n }\n if (!order) { return get(sticky == \"before\" ? ch - 1 : ch, sticky == \"before\") }\n\n function getBidi(ch, partPos, invert) {\n var part = order[partPos], right = part.level == 1;\n return get(invert ? ch - 1 : ch, right != invert)\n }\n var partPos = getBidiPartAt(order, ch, sticky);\n var other = bidiOther;\n var val = getBidi(ch, partPos, sticky == \"before\");\n if (other != null) { val.other = getBidi(ch, other, sticky != \"before\"); }\n return val\n }\n\n // Used to cheaply estimate the coordinates for a position. Used for\n // intermediate scroll updates.\n function estimateCoords(cm, pos) {\n var left = 0;\n pos = clipPos(cm.doc, pos);\n if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }\n var lineObj = getLine(cm.doc, pos.line);\n var top = heightAtLine(lineObj) + paddingTop(cm.display);\n return {left: left, right: left, top: top, bottom: top + lineObj.height}\n }\n\n // Positions returned by coordsChar contain some extra information.\n // xRel is the relative x position of the input coordinates compared\n // to the found position (so xRel > 0 means the coordinates are to\n // the right of the character position, for example). When outside\n // is true, that means the coordinates lie outside the line's\n // vertical range.\n function PosWithInfo(line, ch, sticky, outside, xRel) {\n var pos = Pos(line, ch, sticky);\n pos.xRel = xRel;\n if (outside) { pos.outside = outside; }\n return pos\n }\n\n // Compute the character position closest to the given coordinates.\n // Input must be lineSpace-local (\"div\" coordinate system).\n function coordsChar(cm, x, y) {\n var doc = cm.doc;\n y += cm.display.viewOffset;\n if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) }\n var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;\n if (lineN > last)\n { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) }\n if (x < 0) { x = 0; }\n\n var lineObj = getLine(doc, lineN);\n for (;;) {\n var found = coordsCharInner(cm, lineObj, lineN, x, y);\n var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0));\n if (!collapsed) { return found }\n var rangeEnd = collapsed.find(1);\n if (rangeEnd.line == lineN) { return rangeEnd }\n lineObj = getLine(doc, lineN = rangeEnd.line);\n }\n }\n\n function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {\n y -= widgetTopHeight(lineObj);\n var end = lineObj.text.length;\n var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);\n end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);\n return {begin: begin, end: end}\n }\n\n function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {\n if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }\n var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), \"line\").top;\n return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)\n }\n\n // Returns true if the given side of a box is after the given\n // coordinates, in top-to-bottom, left-to-right order.\n function boxIsAfter(box, x, y, left) {\n return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x\n }\n\n function coordsCharInner(cm, lineObj, lineNo, x, y) {\n // Move y into line-local coordinate space\n y -= heightAtLine(lineObj);\n var preparedMeasure = prepareMeasureForLine(cm, lineObj);\n // When directly calling `measureCharPrepared`, we have to adjust\n // for the widgets at this line.\n var widgetHeight = widgetTopHeight(lineObj);\n var begin = 0, end = lineObj.text.length, ltr = true;\n\n var order = getOrder(lineObj, cm.doc.direction);\n // If the line isn't plain left-to-right text, first figure out\n // which bidi section the coordinates fall into.\n if (order) {\n var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)\n (cm, lineObj, lineNo, preparedMeasure, order, x, y);\n ltr = part.level != 1;\n // The awkward -1 offsets are needed because findFirst (called\n // on these below) will treat its first bound as inclusive,\n // second as exclusive, but we want to actually address the\n // characters in the part's range\n begin = ltr ? part.from : part.to - 1;\n end = ltr ? part.to : part.from - 1;\n }\n\n // A binary search to find the first character whose bounding box\n // starts after the coordinates. If we run across any whose box wrap\n // the coordinates, store that.\n var chAround = null, boxAround = null;\n var ch = findFirst(function (ch) {\n var box = measureCharPrepared(cm, preparedMeasure, ch);\n box.top += widgetHeight; box.bottom += widgetHeight;\n if (!boxIsAfter(box, x, y, false)) { return false }\n if (box.top <= y && box.left <= x) {\n chAround = ch;\n boxAround = box;\n }\n return true\n }, begin, end);\n\n var baseX, sticky, outside = false;\n // If a box around the coordinates was found, use that\n if (boxAround) {\n // Distinguish coordinates nearer to the left or right side of the box\n var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;\n ch = chAround + (atStart ? 0 : 1);\n sticky = atStart ? \"after\" : \"before\";\n baseX = atLeft ? boxAround.left : boxAround.right;\n } else {\n // (Adjust for extended bound, if necessary.)\n if (!ltr && (ch == end || ch == begin)) { ch++; }\n // To determine which side to associate with, get the box to the\n // left of the character and compare it's vertical position to the\n // coordinates\n sticky = ch == 0 ? \"after\" : ch == lineObj.text.length ? \"before\" :\n (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ?\n \"after\" : \"before\";\n // Now get accurate coordinates for this place, in order to get a\n // base X position\n var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), \"line\", lineObj, preparedMeasure);\n baseX = coords.left;\n outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0;\n }\n\n ch = skipExtendingChars(lineObj.text, ch, 1);\n return PosWithInfo(lineNo, ch, sticky, outside, x - baseX)\n }\n\n function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) {\n // Bidi parts are sorted left-to-right, and in a non-line-wrapping\n // situation, we can take this ordering to correspond to the visual\n // ordering. This finds the first part whose end is after the given\n // coordinates.\n var index = findFirst(function (i) {\n var part = order[i], ltr = part.level != 1;\n return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? \"before\" : \"after\"),\n \"line\", lineObj, preparedMeasure), x, y, true)\n }, 0, order.length - 1);\n var part = order[index];\n // If this isn't the first part, the part's start is also after\n // the coordinates, and the coordinates aren't on the same line as\n // that start, move one part back.\n if (index > 0) {\n var ltr = part.level != 1;\n var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? \"after\" : \"before\"),\n \"line\", lineObj, preparedMeasure);\n if (boxIsAfter(start, x, y, true) && start.top > y)\n { part = order[index - 1]; }\n }\n return part\n }\n\n function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {\n // In a wrapped line, rtl text on wrapping boundaries can do things\n // that don't correspond to the ordering in our `order` array at\n // all, so a binary search doesn't work, and we want to return a\n // part that only spans one line so that the binary search in\n // coordsCharInner is safe. As such, we first find the extent of the\n // wrapped line, and then do a flat search in which we discard any\n // spans that aren't on the line.\n var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);\n var begin = ref.begin;\n var end = ref.end;\n if (/\\s/.test(lineObj.text.charAt(end - 1))) { end--; }\n var part = null, closestDist = null;\n for (var i = 0; i < order.length; i++) {\n var p = order[i];\n if (p.from >= end || p.to <= begin) { continue }\n var ltr = p.level != 1;\n var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;\n // Weigh against spans ending before this, so that they are only\n // picked if nothing ends after\n var dist = endX < x ? x - endX + 1e9 : endX - x;\n if (!part || closestDist > dist) {\n part = p;\n closestDist = dist;\n }\n }\n if (!part) { part = order[order.length - 1]; }\n // Clip the part to the wrapped line.\n if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }\n if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }\n return part\n }\n\n var measureText;\n // Compute the default text height.\n function textHeight(display) {\n if (display.cachedTextHeight != null) { return display.cachedTextHeight }\n if (measureText == null) {\n measureText = elt(\"pre\", null, \"CodeMirror-line-like\");\n // Measure a bunch of lines, for browsers that compute\n // fractional heights.\n for (var i = 0; i < 49; ++i) {\n measureText.appendChild(document.createTextNode(\"x\"));\n measureText.appendChild(elt(\"br\"));\n }\n measureText.appendChild(document.createTextNode(\"x\"));\n }\n removeChildrenAndAdd(display.measure, measureText);\n var height = measureText.offsetHeight / 50;\n if (height > 3) { display.cachedTextHeight = height; }\n removeChildren(display.measure);\n return height || 1\n }\n\n // Compute the default character width.\n function charWidth(display) {\n if (display.cachedCharWidth != null) { return display.cachedCharWidth }\n var anchor = elt(\"span\", \"xxxxxxxxxx\");\n var pre = elt(\"pre\", [anchor], \"CodeMirror-line-like\");\n removeChildrenAndAdd(display.measure, pre);\n var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;\n if (width > 2) { display.cachedCharWidth = width; }\n return width || 10\n }\n\n // Do a bulk-read of the DOM positions and sizes needed to draw the\n // view, so that we don't interleave reading and writing to the DOM.\n function getDimensions(cm) {\n var d = cm.display, left = {}, width = {};\n var gutterLeft = d.gutters.clientLeft;\n for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {\n var id = cm.display.gutterSpecs[i].className;\n left[id] = n.offsetLeft + n.clientLeft + gutterLeft;\n width[id] = n.clientWidth;\n }\n return {fixedPos: compensateForHScroll(d),\n gutterTotalWidth: d.gutters.offsetWidth,\n gutterLeft: left,\n gutterWidth: width,\n wrapperWidth: d.wrapper.clientWidth}\n }\n\n // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,\n // but using getBoundingClientRect to get a sub-pixel-accurate\n // result.\n function compensateForHScroll(display) {\n return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left\n }\n\n // Returns a function that estimates the height of a line, to use as\n // first approximation until the line becomes visible (and is thus\n // properly measurable).\n function estimateHeight(cm) {\n var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;\n var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);\n return function (line) {\n if (lineIsHidden(cm.doc, line)) { return 0 }\n\n var widgetsHeight = 0;\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {\n if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }\n } }\n\n if (wrapping)\n { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }\n else\n { return widgetsHeight + th }\n }\n }\n\n function estimateLineHeights(cm) {\n var doc = cm.doc, est = estimateHeight(cm);\n doc.iter(function (line) {\n var estHeight = est(line);\n if (estHeight != line.height) { updateLineHeight(line, estHeight); }\n });\n }\n\n // Given a mouse event, find the corresponding position. If liberal\n // is false, it checks whether a gutter or scrollbar was clicked,\n // and returns null if it was. forRect is used by rectangular\n // selections, and tries to estimate a character position even for\n // coordinates beyond the right of the text.\n function posFromMouse(cm, e, liberal, forRect) {\n var display = cm.display;\n if (!liberal && e_target(e).getAttribute(\"cm-not-content\") == \"true\") { return null }\n\n var x, y, space = display.lineSpace.getBoundingClientRect();\n // Fails unpredictably on IE[67] when mouse is dragged around quickly.\n try { x = e.clientX - space.left; y = e.clientY - space.top; }\n catch (e$1) { return null }\n var coords = coordsChar(cm, x, y), line;\n if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {\n var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;\n coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));\n }\n return coords\n }\n\n // Find the view element corresponding to a given line. Return null\n // when the line isn't visible.\n function findViewIndex(cm, n) {\n if (n >= cm.display.viewTo) { return null }\n n -= cm.display.viewFrom;\n if (n < 0) { return null }\n var view = cm.display.view;\n for (var i = 0; i < view.length; i++) {\n n -= view[i].size;\n if (n < 0) { return i }\n }\n }\n\n // Updates the display.view data structure for a given change to the\n // document. From and to are in pre-change coordinates. Lendiff is\n // the amount of lines added or subtracted by the change. This is\n // used for changes that span multiple lines, or change the way\n // lines are divided into visual lines. regLineChange (below)\n // registers single-line changes.\n function regChange(cm, from, to, lendiff) {\n if (from == null) { from = cm.doc.first; }\n if (to == null) { to = cm.doc.first + cm.doc.size; }\n if (!lendiff) { lendiff = 0; }\n\n var display = cm.display;\n if (lendiff && to < display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers > from))\n { display.updateLineNumbers = from; }\n\n cm.curOp.viewChanged = true;\n\n if (from >= display.viewTo) { // Change after\n if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)\n { resetView(cm); }\n } else if (to <= display.viewFrom) { // Change before\n if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {\n resetView(cm);\n } else {\n display.viewFrom += lendiff;\n display.viewTo += lendiff;\n }\n } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap\n resetView(cm);\n } else if (from <= display.viewFrom) { // Top overlap\n var cut = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cut) {\n display.view = display.view.slice(cut.index);\n display.viewFrom = cut.lineN;\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n } else if (to >= display.viewTo) { // Bottom overlap\n var cut$1 = viewCuttingPoint(cm, from, from, -1);\n if (cut$1) {\n display.view = display.view.slice(0, cut$1.index);\n display.viewTo = cut$1.lineN;\n } else {\n resetView(cm);\n }\n } else { // Gap in the middle\n var cutTop = viewCuttingPoint(cm, from, from, -1);\n var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);\n if (cutTop && cutBot) {\n display.view = display.view.slice(0, cutTop.index)\n .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))\n .concat(display.view.slice(cutBot.index));\n display.viewTo += lendiff;\n } else {\n resetView(cm);\n }\n }\n\n var ext = display.externalMeasured;\n if (ext) {\n if (to < ext.lineN)\n { ext.lineN += lendiff; }\n else if (from < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n }\n }\n\n // Register a change to a single line. Type must be one of \"text\",\n // \"gutter\", \"class\", \"widget\"\n function regLineChange(cm, line, type) {\n cm.curOp.viewChanged = true;\n var display = cm.display, ext = cm.display.externalMeasured;\n if (ext && line >= ext.lineN && line < ext.lineN + ext.size)\n { display.externalMeasured = null; }\n\n if (line < display.viewFrom || line >= display.viewTo) { return }\n var lineView = display.view[findViewIndex(cm, line)];\n if (lineView.node == null) { return }\n var arr = lineView.changes || (lineView.changes = []);\n if (indexOf(arr, type) == -1) { arr.push(type); }\n }\n\n // Clear the view.\n function resetView(cm) {\n cm.display.viewFrom = cm.display.viewTo = cm.doc.first;\n cm.display.view = [];\n cm.display.viewOffset = 0;\n }\n\n function viewCuttingPoint(cm, oldN, newN, dir) {\n var index = findViewIndex(cm, oldN), diff, view = cm.display.view;\n if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)\n { return {index: index, lineN: newN} }\n var n = cm.display.viewFrom;\n for (var i = 0; i < index; i++)\n { n += view[i].size; }\n if (n != oldN) {\n if (dir > 0) {\n if (index == view.length - 1) { return null }\n diff = (n + view[index].size) - oldN;\n index++;\n } else {\n diff = n - oldN;\n }\n oldN += diff; newN += diff;\n }\n while (visualLineNo(cm.doc, newN) != newN) {\n if (index == (dir < 0 ? 0 : view.length - 1)) { return null }\n newN += dir * view[index - (dir < 0 ? 1 : 0)].size;\n index += dir;\n }\n return {index: index, lineN: newN}\n }\n\n // Force the view to cover a given range, adding empty view element\n // or clipping off existing ones as needed.\n function adjustView(cm, from, to) {\n var display = cm.display, view = display.view;\n if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {\n display.view = buildViewArray(cm, from, to);\n display.viewFrom = from;\n } else {\n if (display.viewFrom > from)\n { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }\n else if (display.viewFrom < from)\n { display.view = display.view.slice(findViewIndex(cm, from)); }\n display.viewFrom = from;\n if (display.viewTo < to)\n { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }\n else if (display.viewTo > to)\n { display.view = display.view.slice(0, findViewIndex(cm, to)); }\n }\n display.viewTo = to;\n }\n\n // Count the number of lines in the view whose DOM representation is\n // out of date (or nonexistent).\n function countDirtyView(cm) {\n var view = cm.display.view, dirty = 0;\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }\n }\n return dirty\n }\n\n function updateSelection(cm) {\n cm.display.input.showSelection(cm.display.input.prepareSelection());\n }\n\n function prepareSelection(cm, primary) {\n if ( primary === void 0 ) primary = true;\n\n var doc = cm.doc, result = {};\n var curFragment = result.cursors = document.createDocumentFragment();\n var selFragment = result.selection = document.createDocumentFragment();\n\n var customCursor = cm.options.$customCursor;\n if (customCursor) { primary = true; }\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n if (!primary && i == doc.sel.primIndex) { continue }\n var range = doc.sel.ranges[i];\n if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue }\n var collapsed = range.empty();\n if (customCursor) {\n var head = customCursor(cm, range);\n if (head) { drawSelectionCursor(cm, head, curFragment); }\n } else if (collapsed || cm.options.showCursorWhenSelecting) {\n drawSelectionCursor(cm, range.head, curFragment);\n }\n if (!collapsed)\n { drawSelectionRange(cm, range, selFragment); }\n }\n return result\n }\n\n // Draws a cursor for the given range\n function drawSelectionCursor(cm, head, output) {\n var pos = cursorCoords(cm, head, \"div\", null, null, !cm.options.singleCursorHeightPerLine);\n\n var cursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor\"));\n cursor.style.left = pos.left + \"px\";\n cursor.style.top = pos.top + \"px\";\n cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + \"px\";\n\n if (/\\bcm-fat-cursor\\b/.test(cm.getWrapperElement().className)) {\n var charPos = charCoords(cm, head, \"div\", null, null);\n var width = charPos.right - charPos.left;\n cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + \"px\";\n }\n\n if (pos.other) {\n // Secondary cursor, shown when on a 'jump' in bi-directional text\n var otherCursor = output.appendChild(elt(\"div\", \"\\u00a0\", \"CodeMirror-cursor CodeMirror-secondarycursor\"));\n otherCursor.style.display = \"\";\n otherCursor.style.left = pos.other.left + \"px\";\n otherCursor.style.top = pos.other.top + \"px\";\n otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + \"px\";\n }\n }\n\n function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }\n\n // Draws the given range as a highlighted selection\n function drawSelectionRange(cm, range, output) {\n var display = cm.display, doc = cm.doc;\n var fragment = document.createDocumentFragment();\n var padding = paddingH(cm.display), leftSide = padding.left;\n var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;\n var docLTR = doc.direction == \"ltr\";\n\n function add(left, top, width, bottom) {\n if (top < 0) { top = 0; }\n top = Math.round(top);\n bottom = Math.round(bottom);\n fragment.appendChild(elt(\"div\", null, \"CodeMirror-selected\", (\"position: absolute; left: \" + left + \"px;\\n top: \" + top + \"px; width: \" + (width == null ? rightSide - left : width) + \"px;\\n height: \" + (bottom - top) + \"px\")));\n }\n\n function drawForLine(line, fromArg, toArg) {\n var lineObj = getLine(doc, line);\n var lineLen = lineObj.text.length;\n var start, end;\n function coords(ch, bias) {\n return charCoords(cm, Pos(line, ch), \"div\", lineObj, bias)\n }\n\n function wrapX(pos, dir, side) {\n var extent = wrappedLineExtentChar(cm, lineObj, null, pos);\n var prop = (dir == \"ltr\") == (side == \"after\") ? \"left\" : \"right\";\n var ch = side == \"after\" ? extent.begin : extent.end - (/\\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);\n return coords(ch, prop)[prop]\n }\n\n var order = getOrder(lineObj, doc.direction);\n iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {\n var ltr = dir == \"ltr\";\n var fromPos = coords(from, ltr ? \"left\" : \"right\");\n var toPos = coords(to - 1, ltr ? \"right\" : \"left\");\n\n var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;\n var first = i == 0, last = !order || i == order.length - 1;\n if (toPos.top - fromPos.top <= 3) { // Single line\n var openLeft = (docLTR ? openStart : openEnd) && first;\n var openRight = (docLTR ? openEnd : openStart) && last;\n var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;\n var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;\n add(left, fromPos.top, right - left, fromPos.bottom);\n } else { // Multiple lines\n var topLeft, topRight, botLeft, botRight;\n if (ltr) {\n topLeft = docLTR && openStart && first ? leftSide : fromPos.left;\n topRight = docLTR ? rightSide : wrapX(from, dir, \"before\");\n botLeft = docLTR ? leftSide : wrapX(to, dir, \"after\");\n botRight = docLTR && openEnd && last ? rightSide : toPos.right;\n } else {\n topLeft = !docLTR ? leftSide : wrapX(from, dir, \"before\");\n topRight = !docLTR && openStart && first ? rightSide : fromPos.right;\n botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;\n botRight = !docLTR ? rightSide : wrapX(to, dir, \"after\");\n }\n add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);\n if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }\n add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);\n }\n\n if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }\n if (cmpCoords(toPos, start) < 0) { start = toPos; }\n if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }\n if (cmpCoords(toPos, end) < 0) { end = toPos; }\n });\n return {start: start, end: end}\n }\n\n var sFrom = range.from(), sTo = range.to();\n if (sFrom.line == sTo.line) {\n drawForLine(sFrom.line, sFrom.ch, sTo.ch);\n } else {\n var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);\n var singleVLine = visualLine(fromLine) == visualLine(toLine);\n var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;\n var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;\n if (singleVLine) {\n if (leftEnd.top < rightStart.top - 2) {\n add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);\n add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);\n } else {\n add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);\n }\n }\n if (leftEnd.bottom < rightStart.top)\n { add(leftSide, leftEnd.bottom, null, rightStart.top); }\n }\n\n output.appendChild(fragment);\n }\n\n // Cursor-blinking\n function restartBlink(cm) {\n if (!cm.state.focused) { return }\n var display = cm.display;\n clearInterval(display.blinker);\n var on = true;\n display.cursorDiv.style.visibility = \"\";\n if (cm.options.cursorBlinkRate > 0)\n { display.blinker = setInterval(function () {\n if (!cm.hasFocus()) { onBlur(cm); }\n display.cursorDiv.style.visibility = (on = !on) ? \"\" : \"hidden\";\n }, cm.options.cursorBlinkRate); }\n else if (cm.options.cursorBlinkRate < 0)\n { display.cursorDiv.style.visibility = \"hidden\"; }\n }\n\n function ensureFocus(cm) {\n if (!cm.hasFocus()) {\n cm.display.input.focus();\n if (!cm.state.focused) { onFocus(cm); }\n }\n }\n\n function delayBlurEvent(cm) {\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { if (cm.state.delayingBlurEvent) {\n cm.state.delayingBlurEvent = false;\n if (cm.state.focused) { onBlur(cm); }\n } }, 100);\n }\n\n function onFocus(cm, e) {\n if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; }\n\n if (cm.options.readOnly == \"nocursor\") { return }\n if (!cm.state.focused) {\n signal(cm, \"focus\", cm, e);\n cm.state.focused = true;\n addClass(cm.display.wrapper, \"CodeMirror-focused\");\n // This test prevents this from firing when a context\n // menu is closed (since the input reset would kill the\n // select-all detection hack)\n if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {\n cm.display.input.reset();\n if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730\n }\n cm.display.input.receivedFocus();\n }\n restartBlink(cm);\n }\n function onBlur(cm, e) {\n if (cm.state.delayingBlurEvent) { return }\n\n if (cm.state.focused) {\n signal(cm, \"blur\", cm, e);\n cm.state.focused = false;\n rmClass(cm.display.wrapper, \"CodeMirror-focused\");\n }\n clearInterval(cm.display.blinker);\n setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);\n }\n\n // Read the actual heights of the rendered lines, and update their\n // stored heights to match.\n function updateHeightsInViewport(cm) {\n var display = cm.display;\n var prevBottom = display.lineDiv.offsetTop;\n var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top);\n var oldHeight = display.lineDiv.getBoundingClientRect().top;\n var mustScroll = 0;\n for (var i = 0; i < display.view.length; i++) {\n var cur = display.view[i], wrapping = cm.options.lineWrapping;\n var height = (void 0), width = 0;\n if (cur.hidden) { continue }\n oldHeight += cur.line.height;\n if (ie && ie_version < 8) {\n var bot = cur.node.offsetTop + cur.node.offsetHeight;\n height = bot - prevBottom;\n prevBottom = bot;\n } else {\n var box = cur.node.getBoundingClientRect();\n height = box.bottom - box.top;\n // Check that lines don't extend past the right of the current\n // editor width\n if (!wrapping && cur.text.firstChild)\n { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }\n }\n var diff = cur.line.height - height;\n if (diff > .005 || diff < -.005) {\n if (oldHeight < viewTop) { mustScroll -= diff; }\n updateLineHeight(cur.line, height);\n updateWidgetHeight(cur.line);\n if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)\n { updateWidgetHeight(cur.rest[j]); } }\n }\n if (width > cm.display.sizerWidth) {\n var chWidth = Math.ceil(width / charWidth(cm.display));\n if (chWidth > cm.display.maxLineLength) {\n cm.display.maxLineLength = chWidth;\n cm.display.maxLine = cur.line;\n cm.display.maxLineChanged = true;\n }\n }\n }\n if (Math.abs(mustScroll) > 2) { display.scroller.scrollTop += mustScroll; }\n }\n\n // Read and store the height of line widgets associated with the\n // given line.\n function updateWidgetHeight(line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {\n var w = line.widgets[i], parent = w.node.parentNode;\n if (parent) { w.height = parent.offsetHeight; }\n } }\n }\n\n // Compute the lines that are visible in a given viewport (defaults\n // the current scroll position). viewport may contain top,\n // height, and ensure (see op.scrollToPos) properties.\n function visibleLines(display, doc, viewport) {\n var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;\n top = Math.floor(top - paddingTop(display));\n var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;\n\n var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);\n // Ensure is a {from: {line, ch}, to: {line, ch}} object, and\n // forces those lines into the viewport (if possible).\n if (viewport && viewport.ensure) {\n var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;\n if (ensureFrom < from) {\n from = ensureFrom;\n to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);\n } else if (Math.min(ensureTo, doc.lastLine()) >= to) {\n from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);\n to = ensureTo;\n }\n }\n return {from: from, to: Math.max(to, from + 1)}\n }\n\n // SCROLLING THINGS INTO VIEW\n\n // If an editor sits on the top or bottom of the window, partially\n // scrolled out of view, this ensures that the cursor is visible.\n function maybeScrollWindow(cm, rect) {\n if (signalDOMEvent(cm, \"scrollCursorIntoView\")) { return }\n\n var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;\n var doc = display.wrapper.ownerDocument;\n if (rect.top + box.top < 0) { doScroll = true; }\n else if (rect.bottom + box.top > (doc.defaultView.innerHeight || doc.documentElement.clientHeight)) { doScroll = false; }\n if (doScroll != null && !phantom) {\n var scrollNode = elt(\"div\", \"\\u200b\", null, (\"position: absolute;\\n top: \" + (rect.top - display.viewOffset - paddingTop(cm.display)) + \"px;\\n height: \" + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + \"px;\\n left: \" + (rect.left) + \"px; width: \" + (Math.max(2, rect.right - rect.left)) + \"px;\"));\n cm.display.lineSpace.appendChild(scrollNode);\n scrollNode.scrollIntoView(doScroll);\n cm.display.lineSpace.removeChild(scrollNode);\n }\n }\n\n // Scroll a given position into view (immediately), verifying that\n // it actually became visible (as line heights are accurately\n // measured, the position of something may 'drift' during drawing).\n function scrollPosIntoView(cm, pos, end, margin) {\n if (margin == null) { margin = 0; }\n var rect;\n if (!cm.options.lineWrapping && pos == end) {\n // Set pos and end to the cursor positions around the character pos sticks to\n // If pos.sticky == \"before\", that is around pos.ch - 1, otherwise around pos.ch\n // If pos == Pos(_, 0, \"before\"), pos and end are unchanged\n end = pos.sticky == \"before\" ? Pos(pos.line, pos.ch + 1, \"before\") : pos;\n pos = pos.ch ? Pos(pos.line, pos.sticky == \"before\" ? pos.ch - 1 : pos.ch, \"after\") : pos;\n }\n for (var limit = 0; limit < 5; limit++) {\n var changed = false;\n var coords = cursorCoords(cm, pos);\n var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);\n rect = {left: Math.min(coords.left, endCoords.left),\n top: Math.min(coords.top, endCoords.top) - margin,\n right: Math.max(coords.left, endCoords.left),\n bottom: Math.max(coords.bottom, endCoords.bottom) + margin};\n var scrollPos = calculateScrollPos(cm, rect);\n var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;\n if (scrollPos.scrollTop != null) {\n updateScrollTop(cm, scrollPos.scrollTop);\n if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }\n }\n if (scrollPos.scrollLeft != null) {\n setScrollLeft(cm, scrollPos.scrollLeft);\n if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }\n }\n if (!changed) { break }\n }\n return rect\n }\n\n // Scroll a given set of coordinates into view (immediately).\n function scrollIntoView(cm, rect) {\n var scrollPos = calculateScrollPos(cm, rect);\n if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }\n if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }\n }\n\n // Calculate a new scroll position needed to scroll the given\n // rectangle into view. Returns an object with scrollTop and\n // scrollLeft properties. When these are undefined, the\n // vertical/horizontal position does not need to be adjusted.\n function calculateScrollPos(cm, rect) {\n var display = cm.display, snapMargin = textHeight(cm.display);\n if (rect.top < 0) { rect.top = 0; }\n var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;\n var screen = displayHeight(cm), result = {};\n if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }\n var docBottom = cm.doc.height + paddingVert(display);\n var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;\n if (rect.top < screentop) {\n result.scrollTop = atTop ? 0 : rect.top;\n } else if (rect.bottom > screentop + screen) {\n var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);\n if (newTop != screentop) { result.scrollTop = newTop; }\n }\n\n var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth;\n var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace;\n var screenw = displayWidth(cm) - display.gutters.offsetWidth;\n var tooWide = rect.right - rect.left > screenw;\n if (tooWide) { rect.right = rect.left + screenw; }\n if (rect.left < 10)\n { result.scrollLeft = 0; }\n else if (rect.left < screenleft)\n { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); }\n else if (rect.right > screenw + screenleft - 3)\n { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }\n return result\n }\n\n // Store a relative adjustment to the scroll position in the current\n // operation (to be applied when the operation finishes).\n function addToScrollTop(cm, top) {\n if (top == null) { return }\n resolveScrollToPos(cm);\n cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;\n }\n\n // Make sure that at the end of the operation the current cursor is\n // shown.\n function ensureCursorVisible(cm) {\n resolveScrollToPos(cm);\n var cur = cm.getCursor();\n cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};\n }\n\n function scrollToCoords(cm, x, y) {\n if (x != null || y != null) { resolveScrollToPos(cm); }\n if (x != null) { cm.curOp.scrollLeft = x; }\n if (y != null) { cm.curOp.scrollTop = y; }\n }\n\n function scrollToRange(cm, range) {\n resolveScrollToPos(cm);\n cm.curOp.scrollToPos = range;\n }\n\n // When an operation has its scrollToPos property set, and another\n // scroll action is applied before the end of the operation, this\n // 'simulates' scrolling that position into view in a cheap way, so\n // that the effect of intermediate scroll commands is not ignored.\n function resolveScrollToPos(cm) {\n var range = cm.curOp.scrollToPos;\n if (range) {\n cm.curOp.scrollToPos = null;\n var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to);\n scrollToCoordsRange(cm, from, to, range.margin);\n }\n }\n\n function scrollToCoordsRange(cm, from, to, margin) {\n var sPos = calculateScrollPos(cm, {\n left: Math.min(from.left, to.left),\n top: Math.min(from.top, to.top) - margin,\n right: Math.max(from.right, to.right),\n bottom: Math.max(from.bottom, to.bottom) + margin\n });\n scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);\n }\n\n // Sync the scrollable area and scrollbars, ensure the viewport\n // covers the visible area.\n function updateScrollTop(cm, val) {\n if (Math.abs(cm.doc.scrollTop - val) < 2) { return }\n if (!gecko) { updateDisplaySimple(cm, {top: val}); }\n setScrollTop(cm, val, true);\n if (gecko) { updateDisplaySimple(cm); }\n startWorker(cm, 100);\n }\n\n function setScrollTop(cm, val, forceScroll) {\n val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val));\n if (cm.display.scroller.scrollTop == val && !forceScroll) { return }\n cm.doc.scrollTop = val;\n cm.display.scrollbars.setScrollTop(val);\n if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }\n }\n\n // Sync scroller and scrollbar, ensure the gutter elements are\n // aligned.\n function setScrollLeft(cm, val, isScroller, forceScroll) {\n val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth));\n if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }\n cm.doc.scrollLeft = val;\n alignHorizontally(cm);\n if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }\n cm.display.scrollbars.setScrollLeft(val);\n }\n\n // SCROLLBARS\n\n // Prepare DOM reads needed to update the scrollbars. Done in one\n // shot to minimize update/measure roundtrips.\n function measureForScrollbars(cm) {\n var d = cm.display, gutterW = d.gutters.offsetWidth;\n var docH = Math.round(cm.doc.height + paddingVert(cm.display));\n return {\n clientHeight: d.scroller.clientHeight,\n viewHeight: d.wrapper.clientHeight,\n scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,\n viewWidth: d.wrapper.clientWidth,\n barLeft: cm.options.fixedGutter ? gutterW : 0,\n docHeight: docH,\n scrollHeight: docH + scrollGap(cm) + d.barHeight,\n nativeBarWidth: d.nativeBarWidth,\n gutterWidth: gutterW\n }\n }\n\n var NativeScrollbars = function(place, scroll, cm) {\n this.cm = cm;\n var vert = this.vert = elt(\"div\", [elt(\"div\", null, null, \"min-width: 1px\")], \"CodeMirror-vscrollbar\");\n var horiz = this.horiz = elt(\"div\", [elt(\"div\", null, null, \"height: 100%; min-height: 1px\")], \"CodeMirror-hscrollbar\");\n vert.tabIndex = horiz.tabIndex = -1;\n place(vert); place(horiz);\n\n on(vert, \"scroll\", function () {\n if (vert.clientHeight) { scroll(vert.scrollTop, \"vertical\"); }\n });\n on(horiz, \"scroll\", function () {\n if (horiz.clientWidth) { scroll(horiz.scrollLeft, \"horizontal\"); }\n });\n\n this.checkedZeroWidth = false;\n // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).\n if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = \"18px\"; }\n };\n\n NativeScrollbars.prototype.update = function (measure) {\n var needsH = measure.scrollWidth > measure.clientWidth + 1;\n var needsV = measure.scrollHeight > measure.clientHeight + 1;\n var sWidth = measure.nativeBarWidth;\n\n if (needsV) {\n this.vert.style.display = \"block\";\n this.vert.style.bottom = needsH ? sWidth + \"px\" : \"0\";\n var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);\n // A bug in IE8 can cause this value to be negative, so guard it.\n this.vert.firstChild.style.height =\n Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + \"px\";\n } else {\n this.vert.scrollTop = 0;\n this.vert.style.display = \"\";\n this.vert.firstChild.style.height = \"0\";\n }\n\n if (needsH) {\n this.horiz.style.display = \"block\";\n this.horiz.style.right = needsV ? sWidth + \"px\" : \"0\";\n this.horiz.style.left = measure.barLeft + \"px\";\n var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);\n this.horiz.firstChild.style.width =\n Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + \"px\";\n } else {\n this.horiz.style.display = \"\";\n this.horiz.firstChild.style.width = \"0\";\n }\n\n if (!this.checkedZeroWidth && measure.clientHeight > 0) {\n if (sWidth == 0) { this.zeroWidthHack(); }\n this.checkedZeroWidth = true;\n }\n\n return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}\n };\n\n NativeScrollbars.prototype.setScrollLeft = function (pos) {\n if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }\n if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, \"horiz\"); }\n };\n\n NativeScrollbars.prototype.setScrollTop = function (pos) {\n if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }\n if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, \"vert\"); }\n };\n\n NativeScrollbars.prototype.zeroWidthHack = function () {\n var w = mac && !mac_geMountainLion ? \"12px\" : \"18px\";\n this.horiz.style.height = this.vert.style.width = w;\n this.horiz.style.visibility = this.vert.style.visibility = \"hidden\";\n this.disableHoriz = new Delayed;\n this.disableVert = new Delayed;\n };\n\n NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {\n bar.style.visibility = \"\";\n function maybeDisable() {\n // To find out whether the scrollbar is still visible, we\n // check whether the element under the pixel in the bottom\n // right corner of the scrollbar box is the scrollbar box\n // itself (when the bar is still visible) or its filler child\n // (when the bar is hidden). If it is still visible, we keep\n // it enabled, if it's hidden, we disable pointer events.\n var box = bar.getBoundingClientRect();\n var elt = type == \"vert\" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)\n : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);\n if (elt != bar) { bar.style.visibility = \"hidden\"; }\n else { delay.set(1000, maybeDisable); }\n }\n delay.set(1000, maybeDisable);\n };\n\n NativeScrollbars.prototype.clear = function () {\n var parent = this.horiz.parentNode;\n parent.removeChild(this.horiz);\n parent.removeChild(this.vert);\n };\n\n var NullScrollbars = function () {};\n\n NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };\n NullScrollbars.prototype.setScrollLeft = function () {};\n NullScrollbars.prototype.setScrollTop = function () {};\n NullScrollbars.prototype.clear = function () {};\n\n function updateScrollbars(cm, measure) {\n if (!measure) { measure = measureForScrollbars(cm); }\n var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;\n updateScrollbarsInner(cm, measure);\n for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {\n if (startWidth != cm.display.barWidth && cm.options.lineWrapping)\n { updateHeightsInViewport(cm); }\n updateScrollbarsInner(cm, measureForScrollbars(cm));\n startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;\n }\n }\n\n // Re-synchronize the fake scrollbars with the actual size of the\n // content.\n function updateScrollbarsInner(cm, measure) {\n var d = cm.display;\n var sizes = d.scrollbars.update(measure);\n\n d.sizer.style.paddingRight = (d.barWidth = sizes.right) + \"px\";\n d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + \"px\";\n d.heightForcer.style.borderBottom = sizes.bottom + \"px solid transparent\";\n\n if (sizes.right && sizes.bottom) {\n d.scrollbarFiller.style.display = \"block\";\n d.scrollbarFiller.style.height = sizes.bottom + \"px\";\n d.scrollbarFiller.style.width = sizes.right + \"px\";\n } else { d.scrollbarFiller.style.display = \"\"; }\n if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {\n d.gutterFiller.style.display = \"block\";\n d.gutterFiller.style.height = sizes.bottom + \"px\";\n d.gutterFiller.style.width = measure.gutterWidth + \"px\";\n } else { d.gutterFiller.style.display = \"\"; }\n }\n\n var scrollbarModel = {\"native\": NativeScrollbars, \"null\": NullScrollbars};\n\n function initScrollbars(cm) {\n if (cm.display.scrollbars) {\n cm.display.scrollbars.clear();\n if (cm.display.scrollbars.addClass)\n { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {\n cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);\n // Prevent clicks in the scrollbars from killing focus\n on(node, \"mousedown\", function () {\n if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }\n });\n node.setAttribute(\"cm-not-content\", \"true\");\n }, function (pos, axis) {\n if (axis == \"horizontal\") { setScrollLeft(cm, pos); }\n else { updateScrollTop(cm, pos); }\n }, cm);\n if (cm.display.scrollbars.addClass)\n { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }\n }\n\n // Operations are used to wrap a series of changes to the editor\n // state in such a way that each change won't have to update the\n // cursor and display (which would be awkward, slow, and\n // error-prone). Instead, display updates are batched and then all\n // combined and executed at once.\n\n var nextOpId = 0;\n // Start a new operation.\n function startOperation(cm) {\n cm.curOp = {\n cm: cm,\n viewChanged: false, // Flag that indicates that lines might need to be redrawn\n startHeight: cm.doc.height, // Used to detect need to update scrollbar\n forceUpdate: false, // Used to force a redraw\n updateInput: 0, // Whether to reset the input textarea\n typing: false, // Whether this reset should be careful to leave existing text (for compositing)\n changeObjs: null, // Accumulated changes, for firing change events\n cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on\n cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already\n selectionChanged: false, // Whether the selection needs to be redrawn\n updateMaxLine: false, // Set when the widest line needs to be determined anew\n scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet\n scrollToPos: null, // Used to scroll to a specific position\n focus: false,\n id: ++nextOpId, // Unique ID\n markArrays: null // Used by addMarkedSpan\n };\n pushOperation(cm.curOp);\n }\n\n // Finish an operation, updating the display and signalling delayed events\n function endOperation(cm) {\n var op = cm.curOp;\n if (op) { finishOperation(op, function (group) {\n for (var i = 0; i < group.ops.length; i++)\n { group.ops[i].cm.curOp = null; }\n endOperations(group);\n }); }\n }\n\n // The DOM updates done when an operation finishes are batched so\n // that the minimum number of relayouts are required.\n function endOperations(group) {\n var ops = group.ops;\n for (var i = 0; i < ops.length; i++) // Read DOM\n { endOperation_R1(ops[i]); }\n for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)\n { endOperation_W1(ops[i$1]); }\n for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM\n { endOperation_R2(ops[i$2]); }\n for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)\n { endOperation_W2(ops[i$3]); }\n for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM\n { endOperation_finish(ops[i$4]); }\n }\n\n function endOperation_R1(op) {\n var cm = op.cm, display = cm.display;\n maybeClipScrollbars(cm);\n if (op.updateMaxLine) { findMaxLine(cm); }\n\n op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||\n op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||\n op.scrollToPos.to.line >= display.viewTo) ||\n display.maxLineChanged && cm.options.lineWrapping;\n op.update = op.mustUpdate &&\n new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);\n }\n\n function endOperation_W1(op) {\n op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);\n }\n\n function endOperation_R2(op) {\n var cm = op.cm, display = cm.display;\n if (op.updatedDisplay) { updateHeightsInViewport(cm); }\n\n op.barMeasure = measureForScrollbars(cm);\n\n // If the max line changed since it was last measured, measure it,\n // and ensure the document's width matches it.\n // updateDisplay_W2 will use these properties to do the actual resizing\n if (display.maxLineChanged && !cm.options.lineWrapping) {\n op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;\n cm.display.sizerWidth = op.adjustWidthTo;\n op.barMeasure.scrollWidth =\n Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);\n op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));\n }\n\n if (op.updatedDisplay || op.selectionChanged)\n { op.preparedSelection = display.input.prepareSelection(); }\n }\n\n function endOperation_W2(op) {\n var cm = op.cm;\n\n if (op.adjustWidthTo != null) {\n cm.display.sizer.style.minWidth = op.adjustWidthTo + \"px\";\n if (op.maxScrollLeft < cm.doc.scrollLeft)\n { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }\n cm.display.maxLineChanged = false;\n }\n\n var takeFocus = op.focus && op.focus == activeElt(root(cm));\n if (op.preparedSelection)\n { cm.display.input.showSelection(op.preparedSelection, takeFocus); }\n if (op.updatedDisplay || op.startHeight != cm.doc.height)\n { updateScrollbars(cm, op.barMeasure); }\n if (op.updatedDisplay)\n { setDocumentHeight(cm, op.barMeasure); }\n\n if (op.selectionChanged) { restartBlink(cm); }\n\n if (cm.state.focused && op.updateInput)\n { cm.display.input.reset(op.typing); }\n if (takeFocus) { ensureFocus(op.cm); }\n }\n\n function endOperation_finish(op) {\n var cm = op.cm, display = cm.display, doc = cm.doc;\n\n if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }\n\n // Abort mouse wheel delta measurement, when scrolling explicitly\n if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))\n { display.wheelStartX = display.wheelStartY = null; }\n\n // Propagate the scroll position to the actual DOM scroller\n if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }\n\n if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }\n // If we need to scroll a specific position into view, do so.\n if (op.scrollToPos) {\n var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),\n clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);\n maybeScrollWindow(cm, rect);\n }\n\n // Fire events for markers that are hidden/unidden by editing or\n // undoing\n var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;\n if (hidden) { for (var i = 0; i < hidden.length; ++i)\n { if (!hidden[i].lines.length) { signal(hidden[i], \"hide\"); } } }\n if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)\n { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], \"unhide\"); } } }\n\n if (display.wrapper.offsetHeight)\n { doc.scrollTop = cm.display.scroller.scrollTop; }\n\n // Fire change events, and delayed event handlers\n if (op.changeObjs)\n { signal(cm, \"changes\", cm, op.changeObjs); }\n if (op.update)\n { op.update.finish(); }\n }\n\n // Run the given function in an operation\n function runInOp(cm, f) {\n if (cm.curOp) { return f() }\n startOperation(cm);\n try { return f() }\n finally { endOperation(cm); }\n }\n // Wraps a function in an operation. Returns the wrapped function.\n function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }\n // Used to add methods to editor and doc instances, wrapping them in\n // operations.\n function methodOp(f) {\n return function() {\n if (this.curOp) { return f.apply(this, arguments) }\n startOperation(this);\n try { return f.apply(this, arguments) }\n finally { endOperation(this); }\n }\n }\n function docMethodOp(f) {\n return function() {\n var cm = this.cm;\n if (!cm || cm.curOp) { return f.apply(this, arguments) }\n startOperation(cm);\n try { return f.apply(this, arguments) }\n finally { endOperation(cm); }\n }\n }\n\n // HIGHLIGHT WORKER\n\n function startWorker(cm, time) {\n if (cm.doc.highlightFrontier < cm.display.viewTo)\n { cm.state.highlight.set(time, bind(highlightWorker, cm)); }\n }\n\n function highlightWorker(cm) {\n var doc = cm.doc;\n if (doc.highlightFrontier >= cm.display.viewTo) { return }\n var end = +new Date + cm.options.workTime;\n var context = getContextBefore(cm, doc.highlightFrontier);\n var changedLines = [];\n\n doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {\n if (context.line >= cm.display.viewFrom) { // Visible\n var oldStyles = line.styles;\n var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;\n var highlighted = highlightLine(cm, line, context, true);\n if (resetState) { context.state = resetState; }\n line.styles = highlighted.styles;\n var oldCls = line.styleClasses, newCls = highlighted.classes;\n if (newCls) { line.styleClasses = newCls; }\n else if (oldCls) { line.styleClasses = null; }\n var ischange = !oldStyles || oldStyles.length != line.styles.length ||\n oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);\n for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }\n if (ischange) { changedLines.push(context.line); }\n line.stateAfter = context.save();\n context.nextLine();\n } else {\n if (line.text.length <= cm.options.maxHighlightLength)\n { processLine(cm, line.text, context); }\n line.stateAfter = context.line % 5 == 0 ? context.save() : null;\n context.nextLine();\n }\n if (+new Date > end) {\n startWorker(cm, cm.options.workDelay);\n return true\n }\n });\n doc.highlightFrontier = context.line;\n doc.modeFrontier = Math.max(doc.modeFrontier, context.line);\n if (changedLines.length) { runInOp(cm, function () {\n for (var i = 0; i < changedLines.length; i++)\n { regLineChange(cm, changedLines[i], \"text\"); }\n }); }\n }\n\n // DISPLAY DRAWING\n\n var DisplayUpdate = function(cm, viewport, force) {\n var display = cm.display;\n\n this.viewport = viewport;\n // Store some values that we'll need later (but don't want to force a relayout for)\n this.visible = visibleLines(display, cm.doc, viewport);\n this.editorIsHidden = !display.wrapper.offsetWidth;\n this.wrapperHeight = display.wrapper.clientHeight;\n this.wrapperWidth = display.wrapper.clientWidth;\n this.oldDisplayWidth = displayWidth(cm);\n this.force = force;\n this.dims = getDimensions(cm);\n this.events = [];\n };\n\n DisplayUpdate.prototype.signal = function (emitter, type) {\n if (hasHandler(emitter, type))\n { this.events.push(arguments); }\n };\n DisplayUpdate.prototype.finish = function () {\n for (var i = 0; i < this.events.length; i++)\n { signal.apply(null, this.events[i]); }\n };\n\n function maybeClipScrollbars(cm) {\n var display = cm.display;\n if (!display.scrollbarsClipped && display.scroller.offsetWidth) {\n display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;\n display.heightForcer.style.height = scrollGap(cm) + \"px\";\n display.sizer.style.marginBottom = -display.nativeBarWidth + \"px\";\n display.sizer.style.borderRightWidth = scrollGap(cm) + \"px\";\n display.scrollbarsClipped = true;\n }\n }\n\n function selectionSnapshot(cm) {\n if (cm.hasFocus()) { return null }\n var active = activeElt(root(cm));\n if (!active || !contains(cm.display.lineDiv, active)) { return null }\n var result = {activeElt: active};\n if (window.getSelection) {\n var sel = win(cm).getSelection();\n if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {\n result.anchorNode = sel.anchorNode;\n result.anchorOffset = sel.anchorOffset;\n result.focusNode = sel.focusNode;\n result.focusOffset = sel.focusOffset;\n }\n }\n return result\n }\n\n function restoreSelection(snapshot) {\n if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt(rootNode(snapshot.activeElt))) { return }\n snapshot.activeElt.focus();\n if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) &&\n snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {\n var doc = snapshot.activeElt.ownerDocument;\n var sel = doc.defaultView.getSelection(), range = doc.createRange();\n range.setEnd(snapshot.anchorNode, snapshot.anchorOffset);\n range.collapse(false);\n sel.removeAllRanges();\n sel.addRange(range);\n sel.extend(snapshot.focusNode, snapshot.focusOffset);\n }\n }\n\n // Does the actual updating of the line display. Bails out\n // (returning false) when there is nothing to be done and forced is\n // false.\n function updateDisplayIfNeeded(cm, update) {\n var display = cm.display, doc = cm.doc;\n\n if (update.editorIsHidden) {\n resetView(cm);\n return false\n }\n\n // Bail out if the visible area is already rendered and nothing changed.\n if (!update.force &&\n update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&\n display.renderedView == display.view && countDirtyView(cm) == 0)\n { return false }\n\n if (maybeUpdateLineNumberWidth(cm)) {\n resetView(cm);\n update.dims = getDimensions(cm);\n }\n\n // Compute a suitable new viewport (from & to)\n var end = doc.first + doc.size;\n var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);\n var to = Math.min(end, update.visible.to + cm.options.viewportMargin);\n if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }\n if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }\n if (sawCollapsedSpans) {\n from = visualLineNo(cm.doc, from);\n to = visualLineEndNo(cm.doc, to);\n }\n\n var different = from != display.viewFrom || to != display.viewTo ||\n display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;\n adjustView(cm, from, to);\n\n display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));\n // Position the mover div to align with the current scroll position\n cm.display.mover.style.top = display.viewOffset + \"px\";\n\n var toUpdate = countDirtyView(cm);\n if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&\n (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))\n { return false }\n\n // For big changes, we hide the enclosing element during the\n // update, since that speeds up the operations on most browsers.\n var selSnapshot = selectionSnapshot(cm);\n if (toUpdate > 4) { display.lineDiv.style.display = \"none\"; }\n patchDisplay(cm, display.updateLineNumbers, update.dims);\n if (toUpdate > 4) { display.lineDiv.style.display = \"\"; }\n display.renderedView = display.view;\n // There might have been a widget with a focused element that got\n // hidden or updated, if so re-focus it.\n restoreSelection(selSnapshot);\n\n // Prevent selection and cursors from interfering with the scroll\n // width and height.\n removeChildren(display.cursorDiv);\n removeChildren(display.selectionDiv);\n display.gutters.style.height = display.sizer.style.minHeight = 0;\n\n if (different) {\n display.lastWrapHeight = update.wrapperHeight;\n display.lastWrapWidth = update.wrapperWidth;\n startWorker(cm, 400);\n }\n\n display.updateLineNumbers = null;\n\n return true\n }\n\n function postUpdateDisplay(cm, update) {\n var viewport = update.viewport;\n\n for (var first = true;; first = false) {\n if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {\n // Clip forced viewport to actual scrollable area.\n if (viewport && viewport.top != null)\n { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }\n // Updated line heights might result in the drawn area not\n // actually covering the viewport. Keep looping until it does.\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)\n { break }\n } else if (first) {\n update.visible = visibleLines(cm.display, cm.doc, viewport);\n }\n if (!updateDisplayIfNeeded(cm, update)) { break }\n updateHeightsInViewport(cm);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.force = false;\n }\n\n update.signal(cm, \"update\", cm);\n if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {\n update.signal(cm, \"viewportChange\", cm, cm.display.viewFrom, cm.display.viewTo);\n cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;\n }\n }\n\n function updateDisplaySimple(cm, viewport) {\n var update = new DisplayUpdate(cm, viewport);\n if (updateDisplayIfNeeded(cm, update)) {\n updateHeightsInViewport(cm);\n postUpdateDisplay(cm, update);\n var barMeasure = measureForScrollbars(cm);\n updateSelection(cm);\n updateScrollbars(cm, barMeasure);\n setDocumentHeight(cm, barMeasure);\n update.finish();\n }\n }\n\n // Sync the actual display DOM structure with display.view, removing\n // nodes for lines that are no longer in view, and creating the ones\n // that are not there yet, and updating the ones that are out of\n // date.\n function patchDisplay(cm, updateNumbersFrom, dims) {\n var display = cm.display, lineNumbers = cm.options.lineNumbers;\n var container = display.lineDiv, cur = container.firstChild;\n\n function rm(node) {\n var next = node.nextSibling;\n // Works around a throw-scroll bug in OS X Webkit\n if (webkit && mac && cm.display.currentWheelTarget == node)\n { node.style.display = \"none\"; }\n else\n { node.parentNode.removeChild(node); }\n return next\n }\n\n var view = display.view, lineN = display.viewFrom;\n // Loop over the elements in the view, syncing cur (the DOM nodes\n // in display.lineDiv) with the view as we go.\n for (var i = 0; i < view.length; i++) {\n var lineView = view[i];\n if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet\n var node = buildLineElement(cm, lineView, lineN, dims);\n container.insertBefore(node, cur);\n } else { // Already drawn\n while (cur != lineView.node) { cur = rm(cur); }\n var updateNumber = lineNumbers && updateNumbersFrom != null &&\n updateNumbersFrom <= lineN && lineView.lineNumber;\n if (lineView.changes) {\n if (indexOf(lineView.changes, \"gutter\") > -1) { updateNumber = false; }\n updateLineForChanges(cm, lineView, lineN, dims);\n }\n if (updateNumber) {\n removeChildren(lineView.lineNumber);\n lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));\n }\n cur = lineView.node.nextSibling;\n }\n lineN += lineView.size;\n }\n while (cur) { cur = rm(cur); }\n }\n\n function updateGutterSpace(display) {\n var width = display.gutters.offsetWidth;\n display.sizer.style.marginLeft = width + \"px\";\n // Send an event to consumers responding to changes in gutter width.\n signalLater(display, \"gutterChanged\", display);\n }\n\n function setDocumentHeight(cm, measure) {\n cm.display.sizer.style.minHeight = measure.docHeight + \"px\";\n cm.display.heightForcer.style.top = measure.docHeight + \"px\";\n cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + \"px\";\n }\n\n // Re-align line numbers and gutter marks to compensate for\n // horizontal scrolling.\n function alignHorizontally(cm) {\n var display = cm.display, view = display.view;\n if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }\n var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;\n var gutterW = display.gutters.offsetWidth, left = comp + \"px\";\n for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {\n if (cm.options.fixedGutter) {\n if (view[i].gutter)\n { view[i].gutter.style.left = left; }\n if (view[i].gutterBackground)\n { view[i].gutterBackground.style.left = left; }\n }\n var align = view[i].alignable;\n if (align) { for (var j = 0; j < align.length; j++)\n { align[j].style.left = left; } }\n } }\n if (cm.options.fixedGutter)\n { display.gutters.style.left = (comp + gutterW) + \"px\"; }\n }\n\n // Used to ensure that the line number gutter is still the right\n // size for the current document size. Returns true when an update\n // is needed.\n function maybeUpdateLineNumberWidth(cm) {\n if (!cm.options.lineNumbers) { return false }\n var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;\n if (last.length != display.lineNumChars) {\n var test = display.measure.appendChild(elt(\"div\", [elt(\"div\", last)],\n \"CodeMirror-linenumber CodeMirror-gutter-elt\"));\n var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;\n display.lineGutter.style.width = \"\";\n display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;\n display.lineNumWidth = display.lineNumInnerWidth + padding;\n display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;\n display.lineGutter.style.width = display.lineNumWidth + \"px\";\n updateGutterSpace(cm.display);\n return true\n }\n return false\n }\n\n function getGutters(gutters, lineNumbers) {\n var result = [], sawLineNumbers = false;\n for (var i = 0; i < gutters.length; i++) {\n var name = gutters[i], style = null;\n if (typeof name != \"string\") { style = name.style; name = name.className; }\n if (name == \"CodeMirror-linenumbers\") {\n if (!lineNumbers) { continue }\n else { sawLineNumbers = true; }\n }\n result.push({className: name, style: style});\n }\n if (lineNumbers && !sawLineNumbers) { result.push({className: \"CodeMirror-linenumbers\", style: null}); }\n return result\n }\n\n // Rebuild the gutter elements, ensure the margin to the left of the\n // code matches their width.\n function renderGutters(display) {\n var gutters = display.gutters, specs = display.gutterSpecs;\n removeChildren(gutters);\n display.lineGutter = null;\n for (var i = 0; i < specs.length; ++i) {\n var ref = specs[i];\n var className = ref.className;\n var style = ref.style;\n var gElt = gutters.appendChild(elt(\"div\", null, \"CodeMirror-gutter \" + className));\n if (style) { gElt.style.cssText = style; }\n if (className == \"CodeMirror-linenumbers\") {\n display.lineGutter = gElt;\n gElt.style.width = (display.lineNumWidth || 1) + \"px\";\n }\n }\n gutters.style.display = specs.length ? \"\" : \"none\";\n updateGutterSpace(display);\n }\n\n function updateGutters(cm) {\n renderGutters(cm.display);\n regChange(cm);\n alignHorizontally(cm);\n }\n\n // The display handles the DOM integration, both for input reading\n // and content drawing. It holds references to DOM nodes and\n // display-related state.\n\n function Display(place, doc, input, options) {\n var d = this;\n this.input = input;\n\n // Covers bottom-right square when both scrollbars are present.\n d.scrollbarFiller = elt(\"div\", null, \"CodeMirror-scrollbar-filler\");\n d.scrollbarFiller.setAttribute(\"cm-not-content\", \"true\");\n // Covers bottom of gutter when coverGutterNextToScrollbar is on\n // and h scrollbar is present.\n d.gutterFiller = elt(\"div\", null, \"CodeMirror-gutter-filler\");\n d.gutterFiller.setAttribute(\"cm-not-content\", \"true\");\n // Will contain the actual code, positioned to cover the viewport.\n d.lineDiv = eltP(\"div\", null, \"CodeMirror-code\");\n // Elements are added to these to represent selection and cursors.\n d.selectionDiv = elt(\"div\", null, null, \"position: relative; z-index: 1\");\n d.cursorDiv = elt(\"div\", null, \"CodeMirror-cursors\");\n // A visibility: hidden element used to find the size of things.\n d.measure = elt(\"div\", null, \"CodeMirror-measure\");\n // When lines outside of the viewport are measured, they are drawn in this.\n d.lineMeasure = elt(\"div\", null, \"CodeMirror-measure\");\n // Wraps everything that needs to exist inside the vertically-padded coordinate system\n d.lineSpace = eltP(\"div\", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],\n null, \"position: relative; outline: none\");\n var lines = eltP(\"div\", [d.lineSpace], \"CodeMirror-lines\");\n // Moved around its parent to cover visible view.\n d.mover = elt(\"div\", [lines], null, \"position: relative\");\n // Set to the height of the document, allowing scrolling.\n d.sizer = elt(\"div\", [d.mover], \"CodeMirror-sizer\");\n d.sizerWidth = null;\n // Behavior of elts with overflow: auto and padding is\n // inconsistent across browsers. This is used to ensure the\n // scrollable area is big enough.\n d.heightForcer = elt(\"div\", null, null, \"position: absolute; height: \" + scrollerGap + \"px; width: 1px;\");\n // Will contain the gutters, if any.\n d.gutters = elt(\"div\", null, \"CodeMirror-gutters\");\n d.lineGutter = null;\n // Actual scrollable element.\n d.scroller = elt(\"div\", [d.sizer, d.heightForcer, d.gutters], \"CodeMirror-scroll\");\n d.scroller.setAttribute(\"tabIndex\", \"-1\");\n // The element in which the editor lives.\n d.wrapper = elt(\"div\", [d.scrollbarFiller, d.gutterFiller, d.scroller], \"CodeMirror\");\n // See #6982. FIXME remove when this has been fixed for a while in Chrome\n if (chrome && chrome_version >= 105) { d.wrapper.style.clipPath = \"inset(0px)\"; }\n\n // This attribute is respected by automatic translation systems such as Google Translate,\n // and may also be respected by tools used by human translators.\n d.wrapper.setAttribute('translate', 'no');\n\n // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)\n if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }\n if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }\n\n if (place) {\n if (place.appendChild) { place.appendChild(d.wrapper); }\n else { place(d.wrapper); }\n }\n\n // Current rendered range (may be bigger than the view window).\n d.viewFrom = d.viewTo = doc.first;\n d.reportedViewFrom = d.reportedViewTo = doc.first;\n // Information about the rendered lines.\n d.view = [];\n d.renderedView = null;\n // Holds info about a single rendered line when it was rendered\n // for measurement, while not in view.\n d.externalMeasured = null;\n // Empty space (in pixels) above the view\n d.viewOffset = 0;\n d.lastWrapHeight = d.lastWrapWidth = 0;\n d.updateLineNumbers = null;\n\n d.nativeBarWidth = d.barHeight = d.barWidth = 0;\n d.scrollbarsClipped = false;\n\n // Used to only resize the line number gutter when necessary (when\n // the amount of lines crosses a boundary that makes its width change)\n d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;\n // Set to true when a non-horizontal-scrolling line widget is\n // added. As an optimization, line widget aligning is skipped when\n // this is false.\n d.alignWidgets = false;\n\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n\n // Tracks the maximum line length so that the horizontal scrollbar\n // can be kept static when scrolling.\n d.maxLine = null;\n d.maxLineLength = 0;\n d.maxLineChanged = false;\n\n // Used for measuring wheel scrolling granularity\n d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;\n\n // True when shift is held down.\n d.shift = false;\n\n // Used to track whether anything happened since the context menu\n // was opened.\n d.selForContextMenu = null;\n\n d.activeTouch = null;\n\n d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);\n renderGutters(d);\n\n input.init(d);\n }\n\n // Since the delta values reported on mouse wheel events are\n // unstandardized between browsers and even browser versions, and\n // generally horribly unpredictable, this code starts by measuring\n // the scroll effect that the first few mouse wheel events have,\n // and, from that, detects the way it can convert deltas to pixel\n // offsets afterwards.\n //\n // The reason we want to know the amount a wheel event will scroll\n // is that it gives us a chance to update the display before the\n // actual scrolling happens, reducing flickering.\n\n var wheelSamples = 0, wheelPixelsPerUnit = null;\n // Fill in a browser-detected starting value on browsers where we\n // know one. These don't have to be accurate -- the result of them\n // being wrong would just be a slight flicker on the first wheel\n // scroll (if it is large enough).\n if (ie) { wheelPixelsPerUnit = -.53; }\n else if (gecko) { wheelPixelsPerUnit = 15; }\n else if (chrome) { wheelPixelsPerUnit = -.7; }\n else if (safari) { wheelPixelsPerUnit = -1/3; }\n\n function wheelEventDelta(e) {\n var dx = e.wheelDeltaX, dy = e.wheelDeltaY;\n if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }\n if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }\n else if (dy == null) { dy = e.wheelDelta; }\n return {x: dx, y: dy}\n }\n function wheelEventPixels(e) {\n var delta = wheelEventDelta(e);\n delta.x *= wheelPixelsPerUnit;\n delta.y *= wheelPixelsPerUnit;\n return delta\n }\n\n function onScrollWheel(cm, e) {\n // On Chrome 102, viewport updates somehow stop wheel-based\n // scrolling. Turning off pointer events during the scroll seems\n // to avoid the issue.\n if (chrome && chrome_version == 102) {\n if (cm.display.chromeScrollHack == null) { cm.display.sizer.style.pointerEvents = \"none\"; }\n else { clearTimeout(cm.display.chromeScrollHack); }\n cm.display.chromeScrollHack = setTimeout(function () {\n cm.display.chromeScrollHack = null;\n cm.display.sizer.style.pointerEvents = \"\";\n }, 100);\n }\n var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;\n var pixelsPerUnit = wheelPixelsPerUnit;\n if (e.deltaMode === 0) {\n dx = e.deltaX;\n dy = e.deltaY;\n pixelsPerUnit = 1;\n }\n\n var display = cm.display, scroll = display.scroller;\n // Quit if there's nothing to scroll here\n var canScrollX = scroll.scrollWidth > scroll.clientWidth;\n var canScrollY = scroll.scrollHeight > scroll.clientHeight;\n if (!(dx && canScrollX || dy && canScrollY)) { return }\n\n // Webkit browsers on OS X abort momentum scrolls when the target\n // of the scroll event is removed from the scrollable element.\n // This hack (see related code in patchDisplay) makes sure the\n // element is kept around.\n if (dy && mac && webkit) {\n outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {\n for (var i = 0; i < view.length; i++) {\n if (view[i].node == cur) {\n cm.display.currentWheelTarget = cur;\n break outer\n }\n }\n }\n }\n\n // On some browsers, horizontal scrolling will cause redraws to\n // happen before the gutter has been realigned, causing it to\n // wriggle around in a most unseemly way. When we have an\n // estimated pixels/delta value, we just handle horizontal\n // scrolling entirely here. It'll be slightly off from native, but\n // better than glitching out.\n if (dx && !gecko && !presto && pixelsPerUnit != null) {\n if (dy && canScrollY)\n { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit)); }\n setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit));\n // Only prevent default scrolling if vertical scrolling is\n // actually possible. Otherwise, it causes vertical scroll\n // jitter on OSX trackpads when deltaX is small and deltaY\n // is large (issue #3579)\n if (!dy || (dy && canScrollY))\n { e_preventDefault(e); }\n display.wheelStartX = null; // Abort measurement, if in progress\n return\n }\n\n // 'Project' the visible viewport to cover the area that is being\n // scrolled into view (if we know enough to estimate it).\n if (dy && pixelsPerUnit != null) {\n var pixels = dy * pixelsPerUnit;\n var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;\n if (pixels < 0) { top = Math.max(0, top + pixels - 50); }\n else { bot = Math.min(cm.doc.height, bot + pixels + 50); }\n updateDisplaySimple(cm, {top: top, bottom: bot});\n }\n\n if (wheelSamples < 20 && e.deltaMode !== 0) {\n if (display.wheelStartX == null) {\n display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;\n display.wheelDX = dx; display.wheelDY = dy;\n setTimeout(function () {\n if (display.wheelStartX == null) { return }\n var movedX = scroll.scrollLeft - display.wheelStartX;\n var movedY = scroll.scrollTop - display.wheelStartY;\n var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||\n (movedX && display.wheelDX && movedX / display.wheelDX);\n display.wheelStartX = display.wheelStartY = null;\n if (!sample) { return }\n wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);\n ++wheelSamples;\n }, 200);\n } else {\n display.wheelDX += dx; display.wheelDY += dy;\n }\n }\n }\n\n // Selection objects are immutable. A new one is created every time\n // the selection changes. A selection is one or more non-overlapping\n // (and non-touching) ranges, sorted, and an integer that indicates\n // which one is the primary selection (the one that's scrolled into\n // view, that getCursor returns, etc).\n var Selection = function(ranges, primIndex) {\n this.ranges = ranges;\n this.primIndex = primIndex;\n };\n\n Selection.prototype.primary = function () { return this.ranges[this.primIndex] };\n\n Selection.prototype.equals = function (other) {\n if (other == this) { return true }\n if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }\n for (var i = 0; i < this.ranges.length; i++) {\n var here = this.ranges[i], there = other.ranges[i];\n if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }\n }\n return true\n };\n\n Selection.prototype.deepCopy = function () {\n var out = [];\n for (var i = 0; i < this.ranges.length; i++)\n { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); }\n return new Selection(out, this.primIndex)\n };\n\n Selection.prototype.somethingSelected = function () {\n for (var i = 0; i < this.ranges.length; i++)\n { if (!this.ranges[i].empty()) { return true } }\n return false\n };\n\n Selection.prototype.contains = function (pos, end) {\n if (!end) { end = pos; }\n for (var i = 0; i < this.ranges.length; i++) {\n var range = this.ranges[i];\n if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)\n { return i }\n }\n return -1\n };\n\n var Range = function(anchor, head) {\n this.anchor = anchor; this.head = head;\n };\n\n Range.prototype.from = function () { return minPos(this.anchor, this.head) };\n Range.prototype.to = function () { return maxPos(this.anchor, this.head) };\n Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };\n\n // Take an unsorted, potentially overlapping set of ranges, and\n // build a selection out of it. 'Consumes' ranges array (modifying\n // it).\n function normalizeSelection(cm, ranges, primIndex) {\n var mayTouch = cm && cm.options.selectionsMayTouch;\n var prim = ranges[primIndex];\n ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });\n primIndex = indexOf(ranges, prim);\n for (var i = 1; i < ranges.length; i++) {\n var cur = ranges[i], prev = ranges[i - 1];\n var diff = cmp(prev.to(), cur.from());\n if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {\n var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());\n var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;\n if (i <= primIndex) { --primIndex; }\n ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));\n }\n }\n return new Selection(ranges, primIndex)\n }\n\n function simpleSelection(anchor, head) {\n return new Selection([new Range(anchor, head || anchor)], 0)\n }\n\n // Compute the position of the end of a change (its 'to' property\n // refers to the pre-change end).\n function changeEnd(change) {\n if (!change.text) { return change.to }\n return Pos(change.from.line + change.text.length - 1,\n lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))\n }\n\n // Adjust a position to refer to the post-change position of the\n // same text, or the end of the change if the change covers it.\n function adjustForChange(pos, change) {\n if (cmp(pos, change.from) < 0) { return pos }\n if (cmp(pos, change.to) <= 0) { return changeEnd(change) }\n\n var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;\n if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }\n return Pos(line, ch)\n }\n\n function computeSelAfterChange(doc, change) {\n var out = [];\n for (var i = 0; i < doc.sel.ranges.length; i++) {\n var range = doc.sel.ranges[i];\n out.push(new Range(adjustForChange(range.anchor, change),\n adjustForChange(range.head, change)));\n }\n return normalizeSelection(doc.cm, out, doc.sel.primIndex)\n }\n\n function offsetPos(pos, old, nw) {\n if (pos.line == old.line)\n { return Pos(nw.line, pos.ch - old.ch + nw.ch) }\n else\n { return Pos(nw.line + (pos.line - old.line), pos.ch) }\n }\n\n // Used by replaceSelections to allow moving the selection to the\n // start or around the replaced test. Hint may be \"start\" or \"around\".\n function computeReplacedSel(doc, changes, hint) {\n var out = [];\n var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;\n for (var i = 0; i < changes.length; i++) {\n var change = changes[i];\n var from = offsetPos(change.from, oldPrev, newPrev);\n var to = offsetPos(changeEnd(change), oldPrev, newPrev);\n oldPrev = change.to;\n newPrev = to;\n if (hint == \"around\") {\n var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;\n out[i] = new Range(inv ? to : from, inv ? from : to);\n } else {\n out[i] = new Range(from, from);\n }\n }\n return new Selection(out, doc.sel.primIndex)\n }\n\n // Used to get the editor into a consistent state again when options change.\n\n function loadMode(cm) {\n cm.doc.mode = getMode(cm.options, cm.doc.modeOption);\n resetModeState(cm);\n }\n\n function resetModeState(cm) {\n cm.doc.iter(function (line) {\n if (line.stateAfter) { line.stateAfter = null; }\n if (line.styles) { line.styles = null; }\n });\n cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;\n startWorker(cm, 100);\n cm.state.modeGen++;\n if (cm.curOp) { regChange(cm); }\n }\n\n // DOCUMENT DATA STRUCTURE\n\n // By default, updates that start and end at the beginning of a line\n // are treated specially, in order to make the association of line\n // widgets and marker elements with the text behave more intuitive.\n function isWholeLineUpdate(doc, change) {\n return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == \"\" &&\n (!doc.cm || doc.cm.options.wholeLineUpdateBefore)\n }\n\n // Perform a change on the document data structure.\n function updateDoc(doc, change, markedSpans, estimateHeight) {\n function spansFor(n) {return markedSpans ? markedSpans[n] : null}\n function update(line, text, spans) {\n updateLine(line, text, spans, estimateHeight);\n signalLater(line, \"change\", line, change);\n }\n function linesFor(start, end) {\n var result = [];\n for (var i = start; i < end; ++i)\n { result.push(new Line(text[i], spansFor(i), estimateHeight)); }\n return result\n }\n\n var from = change.from, to = change.to, text = change.text;\n var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);\n var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;\n\n // Adjust the line structure\n if (change.full) {\n doc.insert(0, linesFor(0, text.length));\n doc.remove(text.length, doc.size - text.length);\n } else if (isWholeLineUpdate(doc, change)) {\n // This is a whole-line replace. Treated specially to make\n // sure line objects move the way they are supposed to.\n var added = linesFor(0, text.length - 1);\n update(lastLine, lastLine.text, lastSpans);\n if (nlines) { doc.remove(from.line, nlines); }\n if (added.length) { doc.insert(from.line, added); }\n } else if (firstLine == lastLine) {\n if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);\n } else {\n var added$1 = linesFor(1, text.length - 1);\n added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight));\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n doc.insert(from.line + 1, added$1);\n }\n } else if (text.length == 1) {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));\n doc.remove(from.line + 1, nlines);\n } else {\n update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));\n update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);\n var added$2 = linesFor(1, text.length - 1);\n if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }\n doc.insert(from.line + 1, added$2);\n }\n\n signalLater(doc, \"change\", doc, change);\n }\n\n // Call f for all linked documents.\n function linkedDocs(doc, f, sharedHistOnly) {\n function propagate(doc, skip, sharedHist) {\n if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {\n var rel = doc.linked[i];\n if (rel.doc == skip) { continue }\n var shared = sharedHist && rel.sharedHist;\n if (sharedHistOnly && !shared) { continue }\n f(rel.doc, shared);\n propagate(rel.doc, doc, shared);\n } }\n }\n propagate(doc, null, true);\n }\n\n // Attach a document to an editor.\n function attachDoc(cm, doc) {\n if (doc.cm) { throw new Error(\"This document is already in use.\") }\n cm.doc = doc;\n doc.cm = cm;\n estimateLineHeights(cm);\n loadMode(cm);\n setDirectionClass(cm);\n cm.options.direction = doc.direction;\n if (!cm.options.lineWrapping) { findMaxLine(cm); }\n cm.options.mode = doc.modeOption;\n regChange(cm);\n }\n\n function setDirectionClass(cm) {\n (cm.doc.direction == \"rtl\" ? addClass : rmClass)(cm.display.lineDiv, \"CodeMirror-rtl\");\n }\n\n function directionChanged(cm) {\n runInOp(cm, function () {\n setDirectionClass(cm);\n regChange(cm);\n });\n }\n\n function History(prev) {\n // Arrays of change events and selections. Doing something adds an\n // event to done and clears undo. Undoing moves events from done\n // to undone, redoing moves them in the other direction.\n this.done = []; this.undone = [];\n this.undoDepth = prev ? prev.undoDepth : Infinity;\n // Used to track when changes can be merged into a single undo\n // event\n this.lastModTime = this.lastSelTime = 0;\n this.lastOp = this.lastSelOp = null;\n this.lastOrigin = this.lastSelOrigin = null;\n // Used by the isClean() method\n this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1;\n }\n\n // Create a history change event from an updateDoc-style change\n // object.\n function historyChangeFromChange(doc, change) {\n var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};\n attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);\n linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);\n return histChange\n }\n\n // Pop all selection events off the end of a history array. Stop at\n // a change event.\n function clearSelectionEvents(array) {\n while (array.length) {\n var last = lst(array);\n if (last.ranges) { array.pop(); }\n else { break }\n }\n }\n\n // Find the top change event in the history. Pop off selection\n // events that are in the way.\n function lastChangeEvent(hist, force) {\n if (force) {\n clearSelectionEvents(hist.done);\n return lst(hist.done)\n } else if (hist.done.length && !lst(hist.done).ranges) {\n return lst(hist.done)\n } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {\n hist.done.pop();\n return lst(hist.done)\n }\n }\n\n // Register a change in the history. Merges changes that are within\n // a single operation, or are close together with an origin that\n // allows merging (starting with \"+\") into a single event.\n function addChangeToHistory(doc, change, selAfter, opId) {\n var hist = doc.history;\n hist.undone.length = 0;\n var time = +new Date, cur;\n var last;\n\n if ((hist.lastOp == opId ||\n hist.lastOrigin == change.origin && change.origin &&\n ((change.origin.charAt(0) == \"+\" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||\n change.origin.charAt(0) == \"*\")) &&\n (cur = lastChangeEvent(hist, hist.lastOp == opId))) {\n // Merge this change into the last event\n last = lst(cur.changes);\n if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {\n // Optimized case for simple insertion -- don't want to add\n // new changesets for every character typed\n last.to = changeEnd(change);\n } else {\n // Add new sub-event\n cur.changes.push(historyChangeFromChange(doc, change));\n }\n } else {\n // Can not be merged, start a new event.\n var before = lst(hist.done);\n if (!before || !before.ranges)\n { pushSelectionToHistory(doc.sel, hist.done); }\n cur = {changes: [historyChangeFromChange(doc, change)],\n generation: hist.generation};\n hist.done.push(cur);\n while (hist.done.length > hist.undoDepth) {\n hist.done.shift();\n if (!hist.done[0].ranges) { hist.done.shift(); }\n }\n }\n hist.done.push(selAfter);\n hist.generation = ++hist.maxGeneration;\n hist.lastModTime = hist.lastSelTime = time;\n hist.lastOp = hist.lastSelOp = opId;\n hist.lastOrigin = hist.lastSelOrigin = change.origin;\n\n if (!last) { signal(doc, \"historyAdded\"); }\n }\n\n function selectionEventCanBeMerged(doc, origin, prev, sel) {\n var ch = origin.charAt(0);\n return ch == \"*\" ||\n ch == \"+\" &&\n prev.ranges.length == sel.ranges.length &&\n prev.somethingSelected() == sel.somethingSelected() &&\n new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)\n }\n\n // Called whenever the selection changes, sets the new selection as\n // the pending selection in the history, and pushes the old pending\n // selection into the 'done' array when it was significantly\n // different (in number of selected ranges, emptiness, or time).\n function addSelectionToHistory(doc, sel, opId, options) {\n var hist = doc.history, origin = options && options.origin;\n\n // A new event is started when the previous origin does not match\n // the current, or the origins don't allow matching. Origins\n // starting with * are always merged, those starting with + are\n // merged when similar and close together in time.\n if (opId == hist.lastSelOp ||\n (origin && hist.lastSelOrigin == origin &&\n (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||\n selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))\n { hist.done[hist.done.length - 1] = sel; }\n else\n { pushSelectionToHistory(sel, hist.done); }\n\n hist.lastSelTime = +new Date;\n hist.lastSelOrigin = origin;\n hist.lastSelOp = opId;\n if (options && options.clearRedo !== false)\n { clearSelectionEvents(hist.undone); }\n }\n\n function pushSelectionToHistory(sel, dest) {\n var top = lst(dest);\n if (!(top && top.ranges && top.equals(sel)))\n { dest.push(sel); }\n }\n\n // Used to store marked span information in the history.\n function attachLocalSpans(doc, change, from, to) {\n var existing = change[\"spans_\" + doc.id], n = 0;\n doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {\n if (line.markedSpans)\n { (existing || (existing = change[\"spans_\" + doc.id] = {}))[n] = line.markedSpans; }\n ++n;\n });\n }\n\n // When un/re-doing restores text containing marked spans, those\n // that have been explicitly cleared should not be restored.\n function removeClearedSpans(spans) {\n if (!spans) { return null }\n var out;\n for (var i = 0; i < spans.length; ++i) {\n if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }\n else if (out) { out.push(spans[i]); }\n }\n return !out ? spans : out.length ? out : null\n }\n\n // Retrieve and filter the old marked spans stored in a change event.\n function getOldSpans(doc, change) {\n var found = change[\"spans_\" + doc.id];\n if (!found) { return null }\n var nw = [];\n for (var i = 0; i < change.text.length; ++i)\n { nw.push(removeClearedSpans(found[i])); }\n return nw\n }\n\n // Used for un/re-doing changes from the history. Combines the\n // result of computing the existing spans with the set of spans that\n // existed in the history (so that deleting around a span and then\n // undoing brings back the span).\n function mergeOldSpans(doc, change) {\n var old = getOldSpans(doc, change);\n var stretched = stretchSpansOverChange(doc, change);\n if (!old) { return stretched }\n if (!stretched) { return old }\n\n for (var i = 0; i < old.length; ++i) {\n var oldCur = old[i], stretchCur = stretched[i];\n if (oldCur && stretchCur) {\n spans: for (var j = 0; j < stretchCur.length; ++j) {\n var span = stretchCur[j];\n for (var k = 0; k < oldCur.length; ++k)\n { if (oldCur[k].marker == span.marker) { continue spans } }\n oldCur.push(span);\n }\n } else if (stretchCur) {\n old[i] = stretchCur;\n }\n }\n return old\n }\n\n // Used both to provide a JSON-safe object in .getHistory, and, when\n // detaching a document, to split the history in two\n function copyHistoryArray(events, newGroup, instantiateSel) {\n var copy = [];\n for (var i = 0; i < events.length; ++i) {\n var event = events[i];\n if (event.ranges) {\n copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);\n continue\n }\n var changes = event.changes, newChanges = [];\n copy.push({changes: newChanges});\n for (var j = 0; j < changes.length; ++j) {\n var change = changes[j], m = (void 0);\n newChanges.push({from: change.from, to: change.to, text: change.text});\n if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\\d+)$/)) {\n if (indexOf(newGroup, Number(m[1])) > -1) {\n lst(newChanges)[prop] = change[prop];\n delete change[prop];\n }\n } } }\n }\n }\n return copy\n }\n\n // The 'scroll' parameter given to many of these indicated whether\n // the new cursor position should be scrolled into view after\n // modifying the selection.\n\n // If shift is held or the extend flag is set, extends a range to\n // include a given position (and optionally a second position).\n // Otherwise, simply returns the range between the given positions.\n // Used for cursor motion and such.\n function extendRange(range, head, other, extend) {\n if (extend) {\n var anchor = range.anchor;\n if (other) {\n var posBefore = cmp(head, anchor) < 0;\n if (posBefore != (cmp(other, anchor) < 0)) {\n anchor = head;\n head = other;\n } else if (posBefore != (cmp(head, other) < 0)) {\n head = other;\n }\n }\n return new Range(anchor, head)\n } else {\n return new Range(other || head, head)\n }\n }\n\n // Extend the primary selection range, discard the rest.\n function extendSelection(doc, head, other, options, extend) {\n if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }\n setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);\n }\n\n // Extend all selections (pos is an array of selections with length\n // equal the number of selections)\n function extendSelections(doc, heads, options) {\n var out = [];\n var extend = doc.cm && (doc.cm.display.shift || doc.extend);\n for (var i = 0; i < doc.sel.ranges.length; i++)\n { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }\n var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);\n setSelection(doc, newSel, options);\n }\n\n // Updates a single range in the selection.\n function replaceOneSelection(doc, i, range, options) {\n var ranges = doc.sel.ranges.slice(0);\n ranges[i] = range;\n setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);\n }\n\n // Reset the selection to a single range.\n function setSimpleSelection(doc, anchor, head, options) {\n setSelection(doc, simpleSelection(anchor, head), options);\n }\n\n // Give beforeSelectionChange handlers a change to influence a\n // selection update.\n function filterSelectionChange(doc, sel, options) {\n var obj = {\n ranges: sel.ranges,\n update: function(ranges) {\n this.ranges = [];\n for (var i = 0; i < ranges.length; i++)\n { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),\n clipPos(doc, ranges[i].head)); }\n },\n origin: options && options.origin\n };\n signal(doc, \"beforeSelectionChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeSelectionChange\", doc.cm, obj); }\n if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }\n else { return sel }\n }\n\n function setSelectionReplaceHistory(doc, sel, options) {\n var done = doc.history.done, last = lst(done);\n if (last && last.ranges) {\n done[done.length - 1] = sel;\n setSelectionNoUndo(doc, sel, options);\n } else {\n setSelection(doc, sel, options);\n }\n }\n\n // Set a new selection.\n function setSelection(doc, sel, options) {\n setSelectionNoUndo(doc, sel, options);\n addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);\n }\n\n function setSelectionNoUndo(doc, sel, options) {\n if (hasHandler(doc, \"beforeSelectionChange\") || doc.cm && hasHandler(doc.cm, \"beforeSelectionChange\"))\n { sel = filterSelectionChange(doc, sel, options); }\n\n var bias = options && options.bias ||\n (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);\n setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));\n\n if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption(\"readOnly\") != \"nocursor\")\n { ensureCursorVisible(doc.cm); }\n }\n\n function setSelectionInner(doc, sel) {\n if (sel.equals(doc.sel)) { return }\n\n doc.sel = sel;\n\n if (doc.cm) {\n doc.cm.curOp.updateInput = 1;\n doc.cm.curOp.selectionChanged = true;\n signalCursorActivity(doc.cm);\n }\n signalLater(doc, \"cursorActivity\", doc);\n }\n\n // Verify that the selection does not partially select any atomic\n // marked ranges.\n function reCheckSelection(doc) {\n setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));\n }\n\n // Return a selection that does not partially select any atomic\n // ranges.\n function skipAtomicInSelection(doc, sel, bias, mayClear) {\n var out;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];\n var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);\n var newHead = range.head == range.anchor ? newAnchor : skipAtomic(doc, range.head, old && old.head, bias, mayClear);\n if (out || newAnchor != range.anchor || newHead != range.head) {\n if (!out) { out = sel.ranges.slice(0, i); }\n out[i] = new Range(newAnchor, newHead);\n }\n }\n return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel\n }\n\n function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {\n var line = getLine(doc, pos.line);\n if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {\n var sp = line.markedSpans[i], m = sp.marker;\n\n // Determine if we should prevent the cursor being placed to the left/right of an atomic marker\n // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it\n // is with selectLeft/Right\n var preventCursorLeft = (\"selectLeft\" in m) ? !m.selectLeft : m.inclusiveLeft;\n var preventCursorRight = (\"selectRight\" in m) ? !m.selectRight : m.inclusiveRight;\n\n if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&\n (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) {\n if (mayClear) {\n signal(m, \"beforeCursorEnter\");\n if (m.explicitlyCleared) {\n if (!line.markedSpans) { break }\n else {--i; continue}\n }\n }\n if (!m.atomic) { continue }\n\n if (oldPos) {\n var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);\n if (dir < 0 ? preventCursorRight : preventCursorLeft)\n { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }\n if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))\n { return skipAtomicInner(doc, near, pos, dir, mayClear) }\n }\n\n var far = m.find(dir < 0 ? -1 : 1);\n if (dir < 0 ? preventCursorLeft : preventCursorRight)\n { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }\n return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null\n }\n } }\n return pos\n }\n\n // Ensure a given position is not inside an atomic range.\n function skipAtomic(doc, pos, oldPos, bias, mayClear) {\n var dir = bias || 1;\n var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||\n skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||\n (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));\n if (!found) {\n doc.cantEdit = true;\n return Pos(doc.first, 0)\n }\n return found\n }\n\n function movePos(doc, pos, dir, line) {\n if (dir < 0 && pos.ch == 0) {\n if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }\n else { return null }\n } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {\n if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }\n else { return null }\n } else {\n return new Pos(pos.line, pos.ch + dir)\n }\n }\n\n function selectAll(cm) {\n cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);\n }\n\n // UPDATING\n\n // Allow \"beforeChange\" event handlers to influence a change\n function filterChange(doc, change, update) {\n var obj = {\n canceled: false,\n from: change.from,\n to: change.to,\n text: change.text,\n origin: change.origin,\n cancel: function () { return obj.canceled = true; }\n };\n if (update) { obj.update = function (from, to, text, origin) {\n if (from) { obj.from = clipPos(doc, from); }\n if (to) { obj.to = clipPos(doc, to); }\n if (text) { obj.text = text; }\n if (origin !== undefined) { obj.origin = origin; }\n }; }\n signal(doc, \"beforeChange\", doc, obj);\n if (doc.cm) { signal(doc.cm, \"beforeChange\", doc.cm, obj); }\n\n if (obj.canceled) {\n if (doc.cm) { doc.cm.curOp.updateInput = 2; }\n return null\n }\n return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}\n }\n\n // Apply a change to a document, and add it to the document's\n // history, and propagating it to all linked documents.\n function makeChange(doc, change, ignoreReadOnly) {\n if (doc.cm) {\n if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }\n if (doc.cm.state.suppressEdits) { return }\n }\n\n if (hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\")) {\n change = filterChange(doc, change, true);\n if (!change) { return }\n }\n\n // Possibly split or suppress the update based on the presence\n // of read-only spans in its range.\n var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);\n if (split) {\n for (var i = split.length - 1; i >= 0; --i)\n { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [\"\"] : change.text, origin: change.origin}); }\n } else {\n makeChangeInner(doc, change);\n }\n }\n\n function makeChangeInner(doc, change) {\n if (change.text.length == 1 && change.text[0] == \"\" && cmp(change.from, change.to) == 0) { return }\n var selAfter = computeSelAfterChange(doc, change);\n addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);\n\n makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));\n var rebased = [];\n\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));\n });\n }\n\n // Revert a change stored in a document's history.\n function makeChangeFromHistory(doc, type, allowSelectionOnly) {\n var suppress = doc.cm && doc.cm.state.suppressEdits;\n if (suppress && !allowSelectionOnly) { return }\n\n var hist = doc.history, event, selAfter = doc.sel;\n var source = type == \"undo\" ? hist.done : hist.undone, dest = type == \"undo\" ? hist.undone : hist.done;\n\n // Verify that there is a useable event (so that ctrl-z won't\n // needlessly clear selection events)\n var i = 0;\n for (; i < source.length; i++) {\n event = source[i];\n if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)\n { break }\n }\n if (i == source.length) { return }\n hist.lastOrigin = hist.lastSelOrigin = null;\n\n for (;;) {\n event = source.pop();\n if (event.ranges) {\n pushSelectionToHistory(event, dest);\n if (allowSelectionOnly && !event.equals(doc.sel)) {\n setSelection(doc, event, {clearRedo: false});\n return\n }\n selAfter = event;\n } else if (suppress) {\n source.push(event);\n return\n } else { break }\n }\n\n // Build up a reverse change object to add to the opposite history\n // stack (redo when undoing, and vice versa).\n var antiChanges = [];\n pushSelectionToHistory(selAfter, dest);\n dest.push({changes: antiChanges, generation: hist.generation});\n hist.generation = event.generation || ++hist.maxGeneration;\n\n var filter = hasHandler(doc, \"beforeChange\") || doc.cm && hasHandler(doc.cm, \"beforeChange\");\n\n var loop = function ( i ) {\n var change = event.changes[i];\n change.origin = type;\n if (filter && !filterChange(doc, change, false)) {\n source.length = 0;\n return {}\n }\n\n antiChanges.push(historyChangeFromChange(doc, change));\n\n var after = i ? computeSelAfterChange(doc, change) : lst(source);\n makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));\n if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }\n var rebased = [];\n\n // Propagate to the linked documents\n linkedDocs(doc, function (doc, sharedHist) {\n if (!sharedHist && indexOf(rebased, doc.history) == -1) {\n rebaseHist(doc.history, change);\n rebased.push(doc.history);\n }\n makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));\n });\n };\n\n for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {\n var returned = loop( i$1 );\n\n if ( returned ) return returned.v;\n }\n }\n\n // Sub-views need their line numbers shifted when text is added\n // above or below them in the parent document.\n function shiftDoc(doc, distance) {\n if (distance == 0) { return }\n doc.first += distance;\n doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(\n Pos(range.anchor.line + distance, range.anchor.ch),\n Pos(range.head.line + distance, range.head.ch)\n ); }), doc.sel.primIndex);\n if (doc.cm) {\n regChange(doc.cm, doc.first, doc.first - distance, distance);\n for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)\n { regLineChange(doc.cm, l, \"gutter\"); }\n }\n }\n\n // More lower-level change function, handling only a single document\n // (not linked ones).\n function makeChangeSingleDoc(doc, change, selAfter, spans) {\n if (doc.cm && !doc.cm.curOp)\n { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }\n\n if (change.to.line < doc.first) {\n shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));\n return\n }\n if (change.from.line > doc.lastLine()) { return }\n\n // Clip the change to the size of this doc\n if (change.from.line < doc.first) {\n var shift = change.text.length - 1 - (doc.first - change.from.line);\n shiftDoc(doc, shift);\n change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),\n text: [lst(change.text)], origin: change.origin};\n }\n var last = doc.lastLine();\n if (change.to.line > last) {\n change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),\n text: [change.text[0]], origin: change.origin};\n }\n\n change.removed = getBetween(doc, change.from, change.to);\n\n if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }\n if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }\n else { updateDoc(doc, change, spans); }\n setSelectionNoUndo(doc, selAfter, sel_dontScroll);\n\n if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0)))\n { doc.cantEdit = false; }\n }\n\n // Handle the interaction of a change to a document with the editor\n // that this document is part of.\n function makeChangeSingleDocInEditor(cm, change, spans) {\n var doc = cm.doc, display = cm.display, from = change.from, to = change.to;\n\n var recomputeMaxLength = false, checkWidthStart = from.line;\n if (!cm.options.lineWrapping) {\n checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));\n doc.iter(checkWidthStart, to.line + 1, function (line) {\n if (line == display.maxLine) {\n recomputeMaxLength = true;\n return true\n }\n });\n }\n\n if (doc.sel.contains(change.from, change.to) > -1)\n { signalCursorActivity(cm); }\n\n updateDoc(doc, change, spans, estimateHeight(cm));\n\n if (!cm.options.lineWrapping) {\n doc.iter(checkWidthStart, from.line + change.text.length, function (line) {\n var len = lineLength(line);\n if (len > display.maxLineLength) {\n display.maxLine = line;\n display.maxLineLength = len;\n display.maxLineChanged = true;\n recomputeMaxLength = false;\n }\n });\n if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }\n }\n\n retreatFrontier(doc, from.line);\n startWorker(cm, 400);\n\n var lendiff = change.text.length - (to.line - from.line) - 1;\n // Remember that these lines changed, for updating the display\n if (change.full)\n { regChange(cm); }\n else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))\n { regLineChange(cm, from.line, \"text\"); }\n else\n { regChange(cm, from.line, to.line + 1, lendiff); }\n\n var changesHandler = hasHandler(cm, \"changes\"), changeHandler = hasHandler(cm, \"change\");\n if (changeHandler || changesHandler) {\n var obj = {\n from: from, to: to,\n text: change.text,\n removed: change.removed,\n origin: change.origin\n };\n if (changeHandler) { signalLater(cm, \"change\", cm, obj); }\n if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }\n }\n cm.display.selForContextMenu = null;\n }\n\n function replaceRange(doc, code, from, to, origin) {\n var assign;\n\n if (!to) { to = from; }\n if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }\n if (typeof code == \"string\") { code = doc.splitLines(code); }\n makeChange(doc, {from: from, to: to, text: code, origin: origin});\n }\n\n // Rebasing/resetting history to deal with externally-sourced changes\n\n function rebaseHistSelSingle(pos, from, to, diff) {\n if (to < pos.line) {\n pos.line += diff;\n } else if (from < pos.line) {\n pos.line = from;\n pos.ch = 0;\n }\n }\n\n // Tries to rebase an array of history events given a change in the\n // document. If the change touches the same lines as the event, the\n // event, and everything 'behind' it, is discarded. If the change is\n // before the event, the event's positions are updated. Uses a\n // copy-on-write scheme for the positions, to avoid having to\n // reallocate them all on every rebase, but also avoid problems with\n // shared position objects being unsafely updated.\n function rebaseHistArray(array, from, to, diff) {\n for (var i = 0; i < array.length; ++i) {\n var sub = array[i], ok = true;\n if (sub.ranges) {\n if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }\n for (var j = 0; j < sub.ranges.length; j++) {\n rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);\n rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);\n }\n continue\n }\n for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {\n var cur = sub.changes[j$1];\n if (to < cur.from.line) {\n cur.from = Pos(cur.from.line + diff, cur.from.ch);\n cur.to = Pos(cur.to.line + diff, cur.to.ch);\n } else if (from <= cur.to.line) {\n ok = false;\n break\n }\n }\n if (!ok) {\n array.splice(0, i + 1);\n i = 0;\n }\n }\n }\n\n function rebaseHist(hist, change) {\n var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;\n rebaseHistArray(hist.done, from, to, diff);\n rebaseHistArray(hist.undone, from, to, diff);\n }\n\n // Utility for applying a change to a line by handle or number,\n // returning the number and optionally registering the line as\n // changed.\n function changeLine(doc, handle, changeType, op) {\n var no = handle, line = handle;\n if (typeof handle == \"number\") { line = getLine(doc, clipLine(doc, handle)); }\n else { no = lineNo(handle); }\n if (no == null) { return null }\n if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }\n return line\n }\n\n // The document is represented as a BTree consisting of leaves, with\n // chunk of lines in them, and branches, with up to ten leaves or\n // other branch nodes below them. The top node is always a branch\n // node, and is the document object itself (meaning it has\n // additional methods and properties).\n //\n // All nodes have parent links. The tree is used both to go from\n // line numbers to line objects, and to go from objects to numbers.\n // It also indexes by height, and is used to convert between height\n // and line object, and to find the total height of the document.\n //\n // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html\n\n function LeafChunk(lines) {\n this.lines = lines;\n this.parent = null;\n var height = 0;\n for (var i = 0; i < lines.length; ++i) {\n lines[i].parent = this;\n height += lines[i].height;\n }\n this.height = height;\n }\n\n LeafChunk.prototype = {\n chunkSize: function() { return this.lines.length },\n\n // Remove the n lines at offset 'at'.\n removeInner: function(at, n) {\n for (var i = at, e = at + n; i < e; ++i) {\n var line = this.lines[i];\n this.height -= line.height;\n cleanUpLine(line);\n signalLater(line, \"delete\");\n }\n this.lines.splice(at, n);\n },\n\n // Helper used to collapse a small branch into a single leaf.\n collapse: function(lines) {\n lines.push.apply(lines, this.lines);\n },\n\n // Insert the given array of lines at offset 'at', count them as\n // having the given height.\n insertInner: function(at, lines, height) {\n this.height += height;\n this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));\n for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; }\n },\n\n // Used to iterate over a part of the tree.\n iterN: function(at, n, op) {\n for (var e = at + n; at < e; ++at)\n { if (op(this.lines[at])) { return true } }\n }\n };\n\n function BranchChunk(children) {\n this.children = children;\n var size = 0, height = 0;\n for (var i = 0; i < children.length; ++i) {\n var ch = children[i];\n size += ch.chunkSize(); height += ch.height;\n ch.parent = this;\n }\n this.size = size;\n this.height = height;\n this.parent = null;\n }\n\n BranchChunk.prototype = {\n chunkSize: function() { return this.size },\n\n removeInner: function(at, n) {\n this.size -= n;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at < sz) {\n var rm = Math.min(n, sz - at), oldHeight = child.height;\n child.removeInner(at, rm);\n this.height -= oldHeight - child.height;\n if (sz == rm) { this.children.splice(i--, 1); child.parent = null; }\n if ((n -= rm) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n // If the result is smaller than 25 lines, ensure that it is a\n // single leaf node.\n if (this.size - n < 25 &&\n (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {\n var lines = [];\n this.collapse(lines);\n this.children = [new LeafChunk(lines)];\n this.children[0].parent = this;\n }\n },\n\n collapse: function(lines) {\n for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); }\n },\n\n insertInner: function(at, lines, height) {\n this.size += lines.length;\n this.height += height;\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at <= sz) {\n child.insertInner(at, lines, height);\n if (child.lines && child.lines.length > 50) {\n // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.\n // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.\n var remaining = child.lines.length % 25 + 25;\n for (var pos = remaining; pos < child.lines.length;) {\n var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));\n child.height -= leaf.height;\n this.children.splice(++i, 0, leaf);\n leaf.parent = this;\n }\n child.lines = child.lines.slice(0, remaining);\n this.maybeSpill();\n }\n break\n }\n at -= sz;\n }\n },\n\n // When a node has grown, check whether it should be split.\n maybeSpill: function() {\n if (this.children.length <= 10) { return }\n var me = this;\n do {\n var spilled = me.children.splice(me.children.length - 5, 5);\n var sibling = new BranchChunk(spilled);\n if (!me.parent) { // Become the parent node\n var copy = new BranchChunk(me.children);\n copy.parent = me;\n me.children = [copy, sibling];\n me = copy;\n } else {\n me.size -= sibling.size;\n me.height -= sibling.height;\n var myIndex = indexOf(me.parent.children, me);\n me.parent.children.splice(myIndex + 1, 0, sibling);\n }\n sibling.parent = me.parent;\n } while (me.children.length > 10)\n me.parent.maybeSpill();\n },\n\n iterN: function(at, n, op) {\n for (var i = 0; i < this.children.length; ++i) {\n var child = this.children[i], sz = child.chunkSize();\n if (at < sz) {\n var used = Math.min(n, sz - at);\n if (child.iterN(at, used, op)) { return true }\n if ((n -= used) == 0) { break }\n at = 0;\n } else { at -= sz; }\n }\n }\n };\n\n // Line widgets are block elements displayed above or below a line.\n\n var LineWidget = function(doc, node, options) {\n if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))\n { this[opt] = options[opt]; } } }\n this.doc = doc;\n this.node = node;\n };\n\n LineWidget.prototype.clear = function () {\n var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);\n if (no == null || !ws) { return }\n for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } }\n if (!ws.length) { line.widgets = null; }\n var height = widgetHeight(this);\n updateLineHeight(line, Math.max(0, line.height - height));\n if (cm) {\n runInOp(cm, function () {\n adjustScrollWhenAboveVisible(cm, line, -height);\n regLineChange(cm, no, \"widget\");\n });\n signalLater(cm, \"lineWidgetCleared\", cm, this, no);\n }\n };\n\n LineWidget.prototype.changed = function () {\n var this$1 = this;\n\n var oldH = this.height, cm = this.doc.cm, line = this.line;\n this.height = null;\n var diff = widgetHeight(this) - oldH;\n if (!diff) { return }\n if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }\n if (cm) {\n runInOp(cm, function () {\n cm.curOp.forceUpdate = true;\n adjustScrollWhenAboveVisible(cm, line, diff);\n signalLater(cm, \"lineWidgetChanged\", cm, this$1, lineNo(line));\n });\n }\n };\n eventMixin(LineWidget);\n\n function adjustScrollWhenAboveVisible(cm, line, diff) {\n if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))\n { addToScrollTop(cm, diff); }\n }\n\n function addLineWidget(doc, handle, node, options) {\n var widget = new LineWidget(doc, node, options);\n var cm = doc.cm;\n if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }\n changeLine(doc, handle, \"widget\", function (line) {\n var widgets = line.widgets || (line.widgets = []);\n if (widget.insertAt == null) { widgets.push(widget); }\n else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); }\n widget.line = line;\n if (cm && !lineIsHidden(doc, line)) {\n var aboveVisible = heightAtLine(line) < doc.scrollTop;\n updateLineHeight(line, line.height + widgetHeight(widget));\n if (aboveVisible) { addToScrollTop(cm, widget.height); }\n cm.curOp.forceUpdate = true;\n }\n return true\n });\n if (cm) { signalLater(cm, \"lineWidgetAdded\", cm, widget, typeof handle == \"number\" ? handle : lineNo(handle)); }\n return widget\n }\n\n // TEXTMARKERS\n\n // Created with markText and setBookmark methods. A TextMarker is a\n // handle that can be used to clear or find a marked position in the\n // document. Line objects hold arrays (markedSpans) containing\n // {from, to, marker} object pointing to such marker objects, and\n // indicating that such a marker is present on that line. Multiple\n // lines may point to the same marker when it spans across lines.\n // The spans will have null for their from/to properties when the\n // marker continues beyond the start/end of the line. Markers have\n // links back to the lines they currently touch.\n\n // Collapsed markers have unique ids, in order to be able to order\n // them, which is needed for uniquely determining an outer marker\n // when they overlap (they may nest, but not partially overlap).\n var nextMarkerId = 0;\n\n var TextMarker = function(doc, type) {\n this.lines = [];\n this.type = type;\n this.doc = doc;\n this.id = ++nextMarkerId;\n };\n\n // Clear the marker.\n TextMarker.prototype.clear = function () {\n if (this.explicitlyCleared) { return }\n var cm = this.doc.cm, withOp = cm && !cm.curOp;\n if (withOp) { startOperation(cm); }\n if (hasHandler(this, \"clear\")) {\n var found = this.find();\n if (found) { signalLater(this, \"clear\", found.from, found.to); }\n }\n var min = null, max = null;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this);\n if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), \"text\"); }\n else if (cm) {\n if (span.to != null) { max = lineNo(line); }\n if (span.from != null) { min = lineNo(line); }\n }\n line.markedSpans = removeMarkedSpan(line.markedSpans, span);\n if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm)\n { updateLineHeight(line, textHeight(cm.display)); }\n }\n if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {\n var visual = visualLine(this.lines[i$1]), len = lineLength(visual);\n if (len > cm.display.maxLineLength) {\n cm.display.maxLine = visual;\n cm.display.maxLineLength = len;\n cm.display.maxLineChanged = true;\n }\n } }\n\n if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }\n this.lines.length = 0;\n this.explicitlyCleared = true;\n if (this.atomic && this.doc.cantEdit) {\n this.doc.cantEdit = false;\n if (cm) { reCheckSelection(cm.doc); }\n }\n if (cm) { signalLater(cm, \"markerCleared\", cm, this, min, max); }\n if (withOp) { endOperation(cm); }\n if (this.parent) { this.parent.clear(); }\n };\n\n // Find the position of the marker in the document. Returns a {from,\n // to} object by default. Side can be passed to get a specific side\n // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the\n // Pos objects returned contain a line object, rather than a line\n // number (used to prevent looking up the same line twice).\n TextMarker.prototype.find = function (side, lineObj) {\n if (side == null && this.type == \"bookmark\") { side = 1; }\n var from, to;\n for (var i = 0; i < this.lines.length; ++i) {\n var line = this.lines[i];\n var span = getMarkedSpanFor(line.markedSpans, this);\n if (span.from != null) {\n from = Pos(lineObj ? line : lineNo(line), span.from);\n if (side == -1) { return from }\n }\n if (span.to != null) {\n to = Pos(lineObj ? line : lineNo(line), span.to);\n if (side == 1) { return to }\n }\n }\n return from && {from: from, to: to}\n };\n\n // Signals that the marker's widget changed, and surrounding layout\n // should be recomputed.\n TextMarker.prototype.changed = function () {\n var this$1 = this;\n\n var pos = this.find(-1, true), widget = this, cm = this.doc.cm;\n if (!pos || !cm) { return }\n runInOp(cm, function () {\n var line = pos.line, lineN = lineNo(pos.line);\n var view = findViewForLine(cm, lineN);\n if (view) {\n clearLineMeasurementCacheFor(view);\n cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;\n }\n cm.curOp.updateMaxLine = true;\n if (!lineIsHidden(widget.doc, line) && widget.height != null) {\n var oldHeight = widget.height;\n widget.height = null;\n var dHeight = widgetHeight(widget) - oldHeight;\n if (dHeight)\n { updateLineHeight(line, line.height + dHeight); }\n }\n signalLater(cm, \"markerChanged\", cm, this$1);\n });\n };\n\n TextMarker.prototype.attachLine = function (line) {\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp;\n if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)\n { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }\n }\n this.lines.push(line);\n };\n\n TextMarker.prototype.detachLine = function (line) {\n this.lines.splice(indexOf(this.lines, line), 1);\n if (!this.lines.length && this.doc.cm) {\n var op = this.doc.cm.curOp\n ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);\n }\n };\n eventMixin(TextMarker);\n\n // Create a marker, wire it up to the right lines, and\n function markText(doc, from, to, options, type) {\n // Shared markers (across linked documents) are handled separately\n // (markTextShared will call out to this again, once per\n // document).\n if (options && options.shared) { return markTextShared(doc, from, to, options, type) }\n // Ensure we are in an operation.\n if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }\n\n var marker = new TextMarker(doc, type), diff = cmp(from, to);\n if (options) { copyObj(options, marker, false); }\n // Don't connect empty markers unless clearWhenEmpty is false\n if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)\n { return marker }\n if (marker.replacedWith) {\n // Showing up as a widget implies collapsed (widget replaces text)\n marker.collapsed = true;\n marker.widgetNode = eltP(\"span\", [marker.replacedWith], \"CodeMirror-widget\");\n if (!options.handleMouseEvents) { marker.widgetNode.setAttribute(\"cm-ignore-events\", \"true\"); }\n if (options.insertLeft) { marker.widgetNode.insertLeft = true; }\n }\n if (marker.collapsed) {\n if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||\n from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))\n { throw new Error(\"Inserting collapsed marker partially overlapping an existing one\") }\n seeCollapsedSpans();\n }\n\n if (marker.addToHistory)\n { addChangeToHistory(doc, {from: from, to: to, origin: \"markText\"}, doc.sel, NaN); }\n\n var curLine = from.line, cm = doc.cm, updateMaxLine;\n doc.iter(curLine, to.line + 1, function (line) {\n if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)\n { updateMaxLine = true; }\n if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }\n addMarkedSpan(line, new MarkedSpan(marker,\n curLine == from.line ? from.ch : null,\n curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp);\n ++curLine;\n });\n // lineIsHidden depends on the presence of the spans, so needs a second pass\n if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {\n if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }\n }); }\n\n if (marker.clearOnEnter) { on(marker, \"beforeCursorEnter\", function () { return marker.clear(); }); }\n\n if (marker.readOnly) {\n seeReadOnlySpans();\n if (doc.history.done.length || doc.history.undone.length)\n { doc.clearHistory(); }\n }\n if (marker.collapsed) {\n marker.id = ++nextMarkerId;\n marker.atomic = true;\n }\n if (cm) {\n // Sync editor state\n if (updateMaxLine) { cm.curOp.updateMaxLine = true; }\n if (marker.collapsed)\n { regChange(cm, from.line, to.line + 1); }\n else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||\n marker.attributes || marker.title)\n { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, \"text\"); } }\n if (marker.atomic) { reCheckSelection(cm.doc); }\n signalLater(cm, \"markerAdded\", cm, marker);\n }\n return marker\n }\n\n // SHARED TEXTMARKERS\n\n // A shared marker spans multiple linked documents. It is\n // implemented as a meta-marker-object controlling multiple normal\n // markers.\n var SharedTextMarker = function(markers, primary) {\n this.markers = markers;\n this.primary = primary;\n for (var i = 0; i < markers.length; ++i)\n { markers[i].parent = this; }\n };\n\n SharedTextMarker.prototype.clear = function () {\n if (this.explicitlyCleared) { return }\n this.explicitlyCleared = true;\n for (var i = 0; i < this.markers.length; ++i)\n { this.markers[i].clear(); }\n signalLater(this, \"clear\");\n };\n\n SharedTextMarker.prototype.find = function (side, lineObj) {\n return this.primary.find(side, lineObj)\n };\n eventMixin(SharedTextMarker);\n\n function markTextShared(doc, from, to, options, type) {\n options = copyObj(options);\n options.shared = false;\n var markers = [markText(doc, from, to, options, type)], primary = markers[0];\n var widget = options.widgetNode;\n linkedDocs(doc, function (doc) {\n if (widget) { options.widgetNode = widget.cloneNode(true); }\n markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));\n for (var i = 0; i < doc.linked.length; ++i)\n { if (doc.linked[i].isParent) { return } }\n primary = lst(markers);\n });\n return new SharedTextMarker(markers, primary)\n }\n\n function findSharedMarkers(doc) {\n return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })\n }\n\n function copySharedMarkers(doc, markers) {\n for (var i = 0; i < markers.length; i++) {\n var marker = markers[i], pos = marker.find();\n var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);\n if (cmp(mFrom, mTo)) {\n var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);\n marker.markers.push(subMark);\n subMark.parent = marker;\n }\n }\n }\n\n function detachSharedMarkers(markers) {\n var loop = function ( i ) {\n var marker = markers[i], linked = [marker.primary.doc];\n linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });\n for (var j = 0; j < marker.markers.length; j++) {\n var subMarker = marker.markers[j];\n if (indexOf(linked, subMarker.doc) == -1) {\n subMarker.parent = null;\n marker.markers.splice(j--, 1);\n }\n }\n };\n\n for (var i = 0; i < markers.length; i++) loop( i );\n }\n\n var nextDocId = 0;\n var Doc = function(text, mode, firstLine, lineSep, direction) {\n if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }\n if (firstLine == null) { firstLine = 0; }\n\n BranchChunk.call(this, [new LeafChunk([new Line(\"\", null)])]);\n this.first = firstLine;\n this.scrollTop = this.scrollLeft = 0;\n this.cantEdit = false;\n this.cleanGeneration = 1;\n this.modeFrontier = this.highlightFrontier = firstLine;\n var start = Pos(firstLine, 0);\n this.sel = simpleSelection(start);\n this.history = new History(null);\n this.id = ++nextDocId;\n this.modeOption = mode;\n this.lineSep = lineSep;\n this.direction = (direction == \"rtl\") ? \"rtl\" : \"ltr\";\n this.extend = false;\n\n if (typeof text == \"string\") { text = this.splitLines(text); }\n updateDoc(this, {from: start, to: start, text: text});\n setSelection(this, simpleSelection(start), sel_dontScroll);\n };\n\n Doc.prototype = createObj(BranchChunk.prototype, {\n constructor: Doc,\n // Iterate over the document. Supports two forms -- with only one\n // argument, it calls that for each line in the document. With\n // three, it iterates over the range given by the first two (with\n // the second being non-inclusive).\n iter: function(from, to, op) {\n if (op) { this.iterN(from - this.first, to - from, op); }\n else { this.iterN(this.first, this.first + this.size, from); }\n },\n\n // Non-public interface for adding and removing lines.\n insert: function(at, lines) {\n var height = 0;\n for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }\n this.insertInner(at - this.first, lines, height);\n },\n remove: function(at, n) { this.removeInner(at - this.first, n); },\n\n // From here, the methods are part of the public interface. Most\n // are also available from CodeMirror (editor) instances.\n\n getValue: function(lineSep) {\n var lines = getLines(this, this.first, this.first + this.size);\n if (lineSep === false) { return lines }\n return lines.join(lineSep || this.lineSeparator())\n },\n setValue: docMethodOp(function(code) {\n var top = Pos(this.first, 0), last = this.first + this.size - 1;\n makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),\n text: this.splitLines(code), origin: \"setValue\", full: true}, true);\n if (this.cm) { scrollToCoords(this.cm, 0, 0); }\n setSelection(this, simpleSelection(top), sel_dontScroll);\n }),\n replaceRange: function(code, from, to, origin) {\n from = clipPos(this, from);\n to = to ? clipPos(this, to) : from;\n replaceRange(this, code, from, to, origin);\n },\n getRange: function(from, to, lineSep) {\n var lines = getBetween(this, clipPos(this, from), clipPos(this, to));\n if (lineSep === false) { return lines }\n if (lineSep === '') { return lines.join('') }\n return lines.join(lineSep || this.lineSeparator())\n },\n\n getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},\n\n getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},\n getLineNumber: function(line) {return lineNo(line)},\n\n getLineHandleVisualStart: function(line) {\n if (typeof line == \"number\") { line = getLine(this, line); }\n return visualLine(line)\n },\n\n lineCount: function() {return this.size},\n firstLine: function() {return this.first},\n lastLine: function() {return this.first + this.size - 1},\n\n clipPos: function(pos) {return clipPos(this, pos)},\n\n getCursor: function(start) {\n var range = this.sel.primary(), pos;\n if (start == null || start == \"head\") { pos = range.head; }\n else if (start == \"anchor\") { pos = range.anchor; }\n else if (start == \"end\" || start == \"to\" || start === false) { pos = range.to(); }\n else { pos = range.from(); }\n return pos\n },\n listSelections: function() { return this.sel.ranges },\n somethingSelected: function() {return this.sel.somethingSelected()},\n\n setCursor: docMethodOp(function(line, ch, options) {\n setSimpleSelection(this, clipPos(this, typeof line == \"number\" ? Pos(line, ch || 0) : line), null, options);\n }),\n setSelection: docMethodOp(function(anchor, head, options) {\n setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);\n }),\n extendSelection: docMethodOp(function(head, other, options) {\n extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);\n }),\n extendSelections: docMethodOp(function(heads, options) {\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n extendSelectionsBy: docMethodOp(function(f, options) {\n var heads = map(this.sel.ranges, f);\n extendSelections(this, clipPosArray(this, heads), options);\n }),\n setSelections: docMethodOp(function(ranges, primary, options) {\n if (!ranges.length) { return }\n var out = [];\n for (var i = 0; i < ranges.length; i++)\n { out[i] = new Range(clipPos(this, ranges[i].anchor),\n clipPos(this, ranges[i].head || ranges[i].anchor)); }\n if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }\n setSelection(this, normalizeSelection(this.cm, out, primary), options);\n }),\n addSelection: docMethodOp(function(anchor, head, options) {\n var ranges = this.sel.ranges.slice(0);\n ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));\n setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);\n }),\n\n getSelection: function(lineSep) {\n var ranges = this.sel.ranges, lines;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n lines = lines ? lines.concat(sel) : sel;\n }\n if (lineSep === false) { return lines }\n else { return lines.join(lineSep || this.lineSeparator()) }\n },\n getSelections: function(lineSep) {\n var parts = [], ranges = this.sel.ranges;\n for (var i = 0; i < ranges.length; i++) {\n var sel = getBetween(this, ranges[i].from(), ranges[i].to());\n if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); }\n parts[i] = sel;\n }\n return parts\n },\n replaceSelection: function(code, collapse, origin) {\n var dup = [];\n for (var i = 0; i < this.sel.ranges.length; i++)\n { dup[i] = code; }\n this.replaceSelections(dup, collapse, origin || \"+input\");\n },\n replaceSelections: docMethodOp(function(code, collapse, origin) {\n var changes = [], sel = this.sel;\n for (var i = 0; i < sel.ranges.length; i++) {\n var range = sel.ranges[i];\n changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin};\n }\n var newSel = collapse && collapse != \"end\" && computeReplacedSel(this, changes, collapse);\n for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)\n { makeChange(this, changes[i$1]); }\n if (newSel) { setSelectionReplaceHistory(this, newSel); }\n else if (this.cm) { ensureCursorVisible(this.cm); }\n }),\n undo: docMethodOp(function() {makeChangeFromHistory(this, \"undo\");}),\n redo: docMethodOp(function() {makeChangeFromHistory(this, \"redo\");}),\n undoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"undo\", true);}),\n redoSelection: docMethodOp(function() {makeChangeFromHistory(this, \"redo\", true);}),\n\n setExtending: function(val) {this.extend = val;},\n getExtending: function() {return this.extend},\n\n historySize: function() {\n var hist = this.history, done = 0, undone = 0;\n for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }\n for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }\n return {undo: done, redo: undone}\n },\n clearHistory: function() {\n var this$1 = this;\n\n this.history = new History(this.history);\n linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true);\n },\n\n markClean: function() {\n this.cleanGeneration = this.changeGeneration(true);\n },\n changeGeneration: function(forceSplit) {\n if (forceSplit)\n { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }\n return this.history.generation\n },\n isClean: function (gen) {\n return this.history.generation == (gen || this.cleanGeneration)\n },\n\n getHistory: function() {\n return {done: copyHistoryArray(this.history.done),\n undone: copyHistoryArray(this.history.undone)}\n },\n setHistory: function(histData) {\n var hist = this.history = new History(this.history);\n hist.done = copyHistoryArray(histData.done.slice(0), null, true);\n hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);\n },\n\n setGutterMarker: docMethodOp(function(line, gutterID, value) {\n return changeLine(this, line, \"gutter\", function (line) {\n var markers = line.gutterMarkers || (line.gutterMarkers = {});\n markers[gutterID] = value;\n if (!value && isEmpty(markers)) { line.gutterMarkers = null; }\n return true\n })\n }),\n\n clearGutter: docMethodOp(function(gutterID) {\n var this$1 = this;\n\n this.iter(function (line) {\n if (line.gutterMarkers && line.gutterMarkers[gutterID]) {\n changeLine(this$1, line, \"gutter\", function () {\n line.gutterMarkers[gutterID] = null;\n if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }\n return true\n });\n }\n });\n }),\n\n lineInfo: function(line) {\n var n;\n if (typeof line == \"number\") {\n if (!isLine(this, line)) { return null }\n n = line;\n line = getLine(this, line);\n if (!line) { return null }\n } else {\n n = lineNo(line);\n if (n == null) { return null }\n }\n return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,\n textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,\n widgets: line.widgets}\n },\n\n addLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n if (!line[prop]) { line[prop] = cls; }\n else if (classTest(cls).test(line[prop])) { return false }\n else { line[prop] += \" \" + cls; }\n return true\n })\n }),\n removeLineClass: docMethodOp(function(handle, where, cls) {\n return changeLine(this, handle, where == \"gutter\" ? \"gutter\" : \"class\", function (line) {\n var prop = where == \"text\" ? \"textClass\"\n : where == \"background\" ? \"bgClass\"\n : where == \"gutter\" ? \"gutterClass\" : \"wrapClass\";\n var cur = line[prop];\n if (!cur) { return false }\n else if (cls == null) { line[prop] = null; }\n else {\n var found = cur.match(classTest(cls));\n if (!found) { return false }\n var end = found.index + found[0].length;\n line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? \"\" : \" \") + cur.slice(end) || null;\n }\n return true\n })\n }),\n\n addLineWidget: docMethodOp(function(handle, node, options) {\n return addLineWidget(this, handle, node, options)\n }),\n removeLineWidget: function(widget) { widget.clear(); },\n\n markText: function(from, to, options) {\n return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || \"range\")\n },\n setBookmark: function(pos, options) {\n var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),\n insertLeft: options && options.insertLeft,\n clearWhenEmpty: false, shared: options && options.shared,\n handleMouseEvents: options && options.handleMouseEvents};\n pos = clipPos(this, pos);\n return markText(this, pos, pos, realOpts, \"bookmark\")\n },\n findMarksAt: function(pos) {\n pos = clipPos(this, pos);\n var markers = [], spans = getLine(this, pos.line).markedSpans;\n if (spans) { for (var i = 0; i < spans.length; ++i) {\n var span = spans[i];\n if ((span.from == null || span.from <= pos.ch) &&\n (span.to == null || span.to >= pos.ch))\n { markers.push(span.marker.parent || span.marker); }\n } }\n return markers\n },\n findMarks: function(from, to, filter) {\n from = clipPos(this, from); to = clipPos(this, to);\n var found = [], lineNo = from.line;\n this.iter(from.line, to.line + 1, function (line) {\n var spans = line.markedSpans;\n if (spans) { for (var i = 0; i < spans.length; i++) {\n var span = spans[i];\n if (!(span.to != null && lineNo == from.line && from.ch >= span.to ||\n span.from == null && lineNo != from.line ||\n span.from != null && lineNo == to.line && span.from >= to.ch) &&\n (!filter || filter(span.marker)))\n { found.push(span.marker.parent || span.marker); }\n } }\n ++lineNo;\n });\n return found\n },\n getAllMarks: function() {\n var markers = [];\n this.iter(function (line) {\n var sps = line.markedSpans;\n if (sps) { for (var i = 0; i < sps.length; ++i)\n { if (sps[i].from != null) { markers.push(sps[i].marker); } } }\n });\n return markers\n },\n\n posFromIndex: function(off) {\n var ch, lineNo = this.first, sepSize = this.lineSeparator().length;\n this.iter(function (line) {\n var sz = line.text.length + sepSize;\n if (sz > off) { ch = off; return true }\n off -= sz;\n ++lineNo;\n });\n return clipPos(this, Pos(lineNo, ch))\n },\n indexFromPos: function (coords) {\n coords = clipPos(this, coords);\n var index = coords.ch;\n if (coords.line < this.first || coords.ch < 0) { return 0 }\n var sepSize = this.lineSeparator().length;\n this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value\n index += line.text.length + sepSize;\n });\n return index\n },\n\n copy: function(copyHistory) {\n var doc = new Doc(getLines(this, this.first, this.first + this.size),\n this.modeOption, this.first, this.lineSep, this.direction);\n doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;\n doc.sel = this.sel;\n doc.extend = false;\n if (copyHistory) {\n doc.history.undoDepth = this.history.undoDepth;\n doc.setHistory(this.getHistory());\n }\n return doc\n },\n\n linkedDoc: function(options) {\n if (!options) { options = {}; }\n var from = this.first, to = this.first + this.size;\n if (options.from != null && options.from > from) { from = options.from; }\n if (options.to != null && options.to < to) { to = options.to; }\n var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);\n if (options.sharedHist) { copy.history = this.history\n ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});\n copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];\n copySharedMarkers(copy, findSharedMarkers(this));\n return copy\n },\n unlinkDoc: function(other) {\n if (other instanceof CodeMirror) { other = other.doc; }\n if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {\n var link = this.linked[i];\n if (link.doc != other) { continue }\n this.linked.splice(i, 1);\n other.unlinkDoc(this);\n detachSharedMarkers(findSharedMarkers(this));\n break\n } }\n // If the histories were shared, split them again\n if (other.history == this.history) {\n var splitIds = [other.id];\n linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);\n other.history = new History(null);\n other.history.done = copyHistoryArray(this.history.done, splitIds);\n other.history.undone = copyHistoryArray(this.history.undone, splitIds);\n }\n },\n iterLinkedDocs: function(f) {linkedDocs(this, f);},\n\n getMode: function() {return this.mode},\n getEditor: function() {return this.cm},\n\n splitLines: function(str) {\n if (this.lineSep) { return str.split(this.lineSep) }\n return splitLinesAuto(str)\n },\n lineSeparator: function() { return this.lineSep || \"\\n\" },\n\n setDirection: docMethodOp(function (dir) {\n if (dir != \"rtl\") { dir = \"ltr\"; }\n if (dir == this.direction) { return }\n this.direction = dir;\n this.iter(function (line) { return line.order = null; });\n if (this.cm) { directionChanged(this.cm); }\n })\n });\n\n // Public alias.\n Doc.prototype.eachLine = Doc.prototype.iter;\n\n // Kludge to work around strange IE behavior where it'll sometimes\n // re-fire a series of drag-related events right after the drop (#1551)\n var lastDrop = 0;\n\n function onDrop(e) {\n var cm = this;\n clearDragCursor(cm);\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))\n { return }\n e_preventDefault(e);\n if (ie) { lastDrop = +new Date; }\n var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;\n if (!pos || cm.isReadOnly()) { return }\n // Might be a file drop, in which case we simply extract the text\n // and insert it.\n if (files && files.length && window.FileReader && window.File) {\n var n = files.length, text = Array(n), read = 0;\n var markAsReadAndPasteIfAllFilesAreRead = function () {\n if (++read == n) {\n operation(cm, function () {\n pos = clipPos(cm.doc, pos);\n var change = {from: pos, to: pos,\n text: cm.doc.splitLines(\n text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())),\n origin: \"paste\"};\n makeChange(cm.doc, change);\n setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change))));\n })();\n }\n };\n var readTextFromFile = function (file, i) {\n if (cm.options.allowDropFileTypes &&\n indexOf(cm.options.allowDropFileTypes, file.type) == -1) {\n markAsReadAndPasteIfAllFilesAreRead();\n return\n }\n var reader = new FileReader;\n reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); };\n reader.onload = function () {\n var content = reader.result;\n if (/[\\x00-\\x08\\x0e-\\x1f]{2}/.test(content)) {\n markAsReadAndPasteIfAllFilesAreRead();\n return\n }\n text[i] = content;\n markAsReadAndPasteIfAllFilesAreRead();\n };\n reader.readAsText(file);\n };\n for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); }\n } else { // Normal drop\n // Don't do a replace if the drop happened inside of the selected text.\n if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {\n cm.state.draggingText(e);\n // Ensure the editor is re-focused\n setTimeout(function () { return cm.display.input.focus(); }, 20);\n return\n }\n try {\n var text$1 = e.dataTransfer.getData(\"Text\");\n if (text$1) {\n var selected;\n if (cm.state.draggingText && !cm.state.draggingText.copy)\n { selected = cm.listSelections(); }\n setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));\n if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)\n { replaceRange(cm.doc, \"\", selected[i$1].anchor, selected[i$1].head, \"drag\"); } }\n cm.replaceSelection(text$1, \"around\", \"paste\");\n cm.display.input.focus();\n }\n }\n catch(e$1){}\n }\n }\n\n function onDragStart(cm, e) {\n if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }\n if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }\n\n e.dataTransfer.setData(\"Text\", cm.getSelection());\n e.dataTransfer.effectAllowed = \"copyMove\";\n\n // Use dummy image instead of default browsers image.\n // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.\n if (e.dataTransfer.setDragImage && !safari) {\n var img = elt(\"img\", null, null, \"position: fixed; left: 0; top: 0;\");\n img.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (presto) {\n img.width = img.height = 1;\n cm.display.wrapper.appendChild(img);\n // Force a relayout, or Opera won't use our image for some obscure reason\n img._top = img.offsetTop;\n }\n e.dataTransfer.setDragImage(img, 0, 0);\n if (presto) { img.parentNode.removeChild(img); }\n }\n }\n\n function onDragOver(cm, e) {\n var pos = posFromMouse(cm, e);\n if (!pos) { return }\n var frag = document.createDocumentFragment();\n drawSelectionCursor(cm, pos, frag);\n if (!cm.display.dragCursor) {\n cm.display.dragCursor = elt(\"div\", null, \"CodeMirror-cursors CodeMirror-dragcursors\");\n cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);\n }\n removeChildrenAndAdd(cm.display.dragCursor, frag);\n }\n\n function clearDragCursor(cm) {\n if (cm.display.dragCursor) {\n cm.display.lineSpace.removeChild(cm.display.dragCursor);\n cm.display.dragCursor = null;\n }\n }\n\n // These must be handled carefully, because naively registering a\n // handler for each editor will cause the editors to never be\n // garbage collected.\n\n function forEachCodeMirror(f) {\n if (!document.getElementsByClassName) { return }\n var byClass = document.getElementsByClassName(\"CodeMirror\"), editors = [];\n for (var i = 0; i < byClass.length; i++) {\n var cm = byClass[i].CodeMirror;\n if (cm) { editors.push(cm); }\n }\n if (editors.length) { editors[0].operation(function () {\n for (var i = 0; i < editors.length; i++) { f(editors[i]); }\n }); }\n }\n\n var globalsRegistered = false;\n function ensureGlobalHandlers() {\n if (globalsRegistered) { return }\n registerGlobalHandlers();\n globalsRegistered = true;\n }\n function registerGlobalHandlers() {\n // When the window resizes, we need to refresh active editors.\n var resizeTimer;\n on(window, \"resize\", function () {\n if (resizeTimer == null) { resizeTimer = setTimeout(function () {\n resizeTimer = null;\n forEachCodeMirror(onResize);\n }, 100); }\n });\n // When the window loses focus, we want to show the editor as blurred\n on(window, \"blur\", function () { return forEachCodeMirror(onBlur); });\n }\n // Called when the window resizes\n function onResize(cm) {\n var d = cm.display;\n // Might be a text scaling operation, clear size caches.\n d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;\n d.scrollbarsClipped = false;\n cm.setSize();\n }\n\n var keyNames = {\n 3: \"Pause\", 8: \"Backspace\", 9: \"Tab\", 13: \"Enter\", 16: \"Shift\", 17: \"Ctrl\", 18: \"Alt\",\n 19: \"Pause\", 20: \"CapsLock\", 27: \"Esc\", 32: \"Space\", 33: \"PageUp\", 34: \"PageDown\", 35: \"End\",\n 36: \"Home\", 37: \"Left\", 38: \"Up\", 39: \"Right\", 40: \"Down\", 44: \"PrintScrn\", 45: \"Insert\",\n 46: \"Delete\", 59: \";\", 61: \"=\", 91: \"Mod\", 92: \"Mod\", 93: \"Mod\",\n 106: \"*\", 107: \"=\", 109: \"-\", 110: \".\", 111: \"/\", 145: \"ScrollLock\",\n 173: \"-\", 186: \";\", 187: \"=\", 188: \",\", 189: \"-\", 190: \".\", 191: \"/\", 192: \"`\", 219: \"[\", 220: \"\\\\\",\n 221: \"]\", 222: \"'\", 224: \"Mod\", 63232: \"Up\", 63233: \"Down\", 63234: \"Left\", 63235: \"Right\", 63272: \"Delete\",\n 63273: \"Home\", 63275: \"End\", 63276: \"PageUp\", 63277: \"PageDown\", 63302: \"Insert\"\n };\n\n // Number keys\n for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }\n // Alphabetic keys\n for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }\n // Function keys\n for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = \"F\" + i$2; }\n\n var keyMap = {};\n\n keyMap.basic = {\n \"Left\": \"goCharLeft\", \"Right\": \"goCharRight\", \"Up\": \"goLineUp\", \"Down\": \"goLineDown\",\n \"End\": \"goLineEnd\", \"Home\": \"goLineStartSmart\", \"PageUp\": \"goPageUp\", \"PageDown\": \"goPageDown\",\n \"Delete\": \"delCharAfter\", \"Backspace\": \"delCharBefore\", \"Shift-Backspace\": \"delCharBefore\",\n \"Tab\": \"defaultTab\", \"Shift-Tab\": \"indentAuto\",\n \"Enter\": \"newlineAndIndent\", \"Insert\": \"toggleOverwrite\",\n \"Esc\": \"singleSelection\"\n };\n // Note that the save and find-related commands aren't defined by\n // default. User code or addons can define them. Unknown commands\n // are simply ignored.\n keyMap.pcDefault = {\n \"Ctrl-A\": \"selectAll\", \"Ctrl-D\": \"deleteLine\", \"Ctrl-Z\": \"undo\", \"Shift-Ctrl-Z\": \"redo\", \"Ctrl-Y\": \"redo\",\n \"Ctrl-Home\": \"goDocStart\", \"Ctrl-End\": \"goDocEnd\", \"Ctrl-Up\": \"goLineUp\", \"Ctrl-Down\": \"goLineDown\",\n \"Ctrl-Left\": \"goGroupLeft\", \"Ctrl-Right\": \"goGroupRight\", \"Alt-Left\": \"goLineStart\", \"Alt-Right\": \"goLineEnd\",\n \"Ctrl-Backspace\": \"delGroupBefore\", \"Ctrl-Delete\": \"delGroupAfter\", \"Ctrl-S\": \"save\", \"Ctrl-F\": \"find\",\n \"Ctrl-G\": \"findNext\", \"Shift-Ctrl-G\": \"findPrev\", \"Shift-Ctrl-F\": \"replace\", \"Shift-Ctrl-R\": \"replaceAll\",\n \"Ctrl-[\": \"indentLess\", \"Ctrl-]\": \"indentMore\",\n \"Ctrl-U\": \"undoSelection\", \"Shift-Ctrl-U\": \"redoSelection\", \"Alt-U\": \"redoSelection\",\n \"fallthrough\": \"basic\"\n };\n // Very basic readline/emacs-style bindings, which are standard on Mac.\n keyMap.emacsy = {\n \"Ctrl-F\": \"goCharRight\", \"Ctrl-B\": \"goCharLeft\", \"Ctrl-P\": \"goLineUp\", \"Ctrl-N\": \"goLineDown\",\n \"Ctrl-A\": \"goLineStart\", \"Ctrl-E\": \"goLineEnd\", \"Ctrl-V\": \"goPageDown\", \"Shift-Ctrl-V\": \"goPageUp\",\n \"Ctrl-D\": \"delCharAfter\", \"Ctrl-H\": \"delCharBefore\", \"Alt-Backspace\": \"delWordBefore\", \"Ctrl-K\": \"killLine\",\n \"Ctrl-T\": \"transposeChars\", \"Ctrl-O\": \"openLine\"\n };\n keyMap.macDefault = {\n \"Cmd-A\": \"selectAll\", \"Cmd-D\": \"deleteLine\", \"Cmd-Z\": \"undo\", \"Shift-Cmd-Z\": \"redo\", \"Cmd-Y\": \"redo\",\n \"Cmd-Home\": \"goDocStart\", \"Cmd-Up\": \"goDocStart\", \"Cmd-End\": \"goDocEnd\", \"Cmd-Down\": \"goDocEnd\", \"Alt-Left\": \"goGroupLeft\",\n \"Alt-Right\": \"goGroupRight\", \"Cmd-Left\": \"goLineLeft\", \"Cmd-Right\": \"goLineRight\", \"Alt-Backspace\": \"delGroupBefore\",\n \"Ctrl-Alt-Backspace\": \"delGroupAfter\", \"Alt-Delete\": \"delGroupAfter\", \"Cmd-S\": \"save\", \"Cmd-F\": \"find\",\n \"Cmd-G\": \"findNext\", \"Shift-Cmd-G\": \"findPrev\", \"Cmd-Alt-F\": \"replace\", \"Shift-Cmd-Alt-F\": \"replaceAll\",\n \"Cmd-[\": \"indentLess\", \"Cmd-]\": \"indentMore\", \"Cmd-Backspace\": \"delWrappedLineLeft\", \"Cmd-Delete\": \"delWrappedLineRight\",\n \"Cmd-U\": \"undoSelection\", \"Shift-Cmd-U\": \"redoSelection\", \"Ctrl-Up\": \"goDocStart\", \"Ctrl-Down\": \"goDocEnd\",\n \"fallthrough\": [\"basic\", \"emacsy\"]\n };\n keyMap[\"default\"] = mac ? keyMap.macDefault : keyMap.pcDefault;\n\n // KEYMAP DISPATCH\n\n function normalizeKeyName(name) {\n var parts = name.split(/-(?!$)/);\n name = parts[parts.length - 1];\n var alt, ctrl, shift, cmd;\n for (var i = 0; i < parts.length - 1; i++) {\n var mod = parts[i];\n if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }\n else if (/^a(lt)?$/i.test(mod)) { alt = true; }\n else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }\n else if (/^s(hift)?$/i.test(mod)) { shift = true; }\n else { throw new Error(\"Unrecognized modifier name: \" + mod) }\n }\n if (alt) { name = \"Alt-\" + name; }\n if (ctrl) { name = \"Ctrl-\" + name; }\n if (cmd) { name = \"Cmd-\" + name; }\n if (shift) { name = \"Shift-\" + name; }\n return name\n }\n\n // This is a kludge to keep keymaps mostly working as raw objects\n // (backwards compatibility) while at the same time support features\n // like normalization and multi-stroke key bindings. It compiles a\n // new normalized keymap, and then updates the old object to reflect\n // this.\n function normalizeKeyMap(keymap) {\n var copy = {};\n for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {\n var value = keymap[keyname];\n if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }\n if (value == \"...\") { delete keymap[keyname]; continue }\n\n var keys = map(keyname.split(\" \"), normalizeKeyName);\n for (var i = 0; i < keys.length; i++) {\n var val = (void 0), name = (void 0);\n if (i == keys.length - 1) {\n name = keys.join(\" \");\n val = value;\n } else {\n name = keys.slice(0, i + 1).join(\" \");\n val = \"...\";\n }\n var prev = copy[name];\n if (!prev) { copy[name] = val; }\n else if (prev != val) { throw new Error(\"Inconsistent bindings for \" + name) }\n }\n delete keymap[keyname];\n } }\n for (var prop in copy) { keymap[prop] = copy[prop]; }\n return keymap\n }\n\n function lookupKey(key, map, handle, context) {\n map = getKeyMap(map);\n var found = map.call ? map.call(key, context) : map[key];\n if (found === false) { return \"nothing\" }\n if (found === \"...\") { return \"multi\" }\n if (found != null && handle(found)) { return \"handled\" }\n\n if (map.fallthrough) {\n if (Object.prototype.toString.call(map.fallthrough) != \"[object Array]\")\n { return lookupKey(key, map.fallthrough, handle, context) }\n for (var i = 0; i < map.fallthrough.length; i++) {\n var result = lookupKey(key, map.fallthrough[i], handle, context);\n if (result) { return result }\n }\n }\n }\n\n // Modifier key presses don't count as 'real' key presses for the\n // purpose of keymap fallthrough.\n function isModifierKey(value) {\n var name = typeof value == \"string\" ? value : keyNames[value.keyCode];\n return name == \"Ctrl\" || name == \"Alt\" || name == \"Shift\" || name == \"Mod\"\n }\n\n function addModifierNames(name, event, noShift) {\n var base = name;\n if (event.altKey && base != \"Alt\") { name = \"Alt-\" + name; }\n if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != \"Ctrl\") { name = \"Ctrl-\" + name; }\n if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != \"Mod\") { name = \"Cmd-\" + name; }\n if (!noShift && event.shiftKey && base != \"Shift\") { name = \"Shift-\" + name; }\n return name\n }\n\n // Look up the name of a key as indicated by an event object.\n function keyName(event, noShift) {\n if (presto && event.keyCode == 34 && event[\"char\"]) { return false }\n var name = keyNames[event.keyCode];\n if (name == null || event.altGraphKey) { return false }\n // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,\n // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)\n if (event.keyCode == 3 && event.code) { name = event.code; }\n return addModifierNames(name, event, noShift)\n }\n\n function getKeyMap(val) {\n return typeof val == \"string\" ? keyMap[val] : val\n }\n\n // Helper for deleting text near the selection(s), used to implement\n // backspace, delete, and similar functionality.\n function deleteNearSelection(cm, compute) {\n var ranges = cm.doc.sel.ranges, kill = [];\n // Build up a set of ranges to kill first, merging overlapping\n // ranges.\n for (var i = 0; i < ranges.length; i++) {\n var toKill = compute(ranges[i]);\n while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {\n var replaced = kill.pop();\n if (cmp(replaced.from, toKill.from) < 0) {\n toKill.from = replaced.from;\n break\n }\n }\n kill.push(toKill);\n }\n // Next, remove those actual ranges.\n runInOp(cm, function () {\n for (var i = kill.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, \"\", kill[i].from, kill[i].to, \"+delete\"); }\n ensureCursorVisible(cm);\n });\n }\n\n function moveCharLogically(line, ch, dir) {\n var target = skipExtendingChars(line.text, ch + dir, dir);\n return target < 0 || target > line.text.length ? null : target\n }\n\n function moveLogically(line, start, dir) {\n var ch = moveCharLogically(line, start.ch, dir);\n return ch == null ? null : new Pos(start.line, ch, dir < 0 ? \"after\" : \"before\")\n }\n\n function endOfLine(visually, cm, lineObj, lineNo, dir) {\n if (visually) {\n if (cm.doc.direction == \"rtl\") { dir = -dir; }\n var order = getOrder(lineObj, cm.doc.direction);\n if (order) {\n var part = dir < 0 ? lst(order) : order[0];\n var moveInStorageOrder = (dir < 0) == (part.level == 1);\n var sticky = moveInStorageOrder ? \"after\" : \"before\";\n var ch;\n // With a wrapped rtl chunk (possibly spanning multiple bidi parts),\n // it could be that the last bidi part is not on the last visual line,\n // since visual lines contain content order-consecutive chunks.\n // Thus, in rtl, we are looking for the first (content-order) character\n // in the rtl chunk that is on the last line (that is, the same line\n // as the last (content-order) character).\n if (part.level > 0 || cm.doc.direction == \"rtl\") {\n var prep = prepareMeasureForLine(cm, lineObj);\n ch = dir < 0 ? lineObj.text.length - 1 : 0;\n var targetTop = measureCharPrepared(cm, prep, ch).top;\n ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);\n if (sticky == \"before\") { ch = moveCharLogically(lineObj, ch, 1); }\n } else { ch = dir < 0 ? part.to : part.from; }\n return new Pos(lineNo, ch, sticky)\n }\n }\n return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? \"before\" : \"after\")\n }\n\n function moveVisually(cm, line, start, dir) {\n var bidi = getOrder(line, cm.doc.direction);\n if (!bidi) { return moveLogically(line, start, dir) }\n if (start.ch >= line.text.length) {\n start.ch = line.text.length;\n start.sticky = \"before\";\n } else if (start.ch <= 0) {\n start.ch = 0;\n start.sticky = \"after\";\n }\n var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];\n if (cm.doc.direction == \"ltr\" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {\n // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,\n // nothing interesting happens.\n return moveLogically(line, start, dir)\n }\n\n var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };\n var prep;\n var getWrappedLineExtent = function (ch) {\n if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }\n prep = prep || prepareMeasureForLine(cm, line);\n return wrappedLineExtentChar(cm, line, prep, ch)\n };\n var wrappedLineExtent = getWrappedLineExtent(start.sticky == \"before\" ? mv(start, -1) : start.ch);\n\n if (cm.doc.direction == \"rtl\" || part.level == 1) {\n var moveInStorageOrder = (part.level == 1) == (dir < 0);\n var ch = mv(start, moveInStorageOrder ? 1 : -1);\n if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {\n // Case 2: We move within an rtl part or in an rtl editor on the same visual line\n var sticky = moveInStorageOrder ? \"before\" : \"after\";\n return new Pos(start.line, ch, sticky)\n }\n }\n\n // Case 3: Could not move within this bidi part in this visual line, so leave\n // the current bidi part\n\n var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {\n var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder\n ? new Pos(start.line, mv(ch, 1), \"before\")\n : new Pos(start.line, ch, \"after\"); };\n\n for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {\n var part = bidi[partPos];\n var moveInStorageOrder = (dir > 0) == (part.level != 1);\n var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);\n if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }\n ch = moveInStorageOrder ? part.from : mv(part.to, -1);\n if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }\n }\n };\n\n // Case 3a: Look for other bidi parts on the same visual line\n var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);\n if (res) { return res }\n\n // Case 3b: Look for other bidi parts on the next visual line\n var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);\n if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {\n res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));\n if (res) { return res }\n }\n\n // Case 4: Nowhere to move\n return null\n }\n\n // Commands are parameter-less actions that can be performed on an\n // editor, mostly used for keybindings.\n var commands = {\n selectAll: selectAll,\n singleSelection: function (cm) { return cm.setSelection(cm.getCursor(\"anchor\"), cm.getCursor(\"head\"), sel_dontScroll); },\n killLine: function (cm) { return deleteNearSelection(cm, function (range) {\n if (range.empty()) {\n var len = getLine(cm.doc, range.head.line).text.length;\n if (range.head.ch == len && range.head.line < cm.lastLine())\n { return {from: range.head, to: Pos(range.head.line + 1, 0)} }\n else\n { return {from: range.head, to: Pos(range.head.line, len)} }\n } else {\n return {from: range.from(), to: range.to()}\n }\n }); },\n deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0),\n to: clipPos(cm.doc, Pos(range.to().line + 1, 0))\n }); }); },\n delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({\n from: Pos(range.from().line, 0), to: range.from()\n }); }); },\n delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var leftPos = cm.coordsChar({left: 0, top: top}, \"div\");\n return {from: leftPos, to: range.from()}\n }); },\n delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {\n var top = cm.charCoords(range.head, \"div\").top + 5;\n var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\");\n return {from: range.from(), to: rightPos }\n }); },\n undo: function (cm) { return cm.undo(); },\n redo: function (cm) { return cm.redo(); },\n undoSelection: function (cm) { return cm.undoSelection(); },\n redoSelection: function (cm) { return cm.redoSelection(); },\n goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },\n goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },\n goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },\n {origin: \"+move\", bias: 1}\n ); },\n goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },\n {origin: \"+move\", bias: -1}\n ); },\n goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, \"div\")\n }, sel_move); },\n goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n return cm.coordsChar({left: 0, top: top}, \"div\")\n }, sel_move); },\n goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {\n var top = cm.cursorCoords(range.head, \"div\").top + 5;\n var pos = cm.coordsChar({left: 0, top: top}, \"div\");\n if (pos.ch < cm.getLine(pos.line).search(/\\S/)) { return lineStartSmart(cm, range.head) }\n return pos\n }, sel_move); },\n goLineUp: function (cm) { return cm.moveV(-1, \"line\"); },\n goLineDown: function (cm) { return cm.moveV(1, \"line\"); },\n goPageUp: function (cm) { return cm.moveV(-1, \"page\"); },\n goPageDown: function (cm) { return cm.moveV(1, \"page\"); },\n goCharLeft: function (cm) { return cm.moveH(-1, \"char\"); },\n goCharRight: function (cm) { return cm.moveH(1, \"char\"); },\n goColumnLeft: function (cm) { return cm.moveH(-1, \"column\"); },\n goColumnRight: function (cm) { return cm.moveH(1, \"column\"); },\n goWordLeft: function (cm) { return cm.moveH(-1, \"word\"); },\n goGroupRight: function (cm) { return cm.moveH(1, \"group\"); },\n goGroupLeft: function (cm) { return cm.moveH(-1, \"group\"); },\n goWordRight: function (cm) { return cm.moveH(1, \"word\"); },\n delCharBefore: function (cm) { return cm.deleteH(-1, \"codepoint\"); },\n delCharAfter: function (cm) { return cm.deleteH(1, \"char\"); },\n delWordBefore: function (cm) { return cm.deleteH(-1, \"word\"); },\n delWordAfter: function (cm) { return cm.deleteH(1, \"word\"); },\n delGroupBefore: function (cm) { return cm.deleteH(-1, \"group\"); },\n delGroupAfter: function (cm) { return cm.deleteH(1, \"group\"); },\n indentAuto: function (cm) { return cm.indentSelection(\"smart\"); },\n indentMore: function (cm) { return cm.indentSelection(\"add\"); },\n indentLess: function (cm) { return cm.indentSelection(\"subtract\"); },\n insertTab: function (cm) { return cm.replaceSelection(\"\\t\"); },\n insertSoftTab: function (cm) {\n var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;\n for (var i = 0; i < ranges.length; i++) {\n var pos = ranges[i].from();\n var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);\n spaces.push(spaceStr(tabSize - col % tabSize));\n }\n cm.replaceSelections(spaces);\n },\n defaultTab: function (cm) {\n if (cm.somethingSelected()) { cm.indentSelection(\"add\"); }\n else { cm.execCommand(\"insertTab\"); }\n },\n // Swap the two chars left and right of each selection's head.\n // Move cursor behind the two swapped characters afterwards.\n //\n // Doesn't consider line feeds a character.\n // Doesn't scan more than one line above to find a character.\n // Doesn't do anything on an empty line.\n // Doesn't do anything with non-empty selections.\n transposeChars: function (cm) { return runInOp(cm, function () {\n var ranges = cm.listSelections(), newSel = [];\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) { continue }\n var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;\n if (line) {\n if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }\n if (cur.ch > 0) {\n cur = new Pos(cur.line, cur.ch + 1);\n cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),\n Pos(cur.line, cur.ch - 2), cur, \"+transpose\");\n } else if (cur.line > cm.doc.first) {\n var prev = getLine(cm.doc, cur.line - 1).text;\n if (prev) {\n cur = new Pos(cur.line, 1);\n cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +\n prev.charAt(prev.length - 1),\n Pos(cur.line - 1, prev.length - 1), cur, \"+transpose\");\n }\n }\n }\n newSel.push(new Range(cur, cur));\n }\n cm.setSelections(newSel);\n }); },\n newlineAndIndent: function (cm) { return runInOp(cm, function () {\n var sels = cm.listSelections();\n for (var i = sels.length - 1; i >= 0; i--)\n { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, \"+input\"); }\n sels = cm.listSelections();\n for (var i$1 = 0; i$1 < sels.length; i$1++)\n { cm.indentLine(sels[i$1].from().line, null, true); }\n ensureCursorVisible(cm);\n }); },\n openLine: function (cm) { return cm.replaceSelection(\"\\n\", \"start\"); },\n toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }\n };\n\n\n function lineStart(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLine(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, visual, lineN, 1)\n }\n function lineEnd(cm, lineN) {\n var line = getLine(cm.doc, lineN);\n var visual = visualLineEnd(line);\n if (visual != line) { lineN = lineNo(visual); }\n return endOfLine(true, cm, line, lineN, -1)\n }\n function lineStartSmart(cm, pos) {\n var start = lineStart(cm, pos.line);\n var line = getLine(cm.doc, start.line);\n var order = getOrder(line, cm.doc.direction);\n if (!order || order[0].level == 0) {\n var firstNonWS = Math.max(start.ch, line.text.search(/\\S/));\n var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;\n return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)\n }\n return start\n }\n\n // Run a handler that was bound to a key.\n function doHandleBinding(cm, bound, dropShift) {\n if (typeof bound == \"string\") {\n bound = commands[bound];\n if (!bound) { return false }\n }\n // Ensure previous input has been read, so that the handler sees a\n // consistent view of the document\n cm.display.input.ensurePolled();\n var prevShift = cm.display.shift, done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n if (dropShift) { cm.display.shift = false; }\n done = bound(cm) != Pass;\n } finally {\n cm.display.shift = prevShift;\n cm.state.suppressEdits = false;\n }\n return done\n }\n\n function lookupKeyForEditor(cm, name, handle) {\n for (var i = 0; i < cm.state.keyMaps.length; i++) {\n var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);\n if (result) { return result }\n }\n return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))\n || lookupKey(name, cm.options.keyMap, handle, cm)\n }\n\n // Note that, despite the name, this function is also used to check\n // for bound mouse clicks.\n\n var stopSeq = new Delayed;\n\n function dispatchKey(cm, name, e, handle) {\n var seq = cm.state.keySeq;\n if (seq) {\n if (isModifierKey(name)) { return \"handled\" }\n if (/\\'$/.test(name))\n { cm.state.keySeq = null; }\n else\n { stopSeq.set(50, function () {\n if (cm.state.keySeq == seq) {\n cm.state.keySeq = null;\n cm.display.input.reset();\n }\n }); }\n if (dispatchKeyInner(cm, seq + \" \" + name, e, handle)) { return true }\n }\n return dispatchKeyInner(cm, name, e, handle)\n }\n\n function dispatchKeyInner(cm, name, e, handle) {\n var result = lookupKeyForEditor(cm, name, handle);\n\n if (result == \"multi\")\n { cm.state.keySeq = name; }\n if (result == \"handled\")\n { signalLater(cm, \"keyHandled\", cm, name, e); }\n\n if (result == \"handled\" || result == \"multi\") {\n e_preventDefault(e);\n restartBlink(cm);\n }\n\n return !!result\n }\n\n // Handle a key from the keydown event.\n function handleKeyBinding(cm, e) {\n var name = keyName(e, true);\n if (!name) { return false }\n\n if (e.shiftKey && !cm.state.keySeq) {\n // First try to resolve full name (including 'Shift-'). Failing\n // that, see if there is a cursor-motion command (starting with\n // 'go') bound to the keyname without 'Shift-'.\n return dispatchKey(cm, \"Shift-\" + name, e, function (b) { return doHandleBinding(cm, b, true); })\n || dispatchKey(cm, name, e, function (b) {\n if (typeof b == \"string\" ? /^go[A-Z]/.test(b) : b.motion)\n { return doHandleBinding(cm, b) }\n })\n } else {\n return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })\n }\n }\n\n // Handle a key from the keypress event\n function handleCharBinding(cm, e, ch) {\n return dispatchKey(cm, \"'\" + ch + \"'\", e, function (b) { return doHandleBinding(cm, b, true); })\n }\n\n var lastStoppedKey = null;\n function onKeyDown(e) {\n var cm = this;\n if (e.target && e.target != cm.display.input.getField()) { return }\n cm.curOp.focus = activeElt(root(cm));\n if (signalDOMEvent(cm, e)) { return }\n // IE does strange things with escape.\n if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }\n var code = e.keyCode;\n cm.display.shift = code == 16 || e.shiftKey;\n var handled = handleKeyBinding(cm, e);\n if (presto) {\n lastStoppedKey = handled ? code : null;\n // Opera has no cut event... we try to at least catch the key combo\n if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))\n { cm.replaceSelection(\"\", null, \"cut\"); }\n }\n if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand)\n { document.execCommand(\"cut\"); }\n\n // Turn mouse into crosshair when Alt is held on Mac.\n if (code == 18 && !/\\bCodeMirror-crosshair\\b/.test(cm.display.lineDiv.className))\n { showCrossHair(cm); }\n }\n\n function showCrossHair(cm) {\n var lineDiv = cm.display.lineDiv;\n addClass(lineDiv, \"CodeMirror-crosshair\");\n\n function up(e) {\n if (e.keyCode == 18 || !e.altKey) {\n rmClass(lineDiv, \"CodeMirror-crosshair\");\n off(document, \"keyup\", up);\n off(document, \"mouseover\", up);\n }\n }\n on(document, \"keyup\", up);\n on(document, \"mouseover\", up);\n }\n\n function onKeyUp(e) {\n if (e.keyCode == 16) { this.doc.sel.shift = false; }\n signalDOMEvent(this, e);\n }\n\n function onKeyPress(e) {\n var cm = this;\n if (e.target && e.target != cm.display.input.getField()) { return }\n if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }\n var keyCode = e.keyCode, charCode = e.charCode;\n if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}\n if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }\n var ch = String.fromCharCode(charCode == null ? keyCode : charCode);\n // Some browsers fire keypress events for backspace\n if (ch == \"\\x08\") { return }\n if (handleCharBinding(cm, e, ch)) { return }\n cm.display.input.onKeyPress(e);\n }\n\n var DOUBLECLICK_DELAY = 400;\n\n var PastClick = function(time, pos, button) {\n this.time = time;\n this.pos = pos;\n this.button = button;\n };\n\n PastClick.prototype.compare = function (time, pos, button) {\n return this.time + DOUBLECLICK_DELAY > time &&\n cmp(pos, this.pos) == 0 && button == this.button\n };\n\n var lastClick, lastDoubleClick;\n function clickRepeat(pos, button) {\n var now = +new Date;\n if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {\n lastClick = lastDoubleClick = null;\n return \"triple\"\n } else if (lastClick && lastClick.compare(now, pos, button)) {\n lastDoubleClick = new PastClick(now, pos, button);\n lastClick = null;\n return \"double\"\n } else {\n lastClick = new PastClick(now, pos, button);\n lastDoubleClick = null;\n return \"single\"\n }\n }\n\n // A mouse down can be a single click, double click, triple click,\n // start of selection drag, start of text drag, new cursor\n // (ctrl-click), rectangle drag (alt-drag), or xwin\n // middle-click-paste. Or it might be a click on something we should\n // not interfere with, such as a scrollbar or widget.\n function onMouseDown(e) {\n var cm = this, display = cm.display;\n if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }\n display.input.ensurePolled();\n display.shift = e.shiftKey;\n\n if (eventInWidget(display, e)) {\n if (!webkit) {\n // Briefly turn off draggability, to allow widgets to do\n // normal dragging things.\n display.scroller.draggable = false;\n setTimeout(function () { return display.scroller.draggable = true; }, 100);\n }\n return\n }\n if (clickInGutter(cm, e)) { return }\n var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : \"single\";\n win(cm).focus();\n\n // #3261: make sure, that we're not starting a second selection\n if (button == 1 && cm.state.selectingText)\n { cm.state.selectingText(e); }\n\n if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }\n\n if (button == 1) {\n if (pos) { leftButtonDown(cm, pos, repeat, e); }\n else if (e_target(e) == display.scroller) { e_preventDefault(e); }\n } else if (button == 2) {\n if (pos) { extendSelection(cm.doc, pos); }\n setTimeout(function () { return display.input.focus(); }, 20);\n } else if (button == 3) {\n if (captureRightClick) { cm.display.input.onContextMenu(e); }\n else { delayBlurEvent(cm); }\n }\n }\n\n function handleMappedButton(cm, button, pos, repeat, event) {\n var name = \"Click\";\n if (repeat == \"double\") { name = \"Double\" + name; }\n else if (repeat == \"triple\") { name = \"Triple\" + name; }\n name = (button == 1 ? \"Left\" : button == 2 ? \"Middle\" : \"Right\") + name;\n\n return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {\n if (typeof bound == \"string\") { bound = commands[bound]; }\n if (!bound) { return false }\n var done = false;\n try {\n if (cm.isReadOnly()) { cm.state.suppressEdits = true; }\n done = bound(cm, pos) != Pass;\n } finally {\n cm.state.suppressEdits = false;\n }\n return done\n })\n }\n\n function configureMouse(cm, repeat, event) {\n var option = cm.getOption(\"configureMouse\");\n var value = option ? option(cm, repeat, event) : {};\n if (value.unit == null) {\n var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;\n value.unit = rect ? \"rectangle\" : repeat == \"single\" ? \"char\" : repeat == \"double\" ? \"word\" : \"line\";\n }\n if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }\n if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }\n if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }\n return value\n }\n\n function leftButtonDown(cm, pos, repeat, event) {\n if (ie) { setTimeout(bind(ensureFocus, cm), 0); }\n else { cm.curOp.focus = activeElt(root(cm)); }\n\n var behavior = configureMouse(cm, repeat, event);\n\n var sel = cm.doc.sel, contained;\n if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&\n repeat == \"single\" && (contained = sel.contains(pos)) > -1 &&\n (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&\n (cmp(contained.to(), pos) > 0 || pos.xRel < 0))\n { leftButtonStartDrag(cm, event, pos, behavior); }\n else\n { leftButtonSelect(cm, event, pos, behavior); }\n }\n\n // Start a text drag. When it ends, see if any dragging actually\n // happen, and treat as a click if it didn't.\n function leftButtonStartDrag(cm, event, pos, behavior) {\n var display = cm.display, moved = false;\n var dragEnd = operation(cm, function (e) {\n if (webkit) { display.scroller.draggable = false; }\n cm.state.draggingText = false;\n if (cm.state.delayingBlurEvent) {\n if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; }\n else { delayBlurEvent(cm); }\n }\n off(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n off(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n off(display.scroller, \"dragstart\", dragStart);\n off(display.scroller, \"drop\", dragEnd);\n if (!moved) {\n e_preventDefault(e);\n if (!behavior.addNew)\n { extendSelection(cm.doc, pos, null, null, behavior.extend); }\n // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)\n if ((webkit && !safari) || ie && ie_version == 9)\n { setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); }\n else\n { display.input.focus(); }\n }\n });\n var mouseMove = function(e2) {\n moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;\n };\n var dragStart = function () { return moved = true; };\n // Let the drag handler handle this.\n if (webkit) { display.scroller.draggable = true; }\n cm.state.draggingText = dragEnd;\n dragEnd.copy = !behavior.moveOnDrag;\n on(display.wrapper.ownerDocument, \"mouseup\", dragEnd);\n on(display.wrapper.ownerDocument, \"mousemove\", mouseMove);\n on(display.scroller, \"dragstart\", dragStart);\n on(display.scroller, \"drop\", dragEnd);\n\n cm.state.delayingBlurEvent = true;\n setTimeout(function () { return display.input.focus(); }, 20);\n // IE's approach to draggable\n if (display.scroller.dragDrop) { display.scroller.dragDrop(); }\n }\n\n function rangeForUnit(cm, pos, unit) {\n if (unit == \"char\") { return new Range(pos, pos) }\n if (unit == \"word\") { return cm.findWordAt(pos) }\n if (unit == \"line\") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }\n var result = unit(cm, pos);\n return new Range(result.from, result.to)\n }\n\n // Normal selection, as opposed to text dragging.\n function leftButtonSelect(cm, event, start, behavior) {\n if (ie) { delayBlurEvent(cm); }\n var display = cm.display, doc = cm.doc;\n e_preventDefault(event);\n\n var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;\n if (behavior.addNew && !behavior.extend) {\n ourIndex = doc.sel.contains(start);\n if (ourIndex > -1)\n { ourRange = ranges[ourIndex]; }\n else\n { ourRange = new Range(start, start); }\n } else {\n ourRange = doc.sel.primary();\n ourIndex = doc.sel.primIndex;\n }\n\n if (behavior.unit == \"rectangle\") {\n if (!behavior.addNew) { ourRange = new Range(start, start); }\n start = posFromMouse(cm, event, true, true);\n ourIndex = -1;\n } else {\n var range = rangeForUnit(cm, start, behavior.unit);\n if (behavior.extend)\n { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); }\n else\n { ourRange = range; }\n }\n\n if (!behavior.addNew) {\n ourIndex = 0;\n setSelection(doc, new Selection([ourRange], 0), sel_mouse);\n startSel = doc.sel;\n } else if (ourIndex == -1) {\n ourIndex = ranges.length;\n setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),\n {scroll: false, origin: \"*mouse\"});\n } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == \"char\" && !behavior.extend) {\n setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),\n {scroll: false, origin: \"*mouse\"});\n startSel = doc.sel;\n } else {\n replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);\n }\n\n var lastPos = start;\n function extendTo(pos) {\n if (cmp(lastPos, pos) == 0) { return }\n lastPos = pos;\n\n if (behavior.unit == \"rectangle\") {\n var ranges = [], tabSize = cm.options.tabSize;\n var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);\n var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);\n var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);\n for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));\n line <= end; line++) {\n var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);\n if (left == right)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }\n else if (text.length > leftPos)\n { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }\n }\n if (!ranges.length) { ranges.push(new Range(start, start)); }\n setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),\n {origin: \"*mouse\", scroll: false});\n cm.scrollIntoView(pos);\n } else {\n var oldRange = ourRange;\n var range = rangeForUnit(cm, pos, behavior.unit);\n var anchor = oldRange.anchor, head;\n if (cmp(range.anchor, anchor) > 0) {\n head = range.head;\n anchor = minPos(oldRange.from(), range.anchor);\n } else {\n head = range.anchor;\n anchor = maxPos(oldRange.to(), range.head);\n }\n var ranges$1 = startSel.ranges.slice(0);\n ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));\n setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);\n }\n }\n\n var editorSize = display.wrapper.getBoundingClientRect();\n // Used to ensure timeout re-tries don't fire when another extend\n // happened in the meantime (clearTimeout isn't reliable -- at\n // least on Chrome, the timeouts still happen even when cleared,\n // if the clear happens after their scheduled firing time).\n var counter = 0;\n\n function extend(e) {\n var curCount = ++counter;\n var cur = posFromMouse(cm, e, true, behavior.unit == \"rectangle\");\n if (!cur) { return }\n if (cmp(cur, lastPos) != 0) {\n cm.curOp.focus = activeElt(root(cm));\n extendTo(cur);\n var visible = visibleLines(display, doc);\n if (cur.line >= visible.to || cur.line < visible.from)\n { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }\n } else {\n var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;\n if (outside) { setTimeout(operation(cm, function () {\n if (counter != curCount) { return }\n display.scroller.scrollTop += outside;\n extend(e);\n }), 50); }\n }\n }\n\n function done(e) {\n cm.state.selectingText = false;\n counter = Infinity;\n // If e is null or undefined we interpret this as someone trying\n // to explicitly cancel the selection rather than the user\n // letting go of the mouse button.\n if (e) {\n e_preventDefault(e);\n display.input.focus();\n }\n off(display.wrapper.ownerDocument, \"mousemove\", move);\n off(display.wrapper.ownerDocument, \"mouseup\", up);\n doc.history.lastSelOrigin = null;\n }\n\n var move = operation(cm, function (e) {\n if (e.buttons === 0 || !e_button(e)) { done(e); }\n else { extend(e); }\n });\n var up = operation(cm, done);\n cm.state.selectingText = up;\n on(display.wrapper.ownerDocument, \"mousemove\", move);\n on(display.wrapper.ownerDocument, \"mouseup\", up);\n }\n\n // Used when mouse-selecting to adjust the anchor to the proper side\n // of a bidi jump depending on the visual position of the head.\n function bidiSimplify(cm, range) {\n var anchor = range.anchor;\n var head = range.head;\n var anchorLine = getLine(cm.doc, anchor.line);\n if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range }\n var order = getOrder(anchorLine);\n if (!order) { return range }\n var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];\n if (part.from != anchor.ch && part.to != anchor.ch) { return range }\n var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);\n if (boundary == 0 || boundary == order.length) { return range }\n\n // Compute the relative visual position of the head compared to the\n // anchor (<0 is to the left, >0 to the right)\n var leftSide;\n if (head.line != anchor.line) {\n leftSide = (head.line - anchor.line) * (cm.doc.direction == \"ltr\" ? 1 : -1) > 0;\n } else {\n var headIndex = getBidiPartAt(order, head.ch, head.sticky);\n var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);\n if (headIndex == boundary - 1 || headIndex == boundary)\n { leftSide = dir < 0; }\n else\n { leftSide = dir > 0; }\n }\n\n var usePart = order[boundary + (leftSide ? -1 : 0)];\n var from = leftSide == (usePart.level == 1);\n var ch = from ? usePart.from : usePart.to, sticky = from ? \"after\" : \"before\";\n return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head)\n }\n\n\n // Determines whether an event happened in the gutter, and fires the\n // handlers for the corresponding event.\n function gutterEvent(cm, e, type, prevent) {\n var mX, mY;\n if (e.touches) {\n mX = e.touches[0].clientX;\n mY = e.touches[0].clientY;\n } else {\n try { mX = e.clientX; mY = e.clientY; }\n catch(e$1) { return false }\n }\n if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }\n if (prevent) { e_preventDefault(e); }\n\n var display = cm.display;\n var lineBox = display.lineDiv.getBoundingClientRect();\n\n if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }\n mY -= lineBox.top - display.viewOffset;\n\n for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {\n var g = display.gutters.childNodes[i];\n if (g && g.getBoundingClientRect().right >= mX) {\n var line = lineAtHeight(cm.doc, mY);\n var gutter = cm.display.gutterSpecs[i];\n signal(cm, type, cm, line, gutter.className, e);\n return e_defaultPrevented(e)\n }\n }\n }\n\n function clickInGutter(cm, e) {\n return gutterEvent(cm, e, \"gutterClick\", true)\n }\n\n // CONTEXT MENU HANDLING\n\n // To make the context menu work, we need to briefly unhide the\n // textarea (making it as unobtrusive as possible) to let the\n // right-click take effect on it.\n function onContextMenu(cm, e) {\n if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }\n if (signalDOMEvent(cm, e, \"contextmenu\")) { return }\n if (!captureRightClick) { cm.display.input.onContextMenu(e); }\n }\n\n function contextMenuInGutter(cm, e) {\n if (!hasHandler(cm, \"gutterContextMenu\")) { return false }\n return gutterEvent(cm, e, \"gutterContextMenu\", false)\n }\n\n function themeChanged(cm) {\n cm.display.wrapper.className = cm.display.wrapper.className.replace(/\\s*cm-s-\\S+/g, \"\") +\n cm.options.theme.replace(/(^|\\s)\\s*/g, \" cm-s-\");\n clearCaches(cm);\n }\n\n var Init = {toString: function(){return \"CodeMirror.Init\"}};\n\n var defaults = {};\n var optionHandlers = {};\n\n function defineOptions(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n function option(name, deflt, handle, notOnInit) {\n CodeMirror.defaults[name] = deflt;\n if (handle) { optionHandlers[name] =\n notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }\n }\n\n CodeMirror.defineOption = option;\n\n // Passed to option handlers when there is no old value.\n CodeMirror.Init = Init;\n\n // These two are, on init, called from the constructor because they\n // have to be initialized before the editor can start at all.\n option(\"value\", \"\", function (cm, val) { return cm.setValue(val); }, true);\n option(\"mode\", null, function (cm, val) {\n cm.doc.modeOption = val;\n loadMode(cm);\n }, true);\n\n option(\"indentUnit\", 2, loadMode, true);\n option(\"indentWithTabs\", false);\n option(\"smartIndent\", true);\n option(\"tabSize\", 4, function (cm) {\n resetModeState(cm);\n clearCaches(cm);\n regChange(cm);\n }, true);\n\n option(\"lineSeparator\", null, function (cm, val) {\n cm.doc.lineSep = val;\n if (!val) { return }\n var newBreaks = [], lineNo = cm.doc.first;\n cm.doc.iter(function (line) {\n for (var pos = 0;;) {\n var found = line.text.indexOf(val, pos);\n if (found == -1) { break }\n pos = found + val.length;\n newBreaks.push(Pos(lineNo, found));\n }\n lineNo++;\n });\n for (var i = newBreaks.length - 1; i >= 0; i--)\n { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }\n });\n option(\"specialChars\", /[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u061c\\u200b\\u200e\\u200f\\u2028\\u2029\\u202d\\u202e\\u2066\\u2067\\u2069\\ufeff\\ufff9-\\ufffc]/g, function (cm, val, old) {\n cm.state.specialChars = new RegExp(val.source + (val.test(\"\\t\") ? \"\" : \"|\\t\"), \"g\");\n if (old != Init) { cm.refresh(); }\n });\n option(\"specialCharPlaceholder\", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);\n option(\"electricChars\", true);\n option(\"inputStyle\", mobile ? \"contenteditable\" : \"textarea\", function () {\n throw new Error(\"inputStyle can not (yet) be changed in a running editor\") // FIXME\n }, true);\n option(\"spellcheck\", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);\n option(\"autocorrect\", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);\n option(\"autocapitalize\", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);\n option(\"rtlMoveVisually\", !windows);\n option(\"wholeLineUpdateBefore\", true);\n\n option(\"theme\", \"default\", function (cm) {\n themeChanged(cm);\n updateGutters(cm);\n }, true);\n option(\"keyMap\", \"default\", function (cm, val, old) {\n var next = getKeyMap(val);\n var prev = old != Init && getKeyMap(old);\n if (prev && prev.detach) { prev.detach(cm, next); }\n if (next.attach) { next.attach(cm, prev || null); }\n });\n option(\"extraKeys\", null);\n option(\"configureMouse\", null);\n\n option(\"lineWrapping\", false, wrappingChanged, true);\n option(\"gutters\", [], function (cm, val) {\n cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);\n updateGutters(cm);\n }, true);\n option(\"fixedGutter\", true, function (cm, val) {\n cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + \"px\" : \"0\";\n cm.refresh();\n }, true);\n option(\"coverGutterNextToScrollbar\", false, function (cm) { return updateScrollbars(cm); }, true);\n option(\"scrollbarStyle\", \"native\", function (cm) {\n initScrollbars(cm);\n updateScrollbars(cm);\n cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);\n cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);\n }, true);\n option(\"lineNumbers\", false, function (cm, val) {\n cm.display.gutterSpecs = getGutters(cm.options.gutters, val);\n updateGutters(cm);\n }, true);\n option(\"firstLineNumber\", 1, updateGutters, true);\n option(\"lineNumberFormatter\", function (integer) { return integer; }, updateGutters, true);\n option(\"showCursorWhenSelecting\", false, updateSelection, true);\n\n option(\"resetSelectionOnContextMenu\", true);\n option(\"lineWiseCopyCut\", true);\n option(\"pasteLinesPerSelection\", true);\n option(\"selectionsMayTouch\", false);\n\n option(\"readOnly\", false, function (cm, val) {\n if (val == \"nocursor\") {\n onBlur(cm);\n cm.display.input.blur();\n }\n cm.display.input.readOnlyChanged(val);\n });\n\n option(\"screenReaderLabel\", null, function (cm, val) {\n val = (val === '') ? null : val;\n cm.display.input.screenReaderLabelChanged(val);\n });\n\n option(\"disableInput\", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);\n option(\"dragDrop\", true, dragDropChanged);\n option(\"allowDropFileTypes\", null);\n\n option(\"cursorBlinkRate\", 530);\n option(\"cursorScrollMargin\", 0);\n option(\"cursorHeight\", 1, updateSelection, true);\n option(\"singleCursorHeightPerLine\", true, updateSelection, true);\n option(\"workTime\", 100);\n option(\"workDelay\", 100);\n option(\"flattenSpans\", true, resetModeState, true);\n option(\"addModeClass\", false, resetModeState, true);\n option(\"pollInterval\", 100);\n option(\"undoDepth\", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });\n option(\"historyEventDelay\", 1250);\n option(\"viewportMargin\", 10, function (cm) { return cm.refresh(); }, true);\n option(\"maxHighlightLength\", 10000, resetModeState, true);\n option(\"moveInputWithCursor\", true, function (cm, val) {\n if (!val) { cm.display.input.resetPosition(); }\n });\n\n option(\"tabindex\", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || \"\"; });\n option(\"autofocus\", null);\n option(\"direction\", \"ltr\", function (cm, val) { return cm.doc.setDirection(val); }, true);\n option(\"phrases\", null);\n }\n\n function dragDropChanged(cm, value, old) {\n var wasOn = old && old != Init;\n if (!value != !wasOn) {\n var funcs = cm.display.dragFunctions;\n var toggle = value ? on : off;\n toggle(cm.display.scroller, \"dragstart\", funcs.start);\n toggle(cm.display.scroller, \"dragenter\", funcs.enter);\n toggle(cm.display.scroller, \"dragover\", funcs.over);\n toggle(cm.display.scroller, \"dragleave\", funcs.leave);\n toggle(cm.display.scroller, \"drop\", funcs.drop);\n }\n }\n\n function wrappingChanged(cm) {\n if (cm.options.lineWrapping) {\n addClass(cm.display.wrapper, \"CodeMirror-wrap\");\n cm.display.sizer.style.minWidth = \"\";\n cm.display.sizerWidth = null;\n } else {\n rmClass(cm.display.wrapper, \"CodeMirror-wrap\");\n findMaxLine(cm);\n }\n estimateLineHeights(cm);\n regChange(cm);\n clearCaches(cm);\n setTimeout(function () { return updateScrollbars(cm); }, 100);\n }\n\n // A CodeMirror instance represents an editor. This is the object\n // that user code is usually dealing with.\n\n function CodeMirror(place, options) {\n var this$1 = this;\n\n if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }\n\n this.options = options = options ? copyObj(options) : {};\n // Determine effective options based on given values and defaults.\n copyObj(defaults, options, false);\n\n var doc = options.value;\n if (typeof doc == \"string\") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }\n else if (options.mode) { doc.modeOption = options.mode; }\n this.doc = doc;\n\n var input = new CodeMirror.inputStyles[options.inputStyle](this);\n var display = this.display = new Display(place, doc, input, options);\n display.wrapper.CodeMirror = this;\n themeChanged(this);\n if (options.lineWrapping)\n { this.display.wrapper.className += \" CodeMirror-wrap\"; }\n initScrollbars(this);\n\n this.state = {\n keyMaps: [], // stores maps added by addKeyMap\n overlays: [], // highlighting overlays, as added by addOverlay\n modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info\n overwrite: false,\n delayingBlurEvent: false,\n focused: false,\n suppressEdits: false, // used to disable editing during key handlers when in readOnly mode\n pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll\n selectingText: false,\n draggingText: false,\n highlight: new Delayed(), // stores highlight worker timeout\n keySeq: null, // Unfinished key sequence\n specialChars: null\n };\n\n if (options.autofocus && !mobile) { display.input.focus(); }\n\n // Override magic textarea content restore that IE sometimes does\n // on our hidden textarea on reload\n if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }\n\n registerEventHandlers(this);\n ensureGlobalHandlers();\n\n startOperation(this);\n this.curOp.forceUpdate = true;\n attachDoc(this, doc);\n\n if ((options.autofocus && !mobile) || this.hasFocus())\n { setTimeout(function () {\n if (this$1.hasFocus() && !this$1.state.focused) { onFocus(this$1); }\n }, 20); }\n else\n { onBlur(this); }\n\n for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))\n { optionHandlers[opt](this, options[opt], Init); } }\n maybeUpdateLineNumberWidth(this);\n if (options.finishInit) { options.finishInit(this); }\n for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); }\n endOperation(this);\n // Suppress optimizelegibility in Webkit, since it breaks text\n // measuring on line wrapping boundaries.\n if (webkit && options.lineWrapping &&\n getComputedStyle(display.lineDiv).textRendering == \"optimizelegibility\")\n { display.lineDiv.style.textRendering = \"auto\"; }\n }\n\n // The default configuration options.\n CodeMirror.defaults = defaults;\n // Functions to run when options are changed.\n CodeMirror.optionHandlers = optionHandlers;\n\n // Attach the necessary event handlers when initializing the editor\n function registerEventHandlers(cm) {\n var d = cm.display;\n on(d.scroller, \"mousedown\", operation(cm, onMouseDown));\n // Older IE's will not fire a second mousedown for a double click\n if (ie && ie_version < 11)\n { on(d.scroller, \"dblclick\", operation(cm, function (e) {\n if (signalDOMEvent(cm, e)) { return }\n var pos = posFromMouse(cm, e);\n if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }\n e_preventDefault(e);\n var word = cm.findWordAt(pos);\n extendSelection(cm.doc, word.anchor, word.head);\n })); }\n else\n { on(d.scroller, \"dblclick\", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }\n // Some browsers fire contextmenu *after* opening the menu, at\n // which point we can't mess with it anymore. Context menu is\n // handled in onMouseDown for these browsers.\n on(d.scroller, \"contextmenu\", function (e) { return onContextMenu(cm, e); });\n on(d.input.getField(), \"contextmenu\", function (e) {\n if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); }\n });\n\n // Used to suppress mouse event handling when a touch happens\n var touchFinished, prevTouch = {end: 0};\n function finishTouch() {\n if (d.activeTouch) {\n touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);\n prevTouch = d.activeTouch;\n prevTouch.end = +new Date;\n }\n }\n function isMouseLikeTouchEvent(e) {\n if (e.touches.length != 1) { return false }\n var touch = e.touches[0];\n return touch.radiusX <= 1 && touch.radiusY <= 1\n }\n function farAway(touch, other) {\n if (other.left == null) { return true }\n var dx = other.left - touch.left, dy = other.top - touch.top;\n return dx * dx + dy * dy > 20 * 20\n }\n on(d.scroller, \"touchstart\", function (e) {\n if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {\n d.input.ensurePolled();\n clearTimeout(touchFinished);\n var now = +new Date;\n d.activeTouch = {start: now, moved: false,\n prev: now - prevTouch.end <= 300 ? prevTouch : null};\n if (e.touches.length == 1) {\n d.activeTouch.left = e.touches[0].pageX;\n d.activeTouch.top = e.touches[0].pageY;\n }\n }\n });\n on(d.scroller, \"touchmove\", function () {\n if (d.activeTouch) { d.activeTouch.moved = true; }\n });\n on(d.scroller, \"touchend\", function (e) {\n var touch = d.activeTouch;\n if (touch && !eventInWidget(d, e) && touch.left != null &&\n !touch.moved && new Date - touch.start < 300) {\n var pos = cm.coordsChar(d.activeTouch, \"page\"), range;\n if (!touch.prev || farAway(touch, touch.prev)) // Single tap\n { range = new Range(pos, pos); }\n else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap\n { range = cm.findWordAt(pos); }\n else // Triple tap\n { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }\n cm.setSelection(range.anchor, range.head);\n cm.focus();\n e_preventDefault(e);\n }\n finishTouch();\n });\n on(d.scroller, \"touchcancel\", finishTouch);\n\n // Sync scrolling between fake scrollbars and real scrollable\n // area, ensure viewport is updated when scrolling.\n on(d.scroller, \"scroll\", function () {\n if (d.scroller.clientHeight) {\n updateScrollTop(cm, d.scroller.scrollTop);\n setScrollLeft(cm, d.scroller.scrollLeft, true);\n signal(cm, \"scroll\", cm);\n }\n });\n\n // Listen to wheel events in order to try and update the viewport on time.\n on(d.scroller, \"mousewheel\", function (e) { return onScrollWheel(cm, e); });\n on(d.scroller, \"DOMMouseScroll\", function (e) { return onScrollWheel(cm, e); });\n\n // Prevent wrapper from ever scrolling\n on(d.wrapper, \"scroll\", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });\n\n d.dragFunctions = {\n enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},\n over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},\n start: function (e) { return onDragStart(cm, e); },\n drop: operation(cm, onDrop),\n leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}\n };\n\n var inp = d.input.getField();\n on(inp, \"keyup\", function (e) { return onKeyUp.call(cm, e); });\n on(inp, \"keydown\", operation(cm, onKeyDown));\n on(inp, \"keypress\", operation(cm, onKeyPress));\n on(inp, \"focus\", function (e) { return onFocus(cm, e); });\n on(inp, \"blur\", function (e) { return onBlur(cm, e); });\n }\n\n var initHooks = [];\n CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };\n\n // Indent the given line. The how parameter can be \"smart\",\n // \"add\"/null, \"subtract\", or \"prev\". When aggressive is false\n // (typically set to true for forced single-line indents), empty\n // lines are not indented, and places where the mode returns Pass\n // are left alone.\n function indentLine(cm, n, how, aggressive) {\n var doc = cm.doc, state;\n if (how == null) { how = \"add\"; }\n if (how == \"smart\") {\n // Fall back to \"prev\" when the mode doesn't have an indentation\n // method.\n if (!doc.mode.indent) { how = \"prev\"; }\n else { state = getContextBefore(cm, n).state; }\n }\n\n var tabSize = cm.options.tabSize;\n var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);\n if (line.stateAfter) { line.stateAfter = null; }\n var curSpaceString = line.text.match(/^\\s*/)[0], indentation;\n if (!aggressive && !/\\S/.test(line.text)) {\n indentation = 0;\n how = \"not\";\n } else if (how == \"smart\") {\n indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);\n if (indentation == Pass || indentation > 150) {\n if (!aggressive) { return }\n how = \"prev\";\n }\n }\n if (how == \"prev\") {\n if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }\n else { indentation = 0; }\n } else if (how == \"add\") {\n indentation = curSpace + cm.options.indentUnit;\n } else if (how == \"subtract\") {\n indentation = curSpace - cm.options.indentUnit;\n } else if (typeof how == \"number\") {\n indentation = curSpace + how;\n }\n indentation = Math.max(0, indentation);\n\n var indentString = \"\", pos = 0;\n if (cm.options.indentWithTabs)\n { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += \"\\t\";} }\n if (pos < indentation) { indentString += spaceStr(indentation - pos); }\n\n if (indentString != curSpaceString) {\n replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), \"+input\");\n line.stateAfter = null;\n return true\n } else {\n // Ensure that, if the cursor was in the whitespace at the start\n // of the line, it is moved to the end of that space.\n for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {\n var range = doc.sel.ranges[i$1];\n if (range.head.line == n && range.head.ch < curSpaceString.length) {\n var pos$1 = Pos(n, curSpaceString.length);\n replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));\n break\n }\n }\n }\n }\n\n // This will be set to a {lineWise: bool, text: [string]} object, so\n // that, when pasting, we know what kind of selections the copied\n // text was made out of.\n var lastCopied = null;\n\n function setLastCopied(newLastCopied) {\n lastCopied = newLastCopied;\n }\n\n function applyTextInput(cm, inserted, deleted, sel, origin) {\n var doc = cm.doc;\n cm.display.shift = false;\n if (!sel) { sel = doc.sel; }\n\n var recent = +new Date - 200;\n var paste = origin == \"paste\" || cm.state.pasteIncoming > recent;\n var textLines = splitLinesAuto(inserted), multiPaste = null;\n // When pasting N lines into N selections, insert one line per selection\n if (paste && sel.ranges.length > 1) {\n if (lastCopied && lastCopied.text.join(\"\\n\") == inserted) {\n if (sel.ranges.length % lastCopied.text.length == 0) {\n multiPaste = [];\n for (var i = 0; i < lastCopied.text.length; i++)\n { multiPaste.push(doc.splitLines(lastCopied.text[i])); }\n }\n } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {\n multiPaste = map(textLines, function (l) { return [l]; });\n }\n }\n\n var updateInput = cm.curOp.updateInput;\n // Normal behavior is to insert the new text into every selection\n for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {\n var range = sel.ranges[i$1];\n var from = range.from(), to = range.to();\n if (range.empty()) {\n if (deleted && deleted > 0) // Handle deletion\n { from = Pos(from.line, from.ch - deleted); }\n else if (cm.state.overwrite && !paste) // Handle overwrite\n { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }\n else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join(\"\\n\") == textLines.join(\"\\n\"))\n { from = to = Pos(from.line, 0); }\n }\n var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,\n origin: origin || (paste ? \"paste\" : cm.state.cutIncoming > recent ? \"cut\" : \"+input\")};\n makeChange(cm.doc, changeEvent);\n signalLater(cm, \"inputRead\", cm, changeEvent);\n }\n if (inserted && !paste)\n { triggerElectric(cm, inserted); }\n\n ensureCursorVisible(cm);\n if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }\n cm.curOp.typing = true;\n cm.state.pasteIncoming = cm.state.cutIncoming = -1;\n }\n\n function handlePaste(e, cm) {\n var pasted = e.clipboardData && e.clipboardData.getData(\"Text\");\n if (pasted) {\n e.preventDefault();\n if (!cm.isReadOnly() && !cm.options.disableInput && cm.hasFocus())\n { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, \"paste\"); }); }\n return true\n }\n }\n\n function triggerElectric(cm, inserted) {\n // When an 'electric' character is inserted, immediately trigger a reindent\n if (!cm.options.electricChars || !cm.options.smartIndent) { return }\n var sel = cm.doc.sel;\n\n for (var i = sel.ranges.length - 1; i >= 0; i--) {\n var range = sel.ranges[i];\n if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue }\n var mode = cm.getModeAt(range.head);\n var indented = false;\n if (mode.electricChars) {\n for (var j = 0; j < mode.electricChars.length; j++)\n { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {\n indented = indentLine(cm, range.head.line, \"smart\");\n break\n } }\n } else if (mode.electricInput) {\n if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch)))\n { indented = indentLine(cm, range.head.line, \"smart\"); }\n }\n if (indented) { signalLater(cm, \"electricInput\", cm, range.head.line); }\n }\n }\n\n function copyableRanges(cm) {\n var text = [], ranges = [];\n for (var i = 0; i < cm.doc.sel.ranges.length; i++) {\n var line = cm.doc.sel.ranges[i].head.line;\n var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};\n ranges.push(lineRange);\n text.push(cm.getRange(lineRange.anchor, lineRange.head));\n }\n return {text: text, ranges: ranges}\n }\n\n function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {\n field.setAttribute(\"autocorrect\", autocorrect ? \"on\" : \"off\");\n field.setAttribute(\"autocapitalize\", autocapitalize ? \"on\" : \"off\");\n field.setAttribute(\"spellcheck\", !!spellcheck);\n }\n\n function hiddenTextarea() {\n var te = elt(\"textarea\", null, null, \"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none\");\n var div = elt(\"div\", [te], null, \"overflow: hidden; position: relative; width: 3px; height: 0px;\");\n // The textarea is kept positioned near the cursor to prevent the\n // fact that it'll be scrolled into view on input from scrolling\n // our fake cursor out of view. On webkit, when wrap=off, paste is\n // very slow. So make the area wide instead.\n if (webkit) { te.style.width = \"1000px\"; }\n else { te.setAttribute(\"wrap\", \"off\"); }\n // If border: 0; -- iOS fails to open keyboard (issue #1287)\n if (ios) { te.style.border = \"1px solid black\"; }\n return div\n }\n\n // The publicly visible API. Note that methodOp(f) means\n // 'wrap f in an operation, performed on its `this` parameter'.\n\n // This is not the complete set of editor methods. Most of the\n // methods defined on the Doc type are also injected into\n // CodeMirror.prototype, for backwards compatibility and\n // convenience.\n\n function addEditorMethods(CodeMirror) {\n var optionHandlers = CodeMirror.optionHandlers;\n\n var helpers = CodeMirror.helpers = {};\n\n CodeMirror.prototype = {\n constructor: CodeMirror,\n focus: function(){win(this).focus(); this.display.input.focus();},\n\n setOption: function(option, value) {\n var options = this.options, old = options[option];\n if (options[option] == value && option != \"mode\") { return }\n options[option] = value;\n if (optionHandlers.hasOwnProperty(option))\n { operation(this, optionHandlers[option])(this, value, old); }\n signal(this, \"optionChange\", this, option);\n },\n\n getOption: function(option) {return this.options[option]},\n getDoc: function() {return this.doc},\n\n addKeyMap: function(map, bottom) {\n this.state.keyMaps[bottom ? \"push\" : \"unshift\"](getKeyMap(map));\n },\n removeKeyMap: function(map) {\n var maps = this.state.keyMaps;\n for (var i = 0; i < maps.length; ++i)\n { if (maps[i] == map || maps[i].name == map) {\n maps.splice(i, 1);\n return true\n } }\n },\n\n addOverlay: methodOp(function(spec, options) {\n var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);\n if (mode.startState) { throw new Error(\"Overlays may not be stateful.\") }\n insertSorted(this.state.overlays,\n {mode: mode, modeSpec: spec, opaque: options && options.opaque,\n priority: (options && options.priority) || 0},\n function (overlay) { return overlay.priority; });\n this.state.modeGen++;\n regChange(this);\n }),\n removeOverlay: methodOp(function(spec) {\n var overlays = this.state.overlays;\n for (var i = 0; i < overlays.length; ++i) {\n var cur = overlays[i].modeSpec;\n if (cur == spec || typeof spec == \"string\" && cur.name == spec) {\n overlays.splice(i, 1);\n this.state.modeGen++;\n regChange(this);\n return\n }\n }\n }),\n\n indentLine: methodOp(function(n, dir, aggressive) {\n if (typeof dir != \"string\" && typeof dir != \"number\") {\n if (dir == null) { dir = this.options.smartIndent ? \"smart\" : \"prev\"; }\n else { dir = dir ? \"add\" : \"subtract\"; }\n }\n if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }\n }),\n indentSelection: methodOp(function(how) {\n var ranges = this.doc.sel.ranges, end = -1;\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i];\n if (!range.empty()) {\n var from = range.from(), to = range.to();\n var start = Math.max(end, from.line);\n end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;\n for (var j = start; j < end; ++j)\n { indentLine(this, j, how); }\n var newRanges = this.doc.sel.ranges;\n if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)\n { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }\n } else if (range.head.line > end) {\n indentLine(this, range.head.line, how, true);\n end = range.head.line;\n if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); }\n }\n }\n }),\n\n // Fetch the parser token for a given character. Useful for hacks\n // that want to inspect the mode state (say, for completion).\n getTokenAt: function(pos, precise) {\n return takeToken(this, pos, precise)\n },\n\n getLineTokens: function(line, precise) {\n return takeToken(this, Pos(line), precise, true)\n },\n\n getTokenTypeAt: function(pos) {\n pos = clipPos(this.doc, pos);\n var styles = getLineStyles(this, getLine(this.doc, pos.line));\n var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;\n var type;\n if (ch == 0) { type = styles[2]; }\n else { for (;;) {\n var mid = (before + after) >> 1;\n if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }\n else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }\n else { type = styles[mid * 2 + 2]; break }\n } }\n var cut = type ? type.indexOf(\"overlay \") : -1;\n return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)\n },\n\n getModeAt: function(pos) {\n var mode = this.doc.mode;\n if (!mode.innerMode) { return mode }\n return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode\n },\n\n getHelper: function(pos, type) {\n return this.getHelpers(pos, type)[0]\n },\n\n getHelpers: function(pos, type) {\n var found = [];\n if (!helpers.hasOwnProperty(type)) { return found }\n var help = helpers[type], mode = this.getModeAt(pos);\n if (typeof mode[type] == \"string\") {\n if (help[mode[type]]) { found.push(help[mode[type]]); }\n } else if (mode[type]) {\n for (var i = 0; i < mode[type].length; i++) {\n var val = help[mode[type][i]];\n if (val) { found.push(val); }\n }\n } else if (mode.helperType && help[mode.helperType]) {\n found.push(help[mode.helperType]);\n } else if (help[mode.name]) {\n found.push(help[mode.name]);\n }\n for (var i$1 = 0; i$1 < help._global.length; i$1++) {\n var cur = help._global[i$1];\n if (cur.pred(mode, this) && indexOf(found, cur.val) == -1)\n { found.push(cur.val); }\n }\n return found\n },\n\n getStateAfter: function(line, precise) {\n var doc = this.doc;\n line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);\n return getContextBefore(this, line + 1, precise).state\n },\n\n cursorCoords: function(start, mode) {\n var pos, range = this.doc.sel.primary();\n if (start == null) { pos = range.head; }\n else if (typeof start == \"object\") { pos = clipPos(this.doc, start); }\n else { pos = start ? range.from() : range.to(); }\n return cursorCoords(this, pos, mode || \"page\")\n },\n\n charCoords: function(pos, mode) {\n return charCoords(this, clipPos(this.doc, pos), mode || \"page\")\n },\n\n coordsChar: function(coords, mode) {\n coords = fromCoordSystem(this, coords, mode || \"page\");\n return coordsChar(this, coords.left, coords.top)\n },\n\n lineAtHeight: function(height, mode) {\n height = fromCoordSystem(this, {top: height, left: 0}, mode || \"page\").top;\n return lineAtHeight(this.doc, height + this.display.viewOffset)\n },\n heightAtLine: function(line, mode, includeWidgets) {\n var end = false, lineObj;\n if (typeof line == \"number\") {\n var last = this.doc.first + this.doc.size - 1;\n if (line < this.doc.first) { line = this.doc.first; }\n else if (line > last) { line = last; end = true; }\n lineObj = getLine(this.doc, line);\n } else {\n lineObj = line;\n }\n return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || \"page\", includeWidgets || end).top +\n (end ? this.doc.height - heightAtLine(lineObj) : 0)\n },\n\n defaultTextHeight: function() { return textHeight(this.display) },\n defaultCharWidth: function() { return charWidth(this.display) },\n\n getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},\n\n addWidget: function(pos, node, scroll, vert, horiz) {\n var display = this.display;\n pos = cursorCoords(this, clipPos(this.doc, pos));\n var top = pos.bottom, left = pos.left;\n node.style.position = \"absolute\";\n node.setAttribute(\"cm-ignore-events\", \"true\");\n this.display.input.setUneditable(node);\n display.sizer.appendChild(node);\n if (vert == \"over\") {\n top = pos.top;\n } else if (vert == \"above\" || vert == \"near\") {\n var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),\n hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);\n // Default to positioning above (if specified and possible); otherwise default to positioning below\n if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)\n { top = pos.top - node.offsetHeight; }\n else if (pos.bottom + node.offsetHeight <= vspace)\n { top = pos.bottom; }\n if (left + node.offsetWidth > hspace)\n { left = hspace - node.offsetWidth; }\n }\n node.style.top = top + \"px\";\n node.style.left = node.style.right = \"\";\n if (horiz == \"right\") {\n left = display.sizer.clientWidth - node.offsetWidth;\n node.style.right = \"0px\";\n } else {\n if (horiz == \"left\") { left = 0; }\n else if (horiz == \"middle\") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }\n node.style.left = left + \"px\";\n }\n if (scroll)\n { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }\n },\n\n triggerOnKeyDown: methodOp(onKeyDown),\n triggerOnKeyPress: methodOp(onKeyPress),\n triggerOnKeyUp: onKeyUp,\n triggerOnMouseDown: methodOp(onMouseDown),\n\n execCommand: function(cmd) {\n if (commands.hasOwnProperty(cmd))\n { return commands[cmd].call(null, this) }\n },\n\n triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),\n\n findPosH: function(from, amount, unit, visually) {\n var dir = 1;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n cur = findPosH(this.doc, cur, dir, unit, visually);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveH: methodOp(function(dir, unit) {\n var this$1 = this;\n\n this.extendSelectionsBy(function (range) {\n if (this$1.display.shift || this$1.doc.extend || range.empty())\n { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) }\n else\n { return dir < 0 ? range.from() : range.to() }\n }, sel_move);\n }),\n\n deleteH: methodOp(function(dir, unit) {\n var sel = this.doc.sel, doc = this.doc;\n if (sel.somethingSelected())\n { doc.replaceSelection(\"\", null, \"+delete\"); }\n else\n { deleteNearSelection(this, function (range) {\n var other = findPosH(doc, range.head, dir, unit, false);\n return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other}\n }); }\n }),\n\n findPosV: function(from, amount, unit, goalColumn) {\n var dir = 1, x = goalColumn;\n if (amount < 0) { dir = -1; amount = -amount; }\n var cur = clipPos(this.doc, from);\n for (var i = 0; i < amount; ++i) {\n var coords = cursorCoords(this, cur, \"div\");\n if (x == null) { x = coords.left; }\n else { coords.left = x; }\n cur = findPosV(this, coords, dir, unit);\n if (cur.hitSide) { break }\n }\n return cur\n },\n\n moveV: methodOp(function(dir, unit) {\n var this$1 = this;\n\n var doc = this.doc, goals = [];\n var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();\n doc.extendSelectionsBy(function (range) {\n if (collapse)\n { return dir < 0 ? range.from() : range.to() }\n var headPos = cursorCoords(this$1, range.head, \"div\");\n if (range.goalColumn != null) { headPos.left = range.goalColumn; }\n goals.push(headPos.left);\n var pos = findPosV(this$1, headPos, dir, unit);\n if (unit == \"page\" && range == doc.sel.primary())\n { addToScrollTop(this$1, charCoords(this$1, pos, \"div\").top - headPos.top); }\n return pos\n }, sel_move);\n if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)\n { doc.sel.ranges[i].goalColumn = goals[i]; } }\n }),\n\n // Find the word at the given position (as returned by coordsChar).\n findWordAt: function(pos) {\n var doc = this.doc, line = getLine(doc, pos.line).text;\n var start = pos.ch, end = pos.ch;\n if (line) {\n var helper = this.getHelper(pos, \"wordChars\");\n if ((pos.sticky == \"before\" || end == line.length) && start) { --start; } else { ++end; }\n var startChar = line.charAt(start);\n var check = isWordChar(startChar, helper)\n ? function (ch) { return isWordChar(ch, helper); }\n : /\\s/.test(startChar) ? function (ch) { return /\\s/.test(ch); }\n : function (ch) { return (!/\\s/.test(ch) && !isWordChar(ch)); };\n while (start > 0 && check(line.charAt(start - 1))) { --start; }\n while (end < line.length && check(line.charAt(end))) { ++end; }\n }\n return new Range(Pos(pos.line, start), Pos(pos.line, end))\n },\n\n toggleOverwrite: function(value) {\n if (value != null && value == this.state.overwrite) { return }\n if (this.state.overwrite = !this.state.overwrite)\n { addClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n else\n { rmClass(this.display.cursorDiv, \"CodeMirror-overwrite\"); }\n\n signal(this, \"overwriteToggle\", this, this.state.overwrite);\n },\n hasFocus: function() { return this.display.input.getField() == activeElt(root(this)) },\n isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },\n\n scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),\n getScrollInfo: function() {\n var scroller = this.display.scroller;\n return {left: scroller.scrollLeft, top: scroller.scrollTop,\n height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,\n width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,\n clientHeight: displayHeight(this), clientWidth: displayWidth(this)}\n },\n\n scrollIntoView: methodOp(function(range, margin) {\n if (range == null) {\n range = {from: this.doc.sel.primary().head, to: null};\n if (margin == null) { margin = this.options.cursorScrollMargin; }\n } else if (typeof range == \"number\") {\n range = {from: Pos(range, 0), to: null};\n } else if (range.from == null) {\n range = {from: range, to: null};\n }\n if (!range.to) { range.to = range.from; }\n range.margin = margin || 0;\n\n if (range.from.line != null) {\n scrollToRange(this, range);\n } else {\n scrollToCoordsRange(this, range.from, range.to, range.margin);\n }\n }),\n\n setSize: methodOp(function(width, height) {\n var this$1 = this;\n\n var interpret = function (val) { return typeof val == \"number\" || /^\\d+$/.test(String(val)) ? val + \"px\" : val; };\n if (width != null) { this.display.wrapper.style.width = interpret(width); }\n if (height != null) { this.display.wrapper.style.height = interpret(height); }\n if (this.options.lineWrapping) { clearLineMeasurementCache(this); }\n var lineNo = this.display.viewFrom;\n this.doc.iter(lineNo, this.display.viewTo, function (line) {\n if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)\n { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, \"widget\"); break } } }\n ++lineNo;\n });\n this.curOp.forceUpdate = true;\n signal(this, \"refresh\", this);\n }),\n\n operation: function(f){return runInOp(this, f)},\n startOperation: function(){return startOperation(this)},\n endOperation: function(){return endOperation(this)},\n\n refresh: methodOp(function() {\n var oldHeight = this.display.cachedTextHeight;\n regChange(this);\n this.curOp.forceUpdate = true;\n clearCaches(this);\n scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);\n updateGutterSpace(this.display);\n if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping)\n { estimateLineHeights(this); }\n signal(this, \"refresh\", this);\n }),\n\n swapDoc: methodOp(function(doc) {\n var old = this.doc;\n old.cm = null;\n // Cancel the current text selection if any (#5821)\n if (this.state.selectingText) { this.state.selectingText(); }\n attachDoc(this, doc);\n clearCaches(this);\n this.display.input.reset();\n scrollToCoords(this, doc.scrollLeft, doc.scrollTop);\n this.curOp.forceScroll = true;\n signalLater(this, \"swapDoc\", this, old);\n return old\n }),\n\n phrase: function(phraseText) {\n var phrases = this.options.phrases;\n return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText\n },\n\n getInputField: function(){return this.display.input.getField()},\n getWrapperElement: function(){return this.display.wrapper},\n getScrollerElement: function(){return this.display.scroller},\n getGutterElement: function(){return this.display.gutters}\n };\n eventMixin(CodeMirror);\n\n CodeMirror.registerHelper = function(type, name, value) {\n if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }\n helpers[type][name] = value;\n };\n CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {\n CodeMirror.registerHelper(type, name, value);\n helpers[type]._global.push({pred: predicate, val: value});\n };\n }\n\n // Used for horizontal relative motion. Dir is -1 or 1 (left or\n // right), unit can be \"codepoint\", \"char\", \"column\" (like char, but\n // doesn't cross line boundaries), \"word\" (across next word), or\n // \"group\" (to the start of next group of word or\n // non-word-non-whitespace chars). The visually param controls\n // whether, in right-to-left text, direction 1 means to move towards\n // the next index in the string, or towards the character to the right\n // of the current position. The resulting position will have a\n // hitSide=true property if it reached the end of the document.\n function findPosH(doc, pos, dir, unit, visually) {\n var oldPos = pos;\n var origDir = dir;\n var lineObj = getLine(doc, pos.line);\n var lineDir = visually && doc.direction == \"rtl\" ? -dir : dir;\n function findNextLine() {\n var l = pos.line + lineDir;\n if (l < doc.first || l >= doc.first + doc.size) { return false }\n pos = new Pos(l, pos.ch, pos.sticky);\n return lineObj = getLine(doc, l)\n }\n function moveOnce(boundToLine) {\n var next;\n if (unit == \"codepoint\") {\n var ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1));\n if (isNaN(ch)) {\n next = null;\n } else {\n var astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF;\n next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir);\n }\n } else if (visually) {\n next = moveVisually(doc.cm, lineObj, pos, dir);\n } else {\n next = moveLogically(lineObj, pos, dir);\n }\n if (next == null) {\n if (!boundToLine && findNextLine())\n { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); }\n else\n { return false }\n } else {\n pos = next;\n }\n return true\n }\n\n if (unit == \"char\" || unit == \"codepoint\") {\n moveOnce();\n } else if (unit == \"column\") {\n moveOnce(true);\n } else if (unit == \"word\" || unit == \"group\") {\n var sawType = null, group = unit == \"group\";\n var helper = doc.cm && doc.cm.getHelper(pos, \"wordChars\");\n for (var first = true;; first = false) {\n if (dir < 0 && !moveOnce(!first)) { break }\n var cur = lineObj.text.charAt(pos.ch) || \"\\n\";\n var type = isWordChar(cur, helper) ? \"w\"\n : group && cur == \"\\n\" ? \"n\"\n : !group || /\\s/.test(cur) ? null\n : \"p\";\n if (group && !first && !type) { type = \"s\"; }\n if (sawType && sawType != type) {\n if (dir < 0) {dir = 1; moveOnce(); pos.sticky = \"after\";}\n break\n }\n\n if (type) { sawType = type; }\n if (dir > 0 && !moveOnce(!first)) { break }\n }\n }\n var result = skipAtomic(doc, pos, oldPos, origDir, true);\n if (equalCursorPos(oldPos, result)) { result.hitSide = true; }\n return result\n }\n\n // For relative vertical movement. Dir may be -1 or 1. Unit can be\n // \"page\" or \"line\". The resulting position will have a hitSide=true\n // property if it reached the end of the document.\n function findPosV(cm, pos, dir, unit) {\n var doc = cm.doc, x = pos.left, y;\n if (unit == \"page\") {\n var pageSize = Math.min(cm.display.wrapper.clientHeight, win(cm).innerHeight || doc(cm).documentElement.clientHeight);\n var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);\n y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;\n\n } else if (unit == \"line\") {\n y = dir > 0 ? pos.bottom + 3 : pos.top - 3;\n }\n var target;\n for (;;) {\n target = coordsChar(cm, x, y);\n if (!target.outside) { break }\n if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }\n y += dir * 5;\n }\n return target\n }\n\n // CONTENTEDITABLE INPUT STYLE\n\n var ContentEditableInput = function(cm) {\n this.cm = cm;\n this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;\n this.polling = new Delayed();\n this.composing = null;\n this.gracePeriod = false;\n this.readDOMTimeout = null;\n };\n\n ContentEditableInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = input.cm;\n var div = input.div = display.lineDiv;\n div.contentEditable = true;\n disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);\n\n function belongsToInput(e) {\n for (var t = e.target; t; t = t.parentNode) {\n if (t == div) { return true }\n if (/\\bCodeMirror-(?:line)?widget\\b/.test(t.className)) { break }\n }\n return false\n }\n\n on(div, \"paste\", function (e) {\n if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n // IE doesn't fire input events, so we schedule a read for the pasted content in this way\n if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }\n });\n\n on(div, \"compositionstart\", function (e) {\n this$1.composing = {data: e.data, done: false};\n });\n on(div, \"compositionupdate\", function (e) {\n if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }\n });\n on(div, \"compositionend\", function (e) {\n if (this$1.composing) {\n if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }\n this$1.composing.done = true;\n }\n });\n\n on(div, \"touchstart\", function () { return input.forceCompositionEnd(); });\n\n on(div, \"input\", function () {\n if (!this$1.composing) { this$1.readFromDOMSoon(); }\n });\n\n function onCopyCut(e) {\n if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n if (e.type == \"cut\") { cm.replaceSelection(\"\", null, \"cut\"); }\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.operation(function () {\n cm.setSelections(ranges.ranges, 0, sel_dontScroll);\n cm.replaceSelection(\"\", null, \"cut\");\n });\n }\n }\n if (e.clipboardData) {\n e.clipboardData.clearData();\n var content = lastCopied.text.join(\"\\n\");\n // iOS exposes the clipboard API, but seems to discard content inserted into it\n e.clipboardData.setData(\"Text\", content);\n if (e.clipboardData.getData(\"Text\") == content) {\n e.preventDefault();\n return\n }\n }\n // Old-fashioned briefly-focus-a-textarea hack\n var kludge = hiddenTextarea(), te = kludge.firstChild;\n disableBrowserMagic(te);\n cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);\n te.value = lastCopied.text.join(\"\\n\");\n var hadFocus = activeElt(rootNode(div));\n selectInput(te);\n setTimeout(function () {\n cm.display.lineSpace.removeChild(kludge);\n hadFocus.focus();\n if (hadFocus == div) { input.showPrimarySelection(); }\n }, 50);\n }\n on(div, \"copy\", onCopyCut);\n on(div, \"cut\", onCopyCut);\n };\n\n ContentEditableInput.prototype.screenReaderLabelChanged = function (label) {\n // Label for screenreaders, accessibility\n if(label) {\n this.div.setAttribute('aria-label', label);\n } else {\n this.div.removeAttribute('aria-label');\n }\n };\n\n ContentEditableInput.prototype.prepareSelection = function () {\n var result = prepareSelection(this.cm, false);\n result.focus = activeElt(rootNode(this.div)) == this.div;\n return result\n };\n\n ContentEditableInput.prototype.showSelection = function (info, takeFocus) {\n if (!info || !this.cm.display.view.length) { return }\n if (info.focus || takeFocus) { this.showPrimarySelection(); }\n this.showMultipleSelections(info);\n };\n\n ContentEditableInput.prototype.getSelection = function () {\n return this.cm.display.wrapper.ownerDocument.getSelection()\n };\n\n ContentEditableInput.prototype.showPrimarySelection = function () {\n var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();\n var from = prim.from(), to = prim.to();\n\n if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {\n sel.removeAllRanges();\n return\n }\n\n var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&\n cmp(minPos(curAnchor, curFocus), from) == 0 &&\n cmp(maxPos(curAnchor, curFocus), to) == 0)\n { return }\n\n var view = cm.display.view;\n var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||\n {node: view[0].measure.map[2], offset: 0};\n var end = to.line < cm.display.viewTo && posToDOM(cm, to);\n if (!end) {\n var measure = view[view.length - 1].measure;\n var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;\n end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]};\n }\n\n if (!start || !end) {\n sel.removeAllRanges();\n return\n }\n\n var old = sel.rangeCount && sel.getRangeAt(0), rng;\n try { rng = range(start.node, start.offset, end.offset, end.node); }\n catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible\n if (rng) {\n if (!gecko && cm.state.focused) {\n sel.collapse(start.node, start.offset);\n if (!rng.collapsed) {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n } else {\n sel.removeAllRanges();\n sel.addRange(rng);\n }\n if (old && sel.anchorNode == null) { sel.addRange(old); }\n else if (gecko) { this.startGracePeriod(); }\n }\n this.rememberSelection();\n };\n\n ContentEditableInput.prototype.startGracePeriod = function () {\n var this$1 = this;\n\n clearTimeout(this.gracePeriod);\n this.gracePeriod = setTimeout(function () {\n this$1.gracePeriod = false;\n if (this$1.selectionChanged())\n { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }\n }, 20);\n };\n\n ContentEditableInput.prototype.showMultipleSelections = function (info) {\n removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);\n removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);\n };\n\n ContentEditableInput.prototype.rememberSelection = function () {\n var sel = this.getSelection();\n this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;\n this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;\n };\n\n ContentEditableInput.prototype.selectionInEditor = function () {\n var sel = this.getSelection();\n if (!sel.rangeCount) { return false }\n var node = sel.getRangeAt(0).commonAncestorContainer;\n return contains(this.div, node)\n };\n\n ContentEditableInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\") {\n if (!this.selectionInEditor() || activeElt(rootNode(this.div)) != this.div)\n { this.showSelection(this.prepareSelection(), true); }\n this.div.focus();\n }\n };\n ContentEditableInput.prototype.blur = function () { this.div.blur(); };\n ContentEditableInput.prototype.getField = function () { return this.div };\n\n ContentEditableInput.prototype.supportsTouch = function () { return true };\n\n ContentEditableInput.prototype.receivedFocus = function () {\n var this$1 = this;\n\n var input = this;\n if (this.selectionInEditor())\n { setTimeout(function () { return this$1.pollSelection(); }, 20); }\n else\n { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }\n\n function poll() {\n if (input.cm.state.focused) {\n input.pollSelection();\n input.polling.set(input.cm.options.pollInterval, poll);\n }\n }\n this.polling.set(this.cm.options.pollInterval, poll);\n };\n\n ContentEditableInput.prototype.selectionChanged = function () {\n var sel = this.getSelection();\n return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||\n sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset\n };\n\n ContentEditableInput.prototype.pollSelection = function () {\n if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }\n var sel = this.getSelection(), cm = this.cm;\n // On Android Chrome (version 56, at least), backspacing into an\n // uneditable block element will put the cursor in that element,\n // and then, because it's not editable, hide the virtual keyboard.\n // Because Android doesn't allow us to actually detect backspace\n // presses in a sane way, this code checks for when that happens\n // and simulates a backspace press in this case.\n if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {\n this.cm.triggerOnKeyDown({type: \"keydown\", keyCode: 8, preventDefault: Math.abs});\n this.blur();\n this.focus();\n return\n }\n if (this.composing) { return }\n this.rememberSelection();\n var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);\n var head = domToPos(cm, sel.focusNode, sel.focusOffset);\n if (anchor && head) { runInOp(cm, function () {\n setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);\n if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }\n }); }\n };\n\n ContentEditableInput.prototype.pollContent = function () {\n if (this.readDOMTimeout != null) {\n clearTimeout(this.readDOMTimeout);\n this.readDOMTimeout = null;\n }\n\n var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();\n var from = sel.from(), to = sel.to();\n if (from.ch == 0 && from.line > cm.firstLine())\n { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }\n if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())\n { to = Pos(to.line + 1, 0); }\n if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }\n\n var fromIndex, fromLine, fromNode;\n if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {\n fromLine = lineNo(display.view[0].line);\n fromNode = display.view[0].node;\n } else {\n fromLine = lineNo(display.view[fromIndex].line);\n fromNode = display.view[fromIndex - 1].node.nextSibling;\n }\n var toIndex = findViewIndex(cm, to.line);\n var toLine, toNode;\n if (toIndex == display.view.length - 1) {\n toLine = display.viewTo - 1;\n toNode = display.lineDiv.lastChild;\n } else {\n toLine = lineNo(display.view[toIndex + 1].line) - 1;\n toNode = display.view[toIndex + 1].node.previousSibling;\n }\n\n if (!fromNode) { return false }\n var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));\n var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));\n while (newText.length > 1 && oldText.length > 1) {\n if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }\n else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }\n else { break }\n }\n\n var cutFront = 0, cutEnd = 0;\n var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);\n while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))\n { ++cutFront; }\n var newBot = lst(newText), oldBot = lst(oldText);\n var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),\n oldBot.length - (oldText.length == 1 ? cutFront : 0));\n while (cutEnd < maxCutEnd &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))\n { ++cutEnd; }\n // Try to move start of change to start of selection if ambiguous\n if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {\n while (cutFront && cutFront > from.ch &&\n newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {\n cutFront--;\n cutEnd++;\n }\n }\n\n newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\\u200b+/, \"\");\n newText[0] = newText[0].slice(cutFront).replace(/\\u200b+$/, \"\");\n\n var chFrom = Pos(fromLine, cutFront);\n var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);\n if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {\n replaceRange(cm.doc, newText, chFrom, chTo, \"+input\");\n return true\n }\n };\n\n ContentEditableInput.prototype.ensurePolled = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.reset = function () {\n this.forceCompositionEnd();\n };\n ContentEditableInput.prototype.forceCompositionEnd = function () {\n if (!this.composing) { return }\n clearTimeout(this.readDOMTimeout);\n this.composing = null;\n this.updateFromDOM();\n this.div.blur();\n this.div.focus();\n };\n ContentEditableInput.prototype.readFromDOMSoon = function () {\n var this$1 = this;\n\n if (this.readDOMTimeout != null) { return }\n this.readDOMTimeout = setTimeout(function () {\n this$1.readDOMTimeout = null;\n if (this$1.composing) {\n if (this$1.composing.done) { this$1.composing = null; }\n else { return }\n }\n this$1.updateFromDOM();\n }, 80);\n };\n\n ContentEditableInput.prototype.updateFromDOM = function () {\n var this$1 = this;\n\n if (this.cm.isReadOnly() || !this.pollContent())\n { runInOp(this.cm, function () { return regChange(this$1.cm); }); }\n };\n\n ContentEditableInput.prototype.setUneditable = function (node) {\n node.contentEditable = \"false\";\n };\n\n ContentEditableInput.prototype.onKeyPress = function (e) {\n if (e.charCode == 0 || this.composing) { return }\n e.preventDefault();\n if (!this.cm.isReadOnly())\n { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }\n };\n\n ContentEditableInput.prototype.readOnlyChanged = function (val) {\n this.div.contentEditable = String(val != \"nocursor\");\n };\n\n ContentEditableInput.prototype.onContextMenu = function () {};\n ContentEditableInput.prototype.resetPosition = function () {};\n\n ContentEditableInput.prototype.needsContentAttribute = true;\n\n function posToDOM(cm, pos) {\n var view = findViewForLine(cm, pos.line);\n if (!view || view.hidden) { return null }\n var line = getLine(cm.doc, pos.line);\n var info = mapFromLineView(view, line, pos.line);\n\n var order = getOrder(line, cm.doc.direction), side = \"left\";\n if (order) {\n var partPos = getBidiPartAt(order, pos.ch);\n side = partPos % 2 ? \"right\" : \"left\";\n }\n var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);\n result.offset = result.collapse == \"right\" ? result.end : result.start;\n return result\n }\n\n function isInGutter(node) {\n for (var scan = node; scan; scan = scan.parentNode)\n { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }\n return false\n }\n\n function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }\n\n function domTextBetween(cm, from, to, fromLine, toLine) {\n var text = \"\", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;\n function recognizeMarker(id) { return function (marker) { return marker.id == id; } }\n function close() {\n if (closing) {\n text += lineSep;\n if (extraLinebreak) { text += lineSep; }\n closing = extraLinebreak = false;\n }\n }\n function addText(str) {\n if (str) {\n close();\n text += str;\n }\n }\n function walk(node) {\n if (node.nodeType == 1) {\n var cmText = node.getAttribute(\"cm-text\");\n if (cmText) {\n addText(cmText);\n return\n }\n var markerID = node.getAttribute(\"cm-marker\"), range;\n if (markerID) {\n var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));\n if (found.length && (range = found[0].find(0)))\n { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); }\n return\n }\n if (node.getAttribute(\"contenteditable\") == \"false\") { return }\n var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);\n if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }\n\n if (isBlock) { close(); }\n for (var i = 0; i < node.childNodes.length; i++)\n { walk(node.childNodes[i]); }\n\n if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }\n if (isBlock) { closing = true; }\n } else if (node.nodeType == 3) {\n addText(node.nodeValue.replace(/\\u200b/g, \"\").replace(/\\u00a0/g, \" \"));\n }\n }\n for (;;) {\n walk(from);\n if (from == to) { break }\n from = from.nextSibling;\n extraLinebreak = false;\n }\n return text\n }\n\n function domToPos(cm, node, offset) {\n var lineNode;\n if (node == cm.display.lineDiv) {\n lineNode = cm.display.lineDiv.childNodes[offset];\n if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }\n node = null; offset = 0;\n } else {\n for (lineNode = node;; lineNode = lineNode.parentNode) {\n if (!lineNode || lineNode == cm.display.lineDiv) { return null }\n if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }\n }\n }\n for (var i = 0; i < cm.display.view.length; i++) {\n var lineView = cm.display.view[i];\n if (lineView.node == lineNode)\n { return locateNodeInLineView(lineView, node, offset) }\n }\n }\n\n function locateNodeInLineView(lineView, node, offset) {\n var wrapper = lineView.text.firstChild, bad = false;\n if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }\n if (node == wrapper) {\n bad = true;\n node = wrapper.childNodes[offset];\n offset = 0;\n if (!node) {\n var line = lineView.rest ? lst(lineView.rest) : lineView.line;\n return badPos(Pos(lineNo(line), line.text.length), bad)\n }\n }\n\n var textNode = node.nodeType == 3 ? node : null, topNode = node;\n if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {\n textNode = node.firstChild;\n if (offset) { offset = textNode.nodeValue.length; }\n }\n while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }\n var measure = lineView.measure, maps = measure.maps;\n\n function find(textNode, topNode, offset) {\n for (var i = -1; i < (maps ? maps.length : 0); i++) {\n var map = i < 0 ? measure.map : maps[i];\n for (var j = 0; j < map.length; j += 3) {\n var curNode = map[j + 2];\n if (curNode == textNode || curNode == topNode) {\n var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);\n var ch = map[j] + offset;\n if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; }\n return Pos(line, ch)\n }\n }\n }\n }\n var found = find(textNode, topNode, offset);\n if (found) { return badPos(found, bad) }\n\n // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems\n for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {\n found = find(after, after.firstChild, 0);\n if (found)\n { return badPos(Pos(found.line, found.ch - dist), bad) }\n else\n { dist += after.textContent.length; }\n }\n for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {\n found = find(before, before.firstChild, -1);\n if (found)\n { return badPos(Pos(found.line, found.ch + dist$1), bad) }\n else\n { dist$1 += before.textContent.length; }\n }\n }\n\n // TEXTAREA INPUT STYLE\n\n var TextareaInput = function(cm) {\n this.cm = cm;\n // See input.poll and input.reset\n this.prevInput = \"\";\n\n // Flag that indicates whether we expect input to appear real soon\n // now (after some event like 'keypress' or 'input') and are\n // polling intensively.\n this.pollingFast = false;\n // Self-resetting timeout for the poller\n this.polling = new Delayed();\n // Used to work around IE issue with selection being forgotten when focus moves away from textarea\n this.hasSelection = false;\n this.composing = null;\n this.resetting = false;\n };\n\n TextareaInput.prototype.init = function (display) {\n var this$1 = this;\n\n var input = this, cm = this.cm;\n this.createField(display);\n var te = this.textarea;\n\n display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);\n\n // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)\n if (ios) { te.style.width = \"0px\"; }\n\n on(te, \"input\", function () {\n if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }\n input.poll();\n });\n\n on(te, \"paste\", function (e) {\n if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }\n\n cm.state.pasteIncoming = +new Date;\n input.fastPoll();\n });\n\n function prepareCopyCut(e) {\n if (signalDOMEvent(cm, e)) { return }\n if (cm.somethingSelected()) {\n setLastCopied({lineWise: false, text: cm.getSelections()});\n } else if (!cm.options.lineWiseCopyCut) {\n return\n } else {\n var ranges = copyableRanges(cm);\n setLastCopied({lineWise: true, text: ranges.text});\n if (e.type == \"cut\") {\n cm.setSelections(ranges.ranges, null, sel_dontScroll);\n } else {\n input.prevInput = \"\";\n te.value = ranges.text.join(\"\\n\");\n selectInput(te);\n }\n }\n if (e.type == \"cut\") { cm.state.cutIncoming = +new Date; }\n }\n on(te, \"cut\", prepareCopyCut);\n on(te, \"copy\", prepareCopyCut);\n\n on(display.scroller, \"paste\", function (e) {\n if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }\n if (!te.dispatchEvent) {\n cm.state.pasteIncoming = +new Date;\n input.focus();\n return\n }\n\n // Pass the `paste` event to the textarea so it's handled by its event listener.\n var event = new Event(\"paste\");\n event.clipboardData = e.clipboardData;\n te.dispatchEvent(event);\n });\n\n // Prevent normal selection in the editor (we handle our own)\n on(display.lineSpace, \"selectstart\", function (e) {\n if (!eventInWidget(display, e)) { e_preventDefault(e); }\n });\n\n on(te, \"compositionstart\", function () {\n var start = cm.getCursor(\"from\");\n if (input.composing) { input.composing.range.clear(); }\n input.composing = {\n start: start,\n range: cm.markText(start, cm.getCursor(\"to\"), {className: \"CodeMirror-composing\"})\n };\n });\n on(te, \"compositionend\", function () {\n if (input.composing) {\n input.poll();\n input.composing.range.clear();\n input.composing = null;\n }\n });\n };\n\n TextareaInput.prototype.createField = function (_display) {\n // Wraps and hides input textarea\n this.wrapper = hiddenTextarea();\n // The semihidden textarea that is focused when the editor is\n // focused, and receives input.\n this.textarea = this.wrapper.firstChild;\n var opts = this.cm.options;\n disableBrowserMagic(this.textarea, opts.spellcheck, opts.autocorrect, opts.autocapitalize);\n };\n\n TextareaInput.prototype.screenReaderLabelChanged = function (label) {\n // Label for screenreaders, accessibility\n if(label) {\n this.textarea.setAttribute('aria-label', label);\n } else {\n this.textarea.removeAttribute('aria-label');\n }\n };\n\n TextareaInput.prototype.prepareSelection = function () {\n // Redraw the selection and/or cursor\n var cm = this.cm, display = cm.display, doc = cm.doc;\n var result = prepareSelection(cm);\n\n // Move the hidden textarea near the cursor to prevent scrolling artifacts\n if (cm.options.moveInputWithCursor) {\n var headPos = cursorCoords(cm, doc.sel.primary().head, \"div\");\n var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();\n result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,\n headPos.top + lineOff.top - wrapOff.top));\n result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,\n headPos.left + lineOff.left - wrapOff.left));\n }\n\n return result\n };\n\n TextareaInput.prototype.showSelection = function (drawn) {\n var cm = this.cm, display = cm.display;\n removeChildrenAndAdd(display.cursorDiv, drawn.cursors);\n removeChildrenAndAdd(display.selectionDiv, drawn.selection);\n if (drawn.teTop != null) {\n this.wrapper.style.top = drawn.teTop + \"px\";\n this.wrapper.style.left = drawn.teLeft + \"px\";\n }\n };\n\n // Reset the input to correspond to the selection (or to be empty,\n // when not typing and nothing is selected)\n TextareaInput.prototype.reset = function (typing) {\n if (this.contextMenuPending || this.composing && typing) { return }\n var cm = this.cm;\n this.resetting = true;\n if (cm.somethingSelected()) {\n this.prevInput = \"\";\n var content = cm.getSelection();\n this.textarea.value = content;\n if (cm.state.focused) { selectInput(this.textarea); }\n if (ie && ie_version >= 9) { this.hasSelection = content; }\n } else if (!typing) {\n this.prevInput = this.textarea.value = \"\";\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n }\n this.resetting = false;\n };\n\n TextareaInput.prototype.getField = function () { return this.textarea };\n\n TextareaInput.prototype.supportsTouch = function () { return false };\n\n TextareaInput.prototype.focus = function () {\n if (this.cm.options.readOnly != \"nocursor\" && (!mobile || activeElt(rootNode(this.textarea)) != this.textarea)) {\n try { this.textarea.focus(); }\n catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM\n }\n };\n\n TextareaInput.prototype.blur = function () { this.textarea.blur(); };\n\n TextareaInput.prototype.resetPosition = function () {\n this.wrapper.style.top = this.wrapper.style.left = 0;\n };\n\n TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };\n\n // Poll for input changes, using the normal rate of polling. This\n // runs as long as the editor is focused.\n TextareaInput.prototype.slowPoll = function () {\n var this$1 = this;\n\n if (this.pollingFast) { return }\n this.polling.set(this.cm.options.pollInterval, function () {\n this$1.poll();\n if (this$1.cm.state.focused) { this$1.slowPoll(); }\n });\n };\n\n // When an event has just come in that is likely to add or change\n // something in the input textarea, we poll faster, to ensure that\n // the change appears on the screen quickly.\n TextareaInput.prototype.fastPoll = function () {\n var missed = false, input = this;\n input.pollingFast = true;\n function p() {\n var changed = input.poll();\n if (!changed && !missed) {missed = true; input.polling.set(60, p);}\n else {input.pollingFast = false; input.slowPoll();}\n }\n input.polling.set(20, p);\n };\n\n // Read input from the textarea, and update the document to match.\n // When something is selected, it is present in the textarea, and\n // selected (unless it is huge, in which case a placeholder is\n // used). When nothing is selected, the cursor sits after previously\n // seen text (can be empty), which is stored in prevInput (we must\n // not reset the textarea when typing, because that breaks IME).\n TextareaInput.prototype.poll = function () {\n var this$1 = this;\n\n var cm = this.cm, input = this.textarea, prevInput = this.prevInput;\n // Since this is called a *lot*, try to bail out as cheaply as\n // possible when it is clear that nothing happened. hasSelection\n // will be the case when there is a lot of text in the textarea,\n // in which case reading its value would be expensive.\n if (this.contextMenuPending || this.resetting || !cm.state.focused ||\n (hasSelection(input) && !prevInput && !this.composing) ||\n cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)\n { return false }\n\n var text = input.value;\n // If nothing changed, bail.\n if (text == prevInput && !cm.somethingSelected()) { return false }\n // Work around nonsensical selection resetting in IE9/10, and\n // inexplicable appearance of private area unicode characters on\n // some key combos in Mac (#2689).\n if (ie && ie_version >= 9 && this.hasSelection === text ||\n mac && /[\\uf700-\\uf7ff]/.test(text)) {\n cm.display.input.reset();\n return false\n }\n\n if (cm.doc.sel == cm.display.selForContextMenu) {\n var first = text.charCodeAt(0);\n if (first == 0x200b && !prevInput) { prevInput = \"\\u200b\"; }\n if (first == 0x21da) { this.reset(); return this.cm.execCommand(\"undo\") }\n }\n // Find the part of the input that is actually new\n var same = 0, l = Math.min(prevInput.length, text.length);\n while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }\n\n runInOp(cm, function () {\n applyTextInput(cm, text.slice(same), prevInput.length - same,\n null, this$1.composing ? \"*compose\" : null);\n\n // Don't leave long text in the textarea, since it makes further polling slow\n if (text.length > 1000 || text.indexOf(\"\\n\") > -1) { input.value = this$1.prevInput = \"\"; }\n else { this$1.prevInput = text; }\n\n if (this$1.composing) {\n this$1.composing.range.clear();\n this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor(\"to\"),\n {className: \"CodeMirror-composing\"});\n }\n });\n return true\n };\n\n TextareaInput.prototype.ensurePolled = function () {\n if (this.pollingFast && this.poll()) { this.pollingFast = false; }\n };\n\n TextareaInput.prototype.onKeyPress = function () {\n if (ie && ie_version >= 9) { this.hasSelection = null; }\n this.fastPoll();\n };\n\n TextareaInput.prototype.onContextMenu = function (e) {\n var input = this, cm = input.cm, display = cm.display, te = input.textarea;\n if (input.contextMenuPending) { input.contextMenuPending(); }\n var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;\n if (!pos || presto) { return } // Opera is difficult.\n\n // Reset the current text selection only if the click is done outside of the selection\n // and 'resetSelectionOnContextMenu' option is true.\n var reset = cm.options.resetSelectionOnContextMenu;\n if (reset && cm.doc.sel.contains(pos) == -1)\n { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }\n\n var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;\n var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();\n input.wrapper.style.cssText = \"position: static\";\n te.style.cssText = \"position: absolute; width: 30px; height: 30px;\\n top: \" + (e.clientY - wrapperBox.top - 5) + \"px; left: \" + (e.clientX - wrapperBox.left - 5) + \"px;\\n z-index: 1000; background: \" + (ie ? \"rgba(255, 255, 255, .05)\" : \"transparent\") + \";\\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);\";\n var oldScrollY;\n if (webkit) { oldScrollY = te.ownerDocument.defaultView.scrollY; } // Work around Chrome issue (#2712)\n display.input.focus();\n if (webkit) { te.ownerDocument.defaultView.scrollTo(null, oldScrollY); }\n display.input.reset();\n // Adds \"Select all\" to context menu in FF\n if (!cm.somethingSelected()) { te.value = input.prevInput = \" \"; }\n input.contextMenuPending = rehide;\n display.selForContextMenu = cm.doc.sel;\n clearTimeout(display.detectingSelectAll);\n\n // Select-all will be greyed out if there's nothing to select, so\n // this adds a zero-width space so that we can later check whether\n // it got selected.\n function prepareSelectAllHack() {\n if (te.selectionStart != null) {\n var selected = cm.somethingSelected();\n var extval = \"\\u200b\" + (selected ? te.value : \"\");\n te.value = \"\\u21da\"; // Used to catch context-menu undo\n te.value = extval;\n input.prevInput = selected ? \"\" : \"\\u200b\";\n te.selectionStart = 1; te.selectionEnd = extval.length;\n // Re-set this, in case some other handler touched the\n // selection in the meantime.\n display.selForContextMenu = cm.doc.sel;\n }\n }\n function rehide() {\n if (input.contextMenuPending != rehide) { return }\n input.contextMenuPending = false;\n input.wrapper.style.cssText = oldWrapperCSS;\n te.style.cssText = oldCSS;\n if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }\n\n // Try to detect the user choosing select-all\n if (te.selectionStart != null) {\n if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }\n var i = 0, poll = function () {\n if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&\n te.selectionEnd > 0 && input.prevInput == \"\\u200b\") {\n operation(cm, selectAll)(cm);\n } else if (i++ < 10) {\n display.detectingSelectAll = setTimeout(poll, 500);\n } else {\n display.selForContextMenu = null;\n display.input.reset();\n }\n };\n display.detectingSelectAll = setTimeout(poll, 200);\n }\n }\n\n if (ie && ie_version >= 9) { prepareSelectAllHack(); }\n if (captureRightClick) {\n e_stop(e);\n var mouseup = function () {\n off(window, \"mouseup\", mouseup);\n setTimeout(rehide, 20);\n };\n on(window, \"mouseup\", mouseup);\n } else {\n setTimeout(rehide, 50);\n }\n };\n\n TextareaInput.prototype.readOnlyChanged = function (val) {\n if (!val) { this.reset(); }\n this.textarea.disabled = val == \"nocursor\";\n this.textarea.readOnly = !!val;\n };\n\n TextareaInput.prototype.setUneditable = function () {};\n\n TextareaInput.prototype.needsContentAttribute = false;\n\n function fromTextArea(textarea, options) {\n options = options ? copyObj(options) : {};\n options.value = textarea.value;\n if (!options.tabindex && textarea.tabIndex)\n { options.tabindex = textarea.tabIndex; }\n if (!options.placeholder && textarea.placeholder)\n { options.placeholder = textarea.placeholder; }\n // Set autofocus to true if this textarea is focused, or if it has\n // autofocus and no other element is focused.\n if (options.autofocus == null) {\n var hasFocus = activeElt(rootNode(textarea));\n options.autofocus = hasFocus == textarea ||\n textarea.getAttribute(\"autofocus\") != null && hasFocus == document.body;\n }\n\n function save() {textarea.value = cm.getValue();}\n\n var realSubmit;\n if (textarea.form) {\n on(textarea.form, \"submit\", save);\n // Deplorable hack to make the submit method do the right thing.\n if (!options.leaveSubmitMethodAlone) {\n var form = textarea.form;\n realSubmit = form.submit;\n try {\n var wrappedSubmit = form.submit = function () {\n save();\n form.submit = realSubmit;\n form.submit();\n form.submit = wrappedSubmit;\n };\n } catch(e) {}\n }\n }\n\n options.finishInit = function (cm) {\n cm.save = save;\n cm.getTextArea = function () { return textarea; };\n cm.toTextArea = function () {\n cm.toTextArea = isNaN; // Prevent this from being ran twice\n save();\n textarea.parentNode.removeChild(cm.getWrapperElement());\n textarea.style.display = \"\";\n if (textarea.form) {\n off(textarea.form, \"submit\", save);\n if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == \"function\")\n { textarea.form.submit = realSubmit; }\n }\n };\n };\n\n textarea.style.display = \"none\";\n var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },\n options);\n return cm\n }\n\n function addLegacyProps(CodeMirror) {\n CodeMirror.off = off;\n CodeMirror.on = on;\n CodeMirror.wheelEventPixels = wheelEventPixels;\n CodeMirror.Doc = Doc;\n CodeMirror.splitLines = splitLinesAuto;\n CodeMirror.countColumn = countColumn;\n CodeMirror.findColumn = findColumn;\n CodeMirror.isWordChar = isWordCharBasic;\n CodeMirror.Pass = Pass;\n CodeMirror.signal = signal;\n CodeMirror.Line = Line;\n CodeMirror.changeEnd = changeEnd;\n CodeMirror.scrollbarModel = scrollbarModel;\n CodeMirror.Pos = Pos;\n CodeMirror.cmpPos = cmp;\n CodeMirror.modes = modes;\n CodeMirror.mimeModes = mimeModes;\n CodeMirror.resolveMode = resolveMode;\n CodeMirror.getMode = getMode;\n CodeMirror.modeExtensions = modeExtensions;\n CodeMirror.extendMode = extendMode;\n CodeMirror.copyState = copyState;\n CodeMirror.startState = startState;\n CodeMirror.innerMode = innerMode;\n CodeMirror.commands = commands;\n CodeMirror.keyMap = keyMap;\n CodeMirror.keyName = keyName;\n CodeMirror.isModifierKey = isModifierKey;\n CodeMirror.lookupKey = lookupKey;\n CodeMirror.normalizeKeyMap = normalizeKeyMap;\n CodeMirror.StringStream = StringStream;\n CodeMirror.SharedTextMarker = SharedTextMarker;\n CodeMirror.TextMarker = TextMarker;\n CodeMirror.LineWidget = LineWidget;\n CodeMirror.e_preventDefault = e_preventDefault;\n CodeMirror.e_stopPropagation = e_stopPropagation;\n CodeMirror.e_stop = e_stop;\n CodeMirror.addClass = addClass;\n CodeMirror.contains = contains;\n CodeMirror.rmClass = rmClass;\n CodeMirror.keyNames = keyNames;\n }\n\n // EDITOR CONSTRUCTOR\n\n defineOptions(CodeMirror);\n\n addEditorMethods(CodeMirror);\n\n // Set up methods on CodeMirror's prototype to redirect to the editor's document.\n var dontDelegate = \"iter insert remove copy getEditor constructor\".split(\" \");\n for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)\n { CodeMirror.prototype[prop] = (function(method) {\n return function() {return method.apply(this.doc, arguments)}\n })(Doc.prototype[prop]); } }\n\n eventMixin(Doc);\n CodeMirror.inputStyles = {\"textarea\": TextareaInput, \"contenteditable\": ContentEditableInput};\n\n // Extra arguments are stored as the mode's dependencies, which is\n // used by (legacy) mechanisms like loadmode.js to automatically\n // load a mode. (Preferred mechanism is the require/define calls.)\n CodeMirror.defineMode = function(name/*, mode, …*/) {\n if (!CodeMirror.defaults.mode && name != \"null\") { CodeMirror.defaults.mode = name; }\n defineMode.apply(this, arguments);\n };\n\n CodeMirror.defineMIME = defineMIME;\n\n // Minimal default mode.\n CodeMirror.defineMode(\"null\", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });\n CodeMirror.defineMIME(\"text/plain\", \"null\");\n\n // EXTENSIONS\n\n CodeMirror.defineExtension = function (name, func) {\n CodeMirror.prototype[name] = func;\n };\n CodeMirror.defineDocExtension = function (name, func) {\n Doc.prototype[name] = func;\n };\n\n CodeMirror.fromTextArea = fromTextArea;\n\n addLegacyProps(CodeMirror);\n\n CodeMirror.version = \"5.65.18\";\n\n return CodeMirror;\n\n})));\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n/**\n * Tag-closer extension for CodeMirror.\n *\n * This extension adds an \"autoCloseTags\" option that can be set to\n * either true to get the default behavior, or an object to further\n * configure its behavior.\n *\n * These are supported options:\n *\n * `whenClosing` (default true)\n * Whether to autoclose when the '/' of a closing tag is typed.\n * `whenOpening` (default true)\n * Whether to autoclose the tag when the final '>' of an opening\n * tag is typed.\n * `dontCloseTags` (default is empty tags for HTML, none for XML)\n * An array of tag names that should not be autoclosed.\n * `indentTags` (default is block tags for HTML, none for XML)\n * An array of tag names that should, when opened, cause a\n * blank line to be added inside the tag, and the blank line and\n * closing line to be indented.\n * `emptyTags` (default is none)\n * An array of XML tag names that should be autoclosed with '/>'.\n *\n * See demos/closetag.html for a usage example.\n */\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../fold/xml-fold\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../fold/xml-fold\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n CodeMirror.defineOption(\"autoCloseTags\", false, function(cm, val, old) {\n if (old != CodeMirror.Init && old)\n cm.removeKeyMap(\"autoCloseTags\");\n if (!val) return;\n var map = {name: \"autoCloseTags\"};\n if (typeof val != \"object\" || val.whenClosing !== false)\n map[\"'/'\"] = function(cm) { return autoCloseSlash(cm); };\n if (typeof val != \"object\" || val.whenOpening !== false)\n map[\"'>'\"] = function(cm) { return autoCloseGT(cm); };\n cm.addKeyMap(map);\n });\n\n var htmlDontClose = [\"area\", \"base\", \"br\", \"col\", \"command\", \"embed\", \"hr\", \"img\", \"input\", \"keygen\", \"link\", \"meta\", \"param\",\n \"source\", \"track\", \"wbr\"];\n var htmlIndent = [\"applet\", \"blockquote\", \"body\", \"button\", \"div\", \"dl\", \"fieldset\", \"form\", \"frameset\", \"h1\", \"h2\", \"h3\", \"h4\",\n \"h5\", \"h6\", \"head\", \"html\", \"iframe\", \"layer\", \"legend\", \"object\", \"ol\", \"p\", \"select\", \"table\", \"ul\"];\n\n function autoCloseGT(cm) {\n if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n var ranges = cm.listSelections(), replacements = [];\n var opt = cm.getOption(\"autoCloseTags\");\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) return CodeMirror.Pass;\n var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n var tagInfo = inner.mode.xmlCurrentTag && inner.mode.xmlCurrentTag(state)\n var tagName = tagInfo && tagInfo.name\n if (!tagName) return CodeMirror.Pass\n\n var html = inner.mode.configuration == \"html\";\n var dontCloseTags = (typeof opt == \"object\" && opt.dontCloseTags) || (html && htmlDontClose);\n var indentTags = (typeof opt == \"object\" && opt.indentTags) || (html && htmlIndent);\n\n if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);\n var lowerTagName = tagName.toLowerCase();\n // Don't process the '>' at the end of an end-tag or self-closing tag\n if (!tagName ||\n tok.type == \"string\" && (tok.end != pos.ch || !/[\\\"\\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||\n tok.type == \"tag\" && tagInfo.close ||\n tok.string.indexOf(\"/\") == (pos.ch - tok.start - 1) || // match something like <someTagName />\n dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||\n closingTagExists(cm, inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state) || [], tagName, pos, true))\n return CodeMirror.Pass;\n\n var emptyTags = typeof opt == \"object\" && opt.emptyTags;\n if (emptyTags && indexOf(emptyTags, tagName) > -1) {\n replacements[i] = { text: \"/>\", newPos: CodeMirror.Pos(pos.line, pos.ch + 2) };\n continue;\n }\n\n var indent = indentTags && indexOf(indentTags, lowerTagName) > -1;\n replacements[i] = {indent: indent,\n text: \">\" + (indent ? \"\\n\\n\" : \"\") + \"</\" + tagName + \">\",\n newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};\n }\n\n var dontIndentOnAutoClose = (typeof opt == \"object\" && opt.dontIndentOnAutoClose);\n for (var i = ranges.length - 1; i >= 0; i--) {\n var info = replacements[i];\n cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, \"+insert\");\n var sel = cm.listSelections().slice(0);\n sel[i] = {head: info.newPos, anchor: info.newPos};\n cm.setSelections(sel);\n if (!dontIndentOnAutoClose && info.indent) {\n cm.indentLine(info.newPos.line, null, true);\n cm.indentLine(info.newPos.line + 1, null, true);\n }\n }\n }\n\n function autoCloseCurrent(cm, typingSlash) {\n var ranges = cm.listSelections(), replacements = [];\n var head = typingSlash ? \"/\" : \"</\";\n var opt = cm.getOption(\"autoCloseTags\");\n var dontIndentOnAutoClose = (typeof opt == \"object\" && opt.dontIndentOnSlash);\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) return CodeMirror.Pass;\n var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n if (typingSlash && (tok.type == \"string\" || tok.string.charAt(0) != \"<\" ||\n tok.start != pos.ch - 1))\n return CodeMirror.Pass;\n // Kludge to get around the fact that we are not in XML mode\n // when completing in JS/CSS snippet in htmlmixed mode. Does not\n // work for other XML embedded languages (there is no general\n // way to go from a mixed mode to its current XML state).\n var replacement, mixed = inner.mode.name != \"xml\" && cm.getMode().name == \"htmlmixed\"\n if (mixed && inner.mode.name == \"javascript\") {\n replacement = head + \"script\";\n } else if (mixed && inner.mode.name == \"css\") {\n replacement = head + \"style\";\n } else {\n var context = inner.mode.xmlCurrentContext && inner.mode.xmlCurrentContext(state)\n var top = context.length ? context[context.length - 1] : \"\"\n if (!context || (context.length && closingTagExists(cm, context, top, pos)))\n return CodeMirror.Pass;\n replacement = head + top\n }\n if (cm.getLine(pos.line).charAt(tok.end) != \">\") replacement += \">\";\n replacements[i] = replacement;\n }\n cm.replaceSelections(replacements);\n ranges = cm.listSelections();\n if (!dontIndentOnAutoClose) {\n for (var i = 0; i < ranges.length; i++)\n if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)\n cm.indentLine(ranges[i].head.line);\n }\n }\n\n function autoCloseSlash(cm) {\n if (cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n return autoCloseCurrent(cm, true);\n }\n\n CodeMirror.commands.closeTag = function(cm) { return autoCloseCurrent(cm); };\n\n function indexOf(collection, elt) {\n if (collection.indexOf) return collection.indexOf(elt);\n for (var i = 0, e = collection.length; i < e; ++i)\n if (collection[i] == elt) return i;\n return -1;\n }\n\n // If xml-fold is loaded, we use its functionality to try and verify\n // whether a given tag is actually unclosed.\n function closingTagExists(cm, context, tagName, pos, newTag) {\n if (!CodeMirror.scanForClosingTag) return false;\n var end = Math.min(cm.lastLine() + 1, pos.line + 500);\n var nextClose = CodeMirror.scanForClosingTag(cm, pos, null, end);\n if (!nextClose || nextClose.tag != tagName) return false;\n // If the immediate wrapping context contains onCx instances of\n // the same tag, a closing tag only exists if there are at least\n // that many closing tags of that type following.\n var onCx = newTag ? 1 : 0\n for (var i = context.length - 1; i >= 0; i--) {\n if (context[i] == tagName) ++onCx\n else break\n }\n pos = nextClose.to;\n for (var i = 1; i < onCx; i++) {\n var next = CodeMirror.scanForClosingTag(cm, pos, null, end);\n if (!next || next.tag != tagName) return false;\n pos = next.to;\n }\n return true;\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n var defaults = {\n pairs: \"()[]{}''\\\"\\\"\",\n closeBefore: \")]}'\\\":;>\",\n triples: \"\",\n explode: \"[]{}\"\n };\n\n var Pos = CodeMirror.Pos;\n\n CodeMirror.defineOption(\"autoCloseBrackets\", false, function(cm, val, old) {\n if (old && old != CodeMirror.Init) {\n cm.removeKeyMap(keyMap);\n cm.state.closeBrackets = null;\n }\n if (val) {\n ensureBound(getOption(val, \"pairs\"))\n cm.state.closeBrackets = val;\n cm.addKeyMap(keyMap);\n }\n });\n\n function getOption(conf, name) {\n if (name == \"pairs\" && typeof conf == \"string\") return conf;\n if (typeof conf == \"object\" && conf[name] != null) return conf[name];\n return defaults[name];\n }\n\n var keyMap = {Backspace: handleBackspace, Enter: handleEnter};\n function ensureBound(chars) {\n for (var i = 0; i < chars.length; i++) {\n var ch = chars.charAt(i), key = \"'\" + ch + \"'\"\n if (!keyMap[key]) keyMap[key] = handler(ch)\n }\n }\n ensureBound(defaults.pairs + \"`\")\n\n function handler(ch) {\n return function(cm) { return handleChar(cm, ch); };\n }\n\n function getConfig(cm) {\n var deflt = cm.state.closeBrackets;\n if (!deflt || deflt.override) return deflt;\n var mode = cm.getModeAt(cm.getCursor());\n return mode.closeBrackets || deflt;\n }\n\n function handleBackspace(cm) {\n var conf = getConfig(cm);\n if (!conf || cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\n var pairs = getOption(conf, \"pairs\");\n var ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) return CodeMirror.Pass;\n var around = charsAround(cm, ranges[i].head);\n if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n }\n for (var i = ranges.length - 1; i >= 0; i--) {\n var cur = ranges[i].head;\n cm.replaceRange(\"\", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1), \"+delete\");\n }\n }\n\n function handleEnter(cm) {\n var conf = getConfig(cm);\n var explode = conf && getOption(conf, \"explode\");\n if (!explode || cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\n var ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n if (!ranges[i].empty()) return CodeMirror.Pass;\n var around = charsAround(cm, ranges[i].head);\n if (!around || explode.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n }\n cm.operation(function() {\n var linesep = cm.lineSeparator() || \"\\n\";\n cm.replaceSelection(linesep + linesep, null);\n moveSel(cm, -1)\n ranges = cm.listSelections();\n for (var i = 0; i < ranges.length; i++) {\n var line = ranges[i].head.line;\n cm.indentLine(line, null, true);\n cm.indentLine(line + 1, null, true);\n }\n });\n }\n\n function moveSel(cm, dir) {\n var newRanges = [], ranges = cm.listSelections(), primary = 0\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i]\n if (range.head == cm.getCursor()) primary = i\n var pos = range.head.ch || dir > 0 ? {line: range.head.line, ch: range.head.ch + dir} : {line: range.head.line - 1}\n newRanges.push({anchor: pos, head: pos})\n }\n cm.setSelections(newRanges, primary)\n }\n\n function contractSelection(sel) {\n var inverted = CodeMirror.cmpPos(sel.anchor, sel.head) > 0;\n return {anchor: new Pos(sel.anchor.line, sel.anchor.ch + (inverted ? -1 : 1)),\n head: new Pos(sel.head.line, sel.head.ch + (inverted ? 1 : -1))};\n }\n\n function handleChar(cm, ch) {\n var conf = getConfig(cm);\n if (!conf || cm.getOption(\"disableInput\")) return CodeMirror.Pass;\n\n var pairs = getOption(conf, \"pairs\");\n var pos = pairs.indexOf(ch);\n if (pos == -1) return CodeMirror.Pass;\n\n var closeBefore = getOption(conf,\"closeBefore\");\n\n var triples = getOption(conf, \"triples\");\n\n var identical = pairs.charAt(pos + 1) == ch;\n var ranges = cm.listSelections();\n var opening = pos % 2 == 0;\n\n var type;\n for (var i = 0; i < ranges.length; i++) {\n var range = ranges[i], cur = range.head, curType;\n var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));\n if (opening && !range.empty()) {\n curType = \"surround\";\n } else if ((identical || !opening) && next == ch) {\n if (identical && stringStartsAfter(cm, cur))\n curType = \"both\";\n else if (triples.indexOf(ch) >= 0 && cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == ch + ch + ch)\n curType = \"skipThree\";\n else\n curType = \"skip\";\n } else if (identical && cur.ch > 1 && triples.indexOf(ch) >= 0 &&\n cm.getRange(Pos(cur.line, cur.ch - 2), cur) == ch + ch) {\n if (cur.ch > 2 && /\\bstring/.test(cm.getTokenTypeAt(Pos(cur.line, cur.ch - 2)))) return CodeMirror.Pass;\n curType = \"addFour\";\n } else if (identical) {\n var prev = cur.ch == 0 ? \" \" : cm.getRange(Pos(cur.line, cur.ch - 1), cur)\n if (!CodeMirror.isWordChar(next) && prev != ch && !CodeMirror.isWordChar(prev)) curType = \"both\";\n else return CodeMirror.Pass;\n } else if (opening && (next.length === 0 || /\\s/.test(next) || closeBefore.indexOf(next) > -1)) {\n curType = \"both\";\n } else {\n return CodeMirror.Pass;\n }\n if (!type) type = curType;\n else if (type != curType) return CodeMirror.Pass;\n }\n\n var left = pos % 2 ? pairs.charAt(pos - 1) : ch;\n var right = pos % 2 ? ch : pairs.charAt(pos + 1);\n cm.operation(function() {\n if (type == \"skip\") {\n moveSel(cm, 1)\n } else if (type == \"skipThree\") {\n moveSel(cm, 3)\n } else if (type == \"surround\") {\n var sels = cm.getSelections();\n for (var i = 0; i < sels.length; i++)\n sels[i] = left + sels[i] + right;\n cm.replaceSelections(sels, \"around\");\n sels = cm.listSelections().slice();\n for (var i = 0; i < sels.length; i++)\n sels[i] = contractSelection(sels[i]);\n cm.setSelections(sels);\n } else if (type == \"both\") {\n cm.replaceSelection(left + right, null);\n cm.triggerElectric(left + right);\n moveSel(cm, -1)\n } else if (type == \"addFour\") {\n cm.replaceSelection(left + left + left + left, \"before\");\n moveSel(cm, 1)\n }\n });\n }\n\n function charsAround(cm, pos) {\n var str = cm.getRange(Pos(pos.line, pos.ch - 1),\n Pos(pos.line, pos.ch + 1));\n return str.length == 2 ? str : null;\n }\n\n function stringStartsAfter(cm, pos) {\n var token = cm.getTokenAt(Pos(pos.line, pos.ch + 1))\n return /\\bstring/.test(token.type) && token.start == pos.ch &&\n (pos.ch == 0 || !/\\bstring/.test(cm.getTokenTypeAt(pos)))\n }\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"javascript\", function(config, parserConfig) {\n var indentUnit = config.indentUnit;\n var statementIndent = parserConfig.statementIndent;\n var jsonldMode = parserConfig.jsonld;\n var jsonMode = parserConfig.json || jsonldMode;\n var trackScope = parserConfig.trackScope !== false\n var isTS = parserConfig.typescript;\n var wordRE = parserConfig.wordCharacters || /[\\w$\\xa1-\\uffff]/;\n\n // Tokenizer\n\n var keywords = function(){\n function kw(type) {return {type: type, style: \"keyword\"};}\n var A = kw(\"keyword a\"), B = kw(\"keyword b\"), C = kw(\"keyword c\"), D = kw(\"keyword d\");\n var operator = kw(\"operator\"), atom = {type: \"atom\", style: \"atom\"};\n\n return {\n \"if\": kw(\"if\"), \"while\": A, \"with\": A, \"else\": B, \"do\": B, \"try\": B, \"finally\": B,\n \"return\": D, \"break\": D, \"continue\": D, \"new\": kw(\"new\"), \"delete\": C, \"void\": C, \"throw\": C,\n \"debugger\": kw(\"debugger\"), \"var\": kw(\"var\"), \"const\": kw(\"var\"), \"let\": kw(\"var\"),\n \"function\": kw(\"function\"), \"catch\": kw(\"catch\"),\n \"for\": kw(\"for\"), \"switch\": kw(\"switch\"), \"case\": kw(\"case\"), \"default\": kw(\"default\"),\n \"in\": operator, \"typeof\": operator, \"instanceof\": operator,\n \"true\": atom, \"false\": atom, \"null\": atom, \"undefined\": atom, \"NaN\": atom, \"Infinity\": atom,\n \"this\": kw(\"this\"), \"class\": kw(\"class\"), \"super\": kw(\"atom\"),\n \"yield\": C, \"export\": kw(\"export\"), \"import\": kw(\"import\"), \"extends\": C,\n \"await\": C\n };\n }();\n\n var isOperatorChar = /[+\\-*&%=<>!?|~^@]/;\n var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)\"/;\n\n function readRegexp(stream) {\n var escaped = false, next, inSet = false;\n while ((next = stream.next()) != null) {\n if (!escaped) {\n if (next == \"/\" && !inSet) return;\n if (next == \"[\") inSet = true;\n else if (inSet && next == \"]\") inSet = false;\n }\n escaped = !escaped && next == \"\\\\\";\n }\n }\n\n // Used as scratch variables to communicate multiple values without\n // consing up tons of objects.\n var type, content;\n function ret(tp, style, cont) {\n type = tp; content = cont;\n return style;\n }\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (ch == '\"' || ch == \"'\") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == \".\" && stream.match(/^\\d[\\d_]*(?:[eE][+\\-]?[\\d_]+)?/)) {\n return ret(\"number\", \"number\");\n } else if (ch == \".\" && stream.match(\"..\")) {\n return ret(\"spread\", \"meta\");\n } else if (/[\\[\\]{}\\(\\),;\\:\\.]/.test(ch)) {\n return ret(ch);\n } else if (ch == \"=\" && stream.eat(\">\")) {\n return ret(\"=>\", \"operator\");\n } else if (ch == \"0\" && stream.match(/^(?:x[\\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) {\n return ret(\"number\", \"number\");\n } else if (/\\d/.test(ch)) {\n stream.match(/^[\\d_]*(?:n|(?:\\.[\\d_]*)?(?:[eE][+\\-]?[\\d_]+)?)?/);\n return ret(\"number\", \"number\");\n } else if (ch == \"/\") {\n if (stream.eat(\"*\")) {\n state.tokenize = tokenComment;\n return tokenComment(stream, state);\n } else if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return ret(\"comment\", \"comment\");\n } else if (expressionAllowed(stream, state, 1)) {\n readRegexp(stream);\n stream.match(/^\\b(([gimyus])(?![gimyus]*\\2))+\\b/);\n return ret(\"regexp\", \"string-2\");\n } else {\n stream.eat(\"=\");\n return ret(\"operator\", \"operator\", stream.current());\n }\n } else if (ch == \"`\") {\n state.tokenize = tokenQuasi;\n return tokenQuasi(stream, state);\n } else if (ch == \"#\" && stream.peek() == \"!\") {\n stream.skipToEnd();\n return ret(\"meta\", \"meta\");\n } else if (ch == \"#\" && stream.eatWhile(wordRE)) {\n return ret(\"variable\", \"property\")\n } else if (ch == \"<\" && stream.match(\"!--\") ||\n (ch == \"-\" && stream.match(\"->\") && !/\\S/.test(stream.string.slice(0, stream.start)))) {\n stream.skipToEnd()\n return ret(\"comment\", \"comment\")\n } else if (isOperatorChar.test(ch)) {\n if (ch != \">\" || !state.lexical || state.lexical.type != \">\") {\n if (stream.eat(\"=\")) {\n if (ch == \"!\" || ch == \"=\") stream.eat(\"=\")\n } else if (/[<>*+\\-|&?]/.test(ch)) {\n stream.eat(ch)\n if (ch == \">\") stream.eat(ch)\n }\n }\n if (ch == \"?\" && stream.eat(\".\")) return ret(\".\")\n return ret(\"operator\", \"operator\", stream.current());\n } else if (wordRE.test(ch)) {\n stream.eatWhile(wordRE);\n var word = stream.current()\n if (state.lastType != \".\") {\n if (keywords.propertyIsEnumerable(word)) {\n var kw = keywords[word]\n return ret(kw.type, kw.style, word)\n }\n if (word == \"async\" && stream.match(/^(\\s|\\/\\*([^*]|\\*(?!\\/))*?\\*\\/)*[\\[\\(\\w]/, false))\n return ret(\"async\", \"keyword\", word)\n }\n return ret(\"variable\", \"variable\", word)\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, next;\n if (jsonldMode && stream.peek() == \"@\" && stream.match(isJsonldKeyword)){\n state.tokenize = tokenBase;\n return ret(\"jsonld-keyword\", \"meta\");\n }\n while ((next = stream.next()) != null) {\n if (next == quote && !escaped) break;\n escaped = !escaped && next == \"\\\\\";\n }\n if (!escaped) state.tokenize = tokenBase;\n return ret(\"string\", \"string\");\n };\n }\n\n function tokenComment(stream, state) {\n var maybeEnd = false, ch;\n while (ch = stream.next()) {\n if (ch == \"/\" && maybeEnd) {\n state.tokenize = tokenBase;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return ret(\"comment\", \"comment\");\n }\n\n function tokenQuasi(stream, state) {\n var escaped = false, next;\n while ((next = stream.next()) != null) {\n if (!escaped && (next == \"`\" || next == \"$\" && stream.eat(\"{\"))) {\n state.tokenize = tokenBase;\n break;\n }\n escaped = !escaped && next == \"\\\\\";\n }\n return ret(\"quasi\", \"string-2\", stream.current());\n }\n\n var brackets = \"([{}])\";\n // This is a crude lookahead trick to try and notice that we're\n // parsing the argument patterns for a fat-arrow function before we\n // actually hit the arrow token. It only works if the arrow is on\n // the same line as the arguments and there's no strange noise\n // (comments) in between. Fallback is to only notice when we hit the\n // arrow, and not declare the arguments as locals for the arrow\n // body.\n function findFatArrow(stream, state) {\n if (state.fatArrowAt) state.fatArrowAt = null;\n var arrow = stream.string.indexOf(\"=>\", stream.start);\n if (arrow < 0) return;\n\n if (isTS) { // Try to skip TypeScript return type declarations after the arguments\n var m = /:\\s*(?:\\w+(?:<[^>]*>|\\[\\])?|\\{[^}]*\\})\\s*$/.exec(stream.string.slice(stream.start, arrow))\n if (m) arrow = m.index\n }\n\n var depth = 0, sawSomething = false;\n for (var pos = arrow - 1; pos >= 0; --pos) {\n var ch = stream.string.charAt(pos);\n var bracket = brackets.indexOf(ch);\n if (bracket >= 0 && bracket < 3) {\n if (!depth) { ++pos; break; }\n if (--depth == 0) { if (ch == \"(\") sawSomething = true; break; }\n } else if (bracket >= 3 && bracket < 6) {\n ++depth;\n } else if (wordRE.test(ch)) {\n sawSomething = true;\n } else if (/[\"'\\/`]/.test(ch)) {\n for (;; --pos) {\n if (pos == 0) return\n var next = stream.string.charAt(pos - 1)\n if (next == ch && stream.string.charAt(pos - 2) != \"\\\\\") { pos--; break }\n }\n } else if (sawSomething && !depth) {\n ++pos;\n break;\n }\n }\n if (sawSomething && !depth) state.fatArrowAt = pos;\n }\n\n // Parser\n\n var atomicTypes = {\"atom\": true, \"number\": true, \"variable\": true, \"string\": true,\n \"regexp\": true, \"this\": true, \"import\": true, \"jsonld-keyword\": true};\n\n function JSLexical(indented, column, type, align, prev, info) {\n this.indented = indented;\n this.column = column;\n this.type = type;\n this.prev = prev;\n this.info = info;\n if (align != null) this.align = align;\n }\n\n function inScope(state, varname) {\n if (!trackScope) return false\n for (var v = state.localVars; v; v = v.next)\n if (v.name == varname) return true;\n for (var cx = state.context; cx; cx = cx.prev) {\n for (var v = cx.vars; v; v = v.next)\n if (v.name == varname) return true;\n }\n }\n\n function parseJS(state, style, type, content, stream) {\n var cc = state.cc;\n // Communicate our context to the combinators.\n // (Less wasteful than consing up a hundred closures on every call.)\n cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;\n\n if (!state.lexical.hasOwnProperty(\"align\"))\n state.lexical.align = true;\n\n while(true) {\n var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;\n if (combinator(type, content)) {\n while(cc.length && cc[cc.length - 1].lex)\n cc.pop()();\n if (cx.marked) return cx.marked;\n if (type == \"variable\" && inScope(state, content)) return \"variable-2\";\n return style;\n }\n }\n }\n\n // Combinator utils\n\n var cx = {state: null, column: null, marked: null, cc: null};\n function pass() {\n for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);\n }\n function cont() {\n pass.apply(null, arguments);\n return true;\n }\n function inList(name, list) {\n for (var v = list; v; v = v.next) if (v.name == name) return true\n return false;\n }\n function register(varname) {\n var state = cx.state;\n cx.marked = \"def\";\n if (!trackScope) return\n if (state.context) {\n if (state.lexical.info == \"var\" && state.context && state.context.block) {\n // FIXME function decls are also not block scoped\n var newContext = registerVarScoped(varname, state.context)\n if (newContext != null) {\n state.context = newContext\n return\n }\n } else if (!inList(varname, state.localVars)) {\n state.localVars = new Var(varname, state.localVars)\n return\n }\n }\n // Fall through means this is global\n if (parserConfig.globalVars && !inList(varname, state.globalVars))\n state.globalVars = new Var(varname, state.globalVars)\n }\n function registerVarScoped(varname, context) {\n if (!context) {\n return null\n } else if (context.block) {\n var inner = registerVarScoped(varname, context.prev)\n if (!inner) return null\n if (inner == context.prev) return context\n return new Context(inner, context.vars, true)\n } else if (inList(varname, context.vars)) {\n return context\n } else {\n return new Context(context.prev, new Var(varname, context.vars), false)\n }\n }\n\n function isModifier(name) {\n return name == \"public\" || name == \"private\" || name == \"protected\" || name == \"abstract\" || name == \"readonly\"\n }\n\n // Combinators\n\n function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }\n function Var(name, next) { this.name = name; this.next = next }\n\n var defaultVars = new Var(\"this\", new Var(\"arguments\", null))\n function pushcontext() {\n cx.state.context = new Context(cx.state.context, cx.state.localVars, false)\n cx.state.localVars = defaultVars\n }\n function pushblockcontext() {\n cx.state.context = new Context(cx.state.context, cx.state.localVars, true)\n cx.state.localVars = null\n }\n pushcontext.lex = pushblockcontext.lex = true\n function popcontext() {\n cx.state.localVars = cx.state.context.vars\n cx.state.context = cx.state.context.prev\n }\n popcontext.lex = true\n function pushlex(type, info) {\n var result = function() {\n var state = cx.state, indent = state.indented;\n if (state.lexical.type == \"stat\") indent = state.lexical.indented;\n else for (var outer = state.lexical; outer && outer.type == \")\" && outer.align; outer = outer.prev)\n indent = outer.indented;\n state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);\n };\n result.lex = true;\n return result;\n }\n function poplex() {\n var state = cx.state;\n if (state.lexical.prev) {\n if (state.lexical.type == \")\")\n state.indented = state.lexical.indented;\n state.lexical = state.lexical.prev;\n }\n }\n poplex.lex = true;\n\n function expect(wanted) {\n function exp(type) {\n if (type == wanted) return cont();\n else if (wanted == \";\" || type == \"}\" || type == \")\" || type == \"]\") return pass();\n else return cont(exp);\n };\n return exp;\n }\n\n function statement(type, value) {\n if (type == \"var\") return cont(pushlex(\"vardef\", value), vardef, expect(\";\"), poplex);\n if (type == \"keyword a\") return cont(pushlex(\"form\"), parenExpr, statement, poplex);\n if (type == \"keyword b\") return cont(pushlex(\"form\"), statement, poplex);\n if (type == \"keyword d\") return cx.stream.match(/^\\s*$/, false) ? cont() : cont(pushlex(\"stat\"), maybeexpression, expect(\";\"), poplex);\n if (type == \"debugger\") return cont(expect(\";\"));\n if (type == \"{\") return cont(pushlex(\"}\"), pushblockcontext, block, poplex, popcontext);\n if (type == \";\") return cont();\n if (type == \"if\") {\n if (cx.state.lexical.info == \"else\" && cx.state.cc[cx.state.cc.length - 1] == poplex)\n cx.state.cc.pop()();\n return cont(pushlex(\"form\"), parenExpr, statement, poplex, maybeelse);\n }\n if (type == \"function\") return cont(functiondef);\n if (type == \"for\") return cont(pushlex(\"form\"), pushblockcontext, forspec, statement, popcontext, poplex);\n if (type == \"class\" || (isTS && value == \"interface\")) {\n cx.marked = \"keyword\"\n return cont(pushlex(\"form\", type == \"class\" ? type : value), className, poplex)\n }\n if (type == \"variable\") {\n if (isTS && value == \"declare\") {\n cx.marked = \"keyword\"\n return cont(statement)\n } else if (isTS && (value == \"module\" || value == \"enum\" || value == \"type\") && cx.stream.match(/^\\s*\\w/, false)) {\n cx.marked = \"keyword\"\n if (value == \"enum\") return cont(enumdef);\n else if (value == \"type\") return cont(typename, expect(\"operator\"), typeexpr, expect(\";\"));\n else return cont(pushlex(\"form\"), pattern, expect(\"{\"), pushlex(\"}\"), block, poplex, poplex)\n } else if (isTS && value == \"namespace\") {\n cx.marked = \"keyword\"\n return cont(pushlex(\"form\"), expression, statement, poplex)\n } else if (isTS && value == \"abstract\") {\n cx.marked = \"keyword\"\n return cont(statement)\n } else {\n return cont(pushlex(\"stat\"), maybelabel);\n }\n }\n if (type == \"switch\") return cont(pushlex(\"form\"), parenExpr, expect(\"{\"), pushlex(\"}\", \"switch\"), pushblockcontext,\n block, poplex, poplex, popcontext);\n if (type == \"case\") return cont(expression, expect(\":\"));\n if (type == \"default\") return cont(expect(\":\"));\n if (type == \"catch\") return cont(pushlex(\"form\"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);\n if (type == \"export\") return cont(pushlex(\"stat\"), afterExport, poplex);\n if (type == \"import\") return cont(pushlex(\"stat\"), afterImport, poplex);\n if (type == \"async\") return cont(statement)\n if (value == \"@\") return cont(expression, statement)\n return pass(pushlex(\"stat\"), expression, expect(\";\"), poplex);\n }\n function maybeCatchBinding(type) {\n if (type == \"(\") return cont(funarg, expect(\")\"))\n }\n function expression(type, value) {\n return expressionInner(type, value, false);\n }\n function expressionNoComma(type, value) {\n return expressionInner(type, value, true);\n }\n function parenExpr(type) {\n if (type != \"(\") return pass()\n return cont(pushlex(\")\"), maybeexpression, expect(\")\"), poplex)\n }\n function expressionInner(type, value, noComma) {\n if (cx.state.fatArrowAt == cx.stream.start) {\n var body = noComma ? arrowBodyNoComma : arrowBody;\n if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, expect(\"=>\"), body, popcontext);\n else if (type == \"variable\") return pass(pushcontext, pattern, expect(\"=>\"), body, popcontext);\n }\n\n var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;\n if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);\n if (type == \"function\") return cont(functiondef, maybeop);\n if (type == \"class\" || (isTS && value == \"interface\")) { cx.marked = \"keyword\"; return cont(pushlex(\"form\"), classExpression, poplex); }\n if (type == \"keyword c\" || type == \"async\") return cont(noComma ? expressionNoComma : expression);\n if (type == \"(\") return cont(pushlex(\")\"), maybeexpression, expect(\")\"), poplex, maybeop);\n if (type == \"operator\" || type == \"spread\") return cont(noComma ? expressionNoComma : expression);\n if (type == \"[\") return cont(pushlex(\"]\"), arrayLiteral, poplex, maybeop);\n if (type == \"{\") return contCommasep(objprop, \"}\", null, maybeop);\n if (type == \"quasi\") return pass(quasi, maybeop);\n if (type == \"new\") return cont(maybeTarget(noComma));\n return cont();\n }\n function maybeexpression(type) {\n if (type.match(/[;\\}\\)\\],]/)) return pass();\n return pass(expression);\n }\n\n function maybeoperatorComma(type, value) {\n if (type == \",\") return cont(maybeexpression);\n return maybeoperatorNoComma(type, value, false);\n }\n function maybeoperatorNoComma(type, value, noComma) {\n var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;\n var expr = noComma == false ? expression : expressionNoComma;\n if (type == \"=>\") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);\n if (type == \"operator\") {\n if (/\\+\\+|--/.test(value) || isTS && value == \"!\") return cont(me);\n if (isTS && value == \"<\" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\\s*\\(/, false))\n return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, me);\n if (value == \"?\") return cont(expression, expect(\":\"), expr);\n return cont(expr);\n }\n if (type == \"quasi\") { return pass(quasi, me); }\n if (type == \";\") return;\n if (type == \"(\") return contCommasep(expressionNoComma, \")\", \"call\", me);\n if (type == \".\") return cont(property, me);\n if (type == \"[\") return cont(pushlex(\"]\"), maybeexpression, expect(\"]\"), poplex, me);\n if (isTS && value == \"as\") { cx.marked = \"keyword\"; return cont(typeexpr, me) }\n if (type == \"regexp\") {\n cx.state.lastType = cx.marked = \"operator\"\n cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)\n return cont(expr)\n }\n }\n function quasi(type, value) {\n if (type != \"quasi\") return pass();\n if (value.slice(value.length - 2) != \"${\") return cont(quasi);\n return cont(maybeexpression, continueQuasi);\n }\n function continueQuasi(type) {\n if (type == \"}\") {\n cx.marked = \"string-2\";\n cx.state.tokenize = tokenQuasi;\n return cont(quasi);\n }\n }\n function arrowBody(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == \"{\" ? statement : expression);\n }\n function arrowBodyNoComma(type) {\n findFatArrow(cx.stream, cx.state);\n return pass(type == \"{\" ? statement : expressionNoComma);\n }\n function maybeTarget(noComma) {\n return function(type) {\n if (type == \".\") return cont(noComma ? targetNoComma : target);\n else if (type == \"variable\" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)\n else return pass(noComma ? expressionNoComma : expression);\n };\n }\n function target(_, value) {\n if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorComma); }\n }\n function targetNoComma(_, value) {\n if (value == \"target\") { cx.marked = \"keyword\"; return cont(maybeoperatorNoComma); }\n }\n function maybelabel(type) {\n if (type == \":\") return cont(poplex, statement);\n return pass(maybeoperatorComma, expect(\";\"), poplex);\n }\n function property(type) {\n if (type == \"variable\") {cx.marked = \"property\"; return cont();}\n }\n function objprop(type, value) {\n if (type == \"async\") {\n cx.marked = \"property\";\n return cont(objprop);\n } else if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\";\n if (value == \"get\" || value == \"set\") return cont(getterSetter);\n var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params\n if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\\s*:\\s*/, false)))\n cx.state.fatArrowAt = cx.stream.pos + m[0].length\n return cont(afterprop);\n } else if (type == \"number\" || type == \"string\") {\n cx.marked = jsonldMode ? \"property\" : (cx.style + \" property\");\n return cont(afterprop);\n } else if (type == \"jsonld-keyword\") {\n return cont(afterprop);\n } else if (isTS && isModifier(value)) {\n cx.marked = \"keyword\"\n return cont(objprop)\n } else if (type == \"[\") {\n return cont(expression, maybetype, expect(\"]\"), afterprop);\n } else if (type == \"spread\") {\n return cont(expressionNoComma, afterprop);\n } else if (value == \"*\") {\n cx.marked = \"keyword\";\n return cont(objprop);\n } else if (type == \":\") {\n return pass(afterprop)\n }\n }\n function getterSetter(type) {\n if (type != \"variable\") return pass(afterprop);\n cx.marked = \"property\";\n return cont(functiondef);\n }\n function afterprop(type) {\n if (type == \":\") return cont(expressionNoComma);\n if (type == \"(\") return pass(functiondef);\n }\n function commasep(what, end, sep) {\n function proceed(type, value) {\n if (sep ? sep.indexOf(type) > -1 : type == \",\") {\n var lex = cx.state.lexical;\n if (lex.info == \"call\") lex.pos = (lex.pos || 0) + 1;\n return cont(function(type, value) {\n if (type == end || value == end) return pass()\n return pass(what)\n }, proceed);\n }\n if (type == end || value == end) return cont();\n if (sep && sep.indexOf(\";\") > -1) return pass(what)\n return cont(expect(end));\n }\n return function(type, value) {\n if (type == end || value == end) return cont();\n return pass(what, proceed);\n };\n }\n function contCommasep(what, end, info) {\n for (var i = 3; i < arguments.length; i++)\n cx.cc.push(arguments[i]);\n return cont(pushlex(end, info), commasep(what, end), poplex);\n }\n function block(type) {\n if (type == \"}\") return cont();\n return pass(statement, block);\n }\n function maybetype(type, value) {\n if (isTS) {\n if (type == \":\") return cont(typeexpr);\n if (value == \"?\") return cont(maybetype);\n }\n }\n function maybetypeOrIn(type, value) {\n if (isTS && (type == \":\" || value == \"in\")) return cont(typeexpr)\n }\n function mayberettype(type) {\n if (isTS && type == \":\") {\n if (cx.stream.match(/^\\s*\\w+\\s+is\\b/, false)) return cont(expression, isKW, typeexpr)\n else return cont(typeexpr)\n }\n }\n function isKW(_, value) {\n if (value == \"is\") {\n cx.marked = \"keyword\"\n return cont()\n }\n }\n function typeexpr(type, value) {\n if (value == \"keyof\" || value == \"typeof\" || value == \"infer\" || value == \"readonly\") {\n cx.marked = \"keyword\"\n return cont(value == \"typeof\" ? expressionNoComma : typeexpr)\n }\n if (type == \"variable\" || value == \"void\") {\n cx.marked = \"type\"\n return cont(afterType)\n }\n if (value == \"|\" || value == \"&\") return cont(typeexpr)\n if (type == \"string\" || type == \"number\" || type == \"atom\") return cont(afterType);\n if (type == \"[\") return cont(pushlex(\"]\"), commasep(typeexpr, \"]\", \",\"), poplex, afterType)\n if (type == \"{\") return cont(pushlex(\"}\"), typeprops, poplex, afterType)\n if (type == \"(\") return cont(commasep(typearg, \")\"), maybeReturnType, afterType)\n if (type == \"<\") return cont(commasep(typeexpr, \">\"), typeexpr)\n if (type == \"quasi\") { return pass(quasiType, afterType); }\n }\n function maybeReturnType(type) {\n if (type == \"=>\") return cont(typeexpr)\n }\n function typeprops(type) {\n if (type.match(/[\\}\\)\\]]/)) return cont()\n if (type == \",\" || type == \";\") return cont(typeprops)\n return pass(typeprop, typeprops)\n }\n function typeprop(type, value) {\n if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\"\n return cont(typeprop)\n } else if (value == \"?\" || type == \"number\" || type == \"string\") {\n return cont(typeprop)\n } else if (type == \":\") {\n return cont(typeexpr)\n } else if (type == \"[\") {\n return cont(expect(\"variable\"), maybetypeOrIn, expect(\"]\"), typeprop)\n } else if (type == \"(\") {\n return pass(functiondecl, typeprop)\n } else if (!type.match(/[;\\}\\)\\],]/)) {\n return cont()\n }\n }\n function quasiType(type, value) {\n if (type != \"quasi\") return pass();\n if (value.slice(value.length - 2) != \"${\") return cont(quasiType);\n return cont(typeexpr, continueQuasiType);\n }\n function continueQuasiType(type) {\n if (type == \"}\") {\n cx.marked = \"string-2\";\n cx.state.tokenize = tokenQuasi;\n return cont(quasiType);\n }\n }\n function typearg(type, value) {\n if (type == \"variable\" && cx.stream.match(/^\\s*[?:]/, false) || value == \"?\") return cont(typearg)\n if (type == \":\") return cont(typeexpr)\n if (type == \"spread\") return cont(typearg)\n return pass(typeexpr)\n }\n function afterType(type, value) {\n if (value == \"<\") return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, afterType)\n if (value == \"|\" || type == \".\" || value == \"&\") return cont(typeexpr)\n if (type == \"[\") return cont(typeexpr, expect(\"]\"), afterType)\n if (value == \"extends\" || value == \"implements\") { cx.marked = \"keyword\"; return cont(typeexpr) }\n if (value == \"?\") return cont(typeexpr, expect(\":\"), typeexpr)\n }\n function maybeTypeArgs(_, value) {\n if (value == \"<\") return cont(pushlex(\">\"), commasep(typeexpr, \">\"), poplex, afterType)\n }\n function typeparam() {\n return pass(typeexpr, maybeTypeDefault)\n }\n function maybeTypeDefault(_, value) {\n if (value == \"=\") return cont(typeexpr)\n }\n function vardef(_, value) {\n if (value == \"enum\") {cx.marked = \"keyword\"; return cont(enumdef)}\n return pass(pattern, maybetype, maybeAssign, vardefCont);\n }\n function pattern(type, value) {\n if (isTS && isModifier(value)) { cx.marked = \"keyword\"; return cont(pattern) }\n if (type == \"variable\") { register(value); return cont(); }\n if (type == \"spread\") return cont(pattern);\n if (type == \"[\") return contCommasep(eltpattern, \"]\");\n if (type == \"{\") return contCommasep(proppattern, \"}\");\n }\n function proppattern(type, value) {\n if (type == \"variable\" && !cx.stream.match(/^\\s*:/, false)) {\n register(value);\n return cont(maybeAssign);\n }\n if (type == \"variable\") cx.marked = \"property\";\n if (type == \"spread\") return cont(pattern);\n if (type == \"}\") return pass();\n if (type == \"[\") return cont(expression, expect(']'), expect(':'), proppattern);\n return cont(expect(\":\"), pattern, maybeAssign);\n }\n function eltpattern() {\n return pass(pattern, maybeAssign)\n }\n function maybeAssign(_type, value) {\n if (value == \"=\") return cont(expressionNoComma);\n }\n function vardefCont(type) {\n if (type == \",\") return cont(vardef);\n }\n function maybeelse(type, value) {\n if (type == \"keyword b\" && value == \"else\") return cont(pushlex(\"form\", \"else\"), statement, poplex);\n }\n function forspec(type, value) {\n if (value == \"await\") return cont(forspec);\n if (type == \"(\") return cont(pushlex(\")\"), forspec1, poplex);\n }\n function forspec1(type) {\n if (type == \"var\") return cont(vardef, forspec2);\n if (type == \"variable\") return cont(forspec2);\n return pass(forspec2)\n }\n function forspec2(type, value) {\n if (type == \")\") return cont()\n if (type == \";\") return cont(forspec2)\n if (value == \"in\" || value == \"of\") { cx.marked = \"keyword\"; return cont(expression, forspec2) }\n return pass(expression, forspec2)\n }\n function functiondef(type, value) {\n if (value == \"*\") {cx.marked = \"keyword\"; return cont(functiondef);}\n if (type == \"variable\") {register(value); return cont(functiondef);}\n if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, mayberettype, statement, popcontext);\n if (isTS && value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, functiondef)\n }\n function functiondecl(type, value) {\n if (value == \"*\") {cx.marked = \"keyword\"; return cont(functiondecl);}\n if (type == \"variable\") {register(value); return cont(functiondecl);}\n if (type == \"(\") return cont(pushcontext, pushlex(\")\"), commasep(funarg, \")\"), poplex, mayberettype, popcontext);\n if (isTS && value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, functiondecl)\n }\n function typename(type, value) {\n if (type == \"keyword\" || type == \"variable\") {\n cx.marked = \"type\"\n return cont(typename)\n } else if (value == \"<\") {\n return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex)\n }\n }\n function funarg(type, value) {\n if (value == \"@\") cont(expression, funarg)\n if (type == \"spread\") return cont(funarg);\n if (isTS && isModifier(value)) { cx.marked = \"keyword\"; return cont(funarg); }\n if (isTS && type == \"this\") return cont(maybetype, maybeAssign)\n return pass(pattern, maybetype, maybeAssign);\n }\n function classExpression(type, value) {\n // Class expressions may have an optional name.\n if (type == \"variable\") return className(type, value);\n return classNameAfter(type, value);\n }\n function className(type, value) {\n if (type == \"variable\") {register(value); return cont(classNameAfter);}\n }\n function classNameAfter(type, value) {\n if (value == \"<\") return cont(pushlex(\">\"), commasep(typeparam, \">\"), poplex, classNameAfter)\n if (value == \"extends\" || value == \"implements\" || (isTS && type == \",\")) {\n if (value == \"implements\") cx.marked = \"keyword\";\n return cont(isTS ? typeexpr : expression, classNameAfter);\n }\n if (type == \"{\") return cont(pushlex(\"}\"), classBody, poplex);\n }\n function classBody(type, value) {\n if (type == \"async\" ||\n (type == \"variable\" &&\n (value == \"static\" || value == \"get\" || value == \"set\" || (isTS && isModifier(value))) &&\n cx.stream.match(/^\\s+#?[\\w$\\xa1-\\uffff]/, false))) {\n cx.marked = \"keyword\";\n return cont(classBody);\n }\n if (type == \"variable\" || cx.style == \"keyword\") {\n cx.marked = \"property\";\n return cont(classfield, classBody);\n }\n if (type == \"number\" || type == \"string\") return cont(classfield, classBody);\n if (type == \"[\")\n return cont(expression, maybetype, expect(\"]\"), classfield, classBody)\n if (value == \"*\") {\n cx.marked = \"keyword\";\n return cont(classBody);\n }\n if (isTS && type == \"(\") return pass(functiondecl, classBody)\n if (type == \";\" || type == \",\") return cont(classBody);\n if (type == \"}\") return cont();\n if (value == \"@\") return cont(expression, classBody)\n }\n function classfield(type, value) {\n if (value == \"!\") return cont(classfield)\n if (value == \"?\") return cont(classfield)\n if (type == \":\") return cont(typeexpr, maybeAssign)\n if (value == \"=\") return cont(expressionNoComma)\n var context = cx.state.lexical.prev, isInterface = context && context.info == \"interface\"\n return pass(isInterface ? functiondecl : functiondef)\n }\n function afterExport(type, value) {\n if (value == \"*\") { cx.marked = \"keyword\"; return cont(maybeFrom, expect(\";\")); }\n if (value == \"default\") { cx.marked = \"keyword\"; return cont(expression, expect(\";\")); }\n if (type == \"{\") return cont(commasep(exportField, \"}\"), maybeFrom, expect(\";\"));\n return pass(statement);\n }\n function exportField(type, value) {\n if (value == \"as\") { cx.marked = \"keyword\"; return cont(expect(\"variable\")); }\n if (type == \"variable\") return pass(expressionNoComma, exportField);\n }\n function afterImport(type) {\n if (type == \"string\") return cont();\n if (type == \"(\") return pass(expression);\n if (type == \".\") return pass(maybeoperatorComma);\n return pass(importSpec, maybeMoreImports, maybeFrom);\n }\n function importSpec(type, value) {\n if (type == \"{\") return contCommasep(importSpec, \"}\");\n if (type == \"variable\") register(value);\n if (value == \"*\") cx.marked = \"keyword\";\n return cont(maybeAs);\n }\n function maybeMoreImports(type) {\n if (type == \",\") return cont(importSpec, maybeMoreImports)\n }\n function maybeAs(_type, value) {\n if (value == \"as\") { cx.marked = \"keyword\"; return cont(importSpec); }\n }\n function maybeFrom(_type, value) {\n if (value == \"from\") { cx.marked = \"keyword\"; return cont(expression); }\n }\n function arrayLiteral(type) {\n if (type == \"]\") return cont();\n return pass(commasep(expressionNoComma, \"]\"));\n }\n function enumdef() {\n return pass(pushlex(\"form\"), pattern, expect(\"{\"), pushlex(\"}\"), commasep(enummember, \"}\"), poplex, poplex)\n }\n function enummember() {\n return pass(pattern, maybeAssign);\n }\n\n function isContinuedStatement(state, textAfter) {\n return state.lastType == \"operator\" || state.lastType == \",\" ||\n isOperatorChar.test(textAfter.charAt(0)) ||\n /[,.]/.test(textAfter.charAt(0));\n }\n\n function expressionAllowed(stream, state, backUp) {\n return state.tokenize == tokenBase &&\n /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\\[{}\\(,;:]|=>)$/.test(state.lastType) ||\n (state.lastType == \"quasi\" && /\\{\\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))\n }\n\n // Interface\n\n return {\n startState: function(basecolumn) {\n var state = {\n tokenize: tokenBase,\n lastType: \"sof\",\n cc: [],\n lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, \"block\", false),\n localVars: parserConfig.localVars,\n context: parserConfig.localVars && new Context(null, null, false),\n indented: basecolumn || 0\n };\n if (parserConfig.globalVars && typeof parserConfig.globalVars == \"object\")\n state.globalVars = parserConfig.globalVars;\n return state;\n },\n\n token: function(stream, state) {\n if (stream.sol()) {\n if (!state.lexical.hasOwnProperty(\"align\"))\n state.lexical.align = false;\n state.indented = stream.indentation();\n findFatArrow(stream, state);\n }\n if (state.tokenize != tokenComment && stream.eatSpace()) return null;\n var style = state.tokenize(stream, state);\n if (type == \"comment\") return style;\n state.lastType = type == \"operator\" && (content == \"++\" || content == \"--\") ? \"incdec\" : type;\n return parseJS(state, style, type, content, stream);\n },\n\n indent: function(state, textAfter) {\n if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass;\n if (state.tokenize != tokenBase) return 0;\n var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top\n // Kludge to prevent 'maybelse' from blocking lexical scope pops\n if (!/^\\s*else\\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {\n var c = state.cc[i];\n if (c == poplex) lexical = lexical.prev;\n else if (c != maybeelse && c != popcontext) break;\n }\n while ((lexical.type == \"stat\" || lexical.type == \"form\") &&\n (firstChar == \"}\" || ((top = state.cc[state.cc.length - 1]) &&\n (top == maybeoperatorComma || top == maybeoperatorNoComma) &&\n !/^[,\\.=+\\-*:?[\\(]/.test(textAfter))))\n lexical = lexical.prev;\n if (statementIndent && lexical.type == \")\" && lexical.prev.type == \"stat\")\n lexical = lexical.prev;\n var type = lexical.type, closing = firstChar == type;\n\n if (type == \"vardef\") return lexical.indented + (state.lastType == \"operator\" || state.lastType == \",\" ? lexical.info.length + 1 : 0);\n else if (type == \"form\" && firstChar == \"{\") return lexical.indented;\n else if (type == \"form\") return lexical.indented + indentUnit;\n else if (type == \"stat\")\n return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);\n else if (lexical.info == \"switch\" && !closing && parserConfig.doubleIndentSwitch != false)\n return lexical.indented + (/^(?:case|default)\\b/.test(textAfter) ? indentUnit : 2 * indentUnit);\n else if (lexical.align) return lexical.column + (closing ? 0 : 1);\n else return lexical.indented + (closing ? 0 : indentUnit);\n },\n\n electricInput: /^\\s*(?:case .*?:|default:|\\{|\\})$/,\n blockCommentStart: jsonMode ? null : \"/*\",\n blockCommentEnd: jsonMode ? null : \"*/\",\n blockCommentContinue: jsonMode ? null : \" * \",\n lineComment: jsonMode ? null : \"//\",\n fold: \"brace\",\n closeBrackets: \"()[]{}''\\\"\\\"``\",\n\n helperType: jsonMode ? \"json\" : \"javascript\",\n jsonldMode: jsonldMode,\n jsonMode: jsonMode,\n\n expressionAllowed: expressionAllowed,\n\n skipExpression: function(state) {\n parseJS(state, \"atom\", \"atom\", \"true\", new CodeMirror.StringStream(\"\", 2, null))\n }\n };\n});\n\nCodeMirror.registerHelper(\"wordChars\", \"javascript\", /[\\w$]/);\n\nCodeMirror.defineMIME(\"text/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"text/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/x-javascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/ecmascript\", \"javascript\");\nCodeMirror.defineMIME(\"application/json\", { name: \"javascript\", json: true });\nCodeMirror.defineMIME(\"application/x-json\", { name: \"javascript\", json: true });\nCodeMirror.defineMIME(\"application/manifest+json\", { name: \"javascript\", json: true })\nCodeMirror.defineMIME(\"application/ld+json\", { name: \"javascript\", jsonld: true });\nCodeMirror.defineMIME(\"text/typescript\", { name: \"javascript\", typescript: true });\nCodeMirror.defineMIME(\"application/typescript\", { name: \"javascript\", typescript: true });\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nvar htmlConfig = {\n autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n 'track': true, 'wbr': true, 'menuitem': true},\n implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n 'th': true, 'tr': true},\n contextGrabbers: {\n 'dd': {'dd': true, 'dt': true},\n 'dt': {'dd': true, 'dt': true},\n 'li': {'li': true},\n 'option': {'option': true, 'optgroup': true},\n 'optgroup': {'optgroup': true},\n 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n 'rp': {'rp': true, 'rt': true},\n 'rt': {'rp': true, 'rt': true},\n 'tbody': {'tbody': true, 'tfoot': true},\n 'td': {'td': true, 'th': true},\n 'tfoot': {'tbody': true},\n 'th': {'td': true, 'th': true},\n 'thead': {'tbody': true, 'tfoot': true},\n 'tr': {'tr': true}\n },\n doNotIndent: {\"pre\": true},\n allowUnquoted: true,\n allowMissing: true,\n caseFold: true\n}\n\nvar xmlConfig = {\n autoSelfClosers: {},\n implicitlyClosed: {},\n contextGrabbers: {},\n doNotIndent: {},\n allowUnquoted: false,\n allowMissing: false,\n allowMissingTagName: false,\n caseFold: false\n}\n\nCodeMirror.defineMode(\"xml\", function(editorConf, config_) {\n var indentUnit = editorConf.indentUnit\n var config = {}\n var defaults = config_.htmlMode ? htmlConfig : xmlConfig\n for (var prop in defaults) config[prop] = defaults[prop]\n for (var prop in config_) config[prop] = config_[prop]\n\n // Return variables for tokenizers\n var type, setStyle;\n\n function inText(stream, state) {\n function chain(parser) {\n state.tokenize = parser;\n return parser(stream, state);\n }\n\n var ch = stream.next();\n if (ch == \"<\") {\n if (stream.eat(\"!\")) {\n if (stream.eat(\"[\")) {\n if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n else return null;\n } else if (stream.match(\"--\")) {\n return chain(inBlock(\"comment\", \"-->\"));\n } else if (stream.match(\"DOCTYPE\", true, true)) {\n stream.eatWhile(/[\\w\\._\\-]/);\n return chain(doctype(1));\n } else {\n return null;\n }\n } else if (stream.eat(\"?\")) {\n stream.eatWhile(/[\\w\\._\\-]/);\n state.tokenize = inBlock(\"meta\", \"?>\");\n return \"meta\";\n } else {\n type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n state.tokenize = inTag;\n return \"tag bracket\";\n }\n } else if (ch == \"&\") {\n var ok;\n if (stream.eat(\"#\")) {\n if (stream.eat(\"x\")) {\n ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n } else {\n ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n }\n } else {\n ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n }\n return ok ? \"atom\" : \"error\";\n } else {\n stream.eatWhile(/[^&<]/);\n return null;\n }\n }\n inText.isInText = true;\n\n function inTag(stream, state) {\n var ch = stream.next();\n if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n state.tokenize = inText;\n type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n return \"tag bracket\";\n } else if (ch == \"=\") {\n type = \"equals\";\n return null;\n } else if (ch == \"<\") {\n state.tokenize = inText;\n state.state = baseState;\n state.tagName = state.tagStart = null;\n var next = state.tokenize(stream, state);\n return next ? next + \" tag error\" : \"tag error\";\n } else if (/[\\'\\\"]/.test(ch)) {\n state.tokenize = inAttribute(ch);\n state.stringStartCol = stream.column();\n return state.tokenize(stream, state);\n } else {\n stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n return \"word\";\n }\n }\n\n function inAttribute(quote) {\n var closure = function(stream, state) {\n while (!stream.eol()) {\n if (stream.next() == quote) {\n state.tokenize = inTag;\n break;\n }\n }\n return \"string\";\n };\n closure.isInAttribute = true;\n return closure;\n }\n\n function inBlock(style, terminator) {\n return function(stream, state) {\n while (!stream.eol()) {\n if (stream.match(terminator)) {\n state.tokenize = inText;\n break;\n }\n stream.next();\n }\n return style;\n }\n }\n\n function doctype(depth) {\n return function(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == \"<\") {\n state.tokenize = doctype(depth + 1);\n return state.tokenize(stream, state);\n } else if (ch == \">\") {\n if (depth == 1) {\n state.tokenize = inText;\n break;\n } else {\n state.tokenize = doctype(depth - 1);\n return state.tokenize(stream, state);\n }\n }\n }\n return \"meta\";\n };\n }\n\n function lower(tagName) {\n return tagName && tagName.toLowerCase();\n }\n\n function Context(state, tagName, startOfLine) {\n this.prev = state.context;\n this.tagName = tagName || \"\";\n this.indent = state.indented;\n this.startOfLine = startOfLine;\n if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n this.noIndent = true;\n }\n function popContext(state) {\n if (state.context) state.context = state.context.prev;\n }\n function maybePopContext(state, nextTagName) {\n var parentTagName;\n while (true) {\n if (!state.context) {\n return;\n }\n parentTagName = state.context.tagName;\n if (!config.contextGrabbers.hasOwnProperty(lower(parentTagName)) ||\n !config.contextGrabbers[lower(parentTagName)].hasOwnProperty(lower(nextTagName))) {\n return;\n }\n popContext(state);\n }\n }\n\n function baseState(type, stream, state) {\n if (type == \"openTag\") {\n state.tagStart = stream.column();\n return tagNameState;\n } else if (type == \"closeTag\") {\n return closeTagNameState;\n } else {\n return baseState;\n }\n }\n function tagNameState(type, stream, state) {\n if (type == \"word\") {\n state.tagName = stream.current();\n setStyle = \"tag\";\n return attrState;\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return attrState(type, stream, state);\n } else {\n setStyle = \"error\";\n return tagNameState;\n }\n }\n function closeTagNameState(type, stream, state) {\n if (type == \"word\") {\n var tagName = stream.current();\n if (state.context && state.context.tagName != tagName &&\n config.implicitlyClosed.hasOwnProperty(lower(state.context.tagName)))\n popContext(state);\n if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {\n setStyle = \"tag\";\n return closeState;\n } else {\n setStyle = \"tag error\";\n return closeStateErr;\n }\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return closeState(type, stream, state);\n } else {\n setStyle = \"error\";\n return closeStateErr;\n }\n }\n\n function closeState(type, _stream, state) {\n if (type != \"endTag\") {\n setStyle = \"error\";\n return closeState;\n }\n popContext(state);\n return baseState;\n }\n function closeStateErr(type, stream, state) {\n setStyle = \"error\";\n return closeState(type, stream, state);\n }\n\n function attrState(type, _stream, state) {\n if (type == \"word\") {\n setStyle = \"attribute\";\n return attrEqState;\n } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n var tagName = state.tagName, tagStart = state.tagStart;\n state.tagName = state.tagStart = null;\n if (type == \"selfcloseTag\" ||\n config.autoSelfClosers.hasOwnProperty(lower(tagName))) {\n maybePopContext(state, tagName);\n } else {\n maybePopContext(state, tagName);\n state.context = new Context(state, tagName, tagStart == state.indented);\n }\n return baseState;\n }\n setStyle = \"error\";\n return attrState;\n }\n function attrEqState(type, stream, state) {\n if (type == \"equals\") return attrValueState;\n if (!config.allowMissing) setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrValueState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n if (type == \"word\" && config.allowUnquoted) {setStyle = \"string\"; return attrState;}\n setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrContinuedState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n return attrState(type, stream, state);\n }\n\n return {\n startState: function(baseIndent) {\n var state = {tokenize: inText,\n state: baseState,\n indented: baseIndent || 0,\n tagName: null, tagStart: null,\n context: null}\n if (baseIndent != null) state.baseIndent = baseIndent\n return state\n },\n\n token: function(stream, state) {\n if (!state.tagName && stream.sol())\n state.indented = stream.indentation();\n\n if (stream.eatSpace()) return null;\n type = null;\n var style = state.tokenize(stream, state);\n if ((style || type) && style != \"comment\") {\n setStyle = null;\n state.state = state.state(type || style, stream, state);\n if (setStyle)\n style = setStyle == \"error\" ? style + \" error\" : setStyle;\n }\n return style;\n },\n\n indent: function(state, textAfter, fullLine) {\n var context = state.context;\n // Indent multi-line strings (e.g. css).\n if (state.tokenize.isInAttribute) {\n if (state.tagStart == state.indented)\n return state.stringStartCol + 1;\n else\n return state.indented + indentUnit;\n }\n if (context && context.noIndent) return CodeMirror.Pass;\n if (state.tokenize != inTag && state.tokenize != inText)\n return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n // Indent the starts of attribute names.\n if (state.tagName) {\n if (config.multilineTagIndentPastTag !== false)\n return state.tagStart + state.tagName.length + 2;\n else\n return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);\n }\n if (config.alignCDATA && /<!\\[CDATA\\[/.test(textAfter)) return 0;\n var tagAfter = textAfter && /^<(\\/)?([\\w_:\\.-]*)/.exec(textAfter);\n if (tagAfter && tagAfter[1]) { // Closing tag spotted\n while (context) {\n if (context.tagName == tagAfter[2]) {\n context = context.prev;\n break;\n } else if (config.implicitlyClosed.hasOwnProperty(lower(context.tagName))) {\n context = context.prev;\n } else {\n break;\n }\n }\n } else if (tagAfter) { // Opening tag spotted\n while (context) {\n var grabbers = config.contextGrabbers[lower(context.tagName)];\n if (grabbers && grabbers.hasOwnProperty(lower(tagAfter[2])))\n context = context.prev;\n else\n break;\n }\n }\n while (context && context.prev && !context.startOfLine)\n context = context.prev;\n if (context) return context.indent + indentUnit;\n else return state.baseIndent || 0;\n },\n\n electricInput: /<\\/[\\s\\w:]+>$/,\n blockCommentStart: \"<!--\",\n blockCommentEnd: \"-->\",\n\n configuration: config.htmlMode ? \"html\" : \"xml\",\n helperType: config.htmlMode ? \"html\" : \"xml\",\n\n skipAttribute: function(state) {\n if (state.state == attrValueState)\n state.state = attrState\n },\n\n xmlCurrentTag: function(state) {\n return state.tagName ? {name: state.tagName, close: state.type == \"closeTag\"} : null\n },\n\n xmlCurrentContext: function(state) {\n var context = []\n for (var cx = state.context; cx; cx = cx.prev)\n context.push(cx.tagName)\n return context.reverse()\n }\n };\n});\n\nCodeMirror.defineMIME(\"text/xml\", \"xml\");\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nCodeMirror.defineMode(\"css\", function(config, parserConfig) {\n var inline = parserConfig.inline\n if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode(\"text/css\");\n\n var indentUnit = config.indentUnit,\n tokenHooks = parserConfig.tokenHooks,\n documentTypes = parserConfig.documentTypes || {},\n mediaTypes = parserConfig.mediaTypes || {},\n mediaFeatures = parserConfig.mediaFeatures || {},\n mediaValueKeywords = parserConfig.mediaValueKeywords || {},\n propertyKeywords = parserConfig.propertyKeywords || {},\n nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},\n fontProperties = parserConfig.fontProperties || {},\n counterDescriptors = parserConfig.counterDescriptors || {},\n colorKeywords = parserConfig.colorKeywords || {},\n valueKeywords = parserConfig.valueKeywords || {},\n allowNested = parserConfig.allowNested,\n lineComment = parserConfig.lineComment,\n supportsAtComponent = parserConfig.supportsAtComponent === true,\n highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;\n\n var type, override;\n function ret(style, tp) { type = tp; return style; }\n\n // Tokenizers\n\n function tokenBase(stream, state) {\n var ch = stream.next();\n if (tokenHooks[ch]) {\n var result = tokenHooks[ch](stream, state);\n if (result !== false) return result;\n }\n if (ch == \"@\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"def\", stream.current());\n } else if (ch == \"=\" || (ch == \"~\" || ch == \"|\") && stream.eat(\"=\")) {\n return ret(null, \"compare\");\n } else if (ch == \"\\\"\" || ch == \"'\") {\n state.tokenize = tokenString(ch);\n return state.tokenize(stream, state);\n } else if (ch == \"#\") {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"atom\", \"hash\");\n } else if (ch == \"!\") {\n stream.match(/^\\s*\\w*/);\n return ret(\"keyword\", \"important\");\n } else if (/\\d/.test(ch) || ch == \".\" && stream.eat(/\\d/)) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (ch === \"-\") {\n if (/[\\d.]/.test(stream.peek())) {\n stream.eatWhile(/[\\w.%]/);\n return ret(\"number\", \"unit\");\n } else if (stream.match(/^-[\\w\\\\\\-]*/)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return ret(\"variable-2\", \"variable-definition\");\n return ret(\"variable-2\", \"variable\");\n } else if (stream.match(/^\\w+-/)) {\n return ret(\"meta\", \"meta\");\n }\n } else if (/[,+>*\\/]/.test(ch)) {\n return ret(null, \"select-op\");\n } else if (ch == \".\" && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {\n return ret(\"qualifier\", \"qualifier\");\n } else if (/[:;{}\\[\\]\\(\\)]/.test(ch)) {\n return ret(null, ch);\n } else if (stream.match(/^[\\w-.]+(?=\\()/)) {\n if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) {\n state.tokenize = tokenParenthesized;\n }\n return ret(\"variable callee\", \"variable\");\n } else if (/[\\w\\\\\\-]/.test(ch)) {\n stream.eatWhile(/[\\w\\\\\\-]/);\n return ret(\"property\", \"word\");\n } else {\n return ret(null, null);\n }\n }\n\n function tokenString(quote) {\n return function(stream, state) {\n var escaped = false, ch;\n while ((ch = stream.next()) != null) {\n if (ch == quote && !escaped) {\n if (quote == \")\") stream.backUp(1);\n break;\n }\n escaped = !escaped && ch == \"\\\\\";\n }\n if (ch == quote || !escaped && quote != \")\") state.tokenize = null;\n return ret(\"string\", \"string\");\n };\n }\n\n function tokenParenthesized(stream, state) {\n stream.next(); // Must be '('\n if (!stream.match(/^\\s*[\\\"\\')]/, false))\n state.tokenize = tokenString(\")\");\n else\n state.tokenize = null;\n return ret(null, \"(\");\n }\n\n // Context management\n\n function Context(type, indent, prev) {\n this.type = type;\n this.indent = indent;\n this.prev = prev;\n }\n\n function pushContext(state, stream, type, indent) {\n state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);\n return type;\n }\n\n function popContext(state) {\n if (state.context.prev)\n state.context = state.context.prev;\n return state.context.type;\n }\n\n function pass(type, stream, state) {\n return states[state.context.type](type, stream, state);\n }\n function popAndPass(type, stream, state, n) {\n for (var i = n || 1; i > 0; i--)\n state.context = state.context.prev;\n return pass(type, stream, state);\n }\n\n // Parser\n\n function wordAsValue(stream) {\n var word = stream.current().toLowerCase();\n if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"variable\";\n }\n\n var states = {};\n\n states.top = function(type, stream, state) {\n if (type == \"{\") {\n return pushContext(state, stream, \"block\");\n } else if (type == \"}\" && state.context.prev) {\n return popContext(state);\n } else if (supportsAtComponent && /@component/i.test(type)) {\n return pushContext(state, stream, \"atComponentBlock\");\n } else if (/^@(-moz-)?document$/i.test(type)) {\n return pushContext(state, stream, \"documentTypes\");\n } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {\n return pushContext(state, stream, \"atBlock\");\n } else if (/^@(font-face|counter-style)/i.test(type)) {\n state.stateArg = type;\n return \"restricted_atBlock_before\";\n } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {\n return \"keyframes\";\n } else if (type && type.charAt(0) == \"@\") {\n return pushContext(state, stream, \"at\");\n } else if (type == \"hash\") {\n override = \"builtin\";\n } else if (type == \"word\") {\n override = \"tag\";\n } else if (type == \"variable-definition\") {\n return \"maybeprop\";\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n } else if (type == \":\") {\n return \"pseudo\";\n } else if (allowNested && type == \"(\") {\n return pushContext(state, stream, \"parens\");\n }\n return state.context.type;\n };\n\n states.block = function(type, stream, state) {\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (propertyKeywords.hasOwnProperty(word)) {\n override = \"property\";\n return \"maybeprop\";\n } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {\n override = highlightNonStandardPropertyKeywords ? \"string-2\" : \"property\";\n return \"maybeprop\";\n } else if (allowNested) {\n override = stream.match(/^\\s*:(?:\\s|$)/, false) ? \"property\" : \"tag\";\n return \"block\";\n } else {\n override += \" error\";\n return \"maybeprop\";\n }\n } else if (type == \"meta\") {\n return \"block\";\n } else if (!allowNested && (type == \"hash\" || type == \"qualifier\")) {\n override = \"error\";\n return \"block\";\n } else {\n return states.top(type, stream, state);\n }\n };\n\n states.maybeprop = function(type, stream, state) {\n if (type == \":\") return pushContext(state, stream, \"prop\");\n return pass(type, stream, state);\n };\n\n states.prop = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" && allowNested) return pushContext(state, stream, \"propBlock\");\n if (type == \"}\" || type == \"{\") return popAndPass(type, stream, state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n\n if (type == \"hash\" && !/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(stream.current())) {\n override += \" error\";\n } else if (type == \"word\") {\n wordAsValue(stream);\n } else if (type == \"interpolation\") {\n return pushContext(state, stream, \"interpolation\");\n }\n return \"prop\";\n };\n\n states.propBlock = function(type, _stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"word\") { override = \"property\"; return \"maybeprop\"; }\n return state.context.type;\n };\n\n states.parens = function(type, stream, state) {\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \")\") return popContext(state);\n if (type == \"(\") return pushContext(state, stream, \"parens\");\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n if (type == \"word\") wordAsValue(stream);\n return \"parens\";\n };\n\n states.pseudo = function(type, stream, state) {\n if (type == \"meta\") return \"pseudo\";\n\n if (type == \"word\") {\n override = \"variable-3\";\n return state.context.type;\n }\n return pass(type, stream, state);\n };\n\n states.documentTypes = function(type, stream, state) {\n if (type == \"word\" && documentTypes.hasOwnProperty(stream.current())) {\n override = \"tag\";\n return state.context.type;\n } else {\n return states.atBlock(type, stream, state);\n }\n };\n\n states.atBlock = function(type, stream, state) {\n if (type == \"(\") return pushContext(state, stream, \"atBlock_parens\");\n if (type == \"}\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"{\") return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\");\n\n if (type == \"interpolation\") return pushContext(state, stream, \"interpolation\");\n\n if (type == \"word\") {\n var word = stream.current().toLowerCase();\n if (word == \"only\" || word == \"not\" || word == \"and\" || word == \"or\")\n override = \"keyword\";\n else if (mediaTypes.hasOwnProperty(word))\n override = \"attribute\";\n else if (mediaFeatures.hasOwnProperty(word))\n override = \"property\";\n else if (mediaValueKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else if (propertyKeywords.hasOwnProperty(word))\n override = \"property\";\n else if (nonStandardPropertyKeywords.hasOwnProperty(word))\n override = highlightNonStandardPropertyKeywords ? \"string-2\" : \"property\";\n else if (valueKeywords.hasOwnProperty(word))\n override = \"atom\";\n else if (colorKeywords.hasOwnProperty(word))\n override = \"keyword\";\n else\n override = \"error\";\n }\n return state.context.type;\n };\n\n states.atComponentBlock = function(type, stream, state) {\n if (type == \"}\")\n return popAndPass(type, stream, state);\n if (type == \"{\")\n return popContext(state) && pushContext(state, stream, allowNested ? \"block\" : \"top\", false);\n if (type == \"word\")\n override = \"error\";\n return state.context.type;\n };\n\n states.atBlock_parens = function(type, stream, state) {\n if (type == \")\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state, 2);\n return states.atBlock(type, stream, state);\n };\n\n states.restricted_atBlock_before = function(type, stream, state) {\n if (type == \"{\")\n return pushContext(state, stream, \"restricted_atBlock\");\n if (type == \"word\" && state.stateArg == \"@counter-style\") {\n override = \"variable\";\n return \"restricted_atBlock_before\";\n }\n return pass(type, stream, state);\n };\n\n states.restricted_atBlock = function(type, stream, state) {\n if (type == \"}\") {\n state.stateArg = null;\n return popContext(state);\n }\n if (type == \"word\") {\n if ((state.stateArg == \"@font-face\" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||\n (state.stateArg == \"@counter-style\" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))\n override = \"error\";\n else\n override = \"property\";\n return \"maybeprop\";\n }\n return \"restricted_atBlock\";\n };\n\n states.keyframes = function(type, stream, state) {\n if (type == \"word\") { override = \"variable\"; return \"keyframes\"; }\n if (type == \"{\") return pushContext(state, stream, \"top\");\n return pass(type, stream, state);\n };\n\n states.at = function(type, stream, state) {\n if (type == \";\") return popContext(state);\n if (type == \"{\" || type == \"}\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"tag\";\n else if (type == \"hash\") override = \"builtin\";\n return \"at\";\n };\n\n states.interpolation = function(type, stream, state) {\n if (type == \"}\") return popContext(state);\n if (type == \"{\" || type == \";\") return popAndPass(type, stream, state);\n if (type == \"word\") override = \"variable\";\n else if (type != \"variable\" && type != \"(\" && type != \")\") override = \"error\";\n return \"interpolation\";\n };\n\n return {\n startState: function(base) {\n return {tokenize: null,\n state: inline ? \"block\" : \"top\",\n stateArg: null,\n context: new Context(inline ? \"block\" : \"top\", base || 0, null)};\n },\n\n token: function(stream, state) {\n if (!state.tokenize && stream.eatSpace()) return null;\n var style = (state.tokenize || tokenBase)(stream, state);\n if (style && typeof style == \"object\") {\n type = style[1];\n style = style[0];\n }\n override = style;\n if (type != \"comment\")\n state.state = states[state.state](type, stream, state);\n return override;\n },\n\n indent: function(state, textAfter) {\n var cx = state.context, ch = textAfter && textAfter.charAt(0);\n var indent = cx.indent;\n if (cx.type == \"prop\" && (ch == \"}\" || ch == \")\")) cx = cx.prev;\n if (cx.prev) {\n if (ch == \"}\" && (cx.type == \"block\" || cx.type == \"top\" ||\n cx.type == \"interpolation\" || cx.type == \"restricted_atBlock\")) {\n // Resume indentation from parent context.\n cx = cx.prev;\n indent = cx.indent;\n } else if (ch == \")\" && (cx.type == \"parens\" || cx.type == \"atBlock_parens\") ||\n ch == \"{\" && (cx.type == \"at\" || cx.type == \"atBlock\")) {\n // Dedent relative to current context.\n indent = Math.max(0, cx.indent - indentUnit);\n }\n }\n return indent;\n },\n\n electricChars: \"}\",\n blockCommentStart: \"/*\",\n blockCommentEnd: \"*/\",\n blockCommentContinue: \" * \",\n lineComment: lineComment,\n fold: \"brace\"\n };\n});\n\n function keySet(array) {\n var keys = {};\n for (var i = 0; i < array.length; ++i) {\n keys[array[i].toLowerCase()] = true;\n }\n return keys;\n }\n\n var documentTypes_ = [\n \"domain\", \"regexp\", \"url\", \"url-prefix\"\n ], documentTypes = keySet(documentTypes_);\n\n var mediaTypes_ = [\n \"all\", \"aural\", \"braille\", \"handheld\", \"print\", \"projection\", \"screen\",\n \"tty\", \"tv\", \"embossed\"\n ], mediaTypes = keySet(mediaTypes_);\n\n var mediaFeatures_ = [\n \"width\", \"min-width\", \"max-width\", \"height\", \"min-height\", \"max-height\",\n \"device-width\", \"min-device-width\", \"max-device-width\", \"device-height\",\n \"min-device-height\", \"max-device-height\", \"aspect-ratio\",\n \"min-aspect-ratio\", \"max-aspect-ratio\", \"device-aspect-ratio\",\n \"min-device-aspect-ratio\", \"max-device-aspect-ratio\", \"color\", \"min-color\",\n \"max-color\", \"color-index\", \"min-color-index\", \"max-color-index\",\n \"monochrome\", \"min-monochrome\", \"max-monochrome\", \"resolution\",\n \"min-resolution\", \"max-resolution\", \"scan\", \"grid\", \"orientation\",\n \"device-pixel-ratio\", \"min-device-pixel-ratio\", \"max-device-pixel-ratio\",\n \"pointer\", \"any-pointer\", \"hover\", \"any-hover\", \"prefers-color-scheme\",\n \"dynamic-range\", \"video-dynamic-range\"\n ], mediaFeatures = keySet(mediaFeatures_);\n\n var mediaValueKeywords_ = [\n \"landscape\", \"portrait\", \"none\", \"coarse\", \"fine\", \"on-demand\", \"hover\",\n \"interlace\", \"progressive\",\n \"dark\", \"light\",\n \"standard\", \"high\"\n ], mediaValueKeywords = keySet(mediaValueKeywords_);\n\n var propertyKeywords_ = [\n \"align-content\", \"align-items\", \"align-self\", \"alignment-adjust\",\n \"alignment-baseline\", \"all\", \"anchor-point\", \"animation\", \"animation-delay\",\n \"animation-direction\", \"animation-duration\", \"animation-fill-mode\",\n \"animation-iteration-count\", \"animation-name\", \"animation-play-state\",\n \"animation-timing-function\", \"appearance\", \"azimuth\", \"backdrop-filter\",\n \"backface-visibility\", \"background\", \"background-attachment\",\n \"background-blend-mode\", \"background-clip\", \"background-color\",\n \"background-image\", \"background-origin\", \"background-position\",\n \"background-position-x\", \"background-position-y\", \"background-repeat\",\n \"background-size\", \"baseline-shift\", \"binding\", \"bleed\", \"block-size\",\n \"bookmark-label\", \"bookmark-level\", \"bookmark-state\", \"bookmark-target\",\n \"border\", \"border-bottom\", \"border-bottom-color\", \"border-bottom-left-radius\",\n \"border-bottom-right-radius\", \"border-bottom-style\", \"border-bottom-width\",\n \"border-collapse\", \"border-color\", \"border-image\", \"border-image-outset\",\n \"border-image-repeat\", \"border-image-slice\", \"border-image-source\",\n \"border-image-width\", \"border-left\", \"border-left-color\", \"border-left-style\",\n \"border-left-width\", \"border-radius\", \"border-right\", \"border-right-color\",\n \"border-right-style\", \"border-right-width\", \"border-spacing\", \"border-style\",\n \"border-top\", \"border-top-color\", \"border-top-left-radius\",\n \"border-top-right-radius\", \"border-top-style\", \"border-top-width\",\n \"border-width\", \"bottom\", \"box-decoration-break\", \"box-shadow\", \"box-sizing\",\n \"break-after\", \"break-before\", \"break-inside\", \"caption-side\", \"caret-color\",\n \"clear\", \"clip\", \"color\", \"color-profile\", \"column-count\", \"column-fill\",\n \"column-gap\", \"column-rule\", \"column-rule-color\", \"column-rule-style\",\n \"column-rule-width\", \"column-span\", \"column-width\", \"columns\", \"contain\",\n \"content\", \"counter-increment\", \"counter-reset\", \"crop\", \"cue\", \"cue-after\",\n \"cue-before\", \"cursor\", \"direction\", \"display\", \"dominant-baseline\",\n \"drop-initial-after-adjust\", \"drop-initial-after-align\",\n \"drop-initial-before-adjust\", \"drop-initial-before-align\", \"drop-initial-size\",\n \"drop-initial-value\", \"elevation\", \"empty-cells\", \"fit\", \"fit-content\", \"fit-position\",\n \"flex\", \"flex-basis\", \"flex-direction\", \"flex-flow\", \"flex-grow\",\n \"flex-shrink\", \"flex-wrap\", \"float\", \"float-offset\", \"flow-from\", \"flow-into\",\n \"font\", \"font-family\", \"font-feature-settings\", \"font-kerning\",\n \"font-language-override\", \"font-optical-sizing\", \"font-size\",\n \"font-size-adjust\", \"font-stretch\", \"font-style\", \"font-synthesis\",\n \"font-variant\", \"font-variant-alternates\", \"font-variant-caps\",\n \"font-variant-east-asian\", \"font-variant-ligatures\", \"font-variant-numeric\",\n \"font-variant-position\", \"font-variation-settings\", \"font-weight\", \"gap\",\n \"grid\", \"grid-area\", \"grid-auto-columns\", \"grid-auto-flow\", \"grid-auto-rows\",\n \"grid-column\", \"grid-column-end\", \"grid-column-gap\", \"grid-column-start\",\n \"grid-gap\", \"grid-row\", \"grid-row-end\", \"grid-row-gap\", \"grid-row-start\",\n \"grid-template\", \"grid-template-areas\", \"grid-template-columns\",\n \"grid-template-rows\", \"hanging-punctuation\", \"height\", \"hyphens\", \"icon\",\n \"image-orientation\", \"image-rendering\", \"image-resolution\", \"inline-box-align\",\n \"inset\", \"inset-block\", \"inset-block-end\", \"inset-block-start\", \"inset-inline\",\n \"inset-inline-end\", \"inset-inline-start\", \"isolation\", \"justify-content\",\n \"justify-items\", \"justify-self\", \"left\", \"letter-spacing\", \"line-break\",\n \"line-height\", \"line-height-step\", \"line-stacking\", \"line-stacking-ruby\",\n \"line-stacking-shift\", \"line-stacking-strategy\", \"list-style\",\n \"list-style-image\", \"list-style-position\", \"list-style-type\", \"margin\",\n \"margin-bottom\", \"margin-left\", \"margin-right\", \"margin-top\", \"marks\",\n \"marquee-direction\", \"marquee-loop\", \"marquee-play-count\", \"marquee-speed\",\n \"marquee-style\", \"mask-clip\", \"mask-composite\", \"mask-image\", \"mask-mode\",\n \"mask-origin\", \"mask-position\", \"mask-repeat\", \"mask-size\",\"mask-type\",\n \"max-block-size\", \"max-height\", \"max-inline-size\",\n \"max-width\", \"min-block-size\", \"min-height\", \"min-inline-size\", \"min-width\",\n \"mix-blend-mode\", \"move-to\", \"nav-down\", \"nav-index\", \"nav-left\", \"nav-right\",\n \"nav-up\", \"object-fit\", \"object-position\", \"offset\", \"offset-anchor\",\n \"offset-distance\", \"offset-path\", \"offset-position\", \"offset-rotate\",\n \"opacity\", \"order\", \"orphans\", \"outline\", \"outline-color\", \"outline-offset\",\n \"outline-style\", \"outline-width\", \"overflow\", \"overflow-style\",\n \"overflow-wrap\", \"overflow-x\", \"overflow-y\", \"padding\", \"padding-bottom\",\n \"padding-left\", \"padding-right\", \"padding-top\", \"page\", \"page-break-after\",\n \"page-break-before\", \"page-break-inside\", \"page-policy\", \"pause\",\n \"pause-after\", \"pause-before\", \"perspective\", \"perspective-origin\", \"pitch\",\n \"pitch-range\", \"place-content\", \"place-items\", \"place-self\", \"play-during\",\n \"position\", \"presentation-level\", \"punctuation-trim\", \"quotes\",\n \"region-break-after\", \"region-break-before\", \"region-break-inside\",\n \"region-fragment\", \"rendering-intent\", \"resize\", \"rest\", \"rest-after\",\n \"rest-before\", \"richness\", \"right\", \"rotate\", \"rotation\", \"rotation-point\",\n \"row-gap\", \"ruby-align\", \"ruby-overhang\", \"ruby-position\", \"ruby-span\",\n \"scale\", \"scroll-behavior\", \"scroll-margin\", \"scroll-margin-block\",\n \"scroll-margin-block-end\", \"scroll-margin-block-start\", \"scroll-margin-bottom\",\n \"scroll-margin-inline\", \"scroll-margin-inline-end\",\n \"scroll-margin-inline-start\", \"scroll-margin-left\", \"scroll-margin-right\",\n \"scroll-margin-top\", \"scroll-padding\", \"scroll-padding-block\",\n \"scroll-padding-block-end\", \"scroll-padding-block-start\",\n \"scroll-padding-bottom\", \"scroll-padding-inline\", \"scroll-padding-inline-end\",\n \"scroll-padding-inline-start\", \"scroll-padding-left\", \"scroll-padding-right\",\n \"scroll-padding-top\", \"scroll-snap-align\", \"scroll-snap-type\",\n \"shape-image-threshold\", \"shape-inside\", \"shape-margin\", \"shape-outside\",\n \"size\", \"speak\", \"speak-as\", \"speak-header\", \"speak-numeral\",\n \"speak-punctuation\", \"speech-rate\", \"stress\", \"string-set\", \"tab-size\",\n \"table-layout\", \"target\", \"target-name\", \"target-new\", \"target-position\",\n \"text-align\", \"text-align-last\", \"text-combine-upright\", \"text-decoration\",\n \"text-decoration-color\", \"text-decoration-line\", \"text-decoration-skip\",\n \"text-decoration-skip-ink\", \"text-decoration-style\", \"text-emphasis\",\n \"text-emphasis-color\", \"text-emphasis-position\", \"text-emphasis-style\",\n \"text-height\", \"text-indent\", \"text-justify\", \"text-orientation\",\n \"text-outline\", \"text-overflow\", \"text-rendering\", \"text-shadow\",\n \"text-size-adjust\", \"text-space-collapse\", \"text-transform\",\n \"text-underline-position\", \"text-wrap\", \"top\", \"touch-action\", \"transform\", \"transform-origin\",\n \"transform-style\", \"transition\", \"transition-delay\", \"transition-duration\",\n \"transition-property\", \"transition-timing-function\", \"translate\",\n \"unicode-bidi\", \"user-select\", \"vertical-align\", \"visibility\", \"voice-balance\",\n \"voice-duration\", \"voice-family\", \"voice-pitch\", \"voice-range\", \"voice-rate\",\n \"voice-stress\", \"voice-volume\", \"volume\", \"white-space\", \"widows\", \"width\",\n \"will-change\", \"word-break\", \"word-spacing\", \"word-wrap\", \"writing-mode\", \"z-index\",\n // SVG-specific\n \"clip-path\", \"clip-rule\", \"mask\", \"enable-background\", \"filter\", \"flood-color\",\n \"flood-opacity\", \"lighting-color\", \"stop-color\", \"stop-opacity\", \"pointer-events\",\n \"color-interpolation\", \"color-interpolation-filters\",\n \"color-rendering\", \"fill\", \"fill-opacity\", \"fill-rule\", \"image-rendering\",\n \"marker\", \"marker-end\", \"marker-mid\", \"marker-start\", \"paint-order\", \"shape-rendering\", \"stroke\",\n \"stroke-dasharray\", \"stroke-dashoffset\", \"stroke-linecap\", \"stroke-linejoin\",\n \"stroke-miterlimit\", \"stroke-opacity\", \"stroke-width\", \"text-rendering\",\n \"baseline-shift\", \"dominant-baseline\", \"glyph-orientation-horizontal\",\n \"glyph-orientation-vertical\", \"text-anchor\", \"writing-mode\",\n ], propertyKeywords = keySet(propertyKeywords_);\n\n var nonStandardPropertyKeywords_ = [\n \"accent-color\", \"aspect-ratio\", \"border-block\", \"border-block-color\", \"border-block-end\",\n \"border-block-end-color\", \"border-block-end-style\", \"border-block-end-width\",\n \"border-block-start\", \"border-block-start-color\", \"border-block-start-style\",\n \"border-block-start-width\", \"border-block-style\", \"border-block-width\",\n \"border-inline\", \"border-inline-color\", \"border-inline-end\",\n \"border-inline-end-color\", \"border-inline-end-style\",\n \"border-inline-end-width\", \"border-inline-start\", \"border-inline-start-color\",\n \"border-inline-start-style\", \"border-inline-start-width\",\n \"border-inline-style\", \"border-inline-width\", \"content-visibility\", \"margin-block\",\n \"margin-block-end\", \"margin-block-start\", \"margin-inline\", \"margin-inline-end\",\n \"margin-inline-start\", \"overflow-anchor\", \"overscroll-behavior\", \"padding-block\", \"padding-block-end\",\n \"padding-block-start\", \"padding-inline\", \"padding-inline-end\",\n \"padding-inline-start\", \"scroll-snap-stop\", \"scrollbar-3d-light-color\",\n \"scrollbar-arrow-color\", \"scrollbar-base-color\", \"scrollbar-dark-shadow-color\",\n \"scrollbar-face-color\", \"scrollbar-highlight-color\", \"scrollbar-shadow-color\",\n \"scrollbar-track-color\", \"searchfield-cancel-button\", \"searchfield-decoration\",\n \"searchfield-results-button\", \"searchfield-results-decoration\", \"shape-inside\", \"zoom\"\n ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);\n\n var fontProperties_ = [\n \"font-display\", \"font-family\", \"src\", \"unicode-range\", \"font-variant\",\n \"font-feature-settings\", \"font-stretch\", \"font-weight\", \"font-style\"\n ], fontProperties = keySet(fontProperties_);\n\n var counterDescriptors_ = [\n \"additive-symbols\", \"fallback\", \"negative\", \"pad\", \"prefix\", \"range\",\n \"speak-as\", \"suffix\", \"symbols\", \"system\"\n ], counterDescriptors = keySet(counterDescriptors_);\n\n var colorKeywords_ = [\n \"aliceblue\", \"antiquewhite\", \"aqua\", \"aquamarine\", \"azure\", \"beige\",\n \"bisque\", \"black\", \"blanchedalmond\", \"blue\", \"blueviolet\", \"brown\",\n \"burlywood\", \"cadetblue\", \"chartreuse\", \"chocolate\", \"coral\", \"cornflowerblue\",\n \"cornsilk\", \"crimson\", \"cyan\", \"darkblue\", \"darkcyan\", \"darkgoldenrod\",\n \"darkgray\", \"darkgreen\", \"darkgrey\", \"darkkhaki\", \"darkmagenta\", \"darkolivegreen\",\n \"darkorange\", \"darkorchid\", \"darkred\", \"darksalmon\", \"darkseagreen\",\n \"darkslateblue\", \"darkslategray\", \"darkslategrey\", \"darkturquoise\", \"darkviolet\",\n \"deeppink\", \"deepskyblue\", \"dimgray\", \"dimgrey\", \"dodgerblue\", \"firebrick\",\n \"floralwhite\", \"forestgreen\", \"fuchsia\", \"gainsboro\", \"ghostwhite\",\n \"gold\", \"goldenrod\", \"gray\", \"grey\", \"green\", \"greenyellow\", \"honeydew\",\n \"hotpink\", \"indianred\", \"indigo\", \"ivory\", \"khaki\", \"lavender\",\n \"lavenderblush\", \"lawngreen\", \"lemonchiffon\", \"lightblue\", \"lightcoral\",\n \"lightcyan\", \"lightgoldenrodyellow\", \"lightgray\", \"lightgreen\", \"lightgrey\", \"lightpink\",\n \"lightsalmon\", \"lightseagreen\", \"lightskyblue\", \"lightslategray\", \"lightslategrey\",\n \"lightsteelblue\", \"lightyellow\", \"lime\", \"limegreen\", \"linen\", \"magenta\",\n \"maroon\", \"mediumaquamarine\", \"mediumblue\", \"mediumorchid\", \"mediumpurple\",\n \"mediumseagreen\", \"mediumslateblue\", \"mediumspringgreen\", \"mediumturquoise\",\n \"mediumvioletred\", \"midnightblue\", \"mintcream\", \"mistyrose\", \"moccasin\",\n \"navajowhite\", \"navy\", \"oldlace\", \"olive\", \"olivedrab\", \"orange\", \"orangered\",\n \"orchid\", \"palegoldenrod\", \"palegreen\", \"paleturquoise\", \"palevioletred\",\n \"papayawhip\", \"peachpuff\", \"peru\", \"pink\", \"plum\", \"powderblue\",\n \"purple\", \"rebeccapurple\", \"red\", \"rosybrown\", \"royalblue\", \"saddlebrown\",\n \"salmon\", \"sandybrown\", \"seagreen\", \"seashell\", \"sienna\", \"silver\", \"skyblue\",\n \"slateblue\", \"slategray\", \"slategrey\", \"snow\", \"springgreen\", \"steelblue\", \"tan\",\n \"teal\", \"thistle\", \"tomato\", \"turquoise\", \"violet\", \"wheat\", \"white\",\n \"whitesmoke\", \"yellow\", \"yellowgreen\"\n ], colorKeywords = keySet(colorKeywords_);\n\n var valueKeywords_ = [\n \"above\", \"absolute\", \"activeborder\", \"additive\", \"activecaption\", \"afar\",\n \"after-white-space\", \"ahead\", \"alias\", \"all\", \"all-scroll\", \"alphabetic\", \"alternate\",\n \"always\", \"amharic\", \"amharic-abegede\", \"antialiased\", \"appworkspace\",\n \"arabic-indic\", \"armenian\", \"asterisks\", \"attr\", \"auto\", \"auto-flow\", \"avoid\", \"avoid-column\", \"avoid-page\",\n \"avoid-region\", \"axis-pan\", \"background\", \"backwards\", \"baseline\", \"below\", \"bidi-override\", \"binary\",\n \"bengali\", \"blink\", \"block\", \"block-axis\", \"blur\", \"bold\", \"bolder\", \"border\", \"border-box\",\n \"both\", \"bottom\", \"break\", \"break-all\", \"break-word\", \"brightness\", \"bullets\", \"button\",\n \"buttonface\", \"buttonhighlight\", \"buttonshadow\", \"buttontext\", \"calc\", \"cambodian\",\n \"capitalize\", \"caps-lock-indicator\", \"caption\", \"captiontext\", \"caret\",\n \"cell\", \"center\", \"checkbox\", \"circle\", \"cjk-decimal\", \"cjk-earthly-branch\",\n \"cjk-heavenly-stem\", \"cjk-ideographic\", \"clear\", \"clip\", \"close-quote\",\n \"col-resize\", \"collapse\", \"color\", \"color-burn\", \"color-dodge\", \"column\", \"column-reverse\",\n \"compact\", \"condensed\", \"conic-gradient\", \"contain\", \"content\", \"contents\",\n \"content-box\", \"context-menu\", \"continuous\", \"contrast\", \"copy\", \"counter\", \"counters\", \"cover\", \"crop\",\n \"cross\", \"crosshair\", \"cubic-bezier\", \"currentcolor\", \"cursive\", \"cyclic\", \"darken\", \"dashed\", \"decimal\",\n \"decimal-leading-zero\", \"default\", \"default-button\", \"dense\", \"destination-atop\",\n \"destination-in\", \"destination-out\", \"destination-over\", \"devanagari\", \"difference\",\n \"disc\", \"discard\", \"disclosure-closed\", \"disclosure-open\", \"document\",\n \"dot-dash\", \"dot-dot-dash\",\n \"dotted\", \"double\", \"down\", \"drop-shadow\", \"e-resize\", \"ease\", \"ease-in\", \"ease-in-out\", \"ease-out\",\n \"element\", \"ellipse\", \"ellipsis\", \"embed\", \"end\", \"ethiopic\", \"ethiopic-abegede\",\n \"ethiopic-abegede-am-et\", \"ethiopic-abegede-gez\", \"ethiopic-abegede-ti-er\",\n \"ethiopic-abegede-ti-et\", \"ethiopic-halehame-aa-er\",\n \"ethiopic-halehame-aa-et\", \"ethiopic-halehame-am-et\",\n \"ethiopic-halehame-gez\", \"ethiopic-halehame-om-et\",\n \"ethiopic-halehame-sid-et\", \"ethiopic-halehame-so-et\",\n \"ethiopic-halehame-ti-er\", \"ethiopic-halehame-ti-et\", \"ethiopic-halehame-tig\",\n \"ethiopic-numeric\", \"ew-resize\", \"exclusion\", \"expanded\", \"extends\", \"extra-condensed\",\n \"extra-expanded\", \"fantasy\", \"fast\", \"fill\", \"fill-box\", \"fixed\", \"flat\", \"flex\", \"flex-end\", \"flex-start\", \"footnotes\",\n \"forwards\", \"from\", \"geometricPrecision\", \"georgian\", \"grayscale\", \"graytext\", \"grid\", \"groove\",\n \"gujarati\", \"gurmukhi\", \"hand\", \"hangul\", \"hangul-consonant\", \"hard-light\", \"hebrew\",\n \"help\", \"hidden\", \"hide\", \"higher\", \"highlight\", \"highlighttext\",\n \"hiragana\", \"hiragana-iroha\", \"horizontal\", \"hsl\", \"hsla\", \"hue\", \"hue-rotate\", \"icon\", \"ignore\",\n \"inactiveborder\", \"inactivecaption\", \"inactivecaptiontext\", \"infinite\",\n \"infobackground\", \"infotext\", \"inherit\", \"initial\", \"inline\", \"inline-axis\",\n \"inline-block\", \"inline-flex\", \"inline-grid\", \"inline-table\", \"inset\", \"inside\", \"intrinsic\", \"invert\",\n \"italic\", \"japanese-formal\", \"japanese-informal\", \"justify\", \"kannada\",\n \"katakana\", \"katakana-iroha\", \"keep-all\", \"khmer\",\n \"korean-hangul-formal\", \"korean-hanja-formal\", \"korean-hanja-informal\",\n \"landscape\", \"lao\", \"large\", \"larger\", \"left\", \"level\", \"lighter\", \"lighten\",\n \"line-through\", \"linear\", \"linear-gradient\", \"lines\", \"list-item\", \"listbox\", \"listitem\",\n \"local\", \"logical\", \"loud\", \"lower\", \"lower-alpha\", \"lower-armenian\",\n \"lower-greek\", \"lower-hexadecimal\", \"lower-latin\", \"lower-norwegian\",\n \"lower-roman\", \"lowercase\", \"ltr\", \"luminosity\", \"malayalam\", \"manipulation\", \"match\", \"matrix\", \"matrix3d\",\n \"media-play-button\", \"media-slider\", \"media-sliderthumb\",\n \"media-volume-slider\", \"media-volume-sliderthumb\", \"medium\",\n \"menu\", \"menulist\", \"menulist-button\",\n \"menutext\", \"message-box\", \"middle\", \"min-intrinsic\",\n \"mix\", \"mongolian\", \"monospace\", \"move\", \"multiple\", \"multiple_mask_images\", \"multiply\", \"myanmar\", \"n-resize\",\n \"narrower\", \"ne-resize\", \"nesw-resize\", \"no-close-quote\", \"no-drop\",\n \"no-open-quote\", \"no-repeat\", \"none\", \"normal\", \"not-allowed\", \"nowrap\",\n \"ns-resize\", \"numbers\", \"numeric\", \"nw-resize\", \"nwse-resize\", \"oblique\", \"octal\", \"opacity\", \"open-quote\",\n \"optimizeLegibility\", \"optimizeSpeed\", \"oriya\", \"oromo\", \"outset\",\n \"outside\", \"outside-shape\", \"overlay\", \"overline\", \"padding\", \"padding-box\",\n \"painted\", \"page\", \"paused\", \"persian\", \"perspective\", \"pinch-zoom\", \"plus-darker\", \"plus-lighter\",\n \"pointer\", \"polygon\", \"portrait\", \"pre\", \"pre-line\", \"pre-wrap\", \"preserve-3d\",\n \"progress\", \"push-button\", \"radial-gradient\", \"radio\", \"read-only\",\n \"read-write\", \"read-write-plaintext-only\", \"rectangle\", \"region\",\n \"relative\", \"repeat\", \"repeating-linear-gradient\", \"repeating-radial-gradient\",\n \"repeating-conic-gradient\", \"repeat-x\", \"repeat-y\", \"reset\", \"reverse\",\n \"rgb\", \"rgba\", \"ridge\", \"right\", \"rotate\", \"rotate3d\", \"rotateX\", \"rotateY\",\n \"rotateZ\", \"round\", \"row\", \"row-resize\", \"row-reverse\", \"rtl\", \"run-in\", \"running\",\n \"s-resize\", \"sans-serif\", \"saturate\", \"saturation\", \"scale\", \"scale3d\", \"scaleX\", \"scaleY\", \"scaleZ\", \"screen\",\n \"scroll\", \"scrollbar\", \"scroll-position\", \"se-resize\", \"searchfield\",\n \"searchfield-cancel-button\", \"searchfield-decoration\",\n \"searchfield-results-button\", \"searchfield-results-decoration\", \"self-start\", \"self-end\",\n \"semi-condensed\", \"semi-expanded\", \"separate\", \"sepia\", \"serif\", \"show\", \"sidama\",\n \"simp-chinese-formal\", \"simp-chinese-informal\", \"single\",\n \"skew\", \"skewX\", \"skewY\", \"skip-white-space\", \"slide\", \"slider-horizontal\",\n \"slider-vertical\", \"sliderthumb-horizontal\", \"sliderthumb-vertical\", \"slow\",\n \"small\", \"small-caps\", \"small-caption\", \"smaller\", \"soft-light\", \"solid\", \"somali\",\n \"source-atop\", \"source-in\", \"source-out\", \"source-over\", \"space\", \"space-around\", \"space-between\", \"space-evenly\", \"spell-out\", \"square\",\n \"square-button\", \"start\", \"static\", \"status-bar\", \"stretch\", \"stroke\", \"stroke-box\", \"sub\",\n \"subpixel-antialiased\", \"svg_masks\", \"super\", \"sw-resize\", \"symbolic\", \"symbols\", \"system-ui\", \"table\",\n \"table-caption\", \"table-cell\", \"table-column\", \"table-column-group\",\n \"table-footer-group\", \"table-header-group\", \"table-row\", \"table-row-group\",\n \"tamil\",\n \"telugu\", \"text\", \"text-bottom\", \"text-top\", \"textarea\", \"textfield\", \"thai\",\n \"thick\", \"thin\", \"threeddarkshadow\", \"threedface\", \"threedhighlight\",\n \"threedlightshadow\", \"threedshadow\", \"tibetan\", \"tigre\", \"tigrinya-er\",\n \"tigrinya-er-abegede\", \"tigrinya-et\", \"tigrinya-et-abegede\", \"to\", \"top\",\n \"trad-chinese-formal\", \"trad-chinese-informal\", \"transform\",\n \"translate\", \"translate3d\", \"translateX\", \"translateY\", \"translateZ\",\n \"transparent\", \"ultra-condensed\", \"ultra-expanded\", \"underline\", \"unidirectional-pan\", \"unset\", \"up\",\n \"upper-alpha\", \"upper-armenian\", \"upper-greek\", \"upper-hexadecimal\",\n \"upper-latin\", \"upper-norwegian\", \"upper-roman\", \"uppercase\", \"urdu\", \"url\",\n \"var\", \"vertical\", \"vertical-text\", \"view-box\", \"visible\", \"visibleFill\", \"visiblePainted\",\n \"visibleStroke\", \"visual\", \"w-resize\", \"wait\", \"wave\", \"wider\",\n \"window\", \"windowframe\", \"windowtext\", \"words\", \"wrap\", \"wrap-reverse\", \"x-large\", \"x-small\", \"xor\",\n \"xx-large\", \"xx-small\"\n ], valueKeywords = keySet(valueKeywords_);\n\n var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)\n .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)\n .concat(valueKeywords_);\n CodeMirror.registerHelper(\"hintWords\", \"css\", allWords);\n\n function tokenCComment(stream, state) {\n var maybeEnd = false, ch;\n while ((ch = stream.next()) != null) {\n if (maybeEnd && ch == \"/\") {\n state.tokenize = null;\n break;\n }\n maybeEnd = (ch == \"*\");\n }\n return [\"comment\", \"comment\"];\n }\n\n CodeMirror.defineMIME(\"text/css\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\"\n });\n\n CodeMirror.defineMIME(\"text/x-scss\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: \"//\",\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \":\": function(stream) {\n if (stream.match(/^\\s*\\{/, false))\n return [null, null]\n return false;\n },\n \"$\": function(stream) {\n stream.match(/^[\\w-]+/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"#\": function(stream) {\n if (!stream.eat(\"{\")) return false;\n return [null, \"interpolation\"];\n }\n },\n name: \"css\",\n helperType: \"scss\"\n });\n\n CodeMirror.defineMIME(\"text/x-less\", {\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n mediaValueKeywords: mediaValueKeywords,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n fontProperties: fontProperties,\n allowNested: true,\n lineComment: \"//\",\n tokenHooks: {\n \"/\": function(stream, state) {\n if (stream.eat(\"/\")) {\n stream.skipToEnd();\n return [\"comment\", \"comment\"];\n } else if (stream.eat(\"*\")) {\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n } else {\n return [\"operator\", \"operator\"];\n }\n },\n \"@\": function(stream) {\n if (stream.eat(\"{\")) return [null, \"interpolation\"];\n if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\\b/i, false)) return false;\n stream.eatWhile(/[\\w\\\\\\-]/);\n if (stream.match(/^\\s*:/, false))\n return [\"variable-2\", \"variable-definition\"];\n return [\"variable-2\", \"variable\"];\n },\n \"&\": function() {\n return [\"atom\", \"atom\"];\n }\n },\n name: \"css\",\n helperType: \"less\"\n });\n\n CodeMirror.defineMIME(\"text/x-gss\", {\n documentTypes: documentTypes,\n mediaTypes: mediaTypes,\n mediaFeatures: mediaFeatures,\n propertyKeywords: propertyKeywords,\n nonStandardPropertyKeywords: nonStandardPropertyKeywords,\n fontProperties: fontProperties,\n counterDescriptors: counterDescriptors,\n colorKeywords: colorKeywords,\n valueKeywords: valueKeywords,\n supportsAtComponent: true,\n tokenHooks: {\n \"/\": function(stream, state) {\n if (!stream.eat(\"*\")) return false;\n state.tokenize = tokenCComment;\n return tokenCComment(stream, state);\n }\n },\n name: \"css\",\n helperType: \"gss\"\n });\n\n});\n","// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/5/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"), require(\"../xml/xml\"), require(\"../javascript/javascript\"), require(\"../css/css\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\", \"../xml/xml\", \"../javascript/javascript\", \"../css/css\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n \"use strict\";\n\n var defaultTags = {\n script: [\n [\"lang\", /(javascript|babel)/i, \"javascript\"],\n [\"type\", /^(?:text|application)\\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, \"javascript\"],\n [\"type\", /./, \"text/plain\"],\n [null, null, \"javascript\"]\n ],\n style: [\n [\"lang\", /^css$/i, \"css\"],\n [\"type\", /^(text\\/)?(x-)?(stylesheet|css)$/i, \"css\"],\n [\"type\", /./, \"text/plain\"],\n [null, null, \"css\"]\n ]\n };\n\n function maybeBackup(stream, pat, style) {\n var cur = stream.current(), close = cur.search(pat);\n if (close > -1) {\n stream.backUp(cur.length - close);\n } else if (cur.match(/<\\/?$/)) {\n stream.backUp(cur.length);\n if (!stream.match(pat, false)) stream.match(cur);\n }\n return style;\n }\n\n var attrRegexpCache = {};\n function getAttrRegexp(attr) {\n var regexp = attrRegexpCache[attr];\n if (regexp) return regexp;\n return attrRegexpCache[attr] = new RegExp(\"\\\\s+\" + attr + \"\\\\s*=\\\\s*('|\\\")?([^'\\\"]+)('|\\\")?\\\\s*\");\n }\n\n function getAttrValue(text, attr) {\n var match = text.match(getAttrRegexp(attr))\n return match ? /^\\s*(.*?)\\s*$/.exec(match[2])[1] : \"\"\n }\n\n function getTagRegexp(tagName, anchored) {\n return new RegExp((anchored ? \"^\" : \"\") + \"<\\/\\\\s*\" + tagName + \"\\\\s*>\", \"i\");\n }\n\n function addTags(from, to) {\n for (var tag in from) {\n var dest = to[tag] || (to[tag] = []);\n var source = from[tag];\n for (var i = source.length - 1; i >= 0; i--)\n dest.unshift(source[i])\n }\n }\n\n function findMatchingMode(tagInfo, tagText) {\n for (var i = 0; i < tagInfo.length; i++) {\n var spec = tagInfo[i];\n if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];\n }\n }\n\n CodeMirror.defineMode(\"htmlmixed\", function (config, parserConfig) {\n var htmlMode = CodeMirror.getMode(config, {\n name: \"xml\",\n htmlMode: true,\n multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,\n multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag,\n allowMissingTagName: parserConfig.allowMissingTagName,\n });\n\n var tags = {};\n var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;\n addTags(defaultTags, tags);\n if (configTags) addTags(configTags, tags);\n if (configScript) for (var i = configScript.length - 1; i >= 0; i--)\n tags.script.unshift([\"type\", configScript[i].matches, configScript[i].mode])\n\n function html(stream, state) {\n var style = htmlMode.token(stream, state.htmlState), tag = /\\btag\\b/.test(style), tagName\n if (tag && !/[<>\\s\\/]/.test(stream.current()) &&\n (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&\n tags.hasOwnProperty(tagName)) {\n state.inTag = tagName + \" \"\n } else if (state.inTag && tag && />$/.test(stream.current())) {\n var inTag = /^([\\S]+) (.*)/.exec(state.inTag)\n state.inTag = null\n var modeSpec = stream.current() == \">\" && findMatchingMode(tags[inTag[1]], inTag[2])\n var mode = CodeMirror.getMode(config, modeSpec)\n var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);\n state.token = function (stream, state) {\n if (stream.match(endTagA, false)) {\n state.token = html;\n state.localState = state.localMode = null;\n return null;\n }\n return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));\n };\n state.localMode = mode;\n state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, \"\", \"\"));\n } else if (state.inTag) {\n state.inTag += stream.current()\n if (stream.eol()) state.inTag += \" \"\n }\n return style;\n };\n\n return {\n startState: function () {\n var state = CodeMirror.startState(htmlMode);\n return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};\n },\n\n copyState: function (state) {\n var local;\n if (state.localState) {\n local = CodeMirror.copyState(state.localMode, state.localState);\n }\n return {token: state.token, inTag: state.inTag,\n localMode: state.localMode, localState: local,\n htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};\n },\n\n token: function (stream, state) {\n return state.token(stream, state);\n },\n\n indent: function (state, textAfter, line) {\n if (!state.localMode || /^\\s*<\\//.test(textAfter))\n return htmlMode.indent(state.htmlState, textAfter, line);\n else if (state.localMode.indent)\n return state.localMode.indent(state.localState, textAfter, line);\n else\n return CodeMirror.Pass;\n },\n\n innerMode: function (state) {\n return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};\n }\n };\n }, \"xml\", \"javascript\", \"css\");\n\n CodeMirror.defineMIME(\"text/html\", \"htmlmixed\");\n});\n","/* @license\nPapa Parse\nv4.6.3\nhttps://github.com/mholt/PapaParse\nLicense: MIT\n*/\nArray.isArray||(Array.isArray=function(e){return\"[object Array]\"===Object.prototype.toString.call(e)}),function(e,t){\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof module&&\"undefined\"!=typeof exports?module.exports=t():e.Papa=t()}(this,function(){\"use strict\";var s,e,f=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:void 0!==f?f:{},n=!f.document&&!!f.postMessage,o=n&&/(\\?|&)papaworker(=|&|$)/.test(f.location.search),a=!1,h={},u=0,k={parse:function(e,t){var r=(t=t||{}).dynamicTyping||!1;z(r)&&(t.dynamicTypingFunction=r,r={});if(t.dynamicTyping=r,t.transform=!!z(t.transform)&&t.transform,t.worker&&k.WORKERS_SUPPORTED){var i=function(){if(!k.WORKERS_SUPPORTED)return!1;if(!a&&null===k.SCRIPT_PATH)throw new Error(\"Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.\");var e=k.SCRIPT_PATH||s;e+=(-1!==e.indexOf(\"?\")?\"&\":\"?\")+\"papaworker\";var t=new f.Worker(e);return t.onmessage=m,t.id=u++,h[t.id]=t}();return i.userStep=t.step,i.userChunk=t.chunk,i.userComplete=t.complete,i.userError=t.error,t.step=z(t.step),t.chunk=z(t.chunk),t.complete=z(t.complete),t.error=z(t.error),delete t.worker,void i.postMessage({input:e,config:t,workerId:i.id})}var n=null;k.NODE_STREAM_INPUT,\"string\"==typeof e?n=t.download?new c(t):new _(t):!0===e.readable&&z(e.read)&&z(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new p(t));return n.stream(e)},unparse:function(e,t){var i=!1,g=!0,m=\",\",y=\"\\r\\n\",n='\"',r=!1;!function(){if(\"object\"!=typeof t)return;\"string\"!=typeof t.delimiter||k.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);(\"boolean\"==typeof t.quotes||Array.isArray(t.quotes))&&(i=t.quotes);\"boolean\"!=typeof t.skipEmptyLines&&\"string\"!=typeof t.skipEmptyLines||(r=t.skipEmptyLines);\"string\"==typeof t.newline&&(y=t.newline);\"string\"==typeof t.quoteChar&&(n=t.quoteChar);\"boolean\"==typeof t.header&&(g=t.header)}();var s=new RegExp(M(n),\"g\");\"string\"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return o(null,e,r);if(\"object\"==typeof e[0])return o(a(e[0]),e,r)}else if(\"object\"==typeof e)return\"string\"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:a(e.data[0])),Array.isArray(e.data[0])||\"object\"==typeof e.data[0]||(e.data=[e.data])),o(e.fields||[],e.data||[],r);throw\"exception: Unable to serialize unrecognized input\";function a(e){if(\"object\"!=typeof e)return[];var t=[];for(var r in e)t.push(r);return t}function o(e,t,r){var i=\"\";\"string\"==typeof e&&(e=JSON.parse(e)),\"string\"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(n&&g){for(var a=0;a<e.length;a++)0<a&&(i+=m),i+=v(e[a],a);0<t.length&&(i+=y)}for(var o=0;o<t.length;o++){var h=n?e.length:t[o].length,u=!1,f=n?0===Object.keys(t[o]).length:0===t[o].length;if(r&&!n&&(u=\"greedy\"===r?\"\"===t[o].join(\"\").trim():1===t[o].length&&0===t[o][0].length),\"greedy\"===r&&n){for(var d=[],l=0;l<h;l++){var c=s?e[l]:l;d.push(t[o][c])}u=\"\"===d.join(\"\").trim()}if(!u){for(var p=0;p<h;p++){0<p&&!f&&(i+=m);var _=n&&s?e[p]:p;i+=v(t[o][_],p)}o<t.length-1&&(!r||0<h&&!f)&&(i+=y)}}return i}function v(e,t){if(null==e)return\"\";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);e=e.toString().replace(s,n+n);var r=\"boolean\"==typeof i&&i||Array.isArray(i)&&i[t]||function(e,t){for(var r=0;r<t.length;r++)if(-1<e.indexOf(t[r]))return!0;return!1}(e,k.BAD_DELIMITERS)||-1<e.indexOf(m)||\" \"===e.charAt(0)||\" \"===e.charAt(e.length-1);return r?n+e+n:e}}};if(k.RECORD_SEP=String.fromCharCode(30),k.UNIT_SEP=String.fromCharCode(31),k.BYTE_ORDER_MARK=\"\\ufeff\",k.BAD_DELIMITERS=[\"\\r\",\"\\n\",'\"',k.BYTE_ORDER_MARK],k.WORKERS_SUPPORTED=!n&&!!f.Worker,k.SCRIPT_PATH=null,k.NODE_STREAM_INPUT=1,k.LocalChunkSize=10485760,k.RemoteChunkSize=5242880,k.DefaultDelimiter=\",\",k.Parser=v,k.ParserHandle=r,k.NetworkStreamer=c,k.FileStreamer=p,k.StringStreamer=_,k.ReadableStreamStreamer=g,f.jQuery){var d=f.jQuery;d.fn.parse=function(o){var r=o.config||{},h=[];return this.each(function(e){if(!(\"INPUT\"===d(this).prop(\"tagName\").toUpperCase()&&\"file\"===d(this).attr(\"type\").toLowerCase()&&f.FileReader)||!this.files||0===this.files.length)return!0;for(var t=0;t<this.files.length;t++)h.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},r)})}),e(),this;function e(){if(0!==h.length){var e,t,r,i,n=h[0];if(z(o.before)){var s=o.before(n.file,n.inputElem);if(\"object\"==typeof s){if(\"abort\"===s.action)return e=\"AbortError\",t=n.file,r=n.inputElem,i=s.reason,void(z(o.error)&&o.error({name:e},t,r,i));if(\"skip\"===s.action)return void u();\"object\"==typeof s.config&&(n.instanceConfig=d.extend(n.instanceConfig,s.config))}else if(\"skip\"===s)return void u()}var a=n.instanceConfig.complete;n.instanceConfig.complete=function(e){z(a)&&a(e,n.file,n.inputElem),u()},k.parse(n.file,n.instanceConfig)}else z(o.complete)&&o.complete()}function u(){h.splice(0,1),e()}}}function l(e){this._handle=null,this._finished=!1,this._completed=!1,this._input=null,this._baseIndex=0,this._partialLine=\"\",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=E(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new r(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&z(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(e);void 0!==r&&(e=r)}this.isFirstChunk=!1;var i=this._partialLine+e;this._partialLine=\"\";var n=this._handle.parse(i,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=n.meta.cursor;this._finished||(this._partialLine=i.substring(s-this._baseIndex),this._baseIndex=s),n&&n.data&&(this._rowCount+=n.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)f.postMessage({results:n,workerId:k.WORKER_ID,finished:a});else if(z(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return;n=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!z(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}},this._sendError=function(e){z(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:k.WORKER_ID,error:e,finished:!1})}}function c(e){var i;(e=e||{}).chunkSize||(e.chunkSize=k.RemoteChunkSize),l.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(i=new XMLHttpRequest,this._config.withCredentials&&(i.withCredentials=this._config.withCredentials),n||(i.onload=w(this._chunkLoaded,this),i.onerror=w(this._chunkError,this)),i.open(\"GET\",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)i.setRequestHeader(t,e[t])}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;i.setRequestHeader(\"Range\",\"bytes=\"+this._start+\"-\"+r),i.setRequestHeader(\"If-None-Match\",\"webkit-no-cache\")}try{i.send()}catch(e){this._chunkError(e.message)}n&&0===i.status?this._chunkError():this._start+=this._config.chunkSize}},this._chunkLoaded=function(){4===i.readyState&&(i.status<200||400<=i.status?this._chunkError():(this._finished=!this._config.chunkSize||this._start>function(e){var t=e.getResponseHeader(\"Content-Range\");if(null===t)return-1;return parseInt(t.substr(t.lastIndexOf(\"/\")+1))}(i),this.parseChunk(i.responseText)))},this._chunkError=function(e){var t=i.statusText||e;this._sendError(new Error(t))}}function p(e){var i,n;(e=e||{}).chunkSize||(e.chunkSize=k.LocalChunkSize),l.call(this,e);var s=\"undefined\"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((i=new FileReader).onload=w(this._chunkLoaded,this),i.onerror=w(this._chunkError,this)):i=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,t)}var r=i.readAsText(e,this._config.encoding);s||this._chunkLoaded({target:{result:r}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(i.error)}}function _(e){var r;l.call(this,e=e||{}),this.stream=function(e){return r=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?r.substr(0,e):r;return r=e?r.substr(e):\"\",this._finished=!r,this.parseChunk(t)}}}function g(e){l.call(this,e=e||{});var t=[],r=!0,i=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on(\"data\",this._streamData),this._input.on(\"end\",this._streamEnd),this._input.on(\"error\",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=w(function(e){try{t.push(\"string\"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=w(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=w(function(){this._streamCleanUp(),i=!0,this._streamData(\"\")},this),this._streamCleanUp=w(function(){this._input.removeListener(\"data\",this._streamData),this._input.removeListener(\"end\",this._streamEnd),this._input.removeListener(\"error\",this._streamError)},this)}function r(g){var a,o,h,i=/^\\s*-?(\\d*\\.?\\d+|\\d+\\.?\\d*)(e[-+]?\\d+)?\\s*$/i,n=/(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))|(\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d([+-][0-2]\\d:[0-5]\\d|Z))/,t=this,r=0,s=0,u=!1,e=!1,f=[],d={data:[],errors:[],meta:{}};if(z(g.step)){var l=g.step;g.step=function(e){if(d=e,p())c();else{if(c(),0===d.data.length)return;r+=e.data.length,g.preview&&r>g.preview?o.abort():l(d,t)}}}function m(e){return\"greedy\"===g.skipEmptyLines?\"\"===e.join(\"\").trim():1===e.length&&0===e[0].length}function c(){if(d&&h&&(y(\"Delimiter\",\"UndetectableDelimiter\",\"Unable to auto-detect delimiting character; defaulted to '\"+k.DefaultDelimiter+\"'\"),h=!1),g.skipEmptyLines)for(var e=0;e<d.data.length;e++)m(d.data[e])&&d.data.splice(e--,1);return p()&&function(){if(!d)return;for(var e=0;p()&&e<d.data.length;e++)for(var t=0;t<d.data[e].length;t++){var r=d.data[e][t];g.trimHeaders&&(r=r.trim()),f.push(r)}d.data.splice(0,1)}(),function(){if(!d||!g.header&&!g.dynamicTyping&&!g.transform)return d;for(var e=0;e<d.data.length;e++){var t,r=g.header?{}:[];for(t=0;t<d.data[e].length;t++){var i=t,n=d.data[e][t];g.header&&(i=t>=f.length?\"__parsed_extra\":f[t]),g.transform&&(n=g.transform(n,i)),n=_(i,n),\"__parsed_extra\"===i?(r[i]=r[i]||[],r[i].push(n)):r[i]=n}d.data[e]=r,g.header&&(t>f.length?y(\"FieldMismatch\",\"TooManyFields\",\"Too many fields: expected \"+f.length+\" fields but parsed \"+t,s+e):t<f.length&&y(\"FieldMismatch\",\"TooFewFields\",\"Too few fields: expected \"+f.length+\" fields but parsed \"+t,s+e))}g.header&&d.meta&&(d.meta.fields=f);return s+=d.data.length,d}()}function p(){return g.header&&0===f.length}function _(e,t){return r=e,g.dynamicTypingFunction&&void 0===g.dynamicTyping[r]&&(g.dynamicTyping[r]=g.dynamicTypingFunction(r)),!0===(g.dynamicTyping[r]||g.dynamicTyping)?\"true\"===t||\"TRUE\"===t||\"false\"!==t&&\"FALSE\"!==t&&(i.test(t)?parseFloat(t):n.test(t)?new Date(t):\"\"===t?null:t):t;var r}function y(e,t,r,i){d.errors.push({type:e,code:t,message:r,row:i})}this.parse=function(e,t,r){var i=g.quoteChar||'\"';if(g.newline||(g.newline=function(e,t){e=e.substr(0,1048576);var r=new RegExp(M(t)+\"([^]*?)\"+M(t),\"gm\"),i=(e=e.replace(r,\"\")).split(\"\\r\"),n=e.split(\"\\n\"),s=1<n.length&&n[0].length<i[0].length;if(1===i.length||s)return\"\\n\";for(var a=0,o=0;o<i.length;o++)\"\\n\"===i[o][0]&&a++;return a>=i.length/2?\"\\r\\n\":\"\\r\"}(e,i)),h=!1,g.delimiter)z(g.delimiter)&&(g.delimiter=g.delimiter(e),d.meta.delimiter=g.delimiter);else{var n=function(e,t,r,i){for(var n,s,a,o=[\",\",\"\\t\",\"|\",\";\",k.RECORD_SEP,k.UNIT_SEP],h=0;h<o.length;h++){var u=o[h],f=0,d=0,l=0;a=void 0;for(var c=new v({comments:i,delimiter:u,newline:t,preview:10}).parse(e),p=0;p<c.data.length;p++)if(r&&m(c.data[p]))l++;else{var _=c.data[p].length;d+=_,void 0!==a?1<_&&(f+=Math.abs(_-a),a=_):a=0}0<c.data.length&&(d/=c.data.length-l),(void 0===s||s<f)&&1.99<d&&(s=f,n=u)}return{successful:!!(g.delimiter=n),bestDelimiter:n}}(e,g.newline,g.skipEmptyLines,g.comments);n.successful?g.delimiter=n.bestDelimiter:(h=!0,g.delimiter=k.DefaultDelimiter),d.meta.delimiter=g.delimiter}var s=E(g);return g.preview&&g.header&&s.preview++,a=e,o=new v(s),d=o.parse(a,t,r),c(),u?{meta:{paused:!0}}:d||{meta:{paused:!1}}},this.paused=function(){return u},this.pause=function(){u=!0,o.abort(),a=a.substr(o.getCharIndex())},this.resume=function(){u=!1,t.streamer.parseChunk(a,!0)},this.aborted=function(){return e},this.abort=function(){e=!0,o.abort(),d.meta.aborted=!0,z(g.complete)&&g.complete(d),a=\"\"}}function M(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,\"\\\\$&\")}function v(e){var S,O=(e=e||{}).delimiter,x=e.newline,T=e.comments,I=e.step,A=e.preview,D=e.fastMode,L=S=void 0===e.quoteChar?'\"':e.quoteChar;if(void 0!==e.escapeChar&&(L=e.escapeChar),(\"string\"!=typeof O||-1<k.BAD_DELIMITERS.indexOf(O))&&(O=\",\"),T===O)throw\"Comment character same as delimiter\";!0===T?T=\"#\":(\"string\"!=typeof T||-1<k.BAD_DELIMITERS.indexOf(T))&&(T=!1),\"\\n\"!==x&&\"\\r\"!==x&&\"\\r\\n\"!==x&&(x=\"\\n\");var P=0,F=!1;this.parse=function(i,t,r){if(\"string\"!=typeof i)throw\"Input must be a string\";var n=i.length,e=O.length,s=x.length,a=T.length,o=z(I),h=[],u=[],f=[],d=P=0;if(!i)return C();if(D||!1!==D&&-1===i.indexOf(S)){for(var l=i.split(x),c=0;c<l.length;c++){if(f=l[c],P+=f.length,c!==l.length-1)P+=x.length;else if(r)return C();if(!T||f.substr(0,a)!==T){if(o){if(h=[],k(f.split(O)),R(),F)return C()}else k(f.split(O));if(A&&A<=c)return h=h.slice(0,A),C(!0)}}return C()}for(var p,_=i.indexOf(O,P),g=i.indexOf(x,P),m=new RegExp(M(L)+M(S),\"g\");;)if(i[P]!==S)if(T&&0===f.length&&i.substr(P,a)===T){if(-1===g)return C();P=g+s,g=i.indexOf(x,P),_=i.indexOf(O,P)}else if(-1!==_&&(_<g||-1===g))f.push(i.substring(P,_)),P=_+e,_=i.indexOf(O,P);else{if(-1===g)break;if(f.push(i.substring(P,g)),w(g+s),o&&(R(),F))return C();if(A&&h.length>=A)return C(!0)}else for(p=P,P++;;){if(-1===(p=i.indexOf(S,p+1)))return r||u.push({type:\"Quotes\",code:\"MissingQuotes\",message:\"Quoted field unterminated\",row:h.length,index:P}),E();if(p===n-1)return E(i.substring(P,p).replace(m,S));if(S!==L||i[p+1]!==L){if(S===L||0===p||i[p-1]!==L){var y=b(-1===g?_:Math.min(_,g));if(i[p+1+y]===O){f.push(i.substring(P,p).replace(m,S)),P=p+1+y+e,_=i.indexOf(O,P),g=i.indexOf(x,P);break}var v=b(g);if(i.substr(p+1+v,s)===x){if(f.push(i.substring(P,p).replace(m,S)),w(p+1+v+s),_=i.indexOf(O,P),o&&(R(),F))return C();if(A&&h.length>=A)return C(!0);break}u.push({type:\"Quotes\",code:\"InvalidQuotes\",message:\"Trailing quote on quoted field is malformed\",row:h.length,index:P}),p++}}else p++}return E();function k(e){h.push(e),d=P}function b(e){var t=0;if(-1!==e){var r=i.substring(p+1,e);r&&\"\"===r.trim()&&(t=r.length)}return t}function E(e){return r||(void 0===e&&(e=i.substr(P)),f.push(e),P=n,k(f),o&&R()),C()}function w(e){P=e,k(f),f=[],g=i.indexOf(x,P)}function C(e){return{data:h,errors:u,meta:{delimiter:O,linebreak:x,aborted:F,truncated:!!e,cursor:d+(t||0)}}}function R(){I(C()),h=[],u=[]}},this.abort=function(){F=!0},this.getCharIndex=function(){return P}}function m(e){var t=e.data,r=h[t.workerId],i=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){i=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(z(r.userStep)){for(var s=0;s<t.results.data.length&&(r.userStep({data:[t.results.data[s]],errors:t.results.errors,meta:t.results.meta},n),!i);s++);delete t.results}else z(r.userChunk)&&(r.userChunk(t.results,n,t.file),delete t.results)}t.finished&&!i&&y(t.workerId,t.results)}function y(e,t){var r=h[e];z(r.userComplete)&&r.userComplete(t),r.terminate(),delete h[e]}function b(){throw\"Not implemented.\"}function E(e){if(\"object\"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var r in e)t[r]=E(e[r]);return t}function w(e,t){return function(){e.apply(t,arguments)}}function z(e){return\"function\"==typeof e}return o?f.onmessage=function(e){var t=e.data;void 0===k.WORKER_ID&&t&&(k.WORKER_ID=t.workerId);if(\"string\"==typeof t.input)f.postMessage({workerId:k.WORKER_ID,results:k.parse(t.input,t.config),finished:!0});else if(f.File&&t.input instanceof File||t.input instanceof Object){var r=k.parse(t.input,t.config);r&&f.postMessage({workerId:k.WORKER_ID,results:r,finished:!0})}}:k.WORKERS_SUPPORTED&&(e=document.getElementsByTagName(\"script\"),s=e.length?e[e.length-1].src:\"\",document.body?document.addEventListener(\"DOMContentLoaded\",function(){a=!0},!0):a=!0),(c.prototype=Object.create(l.prototype)).constructor=c,(p.prototype=Object.create(l.prototype)).constructor=p,(_.prototype=Object.create(_.prototype)).constructor=_,(g.prototype=Object.create(l.prototype)).constructor=g,k});","/* @license C3.js v0.4.24 | (c) C3 Team and other contributors | http://c3js.org/ */\n!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):t.c3=e()}(this,function(){\"use strict\";var a,r,H={target:\"c3-target\",chart:\"c3-chart\",chartLine:\"c3-chart-line\",chartLines:\"c3-chart-lines\",chartBar:\"c3-chart-bar\",chartBars:\"c3-chart-bars\",chartText:\"c3-chart-text\",chartTexts:\"c3-chart-texts\",chartArc:\"c3-chart-arc\",chartArcs:\"c3-chart-arcs\",chartArcsTitle:\"c3-chart-arcs-title\",chartArcsBackground:\"c3-chart-arcs-background\",chartArcsGaugeUnit:\"c3-chart-arcs-gauge-unit\",chartArcsGaugeMax:\"c3-chart-arcs-gauge-max\",chartArcsGaugeMin:\"c3-chart-arcs-gauge-min\",selectedCircle:\"c3-selected-circle\",selectedCircles:\"c3-selected-circles\",eventRect:\"c3-event-rect\",eventRects:\"c3-event-rects\",eventRectsSingle:\"c3-event-rects-single\",eventRectsMultiple:\"c3-event-rects-multiple\",zoomRect:\"c3-zoom-rect\",brush:\"c3-brush\",focused:\"c3-focused\",defocused:\"c3-defocused\",region:\"c3-region\",regions:\"c3-regions\",title:\"c3-title\",tooltipContainer:\"c3-tooltip-container\",tooltip:\"c3-tooltip\",tooltipName:\"c3-tooltip-name\",shape:\"c3-shape\",shapes:\"c3-shapes\",line:\"c3-line\",lines:\"c3-lines\",bar:\"c3-bar\",bars:\"c3-bars\",circle:\"c3-circle\",circles:\"c3-circles\",arc:\"c3-arc\",arcLabelLine:\"c3-arc-label-line\",arcs:\"c3-arcs\",area:\"c3-area\",areas:\"c3-areas\",empty:\"c3-empty\",text:\"c3-text\",texts:\"c3-texts\",gaugeValue:\"c3-gauge-value\",grid:\"c3-grid\",gridLines:\"c3-grid-lines\",xgrid:\"c3-xgrid\",xgrids:\"c3-xgrids\",xgridLine:\"c3-xgrid-line\",xgridLines:\"c3-xgrid-lines\",xgridFocus:\"c3-xgrid-focus\",ygrid:\"c3-ygrid\",ygrids:\"c3-ygrids\",ygridLine:\"c3-ygrid-line\",ygridLines:\"c3-ygrid-lines\",axis:\"c3-axis\",axisX:\"c3-axis-x\",axisXLabel:\"c3-axis-x-label\",axisY:\"c3-axis-y\",axisYLabel:\"c3-axis-y-label\",axisY2:\"c3-axis-y2\",axisY2Label:\"c3-axis-y2-label\",legendBackground:\"c3-legend-background\",legendItem:\"c3-legend-item\",legendItemEvent:\"c3-legend-item-event\",legendItemTile:\"c3-legend-item-tile\",legendItemHidden:\"c3-legend-item-hidden\",legendItemFocused:\"c3-legend-item-focused\",dragarea:\"c3-dragarea\",EXPANDED:\"_expanded_\",SELECTED:\"_selected_\",INCLUDED:\"_included_\"},o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},P=function(t){return t||0===t},h=function(t){return\"function\"==typeof t},s=function(t){return Array.isArray(t)},c=function(t){return\"string\"==typeof t},v=function(t){return void 0===t},k=function(t){return void 0!==t},n=function(t){return 10*Math.ceil(t/10)},d=function(t){return Math.ceil(t)+.5},D=function(t){return t[1]-t[0]},u=function(t){return null==t||c(t)&&0===t.length||\"object\"===(void 0===t?\"undefined\":o(t))&&0===Object.keys(t).length},C=function(t){return!p.isEmpty(t)},B=function(t,e,i){return k(t[e])?t[e]:i},i=function(e,i){var n=!1;return Object.keys(e).forEach(function(t){e[t]===i&&(n=!0)}),n},_=function(t){return\"string\"==typeof t?t.replace(/</g,\"<\").replace(/>/g,\">\"):t},m=function(t){var e=t.getBoundingClientRect(),i=[t.pathSegList.getItem(0),t.pathSegList.getItem(1)];return{x:i[0].x,y:Math.min(i[0].y,i[1].y),width:e.width,height:e.height}};function l(t,e){var i=this;i.component=t,i.params=e||{},i.d3=t.d3,i.scale=i.d3.scale.linear(),i.range,i.orient=\"bottom\",i.innerTickSize=6,i.outerTickSize=this.params.withOuterTick?6:0,i.tickPadding=3,i.tickValues=null,i.tickFormat,i.tickArguments,i.tickOffset=0,i.tickCulling=!0,i.tickCentered,i.tickTextCharSize,i.tickTextRotate=i.params.tickTextRotate,i.tickLength,i.axis=i.generateAxis()}(r=l.prototype).axisX=function(t,e,i){t.attr(\"transform\",function(t){return\"translate(\"+Math.ceil(e(t)+i)+\", 0)\"})},r.axisY=function(t,e){t.attr(\"transform\",function(t){return\"translate(0,\"+Math.ceil(e(t))+\")\"})},r.scaleExtent=function(t){var e=t[0],i=t[t.length-1];return e<i?[e,i]:[i,e]},r.generateTicks=function(t){var e,i,n=[];if(t.ticks)return t.ticks.apply(t,this.tickArguments);for(i=t.domain(),e=Math.ceil(i[0]);e<i[1];e++)n.push(e);return 0<n.length&&0<n[0]&&n.unshift(n[0]-(n[1]-n[0])),n},r.copyScale=function(){var t,e=this.scale.copy();return this.params.isCategory&&(t=this.scale.domain(),e.domain([t[0],t[1]-1])),e},r.textFormatted=function(t){var e=this.tickFormat?this.tickFormat(t):t;return void 0!==e?e:\"\"},r.updateRange=function(){var t=this;return t.range=t.scale.rangeExtent?t.scale.rangeExtent():t.scaleExtent(t.scale.range()),t.range},r.updateTickTextCharSize=function(t){var r=this;if(r.tickTextCharSize)return r.tickTextCharSize;var s={h:11.5,w:5.5};return t.select(\"text\").text(function(t){return r.textFormatted(t)}).each(function(t){var e=this.getBoundingClientRect(),i=r.textFormatted(t),n=e.height,a=i?e.width/i.length:void 0;n&&a&&(s.h=n,s.w=a)}).text(\"\"),r.tickTextCharSize=s},r.transitionise=function(t){return this.params.withoutTransition?t:this.d3.transition(t)},r.isVertical=function(){return\"left\"===this.orient||\"right\"===this.orient},r.tspanData=function(t,e,i,n){var a=this,r=a.params.tickMultiline?a.splitTickText(t,i,n):[].concat(a.textFormatted(t));return a.params.tickMultiline&&0<a.params.tickMultilineMax&&(r=a.ellipsify(r,a.params.tickMultilineMax)),r.map(function(t){return{index:e,splitted:t,length:r.length}})},r.splitTickText=function(t,e,i){var a,r,s,o=this,n=o.textFormatted(t),c=o.params.tickWidth;if(\"[object Array]\"===Object.prototype.toString.call(n))return n;return(!c||c<=0)&&(c=o.isVertical()?95:o.params.isCategory?Math.ceil(i(e[1])-i(e[0]))-12:110),function t(e,i){r=void 0;for(var n=1;n<i.length;n++)if(\" \"===i.charAt(n)&&(r=n),a=i.substr(0,n+1),s=o.tickTextCharSize.w*a.length,c<s)return t(e.concat(i.substr(0,r||n)),i.slice(r?r+1:n));return e.concat(i)}([],n+\"\")},r.ellipsify=function(t,e){if(t.length<=e)return t;for(var i=t.slice(0,e),n=3,a=e-1;0<=a;a--){var r=i[a].length;if(i[a]=i[a].substr(0,r-n).padEnd(r,\".\"),(n-=r)<=0)break}return i},r.updateTickLength=function(){this.tickLength=Math.max(this.innerTickSize,0)+this.tickPadding},r.lineY2=function(t){var e=this,i=e.scale(t)+(e.tickCentered?0:e.tickOffset);return e.range[0]<i&&i<e.range[1]?e.innerTickSize:0},r.textY=function(){var t=this.tickTextRotate;return t?11.5-t/15*2.5*(0<t?1:-1):this.tickLength},r.textTransform=function(){var t=this.tickTextRotate;return t?\"rotate(\"+t+\")\":\"\"},r.textTextAnchor=function(){var t=this.tickTextRotate;return t?0<t?\"start\":\"end\":\"middle\"},r.tspanDx=function(){var t=this.tickTextRotate;return t?8*Math.sin(Math.PI*(t/180)):0},r.tspanDy=function(t,e){var i=this.tickTextCharSize.h;return 0===e&&(i=this.isVertical()?-((t.length-1)*(this.tickTextCharSize.h/2)-3):\".71em\"),i},r.generateAxis=function(){var m=this,y=m.d3,S=m.params;function w(t){t.each(function(){var t,e,i,n=w.g=y.select(this),a=this.__chart__||m.scale,r=this.__chart__=m.copyScale(),s=m.tickValues?m.tickValues:m.generateTicks(r),o=n.selectAll(\".tick\").data(s,r),c=o.enter().insert(\"g\",\".domain\").attr(\"class\",\"tick\").style(\"opacity\",1e-6),d=o.exit().remove(),l=m.transitionise(o).style(\"opacity\",1);S.isCategory?(m.tickOffset=Math.ceil((r(1)-r(0))/2),e=m.tickCentered?0:m.tickOffset,i=m.tickCentered?m.tickOffset:0):m.tickOffset=e=0,c.append(\"line\"),c.append(\"text\"),m.updateRange(),m.updateTickLength(),m.updateTickTextCharSize(n.select(\".tick\"));var u=l.select(\"line\"),h=l.select(\"text\"),g=o.select(\"text\").selectAll(\"tspan\").data(function(t,e){return m.tspanData(t,e,s,r)});g.enter().append(\"tspan\"),g.exit().remove(),g.text(function(t){return t.splitted});var f=n.selectAll(\".domain\").data([0]),p=(f.enter().append(\"path\").attr(\"class\",\"domain\"),m.transitionise(f));switch(m.orient){case\"bottom\":t=m.axisX,u.attr(\"x1\",e).attr(\"x2\",e).attr(\"y2\",function(t,e){return m.lineY2(t,e)}),h.attr(\"x\",0).attr(\"y\",function(t,e){return m.textY(t,e)}).attr(\"transform\",function(t,e){return m.textTransform(t,e)}).style(\"text-anchor\",function(t,e){return m.textTextAnchor(t,e)}),g.attr(\"x\",0).attr(\"dy\",function(t,e){return m.tspanDy(t,e)}).attr(\"dx\",function(t,e){return m.tspanDx(t,e)}),p.attr(\"d\",\"M\"+m.range[0]+\",\"+m.outerTickSize+\"V0H\"+m.range[1]+\"V\"+m.outerTickSize);break;case\"top\":t=m.axisX,u.attr(\"x1\",e).attr(\"x2\",e).attr(\"y2\",function(t,e){return-1*m.lineY2(t,e)}),h.attr(\"x\",0).attr(\"y\",function(t,e){return-1*m.textY(t,e)-(S.isCategory?2:m.tickLength-2)}).attr(\"transform\",function(t,e){return m.textTransform(t,e)}).style(\"text-anchor\",function(t,e){return m.textTextAnchor(t,e)}),g.attr(\"x\",0).attr(\"dy\",function(t,e){return m.tspanDy(t,e)}).attr(\"dx\",function(t,e){return m.tspanDx(t,e)}),p.attr(\"d\",\"M\"+m.range[0]+\",\"+-m.outerTickSize+\"V0H\"+m.range[1]+\"V\"+-m.outerTickSize);break;case\"left\":t=m.axisY,u.attr(\"x2\",-m.innerTickSize).attr(\"y1\",i).attr(\"y2\",i),h.attr(\"x\",-m.tickLength).attr(\"y\",m.tickOffset).style(\"text-anchor\",\"end\"),g.attr(\"x\",-m.tickLength).attr(\"dy\",function(t,e){return m.tspanDy(t,e)}),p.attr(\"d\",\"M\"+-m.outerTickSize+\",\"+m.range[0]+\"H0V\"+m.range[1]+\"H\"+-m.outerTickSize);break;case\"right\":t=m.axisY,u.attr(\"x2\",m.innerTickSize).attr(\"y1\",i).attr(\"y2\",i),h.attr(\"x\",m.tickLength).attr(\"y\",m.tickOffset).style(\"text-anchor\",\"start\"),g.attr(\"x\",m.tickLength).attr(\"dy\",function(t,e){return m.tspanDy(t,e)}),p.attr(\"d\",\"M\"+m.outerTickSize+\",\"+m.range[0]+\"H0V\"+m.range[1]+\"H\"+m.outerTickSize)}if(r.rangeBand){var _=r,x=_.rangeBand()/2;a=r=function(t){return _(t)+x}}else a.rangeBand?a=r:d.call(t,r,m.tickOffset);c.call(t,a,m.tickOffset),l.call(t,r,m.tickOffset)})}return w.scale=function(t){return arguments.length?(m.scale=t,w):m.scale},w.orient=function(t){return arguments.length?(m.orient=t in{top:1,right:1,bottom:1,left:1}?t+\"\":\"bottom\",w):m.orient},w.tickFormat=function(t){return arguments.length?(m.tickFormat=t,w):m.tickFormat},w.tickCentered=function(t){return arguments.length?(m.tickCentered=t,w):m.tickCentered},w.tickOffset=function(){return m.tickOffset},w.tickInterval=function(){var t;return(t=S.isCategory?2*m.tickOffset:(w.g.select(\"path.domain\").node().getTotalLength()-2*m.outerTickSize)/w.g.selectAll(\"line\").size())===1/0?0:t},w.ticks=function(){return arguments.length?(m.tickArguments=arguments,w):m.tickArguments},w.tickCulling=function(t){return arguments.length?(m.tickCulling=t,w):m.tickCulling},w.tickValues=function(t){if(\"function\"==typeof t)m.tickValues=function(){return t(m.scale.domain())};else{if(!arguments.length)return m.tickValues;m.tickValues=t}return w},w};var g=function(t){function n(t){!function(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}(this,n);var e={fn:a,internal:{fn:r}},i=function(t,e){if(!t)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return!e||\"object\"!=typeof e&&\"function\"!=typeof e?t:e}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t,\"axis\",e));return i.d3=t.d3,i.internal=l,i}return function(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Super expression must either be null or a function, not \"+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,e),n}();(a=g.prototype).init=function(){var t=this.owner,e=t.config,i=t.main;t.axes.x=i.append(\"g\").attr(\"class\",H.axis+\" \"+H.axisX).attr(\"clip-path\",e.axis_x_inner?\"\":t.clipPathForXAxis).attr(\"transform\",t.getTranslate(\"x\")).style(\"visibility\",e.axis_x_show?\"visible\":\"hidden\"),t.axes.x.append(\"text\").attr(\"class\",H.axisXLabel).attr(\"transform\",e.axis_rotated?\"rotate(-90)\":\"\").style(\"text-anchor\",this.textAnchorForXAxisLabel.bind(this)),t.axes.y=i.append(\"g\").attr(\"class\",H.axis+\" \"+H.axisY).attr(\"clip-path\",e.axis_y_inner?\"\":t.clipPathForYAxis).attr(\"transform\",t.getTranslate(\"y\")).style(\"visibility\",e.axis_y_show?\"visible\":\"hidden\"),t.axes.y.append(\"text\").attr(\"class\",H.axisYLabel).attr(\"transform\",e.axis_rotated?\"\":\"rotate(-90)\").style(\"text-anchor\",this.textAnchorForYAxisLabel.bind(this)),t.axes.y2=i.append(\"g\").attr(\"class\",H.axis+\" \"+H.axisY2).attr(\"transform\",t.getTranslate(\"y2\")).style(\"visibility\",e.axis_y2_show?\"visible\":\"hidden\"),t.axes.y2.append(\"text\").attr(\"class\",H.axisY2Label).attr(\"transform\",e.axis_rotated?\"\":\"rotate(-90)\").style(\"text-anchor\",this.textAnchorForY2AxisLabel.bind(this))},a.getXAxis=function(t,e,i,n,a,r,s){var o=this.owner,c=o.config,d={isCategory:o.isCategorized(),withOuterTick:a,tickMultiline:c.axis_x_tick_multiline,tickMultilineMax:c.axis_x_tick_multiline?Number(c.axis_x_tick_multilineMax):0,tickWidth:c.axis_x_tick_width,tickTextRotate:s?0:c.axis_x_tick_rotate,withoutTransition:r},l=new this.internal(this,d).axis.scale(t).orient(e);return o.isTimeSeries()&&n&&\"function\"!=typeof n&&(n=n.map(function(t){return o.parseDate(t)})),l.tickFormat(i).tickValues(n),o.isCategorized()&&(l.tickCentered(c.axis_x_tick_centered),u(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1)),l},a.updateXAxisTickValues=function(t,e){var i,n=this.owner,a=n.config;return(a.axis_x_tick_fit||a.axis_x_tick_count)&&(i=this.generateTickValues(n.mapTargetsToUniqueXs(t),a.axis_x_tick_count,n.isTimeSeries())),e?e.tickValues(i):(n.xAxis.tickValues(i),n.subXAxis.tickValues(i)),i},a.getYAxis=function(t,e,i,n,a,r,s){var o=this.owner,c=o.config,d={withOuterTick:a,withoutTransition:r,tickTextRotate:s?0:c.axis_y_tick_rotate},l=new this.internal(this,d).axis.scale(t).orient(e).tickFormat(i);return o.isTimeSeriesY()?l.ticks(o.d3.time[c.axis_y_tick_time_value],c.axis_y_tick_time_interval):l.tickValues(n),l},a.getId=function(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:\"y\"},a.getXAxisTickFormat=function(){var e=this.owner,i=e.config,n=e.isTimeSeries()?e.defaultAxisTimeFormat:e.isCategorized()?e.categoryName:function(t){return t<0?t.toFixed(0):t};return i.axis_x_tick_format&&(h(i.axis_x_tick_format)?n=i.axis_x_tick_format:e.isTimeSeries()&&(n=function(t){return t?e.axisTimeFormat(i.axis_x_tick_format)(t):\"\"})),h(n)?function(t){return n.call(e,t)}:n},a.getTickValues=function(t,e){return t||(e?e.tickValues():void 0)},a.getXAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_x_tick_values,this.owner.xAxis)},a.getYAxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y_tick_values,this.owner.yAxis)},a.getY2AxisTickValues=function(){return this.getTickValues(this.owner.config.axis_y2_tick_values,this.owner.y2Axis)},a.getLabelOptionByAxisId=function(t){var e,i=this.owner.config;return\"y\"===t?e=i.axis_y_label:\"y2\"===t?e=i.axis_y2_label:\"x\"===t&&(e=i.axis_x_label),e},a.getLabelText=function(t){var e=this.getLabelOptionByAxisId(t);return c(e)?e:e?e.text:null},a.setLabelText=function(t,e){var i=this.owner.config,n=this.getLabelOptionByAxisId(t);c(n)?\"y\"===t?i.axis_y_label=e:\"y2\"===t?i.axis_y2_label=e:\"x\"===t&&(i.axis_x_label=e):n&&(n.text=e)},a.getLabelPosition=function(t,e){var i=this.getLabelOptionByAxisId(t),n=i&&\"object\"===(void 0===i?\"undefined\":o(i))&&i.position?i.position:e;return{isInner:0<=n.indexOf(\"inner\"),isOuter:0<=n.indexOf(\"outer\"),isLeft:0<=n.indexOf(\"left\"),isCenter:0<=n.indexOf(\"center\"),isRight:0<=n.indexOf(\"right\"),isTop:0<=n.indexOf(\"top\"),isMiddle:0<=n.indexOf(\"middle\"),isBottom:0<=n.indexOf(\"bottom\")}},a.getXAxisLabelPosition=function(){return this.getLabelPosition(\"x\",this.owner.config.axis_rotated?\"inner-top\":\"inner-right\")},a.getYAxisLabelPosition=function(){return this.getLabelPosition(\"y\",this.owner.config.axis_rotated?\"inner-right\":\"inner-top\")},a.getY2AxisLabelPosition=function(){return this.getLabelPosition(\"y2\",this.owner.config.axis_rotated?\"inner-right\":\"inner-top\")},a.getLabelPositionById=function(t){return\"y2\"===t?this.getY2AxisLabelPosition():\"y\"===t?this.getYAxisLabelPosition():this.getXAxisLabelPosition()},a.textForXAxisLabel=function(){return this.getLabelText(\"x\")},a.textForYAxisLabel=function(){return this.getLabelText(\"y\")},a.textForY2AxisLabel=function(){return this.getLabelText(\"y2\")},a.xForAxisLabel=function(t,e){var i=this.owner;return t?e.isLeft?0:e.isCenter?i.width/2:i.width:e.isBottom?-i.height:e.isMiddle?-i.height/2:0},a.dxForAxisLabel=function(t,e){return t?e.isLeft?\"0.5em\":e.isRight?\"-0.5em\":\"0\":e.isTop?\"-0.5em\":e.isBottom?\"0.5em\":\"0\"},a.textAnchorForAxisLabel=function(t,e){return t?e.isLeft?\"start\":e.isCenter?\"middle\":\"end\":e.isBottom?\"start\":e.isMiddle?\"middle\":\"end\"},a.xForXAxisLabel=function(){return this.xForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},a.xForYAxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},a.xForY2AxisLabel=function(){return this.xForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},a.dxForXAxisLabel=function(){return this.dxForAxisLabel(!this.owner.config.axis_rotated,this.getXAxisLabelPosition())},a.dxForYAxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getYAxisLabelPosition())},a.dxForY2AxisLabel=function(){return this.dxForAxisLabel(this.owner.config.axis_rotated,this.getY2AxisLabelPosition())},a.dyForXAxisLabel=function(){var t=this.owner,e=t.config,i=this.getXAxisLabelPosition();return e.axis_rotated?i.isInner?\"1.2em\":-25-(t.config.axis_x_inner?0:this.getMaxTickWidth(\"x\")):i.isInner?\"-0.5em\":e.axis_x_height?e.axis_x_height-10:\"3em\"},a.dyForYAxisLabel=function(){var t=this.owner,e=this.getYAxisLabelPosition();return t.config.axis_rotated?e.isInner?\"-0.5em\":\"3em\":e.isInner?\"1.2em\":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth(\"y\")+10)},a.dyForY2AxisLabel=function(){var t=this.owner,e=this.getY2AxisLabelPosition();return t.config.axis_rotated?e.isInner?\"1.2em\":\"-2.2em\":e.isInner?\"-0.5em\":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth(\"y2\")+15)},a.textAnchorForXAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(!t.config.axis_rotated,this.getXAxisLabelPosition())},a.textAnchorForYAxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getYAxisLabelPosition())},a.textAnchorForY2AxisLabel=function(){var t=this.owner;return this.textAnchorForAxisLabel(t.config.axis_rotated,this.getY2AxisLabelPosition())},a.getMaxTickWidth=function(t,e){var i,n,a,r,s=this.owner,o=s.config,c=0;return e&&s.currentMaxTickWidths[t]||(s.svg&&(i=s.filterTargetsToShow(s.data.targets),\"y\"===t?(n=s.y.copy().domain(s.getYDomain(i,\"y\")),a=this.getYAxis(n,s.yOrient,o.axis_y_tick_format,s.yAxisTickValues,!1,!0,!0)):\"y2\"===t?(n=s.y2.copy().domain(s.getYDomain(i,\"y2\")),a=this.getYAxis(n,s.y2Orient,o.axis_y2_tick_format,s.y2AxisTickValues,!1,!0,!0)):(n=s.x.copy().domain(s.getXDomain(i)),a=this.getXAxis(n,s.xOrient,s.xAxisTickFormat,s.xAxisTickValues,!1,!0,!0),this.updateXAxisTickValues(i,a)),(r=s.d3.select(\"body\").append(\"div\").classed(\"c3\",!0)).append(\"svg\").style(\"visibility\",\"hidden\").style(\"position\",\"fixed\").style(\"top\",0).style(\"left\",0).append(\"g\").call(a).each(function(){s.d3.select(this).selectAll(\"text\").each(function(){var t=this.getBoundingClientRect();c<t.width&&(c=t.width)}),r.remove()})),s.currentMaxTickWidths[t]=c<=0?s.currentMaxTickWidths[t]:c),s.currentMaxTickWidths[t]},a.updateLabels=function(t){var e=this.owner,i=e.main.select(\".\"+H.axisX+\" .\"+H.axisXLabel),n=e.main.select(\".\"+H.axisY+\" .\"+H.axisYLabel),a=e.main.select(\".\"+H.axisY2+\" .\"+H.axisY2Label);(t?i.transition():i).attr(\"x\",this.xForXAxisLabel.bind(this)).attr(\"dx\",this.dxForXAxisLabel.bind(this)).attr(\"dy\",this.dyForXAxisLabel.bind(this)).text(this.textForXAxisLabel.bind(this)),(t?n.transition():n).attr(\"x\",this.xForYAxisLabel.bind(this)).attr(\"dx\",this.dxForYAxisLabel.bind(this)).attr(\"dy\",this.dyForYAxisLabel.bind(this)).text(this.textForYAxisLabel.bind(this)),(t?a.transition():a).attr(\"x\",this.xForY2AxisLabel.bind(this)).attr(\"dx\",this.dxForY2AxisLabel.bind(this)).attr(\"dy\",this.dyForY2AxisLabel.bind(this)).text(this.textForY2AxisLabel.bind(this))},a.getPadding=function(t,e,i,n){var a=\"number\"==typeof t?t:t[e];return P(a)?\"ratio\"===t.unit?t[e]*n:this.convertPixelsToAxisPadding(a,n):i},a.convertPixelsToAxisPadding=function(t,e){var i=this.owner;return e*(t/(i.config.axis_rotated?i.width:i.height))},a.generateTickValues=function(t,e,i){var n,a,r,s,o,c,d,l=t;if(e)if(1===(n=h(e)?e():e))l=[t[0]];else if(2===n)l=[t[0],t[t.length-1]];else if(2<n){for(s=n-2,a=t[0],o=((r=t[t.length-1])-a)/(s+1),l=[a],c=0;c<s;c++)d=+a+o*(c+1),l.push(i?new Date(d):d);l.push(r)}return i||(l=l.sort(function(t,e){return t-e})),l},a.generateTransitions=function(t){var e=this.owner.axes;return{axisX:t?e.x.transition().duration(t):e.x,axisY:t?e.y.transition().duration(t):e.y,axisY2:t?e.y2.transition().duration(t):e.y2,axisSubX:t?e.subx.transition().duration(t):e.subx}},a.redraw=function(t,e){var i=this.owner;i.axes.x.style(\"opacity\",e?0:1),i.axes.y.style(\"opacity\",e?0:1),i.axes.y2.style(\"opacity\",e?0:1),i.axes.subx.style(\"opacity\",e?0:1),t.axisX.call(i.xAxis),t.axisY.call(i.yAxis),t.axisY2.call(i.y2Axis),t.axisSubX.call(i.subXAxis)};var f,p,x={version:\"0.4.24\"};function e(t,e,i){this.owner=t,x.chart.internal[e]=i}function y(t){var e=this.internal=new S(this);e.loadConfig(t),e.beforeInit(t),e.init(),e.afterInit(t),function e(i,n,a){Object.keys(i).forEach(function(t){n[t]=i[t].bind(a),0<Object.keys(i[t]).length&&e(i[t],n[t],a)})}(f,this,this)}function S(t){var e=this;e.d3=window.d3?window.d3:\"undefined\"!=typeof require?require(\"d3\"):void 0,e.api=t,e.config=e.getDefaultConfig(),e.data={},e.cache={},e.axes={}}return x.generate=function(t){return new y(t)},x.chart={fn:y.prototype,internal:{fn:S.prototype}},f=x.chart.fn,(p=x.chart.internal.fn).beforeInit=function(){},p.afterInit=function(){},p.init=function(){var t=this,e=t.config;if(t.initParams(),e.data_url)t.convertUrlToData(e.data_url,e.data_mimeType,e.data_headers,e.data_keys,t.initWithData);else if(e.data_json)t.initWithData(t.convertJsonToData(e.data_json,e.data_keys));else if(e.data_rows)t.initWithData(t.convertRowsToData(e.data_rows));else{if(!e.data_columns)throw Error(\"url or json or rows or columns is required.\");t.initWithData(t.convertColumnsToData(e.data_columns))}},p.initParams=function(){var t=this,e=t.d3,i=t.config;t.clipId=\"c3-\"+ +new Date+\"-clip\",t.clipIdForXAxis=t.clipId+\"-xaxis\",t.clipIdForYAxis=t.clipId+\"-yaxis\",t.clipIdForGrid=t.clipId+\"-grid\",t.clipIdForSubchart=t.clipId+\"-subchart\",t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid),t.clipPathForSubchart=t.getClipPath(t.clipIdForSubchart),t.dragStart=null,t.dragging=!1,t.flowing=!1,t.cancelClick=!1,t.mouseover=!1,t.transiting=!1,t.color=t.generateColor(),t.levelColor=t.generateLevelColor(),t.dataTimeFormat=i.data_xLocaltime?e.time.format:e.time.format.utc,t.axisTimeFormat=i.axis_x_localtime?e.time.format:e.time.format.utc,t.defaultAxisTimeFormat=t.axisTimeFormat.multi([[\".%L\",function(t){return t.getMilliseconds()}],[\":%S\",function(t){return t.getSeconds()}],[\"%I:%M\",function(t){return t.getMinutes()}],[\"%I %p\",function(t){return t.getHours()}],[\"%-m/%-d\",function(t){return t.getDay()&&1!==t.getDate()}],[\"%-m/%-d\",function(t){return 1!==t.getDate()}],[\"%-m/%-d\",function(t){return t.getMonth()}],[\"%Y/%-m/%-d\",function(){return!0}]]),t.hiddenTargetIds=[],t.hiddenLegendIds=[],t.focusedTargetIds=[],t.defocusedTargetIds=[],t.xOrient=i.axis_rotated?i.axis_x_inner?\"right\":\"left\":i.axis_x_inner?\"top\":\"bottom\",t.yOrient=i.axis_rotated?i.axis_y_inner?\"top\":\"bottom\":i.axis_y_inner?\"right\":\"left\",t.y2Orient=i.axis_rotated?i.axis_y2_inner?\"bottom\":\"top\":i.axis_y2_inner?\"left\":\"right\",t.subXOrient=i.axis_rotated?\"left\":\"bottom\",t.isLegendRight=\"right\"===i.legend_position,t.isLegendInset=\"inset\"===i.legend_position,t.isLegendTop=\"top-left\"===i.legend_inset_anchor||\"top-right\"===i.legend_inset_anchor,t.isLegendLeft=\"top-left\"===i.legend_inset_anchor||\"bottom-left\"===i.legend_inset_anchor,t.legendStep=0,t.legendItemWidth=0,t.legendItemHeight=0,t.currentMaxTickWidths={x:0,y:0,y2:0},t.rotated_padding_left=30,t.rotated_padding_right=i.axis_rotated&&!i.axis_x_show?0:30,t.rotated_padding_top=5,t.withoutFadeIn={},t.intervalForObserveInserted=void 0,t.axes.subx=e.selectAll([])},p.initChartElements=function(){this.initBar&&this.initBar(),this.initLine&&this.initLine(),this.initArc&&this.initArc(),this.initGauge&&this.initGauge(),this.initText&&this.initText()},p.initWithData=function(t){var e,i,n=this,a=n.d3,r=n.config,s=!0;n.axis=new g(n),n.initPie&&n.initPie(),n.initBrush&&n.initBrush(),n.initZoom&&n.initZoom(),r.bindto?\"function\"==typeof r.bindto.node?n.selectChart=r.bindto:n.selectChart=a.select(r.bindto):n.selectChart=a.selectAll([]),n.selectChart.empty()&&(n.selectChart=a.select(document.createElement(\"div\")).style(\"opacity\",0),n.observeInserted(n.selectChart),s=!1),n.selectChart.html(\"\").classed(\"c3\",!0),n.data.xs={},n.data.targets=n.convertDataToTargets(t),r.data_filter&&(n.data.targets=n.data.targets.filter(r.data_filter)),r.data_hide&&n.addHiddenTargetIds(!0===r.data_hide?n.mapToIds(n.data.targets):r.data_hide),r.legend_hide&&n.addHiddenLegendIds(!0===r.legend_hide?n.mapToIds(n.data.targets):r.legend_hide),n.updateSizes(),n.updateScales(),n.x.domain(a.extent(n.getXDomain(n.data.targets))),n.y.domain(n.getYDomain(n.data.targets,\"y\")),n.y2.domain(n.getYDomain(n.data.targets,\"y2\")),n.subX.domain(n.x.domain()),n.subY.domain(n.y.domain()),n.subY2.domain(n.y2.domain()),n.orgXDomain=n.x.domain(),n.brush&&n.brush.scale(n.subX),r.zoom_enabled&&n.zoom.scale(n.x),n.svg=n.selectChart.append(\"svg\").style(\"overflow\",\"hidden\").on(\"mouseenter\",function(){return r.onmouseover.call(n)}).on(\"mouseleave\",function(){return r.onmouseout.call(n)}),n.config.svg_classname&&n.svg.attr(\"class\",n.config.svg_classname),e=n.svg.append(\"defs\"),n.clipChart=n.appendClip(e,n.clipId),n.clipXAxis=n.appendClip(e,n.clipIdForXAxis),n.clipYAxis=n.appendClip(e,n.clipIdForYAxis),n.clipGrid=n.appendClip(e,n.clipIdForGrid),n.clipSubchart=n.appendClip(e,n.clipIdForSubchart),n.updateSvgSize(),i=n.main=n.svg.append(\"g\").attr(\"transform\",n.getTranslate(\"main\")),n.initSubchart&&n.initSubchart(),n.initTooltip&&n.initTooltip(),n.initLegend&&n.initLegend(),n.initTitle&&n.initTitle(),i.append(\"text\").attr(\"class\",H.text+\" \"+H.empty).attr(\"text-anchor\",\"middle\").attr(\"dominant-baseline\",\"middle\"),n.initRegion(),n.initGrid(),i.append(\"g\").attr(\"clip-path\",n.clipPath).attr(\"class\",H.chart),r.grid_lines_front&&n.initGridLines(),n.initEventRect(),n.initChartElements(),i.insert(\"rect\",r.zoom_privileged?null:\"g.\"+H.regions).attr(\"class\",H.zoomRect).attr(\"width\",n.width).attr(\"height\",n.height).style(\"opacity\",0).on(\"dblclick.zoom\",null),r.axis_x_extent&&n.brush.extent(n.getDefaultExtent()),n.axis.init(),n.updateTargets(n.data.targets),s&&(n.updateDimension(),n.config.oninit.call(n),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1})),n.bindResize(),n.api.element=n.selectChart.node()},p.smoothLines=function(t,e){var r=this;\"grid\"===e&&t.each(function(){var t=r.d3.select(this),e=t.attr(\"x1\"),i=t.attr(\"x2\"),n=t.attr(\"y1\"),a=t.attr(\"y2\");t.attr({x1:Math.ceil(e),x2:Math.ceil(i),y1:Math.ceil(n),y2:Math.ceil(a)})})},p.updateSizes=function(){var t=this,e=t.config,i=t.legend?t.getLegendHeight():0,n=t.legend?t.getLegendWidth():0,a=t.isLegendRight||t.isLegendInset?0:i,r=t.hasArcType(),s=e.axis_rotated||r?0:t.getHorizontalAxisHeight(\"x\"),o=e.subchart_show&&!r?e.subchart_size_height+s:0;t.currentWidth=t.getCurrentWidth(),t.currentHeight=t.getCurrentHeight(),t.margin=e.axis_rotated?{top:t.getHorizontalAxisHeight(\"y2\")+t.getCurrentPaddingTop(),right:r?0:t.getCurrentPaddingRight(),bottom:t.getHorizontalAxisHeight(\"y\")+a+t.getCurrentPaddingBottom(),left:o+(r?0:t.getCurrentPaddingLeft())}:{top:4+t.getCurrentPaddingTop(),right:r?0:t.getCurrentPaddingRight(),bottom:s+o+a+t.getCurrentPaddingBottom(),left:r?0:t.getCurrentPaddingLeft()},t.margin2=e.axis_rotated?{top:t.margin.top,right:NaN,bottom:20+a,left:t.rotated_padding_left}:{top:t.currentHeight-o-a,right:NaN,bottom:s+a,left:t.margin.left},t.margin3={top:0,right:NaN,bottom:0,left:0},t.updateSizeForLegend&&t.updateSizeForLegend(i,n),t.width=t.currentWidth-t.margin.left-t.margin.right,t.height=t.currentHeight-t.margin.top-t.margin.bottom,t.width<0&&(t.width=0),t.height<0&&(t.height=0),t.width2=e.axis_rotated?t.margin.left-t.rotated_padding_left-t.rotated_padding_right:t.width,t.height2=e.axis_rotated?t.height:t.currentHeight-t.margin2.top-t.margin2.bottom,t.width2<0&&(t.width2=0),t.height2<0&&(t.height2=0),t.arcWidth=t.width-(t.isLegendRight?n+10:0),t.arcHeight=t.height-(t.isLegendRight?0:10),t.hasType(\"gauge\")&&!e.gauge_fullCircle&&(t.arcHeight+=t.height-t.getGaugeLabelHeight()),t.updateRadius&&t.updateRadius(),t.isLegendRight&&r&&(t.margin3.left=t.arcWidth/2+1.1*t.radiusExpanded)},p.updateTargets=function(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType()&&e.updateTargetsForArc&&e.updateTargetsForArc(t),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()},p.showTargets=function(){var e=this;e.svg.selectAll(\".\"+H.target).filter(function(t){return e.isTargetToShow(t.id)}).transition().duration(e.config.transition_duration).style(\"opacity\",1)},p.redraw=function(t,e){var i,n,a,r,s,o,c,d,l,u,h,g,f,p,_,x,m,y,S,w,v,b,T,A,P,C,L,V,G,E=this,O=E.main,I=E.d3,R=E.config,k=E.getShapeIndices(E.isAreaType),D=E.getShapeIndices(E.isBarType),F=E.getShapeIndices(E.isLineType),X=E.hasArcType(),M=E.filterTargetsToShow(E.data.targets),z=E.xv.bind(E);if(i=B(t=t||{},\"withY\",!0),n=B(t,\"withSubchart\",!0),a=B(t,\"withTransition\",!0),o=B(t,\"withTransform\",!1),c=B(t,\"withUpdateXDomain\",!1),d=B(t,\"withUpdateOrgXDomain\",!1),l=B(t,\"withTrimXDomain\",!0),f=B(t,\"withUpdateXAxis\",c),u=B(t,\"withLegend\",!1),h=B(t,\"withEventRect\",!0),g=B(t,\"withDimension\",!0),r=B(t,\"withTransitionForExit\",a),s=B(t,\"withTransitionForAxis\",a),S=a?R.transition_duration:0,w=r?S:0,v=s?S:0,e=e||E.axis.generateTransitions(v),u&&R.legend_show?E.updateLegend(E.mapToIds(E.data.targets),t,e):g&&E.updateDimension(!0),E.isCategorized()&&0===M.length&&E.x.domain([0,E.axes.x.selectAll(\".tick\").size()]),M.length?(E.updateXDomain(M,c,d,l),R.axis_x_tick_values||(A=E.axis.updateXAxisTickValues(M))):(E.xAxis.tickValues([]),E.subXAxis.tickValues([])),R.zoom_rescale&&!t.flow&&(L=E.x.orgDomain()),E.y.domain(E.getYDomain(M,\"y\",L)),E.y2.domain(E.getYDomain(M,\"y2\",L)),!R.axis_y_tick_values&&R.axis_y_tick_count&&E.yAxis.tickValues(E.axis.generateTickValues(E.y.domain(),R.axis_y_tick_count)),!R.axis_y2_tick_values&&R.axis_y2_tick_count&&E.y2Axis.tickValues(E.axis.generateTickValues(E.y2.domain(),R.axis_y2_tick_count)),E.axis.redraw(e,X),E.axis.updateLabels(a),(c||f)&&M.length)if(R.axis_x_tick_culling&&A){for(P=1;P<A.length;P++)if(A.length/P<R.axis_x_tick_culling_max){C=P;break}E.svg.selectAll(\".\"+H.axisX+\" .tick text\").each(function(t){var e=A.indexOf(t);0<=e&&I.select(this).style(\"display\",e%C?\"none\":\"block\")})}else E.svg.selectAll(\".\"+H.axisX+\" .tick text\").style(\"display\",\"block\");p=E.generateDrawArea?E.generateDrawArea(k,!1):void 0,_=E.generateDrawBar?E.generateDrawBar(D):void 0,x=E.generateDrawLine?E.generateDrawLine(F,!1):void 0,m=E.generateXYForText(k,D,F,!0),y=E.generateXYForText(k,D,F,!1),i&&(E.subY.domain(E.getYDomain(M,\"y\")),E.subY2.domain(E.getYDomain(M,\"y2\"))),E.updateXgridFocus(),O.select(\"text.\"+H.text+\".\"+H.empty).attr(\"x\",E.width/2).attr(\"y\",E.height/2).text(R.data_empty_label_text).transition().style(\"opacity\",M.length?0:1),E.updateGrid(S),E.updateRegion(S),E.updateBar(w),E.updateLine(w),E.updateArea(w),E.updateCircle(),E.hasDataLabel()&&E.updateText(w),E.redrawTitle&&E.redrawTitle(),E.redrawArc&&E.redrawArc(S,w,o),E.redrawSubchart&&E.redrawSubchart(n,e,S,w,k,D,F),O.selectAll(\".\"+H.selectedCircles).filter(E.isBarType.bind(E)).selectAll(\"circle\").remove(),R.interaction_enabled&&!t.flow&&h&&(E.redrawEventRect(),E.updateZoom&&E.updateZoom()),E.updateCircleY(),V=(E.config.axis_rotated?E.circleY:E.circleX).bind(E),G=(E.config.axis_rotated?E.circleX:E.circleY).bind(E),t.flow&&(T=E.generateFlow({targets:M,flow:t.flow,duration:t.flow.duration,drawBar:_,drawLine:x,drawArea:p,cx:V,cy:G,xv:z,xForText:m,yForText:y})),(S||T)&&E.isTabVisible()?I.transition().duration(S).each(function(){var e=[];[E.redrawBar(_,!0),E.redrawLine(x,!0),E.redrawArea(p,!0),E.redrawCircle(V,G,!0),E.redrawText(m,y,t.flow,!0),E.redrawRegion(!0),E.redrawGrid(!0)].forEach(function(t){t.forEach(function(t){e.push(t)})}),b=E.generateWait(),e.forEach(function(t){b.add(t)})}).call(b,function(){T&&T(),R.onrendered&&R.onrendered.call(E)}):(E.redrawBar(_),E.redrawLine(x),E.redrawArea(p),E.redrawCircle(V,G),E.redrawText(m,y,t.flow),E.redrawRegion(),E.redrawGrid(),R.onrendered&&R.onrendered.call(E)),E.mapToIds(E.data.targets).forEach(function(t){E.withoutFadeIn[t]=!0})},p.updateAndRedraw=function(t){var e,i=this,n=i.config;(t=t||{}).withTransition=B(t,\"withTransition\",!0),t.withTransform=B(t,\"withTransform\",!1),t.withLegend=B(t,\"withLegend\",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=B(t,\"withTransitionForTransform\",t.withTransition),i.updateSizes(),t.withLegend&&n.legend_show||(e=i.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0),i.updateScales(),i.updateSvgSize(),i.transformAll(t.withTransitionForTransform,e)),i.redraw(t,e)},p.redrawWithoutRescale=function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},p.isTimeSeries=function(){return\"timeseries\"===this.config.axis_x_type},p.isCategorized=function(){return 0<=this.config.axis_x_type.indexOf(\"categor\")},p.isCustomX=function(){var t=this.config;return!this.isTimeSeries()&&(t.data_x||C(t.data_xs))},p.isTimeSeriesY=function(){return\"timeseries\"===this.config.axis_y_type},p.getTranslate=function(t){var e,i,n=this,a=n.config;return\"main\"===t?(e=d(n.margin.left),i=d(n.margin.top)):\"context\"===t?(e=d(n.margin2.left),i=d(n.margin2.top)):\"legend\"===t?(e=n.margin3.left,i=n.margin3.top):\"x\"===t?(e=0,i=a.axis_rotated?0:n.height):\"y\"===t?(e=0,i=a.axis_rotated?n.height:0):\"y2\"===t?(e=a.axis_rotated?0:n.width,i=a.axis_rotated?1:0):\"subx\"===t?(e=0,i=a.axis_rotated?0:n.height2):\"arc\"===t&&(e=n.arcWidth/2,i=n.arcHeight/2-(n.hasType(\"gauge\")?6:0)),\"translate(\"+e+\",\"+i+\")\"},p.initialOpacity=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?1:0},p.initialOpacityForCircle=function(t){return null!==t.value&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):0},p.opacityForCircle=function(t){var e=(h(this.config.point_show)?this.config.point_show(t):this.config.point_show)?1:0;return P(t.value)?this.isScatterType(t)?.5:e:0},p.opacityForText=function(){return this.hasDataLabel()?1:0},p.xx=function(t){return t?this.x(t.x):null},p.xv=function(t){var e=this,i=t.value;return e.isTimeSeries()?i=e.parseDate(t.value):e.isCategorized()&&\"string\"==typeof t.value&&(i=e.config.axis_x_categories.indexOf(t.value)),Math.ceil(e.x(i))},p.yv=function(t){var e=t.axis&&\"y2\"===t.axis?this.y2:this.y;return Math.ceil(e(t.value))},p.subxx=function(t){return t?this.subX(t.x):null},p.transformMain=function(t,e){var i,n,a,r=this;e&&e.axisX?i=e.axisX:(i=r.main.select(\".\"+H.axisX),t&&(i=i.transition())),e&&e.axisY?n=e.axisY:(n=r.main.select(\".\"+H.axisY),t&&(n=n.transition())),e&&e.axisY2?a=e.axisY2:(a=r.main.select(\".\"+H.axisY2),t&&(a=a.transition())),(t?r.main.transition():r.main).attr(\"transform\",r.getTranslate(\"main\")),i.attr(\"transform\",r.getTranslate(\"x\")),n.attr(\"transform\",r.getTranslate(\"y\")),a.attr(\"transform\",r.getTranslate(\"y2\")),r.main.select(\".\"+H.chartArcs).attr(\"transform\",r.getTranslate(\"arc\"))},p.transformAll=function(t,e){var i=this;i.transformMain(t,e),i.config.subchart_show&&i.transformContext(t,e),i.legend&&i.transformLegend(t)},p.updateSvgSize=function(){var t=this,e=t.svg.select(\".c3-brush .background\");t.svg.attr(\"width\",t.currentWidth).attr(\"height\",t.currentHeight),t.svg.selectAll([\"#\"+t.clipId,\"#\"+t.clipIdForGrid]).select(\"rect\").attr(\"width\",t.width).attr(\"height\",t.height),t.svg.select(\"#\"+t.clipIdForXAxis).select(\"rect\").attr(\"x\",t.getXAxisClipX.bind(t)).attr(\"y\",t.getXAxisClipY.bind(t)).attr(\"width\",t.getXAxisClipWidth.bind(t)).attr(\"height\",t.getXAxisClipHeight.bind(t)),t.svg.select(\"#\"+t.clipIdForYAxis).select(\"rect\").attr(\"x\",t.getYAxisClipX.bind(t)).attr(\"y\",t.getYAxisClipY.bind(t)).attr(\"width\",t.getYAxisClipWidth.bind(t)).attr(\"height\",t.getYAxisClipHeight.bind(t)),t.svg.select(\"#\"+t.clipIdForSubchart).select(\"rect\").attr(\"width\",t.width).attr(\"height\",e.size()?e.attr(\"height\"):0),t.svg.select(\".\"+H.zoomRect).attr(\"width\",t.width).attr(\"height\",t.height),t.selectChart.style(\"max-height\",t.currentHeight+\"px\")},p.updateDimension=function(t){var e=this;t||(e.config.axis_rotated?(e.axes.x.call(e.xAxis),e.axes.subx.call(e.subXAxis)):(e.axes.y.call(e.yAxis),e.axes.y2.call(e.y2Axis))),e.updateSizes(),e.updateScales(),e.updateSvgSize(),e.transformAll(!1)},p.observeInserted=function(e){var i,n=this;\"undefined\"!=typeof MutationObserver?(i=new MutationObserver(function(t){t.forEach(function(t){\"childList\"===t.type&&t.previousSibling&&(i.disconnect(),n.intervalForObserveInserted=window.setInterval(function(){e.node().parentNode&&(window.clearInterval(n.intervalForObserveInserted),n.updateDimension(),n.brush&&n.brush.update(),n.config.oninit.call(n),n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransition:!1,withTransitionForTransform:!1,withLegend:!0}),e.transition().style(\"opacity\",1))},10))})})).observe(e.node(),{attributes:!0,childList:!0,characterData:!0}):window.console.error(\"MutationObserver not defined.\")},p.bindResize=function(){var t=this,e=t.config;if(t.resizeFunction=t.generateResize(),t.resizeFunction.add(function(){e.onresize.call(t)}),e.resize_auto&&t.resizeFunction.add(function(){void 0!==t.resizeTimeout&&window.clearTimeout(t.resizeTimeout),t.resizeTimeout=window.setTimeout(function(){delete t.resizeTimeout,t.api.flush()},100)}),t.resizeFunction.add(function(){e.onresized.call(t)}),t.resizeIfElementDisplayed=function(){null!=t.api&&t.api.element.offsetParent&&t.resizeFunction()},window.attachEvent)window.attachEvent(\"onresize\",t.resizeIfElementDisplayed);else if(window.addEventListener)window.addEventListener(\"resize\",t.resizeIfElementDisplayed,!1);else{var i=window.onresize;i?i.add&&i.remove||(i=t.generateResize()).add(window.onresize):i=t.generateResize(),i.add(t.resizeFunction),window.onresize=function(){t.api.element.offsetParent&&i()}}},p.generateResize=function(){var i=[];function t(){i.forEach(function(t){t()})}return t.add=function(t){i.push(t)},t.remove=function(t){for(var e=0;e<i.length;e++)if(i[e]===t){i.splice(e,1);break}},t},p.endall=function(t,e){var i=0;t.each(function(){++i}).each(\"end\",function(){--i||e.apply(this,arguments)})},p.generateWait=function(){var a=[],t=function(t,i){var n=setInterval(function(){var e=0;a.forEach(function(t){if(t.empty())e+=1;else try{t.transition()}catch(t){e+=1}}),e===a.length&&(clearInterval(n),i&&i())},10)};return t.add=function(t){a.push(t)},t},p.parseDate=function(t){var e;return t instanceof Date?e=t:\"string\"==typeof t?e=this.dataTimeFormat(this.config.data_xFormat).parse(t):\"object\"===(void 0===t?\"undefined\":o(t))?e=new Date(+t):\"number\"!=typeof t||isNaN(t)||(e=new Date(+t)),e&&!isNaN(+e)||window.console.error(\"Failed to parse x '\"+t+\"' to Date object\"),e},p.isTabVisible=function(){var t;return void 0!==document.hidden?t=\"hidden\":void 0!==document.mozHidden?t=\"mozHidden\":void 0!==document.msHidden?t=\"msHidden\":void 0!==document.webkitHidden&&(t=\"webkitHidden\"),!document[t]},p.isValue=P,p.isFunction=h,p.isString=c,p.isUndefined=v,p.isDefined=k,p.ceil10=n,p.asHalfPixel=d,p.diffDomain=D,p.isEmpty=u,p.notEmpty=C,p.notEmpty=C,p.getOption=B,p.hasValue=i,p.sanitise=_,p.getPathBox=m,p.CLASS=H,Function.prototype.bind||(Function.prototype.bind=function(t){if(\"function\"!=typeof this)throw new TypeError(\"Function.prototype.bind - what is trying to be bound is not callable\");var e=Array.prototype.slice.call(arguments,1),i=this,n=function(){},a=function(){return i.apply(this instanceof n?this:t,e.concat(Array.prototype.slice.call(arguments)))};return n.prototype=this.prototype,a.prototype=new n,a}),\"SVGPathSeg\"in window||(window.SVGPathSeg=function(t,e,i){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=i},window.SVGPathSeg.prototype.classname=\"SVGPathSeg\",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,\"z\",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return\"[object SVGPathSegClosePath]\"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,\"M\",t),this._x=e,this._y=i},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return\"[object SVGPathSegMovetoAbs]\"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x+\" \"+this._y},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,\"m\",t),this._x=e,this._y=i},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return\"[object SVGPathSegMovetoRel]\"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x+\" \"+this._y},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,\"L\",t),this._x=e,this._y=i},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return\"[object SVGPathSegLinetoAbs]\"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x+\" \"+this._y},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,\"l\",t),this._x=e,this._y=i},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return\"[object SVGPathSegLinetoRel]\"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x+\" \"+this._y},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,i,n,a,r,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,\"C\",t),this._x=e,this._y=i,this._x1=n,this._y1=a,this._x2=r,this._y2=s},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return\"[object SVGPathSegCurvetoCubicAbs]\"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x1+\" \"+this._y1+\" \"+this._x2+\" \"+this._y2+\" \"+this._x+\" \"+this._y},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,\"x1\",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,\"y1\",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,\"x2\",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,\"y2\",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,i,n,a,r,s){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,\"c\",t),this._x=e,this._y=i,this._x1=n,this._y1=a,this._x2=r,this._y2=s},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return\"[object SVGPathSegCurvetoCubicRel]\"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x1+\" \"+this._y1+\" \"+this._x2+\" \"+this._y2+\" \"+this._x+\" \"+this._y},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,\"x1\",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,\"y1\",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,\"x2\",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,\"y2\",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,i,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,\"Q\",t),this._x=e,this._y=i,this._x1=n,this._y1=a},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return\"[object SVGPathSegCurvetoQuadraticAbs]\"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x1+\" \"+this._y1+\" \"+this._x+\" \"+this._y},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,\"x1\",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,\"y1\",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,\"q\",t),this._x=e,this._y=i,this._x1=n,this._y1=a},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return\"[object SVGPathSegCurvetoQuadraticRel]\"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x1+\" \"+this._y1+\" \"+this._x+\" \"+this._y},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,\"x1\",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,\"y1\",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,n,a,r,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,\"A\",t),this._x=e,this._y=i,this._r1=n,this._r2=a,this._angle=r,this._largeArcFlag=s,this._sweepFlag=o},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return\"[object SVGPathSegArcAbs]\"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._r1+\" \"+this._r2+\" \"+this._angle+\" \"+(this._largeArcFlag?\"1\":\"0\")+\" \"+(this._sweepFlag?\"1\":\"0\")+\" \"+this._x+\" \"+this._y},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,\"r1\",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,\"r2\",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,\"angle\",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,\"largeArcFlag\",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,\"sweepFlag\",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,i,n,a,r,s,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,\"a\",t),this._x=e,this._y=i,this._r1=n,this._r2=a,this._angle=r,this._largeArcFlag=s,this._sweepFlag=o},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return\"[object SVGPathSegArcRel]\"},window.SVGPathSegArcRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._r1+\" \"+this._r2+\" \"+this._angle+\" \"+(this._largeArcFlag?\"1\":\"0\")+\" \"+(this._sweepFlag?\"1\":\"0\")+\" \"+this._x+\" \"+this._y},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,\"r1\",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,\"r2\",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,\"angle\",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,\"largeArcFlag\",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,\"sweepFlag\",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,\"H\",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return\"[object SVGPathSegLinetoHorizontalAbs]\"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,\"h\",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return\"[object SVGPathSegLinetoHorizontalRel]\"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,\"V\",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return\"[object SVGPathSegLinetoVerticalAbs]\"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._y},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,\"v\",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return\"[object SVGPathSegLinetoVerticalRel]\"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._y},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,\"S\",t),this._x=e,this._y=i,this._x2=n,this._y2=a},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return\"[object SVGPathSegCurvetoCubicSmoothAbs]\"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x2+\" \"+this._y2+\" \"+this._x+\" \"+this._y},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,\"x2\",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,\"y2\",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,\"s\",t),this._x=e,this._y=i,this._x2=n,this._y2=a},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return\"[object SVGPathSegCurvetoCubicSmoothRel]\"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x2+\" \"+this._y2+\" \"+this._x+\" \"+this._y},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,\"x2\",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,\"y2\",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,\"T\",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return\"[object SVGPathSegCurvetoQuadraticSmoothAbs]\"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x+\" \"+this._y},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,\"t\",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return\"[object SVGPathSegCurvetoQuadraticSmoothRel]\"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+\" \"+this._x+\" \"+this._y},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,\"x\",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,\"y\",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,n,a,r){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,n,a,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,n,a,r){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,n,a,r)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,n){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,n,a,r,s){return new window.SVGPathSegArcAbs(void 0,t,e,i,n,a,r,s)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,n,a,r,s){return new window.SVGPathSegArcRel(void 0,t,e,i,n,a,r,s)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,n){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},\"getPathSegAtLength\"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw\"Invalid arguments.\";var e=document.createElementNS(\"http://www.w3.org/2000/svg\",\"path\");e.setAttribute(\"d\",this.getAttribute(\"d\"));var i=e.pathSegList.numberOfItems-1;if(i<=0)return 0;do{if(e.pathSegList.removeItem(i),t>e.getTotalLength())break;i--}while(0<i);return i})),\"SVGPathSegList\"in window||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute(\"d\")),this._mutationObserverConfig={attributes:!0,attributeFilter:[\"d\"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname=\"SVGPathSegList\",Object.defineProperty(window.SVGPathSegList.prototype,\"numberOfItems\",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,\"pathSegList\",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,\"normalizedPathSegList\",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,\"animatedPathSegList\",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,\"animatedNormalizedPathSegList\",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(this._pathElement){var e=!1;t.forEach(function(t){\"d\"==t.attributeName&&(e=!0)}),e&&(this._list=this._parsePath(this._pathElement.getAttribute(\"d\")))}},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute(\"d\",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(t){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach(function(t){t._owningPathSegList=null}),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],(t._owningPathSegList=this)._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw\"INDEX_SIZE_ERR\"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),(t._owningPathSegList=this)._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),((this._list[e]=t)._owningPathSegList=this)._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);var e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),(t._owningPathSegList=this)._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){var e=\"\",i=!0;return t.forEach(function(t){i?(i=!1,e+=t._asPathString()):e+=\" \"+t._asPathString()}),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||0==t.length)return[];var n=this,e=function(){this.pathSegList=[]};e.prototype.appendSegment=function(t){this.pathSegList.push(t)};var i=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};i.prototype._isCurrentSpace=function(){var t=this._string[this._currentIndex];return t<=\" \"&&(\" \"==t||\"\\n\"==t||\"\\t\"==t||\"\\r\"==t||\"\\f\"==t)},i.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},i.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&\",\"!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&\",\"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},i.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},i.prototype.peekSegmentType=function(){var t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},i.prototype._pathSegTypeFromChar=function(t){switch(t){case\"Z\":case\"z\":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case\"M\":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case\"m\":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case\"L\":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case\"l\":return window.SVGPathSeg.PATHSEG_LINETO_REL;case\"C\":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case\"c\":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case\"Q\":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case\"q\":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case\"A\":return window.SVGPathSeg.PATHSEG_ARC_ABS;case\"a\":return window.SVGPathSeg.PATHSEG_ARC_REL;case\"H\":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case\"h\":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case\"V\":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case\"v\":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case\"S\":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case\"s\":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case\"T\":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case\"t\":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},i.prototype._nextCommandHelper=function(t,e){return(\"+\"==t||\"-\"==t||\".\"==t||\"0\"<=t&&t<=\"9\")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},i.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;var t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},i.prototype._parseNumber=function(){var t=0,e=0,i=1,n=0,a=1,r=1,s=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&\"+\"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&\"-\"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,a=-1),!(this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<\"0\"||\"9\"<this._string.charAt(this._currentIndex))&&\".\"!=this._string.charAt(this._currentIndex))){for(var o=this._currentIndex;this._currentIndex<this._endIndex&&\"0\"<=this._string.charAt(this._currentIndex)&&this._string.charAt(this._currentIndex)<=\"9\";)this._currentIndex++;if(this._currentIndex!=o)for(var c=this._currentIndex-1,d=1;o<=c;)e+=d*(this._string.charAt(c--)-\"0\"),d*=10;if(this._currentIndex<this._endIndex&&\".\"==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<\"0\"||\"9\"<this._string.charAt(this._currentIndex))return;for(;this._currentIndex<this._endIndex&&\"0\"<=this._string.charAt(this._currentIndex)&&this._string.charAt(this._currentIndex)<=\"9\";)i*=10,n+=(this._string.charAt(this._currentIndex)-\"0\")/i,this._currentIndex+=1}if(this._currentIndex!=s&&this._currentIndex+1<this._endIndex&&(\"e\"==this._string.charAt(this._currentIndex)||\"E\"==this._string.charAt(this._currentIndex))&&\"x\"!=this._string.charAt(this._currentIndex+1)&&\"m\"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,\"+\"==this._string.charAt(this._currentIndex)?this._currentIndex++:\"-\"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,r=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<\"0\"||\"9\"<this._string.charAt(this._currentIndex))return;for(;this._currentIndex<this._endIndex&&\"0\"<=this._string.charAt(this._currentIndex)&&this._string.charAt(this._currentIndex)<=\"9\";)t*=10,t+=this._string.charAt(this._currentIndex)-\"0\",this._currentIndex++}var l=e+n;if(l*=a,t&&(l*=Math.pow(10,r*t)),s!=this._currentIndex)return this._skipOptionalSpacesOrDelimiter(),l}},i.prototype._parseArcFlag=function(){if(!(this._currentIndex>=this._endIndex)){var t=!1,e=this._string.charAt(this._currentIndex++);if(\"0\"==e)t=!1;else{if(\"1\"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t}},i.prototype.parseSegment=function(){var t=this._string[this._currentIndex],e=this._pathSegTypeFromChar(t);if(e==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if((e=this._nextCommandHelper(t,this._previousCommand))==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=e){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(n,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(n,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(n,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(n,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(n,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(n,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(n,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(n,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(n);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:var i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()};return new window.SVGPathSegCurvetoCubicRel(n,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(n,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(n,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(n,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(n,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(n,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(n,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(n,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(n,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(n,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);default:throw\"Unknown path seg type.\"}};var a=new e,r=new i(t);if(!r.initialCommandIsMoveTo())return[];for(;r.hasMoreData();){var s=r.parseSegment();if(!s)return[];a.appendSegment(s)}return a.pathSegList}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t>>=0,e=String(void 0!==e?e:\" \"),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))}),f.axis=function(){},f.axis.labels=function(e){var i=this.internal;arguments.length&&(Object.keys(e).forEach(function(t){i.axis.setLabelText(t,e[t])}),i.axis.updateLabels())},f.axis.max=function(t){var e=this.internal,i=e.config;if(!arguments.length)return{x:i.axis_x_max,y:i.axis_y_max,y2:i.axis_y2_max};\"object\"===(void 0===t?\"undefined\":o(t))?(P(t.x)&&(i.axis_x_max=t.x),P(t.y)&&(i.axis_y_max=t.y),P(t.y2)&&(i.axis_y2_max=t.y2)):i.axis_y_max=i.axis_y2_max=t,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},f.axis.min=function(t){var e=this.internal,i=e.config;if(!arguments.length)return{x:i.axis_x_min,y:i.axis_y_min,y2:i.axis_y2_min};\"object\"===(void 0===t?\"undefined\":o(t))?(P(t.x)&&(i.axis_x_min=t.x),P(t.y)&&(i.axis_y_min=t.y),P(t.y2)&&(i.axis_y2_min=t.y2)):i.axis_y_min=i.axis_y2_min=t,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})},f.axis.range=function(t){if(!arguments.length)return{max:this.axis.max(),min:this.axis.min()};k(t.max)&&this.axis.max(t.max),k(t.min)&&this.axis.min(t.min)},f.category=function(t,e){var i=this.internal,n=i.config;return 1<arguments.length&&(n.axis_x_categories[t]=e,i.redraw()),n.axis_x_categories[t]},f.categories=function(t){var e=this.internal,i=e.config;return arguments.length&&(i.axis_x_categories=t,e.redraw()),i.axis_x_categories},f.resize=function(t){var e=this.internal.config;e.size_width=t?t.width:null,e.size_height=t?t.height:null,this.flush()},f.flush=function(){this.internal.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},f.destroy=function(){var e=this.internal;if(window.clearInterval(e.intervalForObserveInserted),void 0!==e.resizeTimeout&&window.clearTimeout(e.resizeTimeout),window.detachEvent)window.detachEvent(\"onresize\",e.resizeIfElementDisplayed);else if(window.removeEventListener)window.removeEventListener(\"resize\",e.resizeIfElementDisplayed);else{var t=window.onresize;t&&t.add&&t.remove&&t.remove(e.resizeFunction)}return e.resizeFunction.remove(),e.selectChart.classed(\"c3\",!1).html(\"\"),Object.keys(e).forEach(function(t){e[t]=null}),null},f.color=function(t){return this.internal.color(t)},f.data=function(e){var t=this.internal.data.targets;return void 0===e?t:t.filter(function(t){return 0<=[].concat(e).indexOf(t.id)})},f.data.shown=function(t){return this.internal.filterTargetsToShow(this.data(t))},f.data.values=function(t){var e,i=null;return t&&(i=(e=this.data(t))[0]?e[0].values.map(function(t){return t.value}):null),i},f.data.names=function(t){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes(\"names\",t)},f.data.colors=function(t){return this.internal.updateDataAttributes(\"colors\",t)},f.data.axes=function(t){return this.internal.updateDataAttributes(\"axes\",t)},f.flow=function(t){var a,e,i,n,r,s,o,c=this.internal,d=[],l=c.getMaxDataCount(),u=0,h=0;if(t.json)e=c.convertJsonToData(t.json,t.keys);else if(t.rows)e=c.convertRowsToData(t.rows);else{if(!t.columns)return;e=c.convertColumnsToData(t.columns)}a=c.convertDataToTargets(e,!0),c.data.targets.forEach(function(t){var e,i,n=!1;for(e=0;e<a.length;e++)if(t.id===a[e].id){for(n=!0,t.values[t.values.length-1]&&(h=t.values[t.values.length-1].index+1),u=a[e].values.length,i=0;i<u;i++)a[e].values[i].index=h+i,c.isTimeSeries()||(a[e].values[i].x=h+i);t.values=t.values.concat(a[e].values),a.splice(e,1);break}n||d.push(t.id)}),c.data.targets.forEach(function(t){var e,i;for(e=0;e<d.length;e++)if(t.id===d[e])for(h=t.values[t.values.length-1].index+1,i=0;i<u;i++)t.values.push({id:t.id,index:h+i,x:c.isTimeSeries()?c.getOtherTargetX(h+i):h+i,value:null})}),c.data.targets.length&&a.forEach(function(t){var e,i=[];for(e=c.data.targets[0].values[0].index;e<h;e++)i.push({id:t.id,index:e,x:c.isTimeSeries()?c.getOtherTargetX(e):e,value:null});t.values.forEach(function(t){t.index+=h,c.isTimeSeries()||(t.x+=h)}),t.values=i.concat(t.values)}),c.data.targets=c.data.targets.concat(a),c.getMaxDataCount(),r=(n=c.data.targets[0]).values[0],k(t.to)?(u=0,o=c.isTimeSeries()?c.parseDate(t.to):t.to,n.values.forEach(function(t){t.x<o&&u++})):k(t.length)&&(u=t.length),l?1===l&&c.isTimeSeries()&&(s=(n.values[n.values.length-1].x-r.x)/2,i=[new Date(+r.x-s),new Date(+r.x+s)],c.updateXDomain(null,!0,!0,!1,i)):(s=c.isTimeSeries()?1<n.values.length?n.values[n.values.length-1].x-r.x:r.x-c.getXDomain(c.data.targets)[0]:1,i=[r.x-s,r.x],c.updateXDomain(null,!0,!0,!1,i)),c.updateTargets(c.data.targets),c.redraw({flow:{index:r.index,length:u,duration:P(t.duration)?t.duration:c.config.transition_duration,done:t.done,orgDataCount:l},withLegend:!0,withTransition:1<l,withTrimXDomain:!1,withUpdateXAxis:!0})},p.generateFlow=function(E){var O=this,I=O.config,R=O.d3;return function(){var t,e,i,n,a=E.targets,r=E.flow,s=E.drawBar,o=E.drawLine,c=E.drawArea,d=E.cx,l=E.cy,u=E.xv,h=E.xForText,g=E.yForText,f=E.duration,p=r.index,_=r.length,x=O.getValueOnIndex(O.data.targets[0].values,p),m=O.getValueOnIndex(O.data.targets[0].values,p+_),y=O.x.domain(),S=r.duration||f,w=r.done||function(){},v=O.generateWait(),b=O.xgrid||R.selectAll([]),T=O.xgridLines||R.selectAll([]),A=O.mainRegion||R.selectAll([]),P=O.mainText||R.selectAll([]),C=O.mainBar||R.selectAll([]),L=O.mainLine||R.selectAll([]),V=O.mainArea||R.selectAll([]),G=O.mainCircle||R.selectAll([]);O.flowing=!0,O.data.targets.forEach(function(t){t.values.splice(0,_)}),n=O.updateXDomain(a,!0,!0),O.updateXGrid&&O.updateXGrid(!0),r.orgDataCount?t=1===r.orgDataCount||(x&&x.x)===(m&&m.x)?O.x(y[0])-O.x(n[0]):O.isTimeSeries()?O.x(y[0])-O.x(n[0]):O.x(x.x)-O.x(m.x):1!==O.data.targets[0].values.length?t=O.x(y[0])-O.x(n[0]):O.isTimeSeries()?(x=O.getValueOnIndex(O.data.targets[0].values,0),m=O.getValueOnIndex(O.data.targets[0].values,O.data.targets[0].values.length-1),t=O.x(x.x)-O.x(m.x)):t=D(n)/2,e=D(y)/D(n),i=\"translate(\"+t+\",0) scale(\"+e+\",1)\",O.hideXGridFocus(),R.transition().ease(\"linear\").duration(S).each(function(){v.add(O.axes.x.transition().call(O.xAxis)),v.add(C.transition().attr(\"transform\",i)),v.add(L.transition().attr(\"transform\",i)),v.add(V.transition().attr(\"transform\",i)),v.add(G.transition().attr(\"transform\",i)),v.add(P.transition().attr(\"transform\",i)),v.add(A.filter(O.isRegionOnX).transition().attr(\"transform\",i)),v.add(b.transition().attr(\"transform\",i)),v.add(T.transition().attr(\"transform\",i))}).call(v,function(){var t,e=[],i=[],n=[];if(_){for(t=0;t<_;t++)e.push(\".\"+H.shape+\"-\"+(p+t)),i.push(\".\"+H.text+\"-\"+(p+t)),n.push(\".\"+H.eventRect+\"-\"+(p+t));O.svg.selectAll(\".\"+H.shapes).selectAll(e).remove(),O.svg.selectAll(\".\"+H.texts).selectAll(i).remove(),O.svg.selectAll(\".\"+H.eventRects).selectAll(n).remove(),O.svg.select(\".\"+H.xgrid).remove()}b.attr(\"transform\",null).attr(O.xgridAttr),T.attr(\"transform\",null),T.select(\"line\").attr(\"x1\",I.axis_rotated?0:u).attr(\"x2\",I.axis_rotated?O.width:u),T.select(\"text\").attr(\"x\",I.axis_rotated?O.width:0).attr(\"y\",u),C.attr(\"transform\",null).attr(\"d\",s),L.attr(\"transform\",null).attr(\"d\",o),V.attr(\"transform\",null).attr(\"d\",c),G.attr(\"transform\",null).attr(\"cx\",d).attr(\"cy\",l),P.attr(\"transform\",null).attr(\"x\",h).attr(\"y\",g).style(\"fill-opacity\",O.opacityForText.bind(O)),A.attr(\"transform\",null),A.select(\"rect\").filter(O.isRegionOnX).attr(\"x\",O.regionX.bind(O)).attr(\"width\",O.regionWidth.bind(O)),I.interaction_enabled&&O.redrawEventRect(),w(),O.flowing=!1})}},f.focus=function(e){var t,i=this.internal;e=i.mapToTargetIds(e),t=i.svg.selectAll(i.selectorTargets(e.filter(i.isTargetToShow,i))),this.revert(),this.defocus(),t.classed(H.focused,!0).classed(H.defocused,!1),i.hasArcType()&&i.expandArc(e),i.toggleFocusLegend(e,!0),i.focusedTargetIds=e,i.defocusedTargetIds=i.defocusedTargetIds.filter(function(t){return e.indexOf(t)<0})},f.defocus=function(e){var t=this.internal;e=t.mapToTargetIds(e),t.svg.selectAll(t.selectorTargets(e.filter(t.isTargetToShow,t))).classed(H.focused,!1).classed(H.defocused,!0),t.hasArcType()&&t.unexpandArc(e),t.toggleFocusLegend(e,!1),t.focusedTargetIds=t.focusedTargetIds.filter(function(t){return e.indexOf(t)<0}),t.defocusedTargetIds=e},f.revert=function(t){var e=this.internal;t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t)).classed(H.focused,!1).classed(H.defocused,!1),e.hasArcType()&&e.unexpandArc(t),e.config.legend_show&&(e.showLegend(t.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(t)).filter(function(){return e.d3.select(this).classed(H.legendItemFocused)}).classed(H.legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]},f.xgrids=function(t){var e=this.internal,i=e.config;return t&&(i.grid_x_lines=t,e.redrawWithoutRescale()),i.grid_x_lines},f.xgrids.add=function(t){var e=this.internal;return this.xgrids(e.config.grid_x_lines.concat(t||[]))},f.xgrids.remove=function(t){this.internal.removeGridLines(t,!0)},f.ygrids=function(t){var e=this.internal,i=e.config;return t&&(i.grid_y_lines=t,e.redrawWithoutRescale()),i.grid_y_lines},f.ygrids.add=function(t){var e=this.internal;return this.ygrids(e.config.grid_y_lines.concat(t||[]))},f.ygrids.remove=function(t){this.internal.removeGridLines(t,!1)},f.groups=function(t){var e=this.internal,i=e.config;return v(t)||(i.data_groups=t,e.redraw()),i.data_groups},f.legend=function(){},f.legend.show=function(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},f.legend.hide=function(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},f.load=function(e){var t=this.internal,i=t.config;e.xs&&t.addXs(e.xs),\"names\"in e&&f.data.names.bind(this)(e.names),\"classes\"in e&&Object.keys(e.classes).forEach(function(t){i.data_classes[t]=e.classes[t]}),\"categories\"in e&&t.isCategorized()&&(i.axis_x_categories=e.categories),\"axes\"in e&&Object.keys(e.axes).forEach(function(t){i.data_axes[t]=e.axes[t]}),\"colors\"in e&&Object.keys(e.colors).forEach(function(t){i.data_colors[t]=e.colors[t]}),\"cacheIds\"in e&&t.hasCaches(e.cacheIds)?t.load(t.getCaches(e.cacheIds),e.done):\"unload\"in e?t.unload(t.mapToTargetIds(\"boolean\"==typeof e.unload&&e.unload?null:e.unload),function(){t.loadFromArgs(e)}):t.loadFromArgs(e)},f.unload=function(t){var e=this.internal;(t=t||{})instanceof Array?t={ids:t}:\"string\"==typeof t&&(t={ids:[t]}),e.unload(e.mapToTargetIds(t.ids),function(){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.done&&t.done()})},f.regions=function(t){var e=this.internal,i=e.config;return t&&(i.regions=t,e.redrawWithoutRescale()),i.regions},f.regions.add=function(t){var e=this.internal,i=e.config;return t&&(i.regions=i.regions.concat(t),e.redrawWithoutRescale()),i.regions},f.regions.remove=function(t){var e,i,n,a=this.internal,r=a.config;return t=t||{},e=a.getOption(t,\"duration\",r.transition_duration),i=a.getOption(t,\"classes\",[H.region]),n=a.main.select(\".\"+H.regions).selectAll(i.map(function(t){return\".\"+t})),(e?n.transition().duration(e):n).style(\"opacity\",0).remove(),r.regions=r.regions.filter(function(t){var e=!1;return!t.class||(t.class.split(\" \").forEach(function(t){0<=i.indexOf(t)&&(e=!0)}),!e)}),r.regions},f.selected=function(t){var e=this.internal,i=e.d3;return i.merge(e.main.selectAll(\".\"+H.shapes+e.getTargetSelectorSuffix(t)).selectAll(\".\"+H.shape).filter(function(){return i.select(this).classed(H.SELECTED)}).map(function(t){return t.map(function(t){var e=t.__data__;return e.data?e.data:e})}))},f.select=function(c,d,l){var u=this.internal,h=u.d3,g=u.config;g.data_selection_enabled&&u.main.selectAll(\".\"+H.shapes).selectAll(\".\"+H.shape).each(function(t,e){var i=h.select(this),n=t.data?t.data.id:t.id,a=u.getToggle(this,t).bind(u),r=g.data_selection_grouped||!c||0<=c.indexOf(n),s=!d||0<=d.indexOf(e),o=i.classed(H.SELECTED);i.classed(H.line)||i.classed(H.area)||(r&&s?g.data_selection_isselectable(t)&&!o&&a(!0,i.classed(H.SELECTED,!0),t,e):k(l)&&l&&o&&a(!1,i.classed(H.SELECTED,!1),t,e))})},f.unselect=function(c,d){var l=this.internal,u=l.d3,h=l.config;h.data_selection_enabled&&l.main.selectAll(\".\"+H.shapes).selectAll(\".\"+H.shape).each(function(t,e){var i=u.select(this),n=t.data?t.data.id:t.id,a=l.getToggle(this,t).bind(l),r=h.data_selection_grouped||!c||0<=c.indexOf(n),s=!d||0<=d.indexOf(e),o=i.classed(H.SELECTED);i.classed(H.line)||i.classed(H.area)||r&&s&&h.data_selection_isselectable(t)&&o&&a(!1,i.classed(H.SELECTED,!1),t,e)})},f.show=function(t,e){var i,n=this.internal;t=n.mapToTargetIds(t),e=e||{},n.removeHiddenTargetIds(t),(i=n.svg.selectAll(n.selectorTargets(t))).transition().style(\"opacity\",1,\"important\").call(n.endall,function(){i.style(\"opacity\",null).style(\"opacity\",1)}),e.withLegend&&n.showLegend(t),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},f.hide=function(t,e){var i,n=this.internal;t=n.mapToTargetIds(t),e=e||{},n.addHiddenTargetIds(t),(i=n.svg.selectAll(n.selectorTargets(t))).transition().style(\"opacity\",0,\"important\").call(n.endall,function(){i.style(\"opacity\",null).style(\"opacity\",0)}),e.withLegend&&n.hideLegend(t),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},f.toggle=function(t,e){var i=this,n=this.internal;n.mapToTargetIds(t).forEach(function(t){n.isTargetToShow(t)?i.hide(t,e):i.show(t,e)})},f.tooltip=function(){},f.tooltip.show=function(t){var e,i,n=this.internal;t.mouse&&(i=t.mouse),t.data?n.isMultipleX()?(i=[n.x(t.data.x),n.getYScale(t.data.id)(t.data.value)],e=null):e=P(t.data.index)?t.data.index:n.getIndexByX(t.data.x):void 0!==t.x?e=n.getIndexByX(t.x):void 0!==t.index&&(e=t.index),n.dispatchEvent(\"mouseover\",e,i),n.dispatchEvent(\"mousemove\",e,i),n.config.tooltip_onshow.call(n,t.data)},f.tooltip.hide=function(){this.internal.dispatchEvent(\"mouseout\",0),this.internal.config.tooltip_onhide.call(this)},f.transform=function(t,e){var i=this.internal,n=0<=[\"pie\",\"donut\"].indexOf(t)?{withTransform:!0}:null;i.transformTo(e,t,n)},p.transformTo=function(t,e,i){var n=this,a=!n.hasArcType(),r=i||{withTransitionForAxis:a};r.withTransitionForTransform=!1,n.transiting=!1,n.setTargetType(t,e),n.updateTargets(n.data.targets),n.updateAndRedraw(r)},f.x=function(t){var e=this.internal;return arguments.length&&(e.updateTargetX(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},f.xs=function(t){var e=this.internal;return arguments.length&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},f.zoom=function(t){var e=this.internal;return t&&(e.isTimeSeries()&&(t=t.map(function(t){return e.parseDate(t)})),e.brush.extent(t),e.redraw({withUpdateXDomain:!0,withY:e.config.zoom_rescale}),e.config.zoom_onzoom.call(this,e.x.orgDomain())),e.brush.extent()},f.zoom.enable=function(t){var e=this.internal;e.config.zoom_enabled=t,e.updateAndRedraw()},f.unzoom=function(){var t=this.internal;t.brush.clear().update(),t.redraw({withUpdateXDomain:!0})},f.zoom.max=function(t){var e=this.internal,i=e.config,n=e.d3;if(0!==t&&!t)return i.zoom_x_max;i.zoom_x_max=n.max([e.orgXDomain[1],t])},f.zoom.min=function(t){var e=this.internal,i=e.config,n=e.d3;if(0!==t&&!t)return i.zoom_x_min;i.zoom_x_min=n.min([e.orgXDomain[0],t])},f.zoom.range=function(t){if(!arguments.length)return{max:this.domain.max(),min:this.domain.min()};k(t.max)&&this.domain.max(t.max),k(t.min)&&this.domain.min(t.min)},p.initPie=function(){var t=this.d3;this.pie=t.layout.pie().value(function(t){return t.values.reduce(function(t,e){return t+e.value},0)}),this.pie.sort(this.getOrderFunction()||null)},p.updateRadius=function(){var t=this,e=t.config,i=e.gauge_width||e.donut_width,n=t.filterTargetsToShow(t.data.targets).length*t.config.gauge_arcs_minWidth;t.radiusExpanded=Math.min(t.arcWidth,t.arcHeight)/2*(t.hasType(\"gauge\")?.85:1),t.radius=.95*t.radiusExpanded,t.innerRadiusRatio=i?(t.radius-i)/t.radius:.6,t.innerRadius=t.hasType(\"donut\")||t.hasType(\"gauge\")?t.radius*t.innerRadiusRatio:0,t.gaugeArcWidth=i||(n<=t.radius-t.innerRadius?t.radius-t.innerRadius:n<=t.radius?n:t.radius)},p.updateArc=function(){var t=this;t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded(),t.svgArcExpandedSub=t.getSvgArcExpanded(.98)},p.updateAngle=function(e){var t,i,n,a,r=this,s=r.config,o=!1,c=0;return s?(r.pie(r.filterTargetsToShow(r.data.targets)).forEach(function(t){o||t.data.id!==e.data.id||(o=!0,(e=t).index=c),c++}),isNaN(e.startAngle)&&(e.startAngle=0),isNaN(e.endAngle)&&(e.endAngle=e.startAngle),r.isGaugeType(e.data)&&(t=s.gauge_min,i=s.gauge_max,n=Math.PI*(s.gauge_fullCircle?2:1)/(i-t),a=e.value<t?0:e.value<i?e.value-t:i-t,e.startAngle=s.gauge_startingAngle,e.endAngle=e.startAngle+n*a),o?e:null):null},p.getSvgArc=function(){var n=this,e=n.hasType(\"gauge\"),i=n.gaugeArcWidth/n.filterTargetsToShow(n.data.targets).length,a=n.d3.svg.arc().outerRadius(function(t){return e?n.radius-i*t.index:n.radius}).innerRadius(function(t){return e?n.radius-i*(t.index+1):n.innerRadius}),t=function(t,e){var i;return e?a(t):(i=n.updateAngle(t))?a(i):\"M 0 0\"};return t.centroid=a.centroid,t},p.getSvgArcExpanded=function(e){e=e||1;var i=this,n=i.hasType(\"gauge\"),a=i.gaugeArcWidth/i.filterTargetsToShow(i.data.targets).length,r=Math.min(i.radiusExpanded*e-i.radius,.8*a-100*(1-e)),s=i.d3.svg.arc().outerRadius(function(t){return n?i.radius-a*t.index+r:i.radiusExpanded*e}).innerRadius(function(t){return n?i.radius-a*(t.index+1):i.innerRadius});return function(t){var e=i.updateAngle(t);return e?s(e):\"M 0 0\"}},p.getArc=function(t,e,i){return i||this.isArcType(t.data)?this.svgArc(t,e):\"M 0 0\"},p.transformForArcLabel=function(t){var e,i,n,a,r,s=this,o=s.config,c=s.updateAngle(t),d=\"\",l=s.hasType(\"gauge\");if(c&&!l)e=this.svgArc.centroid(c),i=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1],a=Math.sqrt(i*i+n*n),d=\"translate(\"+i*(r=s.hasType(\"donut\")&&o.donut_label_ratio?h(o.donut_label_ratio)?o.donut_label_ratio(t,s.radius,a):o.donut_label_ratio:s.hasType(\"pie\")&&o.pie_label_ratio?h(o.pie_label_ratio)?o.pie_label_ratio(t,s.radius,a):o.pie_label_ratio:s.radius&&a?(.375<36/s.radius?1.175-36/s.radius:.8)*s.radius/a:0)+\",\"+n*r+\")\";else if(c&&l&&1<s.filterTargetsToShow(s.data.targets).length){var u=Math.sin(c.endAngle-Math.PI/2);d=\"translate(\"+(i=Math.cos(c.endAngle-Math.PI/2)*(s.radiusExpanded+25))+\",\"+(n=u*(s.radiusExpanded+15-Math.abs(10*u))+3)+\")\"}return d},p.getArcRatio=function(t){var e=this.config,i=Math.PI*(this.hasType(\"gauge\")&&!e.gauge_fullCircle?1:2);return t?(t.endAngle-t.startAngle)/i:null},p.convertToArcData=function(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getArcRatio(t),index:t.index})},p.textForArcLabel=function(t){var e,i,n,a,r,s=this;return s.shouldShowArcLabel()?(i=(e=s.updateAngle(t))?e.value:null,n=s.getArcRatio(e),a=t.data.id,s.hasType(\"gauge\")||s.meetsArcLabelThreshold(n)?(r=s.getArcLabelFormat())?r(i,n,a):s.defaultArcValueFormat(i,n):\"\"):\"\"},p.textForGaugeMinMax=function(t,e){var i=this.getGaugeLabelExtents();return i?i(t,e):t},p.expandArc=function(t){var e,i=this;i.transiting?e=window.setInterval(function(){i.transiting||(window.clearInterval(e),0<i.legend.selectAll(\".c3-legend-item-focused\").size()&&i.expandArc(t))},10):(t=i.mapToTargetIds(t),i.svg.selectAll(i.selectorTargets(t,\".\"+H.chartArc)).each(function(t){i.shouldExpand(t.data.id)&&i.d3.select(this).selectAll(\"path\").transition().duration(i.expandDuration(t.data.id)).attr(\"d\",i.svgArcExpanded).transition().duration(2*i.expandDuration(t.data.id)).attr(\"d\",i.svgArcExpandedSub).each(function(t){i.isDonutType(t.data)})}))},p.unexpandArc=function(t){var e=this;e.transiting||(t=e.mapToTargetIds(t),e.svg.selectAll(e.selectorTargets(t,\".\"+H.chartArc)).selectAll(\"path\").transition().duration(function(t){return e.expandDuration(t.data.id)}).attr(\"d\",e.svgArc),e.svg.selectAll(\".\"+H.arc))},p.expandDuration=function(t){var e=this.config;return this.isDonutType(t)?e.donut_expand_duration:this.isGaugeType(t)?e.gauge_expand_duration:this.isPieType(t)?e.pie_expand_duration:50},p.shouldExpand=function(t){var e=this.config;return this.isDonutType(t)&&e.donut_expand||this.isGaugeType(t)&&e.gauge_expand||this.isPieType(t)&&e.pie_expand},p.shouldShowArcLabel=function(){var t=this.config,e=!0;return this.hasType(\"donut\")?e=t.donut_label_show:this.hasType(\"pie\")&&(e=t.pie_label_show),e},p.meetsArcLabelThreshold=function(t){var e=this.config;return(this.hasType(\"donut\")?e.donut_label_threshold:e.pie_label_threshold)<=t},p.getArcLabelFormat=function(){var t=this.config,e=t.pie_label_format;return this.hasType(\"gauge\")?e=t.gauge_label_format:this.hasType(\"donut\")&&(e=t.donut_label_format),e},p.getGaugeLabelExtents=function(){return this.config.gauge_label_extents},p.getArcTitle=function(){return this.hasType(\"donut\")?this.config.donut_title:\"\"},p.updateTargetsForArc=function(t){var e,i=this,n=i.main,a=i.classChartArc.bind(i),r=i.classArcs.bind(i),s=i.classFocus.bind(i);(e=n.select(\".\"+H.chartArcs).selectAll(\".\"+H.chartArc).data(i.pie(t)).attr(\"class\",function(t){return a(t)+s(t.data)}).enter().append(\"g\").attr(\"class\",a)).append(\"g\").attr(\"class\",r),e.append(\"text\").attr(\"dy\",i.hasType(\"gauge\")?\"-.1em\":\".35em\").style(\"opacity\",0).style(\"text-anchor\",\"middle\").style(\"pointer-events\",\"none\")},p.initArc=function(){var t=this;t.arcs=t.main.select(\".\"+H.chart).append(\"g\").attr(\"class\",H.chartArcs).attr(\"transform\",t.getTranslate(\"arc\")),t.arcs.append(\"text\").attr(\"class\",H.chartArcsTitle).style(\"text-anchor\",\"middle\").text(t.getArcTitle())},p.redrawArc=function(t,e,i){var n,a,r,l=this,u=l.d3,s=l.config,o=l.main,c=l.hasType(\"gauge\");if((n=o.selectAll(\".\"+H.arcs).selectAll(\".\"+H.arc).data(l.arcData.bind(l))).enter().append(\"path\").attr(\"class\",l.classArc.bind(l)).style(\"fill\",function(t){return l.color(t.data)}).style(\"cursor\",function(t){return s.interaction_enabled&&s.data_selection_isselectable(t)?\"pointer\":null}).each(function(t){l.isGaugeType(t.data)&&(t.startAngle=t.endAngle=s.gauge_startingAngle),this._current=t}),c&&((r=o.selectAll(\".\"+H.arcs).selectAll(\".\"+H.arcLabelLine).data(l.arcData.bind(l))).enter().append(\"rect\").attr(\"class\",function(t){return H.arcLabelLine+\" \"+H.target+\" \"+H.target+\"-\"+t.data.id}),1===l.filterTargetsToShow(l.data.targets).length?r.style(\"display\",\"none\"):r.style(\"fill\",function(t){return 0<s.color_pattern.length?l.levelColor(t.data.values[0].value):l.color(t.data)}).style(\"display\",s.gauge_labelLine_show?\"\":\"none\").each(function(t){var e=0,i=0,n=0,a=\"\";if(l.hiddenTargetIds.indexOf(t.data.id)<0){var r=l.updateAngle(t),s=l.gaugeArcWidth/l.filterTargetsToShow(l.data.targets).length*(r.index+1),o=r.endAngle-Math.PI/2,c=l.radius-s,d=o-(0===c?0:1/c);e=l.radiusExpanded-l.radius+s,i=Math.cos(d)*c,n=Math.sin(d)*c,a=\"rotate(\"+180*o/Math.PI+\", \"+i+\", \"+n+\")\"}u.select(this).attr({x:i,y:n,width:e,height:2,transform:a}).style(\"stroke-dasharray\",\"0, \"+(e+2)+\", 0\")})),n.attr(\"transform\",function(t){return!l.isGaugeType(t.data)&&i?\"scale(0)\":\"\"}).on(\"mouseover\",s.interaction_enabled?function(t){var e,i;l.transiting||(e=l.updateAngle(t))&&(i=l.convertToArcData(e),l.expandArc(e.data.id),l.api.focus(e.data.id),l.toggleFocusLegend(e.data.id,!0),l.config.data_onmouseover(i,this))}:null).on(\"mousemove\",s.interaction_enabled?function(t){var e,i=l.updateAngle(t);i&&(e=[l.convertToArcData(i)],l.showTooltip(e,this))}:null).on(\"mouseout\",s.interaction_enabled?function(t){var e,i;l.transiting||(e=l.updateAngle(t))&&(i=l.convertToArcData(e),l.unexpandArc(e.data.id),l.api.revert(),l.revertLegend(),l.hideTooltip(),l.config.data_onmouseout(i,this))}:null).on(\"click\",s.interaction_enabled?function(t,e){var i,n=l.updateAngle(t);n&&(i=l.convertToArcData(n),l.toggleShape&&l.toggleShape(this,i,e),l.config.data_onclick.call(l.api,i,this))}:null).each(function(){l.transiting=!0}).transition().duration(t).attrTween(\"d\",function(i){var n,t=l.updateAngle(i);return t?(isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle),n=u.interpolate(this._current,t),this._current=n(0),function(t){var e=n(t);return e.data=i.data,l.getArc(e,!0)}):function(){return\"M 0 0\"}}).attr(\"transform\",i?\"scale(1)\":\"\").style(\"fill\",function(t){return l.levelColor?l.levelColor(t.data.values[0].value):l.color(t.data.id)}).call(l.endall,function(){l.transiting=!1}),n.exit().transition().duration(e).style(\"opacity\",0).remove(),o.selectAll(\".\"+H.chartArc).select(\"text\").style(\"opacity\",0).attr(\"class\",function(t){return l.isGaugeType(t.data)?H.gaugeValue:\"\"}).text(l.textForArcLabel.bind(l)).attr(\"transform\",l.transformForArcLabel.bind(l)).style(\"font-size\",function(t){return l.isGaugeType(t.data)&&1===l.filterTargetsToShow(l.data.targets).length?Math.round(l.radius/5)+\"px\":\"\"}).transition().duration(t).style(\"opacity\",function(t){return l.isTargetToShow(t.data.id)&&l.isArcType(t.data)?1:0}),o.select(\".\"+H.chartArcsTitle).style(\"opacity\",l.hasType(\"donut\")||c?1:0),c){var d=0;(a=l.arcs.select(\"g.\"+H.chartArcsBackground).selectAll(\"path.\"+H.chartArcsBackground).data(l.data.targets)).enter().append(\"path\"),a.attr(\"class\",function(t,e){return H.chartArcsBackground+\" \"+H.chartArcsBackground+\"-\"+e}).attr(\"d\",function(t){if(0<=l.hiddenTargetIds.indexOf(t.id))return\"M 0 0\";var e={data:[{value:s.gauge_max}],startAngle:s.gauge_startingAngle,endAngle:-1*s.gauge_startingAngle*(s.gauge_fullCircle?Math.PI:1),index:d++};return l.getArc(e,!0,!0)}),a.exit().remove(),l.arcs.select(\".\"+H.chartArcsGaugeUnit).attr(\"dy\",\".75em\").text(s.gauge_label_show?s.gauge_units:\"\"),l.arcs.select(\".\"+H.chartArcsGaugeMin).attr(\"dx\",-1*(l.innerRadius+(l.radius-l.innerRadius)/(s.gauge_fullCircle?1:2))+\"px\").attr(\"dy\",\"1.2em\").text(s.gauge_label_show?l.textForGaugeMinMax(s.gauge_min,!1):\"\"),l.arcs.select(\".\"+H.chartArcsGaugeMax).attr(\"dx\",l.innerRadius+(l.radius-l.innerRadius)/(s.gauge_fullCircle?1:2)+\"px\").attr(\"dy\",\"1.2em\").text(s.gauge_label_show?l.textForGaugeMinMax(s.gauge_max,!0):\"\")}},p.initGauge=function(){var t=this.arcs;this.hasType(\"gauge\")&&(t.append(\"g\").attr(\"class\",H.chartArcsBackground),t.append(\"text\").attr(\"class\",H.chartArcsGaugeUnit).style(\"text-anchor\",\"middle\").style(\"pointer-events\",\"none\"),t.append(\"text\").attr(\"class\",H.chartArcsGaugeMin).style(\"text-anchor\",\"middle\").style(\"pointer-events\",\"none\"),t.append(\"text\").attr(\"class\",H.chartArcsGaugeMax).style(\"text-anchor\",\"middle\").style(\"pointer-events\",\"none\"))},p.getGaugeLabelHeight=function(){return this.config.gauge_label_show?20:0},p.hasCaches=function(t){for(var e=0;e<t.length;e++)if(!(t[e]in this.cache))return!1;return!0},p.addCache=function(t,e){this.cache[t]=this.cloneTarget(e)},p.getCaches=function(t){var e,i=[];for(e=0;e<t.length;e++)t[e]in this.cache&&i.push(this.cloneTarget(this.cache[t[e]]));return i},p.categoryName=function(t){var e=this.config;return t<e.axis_x_categories.length?e.axis_x_categories[t]:t},p.generateClass=function(t,e){return\" \"+t+\" \"+t+this.getTargetSelectorSuffix(e)},p.classText=function(t){return this.generateClass(H.text,t.index)},p.classTexts=function(t){return this.generateClass(H.texts,t.id)},p.classShape=function(t){return this.generateClass(H.shape,t.index)},p.classShapes=function(t){return this.generateClass(H.shapes,t.id)},p.classLine=function(t){return this.classShape(t)+this.generateClass(H.line,t.id)},p.classLines=function(t){return this.classShapes(t)+this.generateClass(H.lines,t.id)},p.classCircle=function(t){return this.classShape(t)+this.generateClass(H.circle,t.index)},p.classCircles=function(t){return this.classShapes(t)+this.generateClass(H.circles,t.id)},p.classBar=function(t){return this.classShape(t)+this.generateClass(H.bar,t.index)},p.classBars=function(t){return this.classShapes(t)+this.generateClass(H.bars,t.id)},p.classArc=function(t){return this.classShape(t.data)+this.generateClass(H.arc,t.data.id)},p.classArcs=function(t){return this.classShapes(t.data)+this.generateClass(H.arcs,t.data.id)},p.classArea=function(t){return this.classShape(t)+this.generateClass(H.area,t.id)},p.classAreas=function(t){return this.classShapes(t)+this.generateClass(H.areas,t.id)},p.classRegion=function(t,e){return this.generateClass(H.region,e)+\" \"+(\"class\"in t?t.class:\"\")},p.classEvent=function(t){return this.generateClass(H.eventRect,t.index)},p.classTarget=function(t){var e=this.config.data_classes[t],i=\"\";return e&&(i=\" \"+H.target+\"-\"+e),this.generateClass(H.target,t)+i},p.classFocus=function(t){return this.classFocused(t)+this.classDefocused(t)},p.classFocused=function(t){return\" \"+(0<=this.focusedTargetIds.indexOf(t.id)?H.focused:\"\")},p.classDefocused=function(t){return\" \"+(0<=this.defocusedTargetIds.indexOf(t.id)?H.defocused:\"\")},p.classChartText=function(t){return H.chartText+this.classTarget(t.id)},p.classChartLine=function(t){return H.chartLine+this.classTarget(t.id)},p.classChartBar=function(t){return H.chartBar+this.classTarget(t.id)},p.classChartArc=function(t){return H.chartArc+this.classTarget(t.data.id)},p.getTargetSelectorSuffix=function(t){return t||0===t?(\"-\"+t).replace(/[\\s?!@#$%^&*()_=+,.<>'\":;\\[\\]\\/|~`{}\\\\]/g,\"-\"):\"\"},p.selectorTarget=function(t,e){return(e||\"\")+\".\"+H.target+this.getTargetSelectorSuffix(t)},p.selectorTargets=function(t,e){var i=this;return(t=t||[]).length?t.map(function(t){return i.selectorTarget(t,e)}):null},p.selectorLegend=function(t){return\".\"+H.legendItem+this.getTargetSelectorSuffix(t)},p.selectorLegends=function(t){var e=this;return t&&t.length?t.map(function(t){return e.selectorLegend(t)}):null},p.getClipPath=function(t){return\"url(\"+(0<=window.navigator.appVersion.toLowerCase().indexOf(\"msie 9.\")?\"\":document.URL.split(\"#\")[0])+\"#\"+t+\")\"},p.appendClip=function(t,e){return t.append(\"clipPath\").attr(\"id\",e).append(\"rect\")},p.getAxisClipX=function(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},p.getAxisClipY=function(t){return t?-20:-this.margin.top},p.getXAxisClipX=function(){return this.getAxisClipX(!this.config.axis_rotated)},p.getXAxisClipY=function(){return this.getAxisClipY(!this.config.axis_rotated)},p.getYAxisClipX=function(){return this.config.axis_y_inner?-1:this.getAxisClipX(this.config.axis_rotated)},p.getYAxisClipY=function(){return this.getAxisClipY(this.config.axis_rotated)},p.getAxisClipWidth=function(t){var e=Math.max(30,this.margin.left),i=Math.max(30,this.margin.right);return t?this.width+2+e+i:this.margin.left+20},p.getAxisClipHeight=function(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},p.getXAxisClipWidth=function(){return this.getAxisClipWidth(!this.config.axis_rotated)},p.getXAxisClipHeight=function(){return this.getAxisClipHeight(!this.config.axis_rotated)},p.getYAxisClipWidth=function(){return this.getAxisClipWidth(this.config.axis_rotated)+(this.config.axis_y_inner?20:0)},p.getYAxisClipHeight=function(){return this.getAxisClipHeight(this.config.axis_rotated)},p.generateColor=function(){var t=this.config,e=this.d3,n=t.data_colors,a=C(t.color_pattern)?t.color_pattern:e.scale.category10().range(),r=t.data_color,s=[];return function(t){var e,i=t.id||t.data&&t.data.id||t;return n[i]instanceof Function?e=n[i](t):n[i]?e=n[i]:(s.indexOf(i)<0&&s.push(i),e=a[s.indexOf(i)%a.length],n[i]=e),r instanceof Function?r(e,t):e}},p.generateLevelColor=function(){var t=this.config,n=t.color_pattern,e=t.color_threshold,a=\"value\"===e.unit,r=e.values&&e.values.length?e.values:[],s=e.max||100;return C(t.color_threshold)?function(t){var e,i=n[n.length-1];for(e=0;e<r.length;e++)if((a?t:100*t/s)<r[e]){i=n[e];break}return i}:null},p.getDefaultConfig=function(){var e={bindto:\"#chart\",svg_classname:void 0,size_width:void 0,size_height:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,zoom_enabled:!1,zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:function(){},zoom_onzoomstart:function(){},zoom_onzoomend:function(){},zoom_x_min:void 0,zoom_x_max:void 0,interaction_brighten:!0,interaction_enabled:!0,onmouseover:function(){},onmouseout:function(){},onresize:function(){},onresized:function(){},oninit:function(){},onrendered:function(){},transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:\"%Y-%m-%d\",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(t){return t},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_order:\"desc\",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onmouseover:function(){},data_onmouseout:function(){},data_onselected:function(){},data_onunselected:function(){},data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:\"\",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_onbrush:function(){},color_pattern:[],color_threshold:{},legend_show:!0,legend_hide:!1,legend_position:\"bottom\",legend_inset_anchor:\"top-left\",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onmouseover:void 0,legend_item_onmouseout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,axis_rotated:!1,axis_x_show:!0,axis_x_type:\"indexed\",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_multilineMax:0,axis_x_tick_width:null,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_inner:void 0,axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:void 0,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_time_value:void 0,axis_y_tick_time_interval:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y2_show:!1,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:void 0,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_padding:{},axis_y2_default:void 0,grid_x_show:!1,grid_x_type:\"tick\",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_select_r:void 0,line_connectNull:!1,line_step_type:\"step\",bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,bar_space:0,area_zerobased:!0,area_above:!1,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_duration:50,gauge_fullCircle:!1,gauge_label_show:!0,gauge_labelLine_show:!0,gauge_label_format:void 0,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_label_extents:void 0,gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:\"\",donut_expand:{},donut_expand_duration:50,spline_interpolation_type:\"cardinal\",regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_order:void 0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:function(t,e,i,n){return this.getTooltipContent?this.getTooltipContent(t,e,i,n):\"\"},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:\"0px\",left:\"50px\"},tooltip_onshow:function(){},tooltip_onhide:function(){},title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:\"top-center\"};return Object.keys(this.additionalConfig).forEach(function(t){e[t]=this.additionalConfig[t]},this),e},p.additionalConfig={},p.loadConfig=function(e){var i,n,a,r=this.config;Object.keys(r).forEach(function(t){i=e,n=t.split(\"_\"),a=function t(){var e=n.shift();return e&&i&&\"object\"===(void 0===i?\"undefined\":o(i))&&e in i?(i=i[e],t()):e?void 0:i}(),k(a)&&(r[t]=a)})},p.convertUrlToData=function(t,e,i,a,r){var s=this,o=e||\"csv\",n=s.d3.xhr(t);i&&Object.keys(i).forEach(function(t){n.header(t,i[t])}),n.get(function(t,e){var i,n=e.response||e.responseText;if(!e)throw new Error(t.responseURL+\" \"+t.status+\" (\"+t.statusText+\")\");i=\"json\"===o?s.convertJsonToData(JSON.parse(n),a):\"tsv\"===o?s.convertTsvToData(n):s.convertCsvToData(n),r.call(s,i)})},p.convertXsvToData=function(t,e){var i,n=e.parseRows(t);return 1===n.length?(i=[{}],n[0].forEach(function(t){i[0][t]=null})):i=e.parse(t),i},p.convertCsvToData=function(t){return this.convertXsvToData(t,this.d3.csv)},p.convertTsvToData=function(t){return this.convertXsvToData(t,this.d3.tsv)},p.convertJsonToData=function(e,t){var a,i,r=this,s=[];return t?(t.x?(a=t.value.concat(t.x),r.config.data_x=t.x):a=t.value,s.push(a),e.forEach(function(i){var n=[];a.forEach(function(t){var e=r.findValueInJson(i,t);v(e)&&(e=null),n.push(e)}),s.push(n)}),i=r.convertRowsToData(s)):(Object.keys(e).forEach(function(t){s.push([t].concat(e[t]))}),i=r.convertColumnsToData(s)),i},p.findValueInJson=function(t,e){for(var i=(e=(e=e.replace(/\\[(\\w+)\\]/g,\".$1\")).replace(/^\\./,\"\")).split(\".\"),n=0;n<i.length;++n){var a=i[n];if(!(a in t))return;t=t[a]}return t},p.convertRowsToData=function(t){for(var e=[],i=t[0],n=1;n<t.length;n++){for(var a={},r=0;r<t[n].length;r++){if(v(t[n][r]))throw new Error(\"Source data is missing a component at (\"+n+\",\"+r+\")!\");a[i[r]]=t[n][r]}e.push(a)}return e},p.convertColumnsToData=function(t){for(var e=[],i=0;i<t.length;i++)for(var n=t[i][0],a=1;a<t[i].length;a++){if(v(e[a-1])&&(e[a-1]={}),v(t[i][a]))throw new Error(\"Source data is missing a component at (\"+i+\",\"+a+\")!\");e[a-1][n]=t[i][a]}return e},p.convertDataToTargets=function(t,n){var e,c=this,d=c.config,i=c.d3.keys(t[0]).filter(c.isNotX,c),a=c.d3.keys(t[0]).filter(c.isX,c);return i.forEach(function(i){var e=c.getXKey(i);c.isCustomX()||c.isTimeSeries()?0<=a.indexOf(e)?c.data.xs[i]=(n&&c.data.xs[i]?c.data.xs[i]:[]).concat(t.map(function(t){return t[e]}).filter(P).map(function(t,e){return c.generateTargetX(t,i,e)})):d.data_x?c.data.xs[i]=c.getOtherTargetXs():C(d.data_xs)&&(c.data.xs[i]=c.getXValuesOfXKey(e,c.data.targets)):c.data.xs[i]=t.map(function(t,e){return e})}),i.forEach(function(t){if(!c.data.xs[t])throw new Error('x is not defined for id = \"'+t+'\".')}),(e=i.map(function(r,s){var o=d.data_idConverter(r);return{id:o,id_org:r,values:t.map(function(t,e){var i,n=t[c.getXKey(r)],a=null===t[r]||isNaN(t[r])?null:+t[r];return c.isCustomX()&&c.isCategorized()&&!v(n)?(0===s&&0===e&&(d.axis_x_categories=[]),-1===(i=d.axis_x_categories.indexOf(n))&&(i=d.axis_x_categories.length,d.axis_x_categories.push(n))):i=c.generateTargetX(n,r,e),(v(t[r])||c.data.xs[r].length<=e)&&(i=void 0),{x:i,value:a,id:o}}).filter(function(t){return k(t.x)})}})).forEach(function(t){var e;d.data_xSort&&(t.values=t.values.sort(function(t,e){return(t.x||0===t.x?t.x:1/0)-(e.x||0===e.x?e.x:1/0)})),e=0,t.values.forEach(function(t){t.index=e++}),c.data.xs[t.id].sort(function(t,e){return t-e})}),c.hasNegativeValue=c.hasNegativeValueInTargets(e),c.hasPositiveValue=c.hasPositiveValueInTargets(e),d.data_type&&c.setTargetType(c.mapToIds(e).filter(function(t){return!(t in d.data_types)}),d.data_type),e.forEach(function(t){c.addCache(t.id_org,t)}),e},p.isX=function(t){var e=this.config;return e.data_x&&t===e.data_x||C(e.data_xs)&&i(e.data_xs,t)},p.isNotX=function(t){return!this.isX(t)},p.getXKey=function(t){var e=this.config;return e.data_x?e.data_x:C(e.data_xs)?e.data_xs[t]:null},p.getXValuesOfXKey=function(e,t){var i,n=this;return(t&&C(t)?n.mapToIds(t):[]).forEach(function(t){n.getXKey(t)===e&&(i=n.data.xs[t])}),i},p.getIndexByX=function(t){var e=this.filterByX(this.data.targets,t);return e.length?e[0].index:null},p.getXValue=function(t,e){return t in this.data.xs&&this.data.xs[t]&&P(this.data.xs[t][e])?this.data.xs[t][e]:e},p.getOtherTargetXs=function(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},p.getOtherTargetX=function(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},p.addXs=function(e){var i=this;Object.keys(e).forEach(function(t){i.config.data_xs[t]=e[t]})},p.hasMultipleX=function(e){return 1<this.d3.set(Object.keys(e).map(function(t){return e[t]})).size()},p.isMultipleX=function(){return C(this.config.data_xs)||!this.config.data_xSort||this.hasType(\"scatter\")},p.addName=function(t){var e;return t&&(e=this.config.data_names[t.id],t.name=void 0!==e?e:t.id),t},p.getValueOnIndex=function(t,e){var i=t.filter(function(t){return t.index===e});return i.length?i[0]:null},p.updateTargetX=function(t,n){var a=this;t.forEach(function(i){i.values.forEach(function(t,e){t.x=a.generateTargetX(n[e],i.id,e)}),a.data.xs[i.id]=n})},p.updateTargetXs=function(t,e){var i=this;t.forEach(function(t){e[t.id]&&i.updateTargetX([t],e[t.id])})},p.generateTargetX=function(t,e,i){var n=this;return n.isTimeSeries()?t?n.parseDate(t):n.parseDate(n.getXValue(e,i)):n.isCustomX()&&!n.isCategorized()?P(t)?+t:n.getXValue(e,i):i},p.cloneTarget=function(t){return{id:t.id,id_org:t.id_org,values:t.values.map(function(t){return{x:t.x,value:t.value,id:t.id}})}},p.updateXs=function(){var e=this;e.data.targets.length&&(e.xs=[],e.data.targets[0].values.forEach(function(t){e.xs[t.index]=t.x}))},p.getPrevX=function(t){var e=this.xs[t-1];return void 0!==e?e:null},p.getNextX=function(t){var e=this.xs[t+1];return void 0!==e?e:null},p.getMaxDataCount=function(){return this.d3.max(this.data.targets,function(t){return t.values.length})},p.getMaxDataCountTarget=function(t){var e,i=t.length,n=0;return 1<i?t.forEach(function(t){t.values.length>n&&(n=(e=t).values.length)}):e=i?t[0]:null,e},p.getEdgeX=function(t){return t.length?[this.d3.min(t,function(t){return t.values[0].x}),this.d3.max(t,function(t){return t.values[t.values.length-1].x})]:[0,0]},p.mapToIds=function(t){return t.map(function(t){return t.id})},p.mapToTargetIds=function(t){return t?[].concat(t):this.mapToIds(this.data.targets)},p.hasTarget=function(t,e){var i,n=this.mapToIds(t);for(i=0;i<n.length;i++)if(n[i]===e)return!0;return!1},p.isTargetToShow=function(t){return this.hiddenTargetIds.indexOf(t)<0},p.isLegendToShow=function(t){return this.hiddenLegendIds.indexOf(t)<0},p.filterTargetsToShow=function(t){var e=this;return t.filter(function(t){return e.isTargetToShow(t.id)})},p.mapTargetsToUniqueXs=function(t){var e=this.d3.set(this.d3.merge(t.map(function(t){return t.values.map(function(t){return+t.x})}))).values();return(e=this.isTimeSeries()?e.map(function(t){return new Date(+t)}):e.map(function(t){return+t})).sort(function(t,e){return t<e?-1:e<t?1:e<=t?0:NaN})},p.addHiddenTargetIds=function(t){t=t instanceof Array?t:new Array(t);for(var e=0;e<t.length;e++)this.hiddenTargetIds.indexOf(t[e])<0&&(this.hiddenTargetIds=this.hiddenTargetIds.concat(t[e]))},p.removeHiddenTargetIds=function(e){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(t){return e.indexOf(t)<0})},p.addHiddenLegendIds=function(t){t=t instanceof Array?t:new Array(t);for(var e=0;e<t.length;e++)this.hiddenLegendIds.indexOf(t[e])<0&&(this.hiddenLegendIds=this.hiddenLegendIds.concat(t[e]))},p.removeHiddenLegendIds=function(e){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(t){return e.indexOf(t)<0})},p.getValuesAsIdKeyed=function(t){var i={};return t.forEach(function(e){i[e.id]=[],e.values.forEach(function(t){i[e.id].push(t.value)})}),i},p.checkValueInTargets=function(t,e){var i,n,a,r=Object.keys(t);for(i=0;i<r.length;i++)for(a=t[r[i]].values,n=0;n<a.length;n++)if(e(a[n].value))return!0;return!1},p.hasNegativeValueInTargets=function(t){return this.checkValueInTargets(t,function(t){return t<0})},p.hasPositiveValueInTargets=function(t){return this.checkValueInTargets(t,function(t){return 0<t})},p.isOrderDesc=function(){var t=this.config;return\"string\"==typeof t.data_order&&\"desc\"===t.data_order.toLowerCase()},p.isOrderAsc=function(){var t=this.config;return\"string\"==typeof t.data_order&&\"asc\"===t.data_order.toLowerCase()},p.getOrderFunction=function(){var t=this.config,e=this.isOrderAsc(),r=this.isOrderDesc();if(e||r)return function(t,e){var i=function(t,e){return t+Math.abs(e.value)},n=t.values.reduce(i,0),a=e.values.reduce(i,0);return r?a-n:n-a};if(h(t.data_order))return t.data_order;if(s(t.data_order)){var i=t.data_order;return function(t,e){return i.indexOf(t.id)-i.indexOf(e.id)}}},p.orderTargets=function(t){var e=this.getOrderFunction();return e&&(t.sort(e),(this.isOrderAsc()||this.isOrderDesc())&&t.reverse()),t},p.filterByX=function(t,e){return this.d3.merge(t.map(function(t){return t.values})).filter(function(t){return t.x-e==0})},p.filterRemoveNull=function(t){return t.filter(function(t){return P(t.value)})},p.filterByXDomain=function(t,e){return t.map(function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return e[0]<=t.x&&t.x<=e[1]})}})},p.hasDataLabel=function(){var t=this.config;return!(\"boolean\"!=typeof t.data_labels||!t.data_labels)||!(\"object\"!==o(t.data_labels)||!C(t.data_labels))},p.getDataLabelLength=function(t,e,i){var n=this,a=[0,0];return n.selectChart.select(\"svg\").selectAll(\".dummy\").data([t,e]).enter().append(\"text\").text(function(t){return n.dataLabelFormat(t.id)(t)}).each(function(t,e){a[e]=1.3*this.getBoundingClientRect()[i]}).remove(),a},p.isNoneArc=function(t){return this.hasTarget(this.data.targets,t.id)},p.isArc=function(t){return\"data\"in t&&this.hasTarget(this.data.targets,t.data.id)},p.findSameXOfValues=function(t,e){var i,n=t[e].x,a=[];for(i=e-1;0<=i&&n===t[i].x;i--)a.push(t[i]);for(i=e;i<t.length&&n===t[i].x;i++)a.push(t[i]);return a},p.findClosestFromTargets=function(t,e){var i,n=this;return i=t.map(function(t){return n.findClosest(t.values,e)}),n.findClosest(i,e)},p.findClosest=function(t,i){var n,a=this,r=a.config.point_sensitivity;return t.filter(function(t){return t&&a.isBarType(t.id)}).forEach(function(t){var e=a.main.select(\".\"+H.bars+a.getTargetSelectorSuffix(t.id)+\" .\"+H.bar+\"-\"+t.index).node();!n&&a.isWithinBar(e)&&(n=t)}),t.filter(function(t){return t&&!a.isBarType(t.id)}).forEach(function(t){var e=a.dist(t,i);e<r&&(r=e,n=t)}),n},p.dist=function(t,e){var i=this.config,n=i.axis_rotated?1:0,a=i.axis_rotated?0:1,r=this.circleY(t,t.index),s=this.x(t.x);return Math.sqrt(Math.pow(s-e[n],2)+Math.pow(r-e[a],2))},p.convertValuesToStep=function(t){var e,i=[].concat(t);if(!this.isCategorized())return t;for(e=t.length+1;0<e;e--)i[e]=i[e-1];return i[0]={x:i[0].x-1,value:i[0].value,id:i[0].id},i[t.length+1]={x:i[t.length].x+1,value:i[t.length].value,id:i[t.length].id},i},p.updateDataAttributes=function(t,e){var i=this.config[\"data_\"+t];return void 0===e||(Object.keys(e).forEach(function(t){i[t]=e[t]}),this.redraw({withLegend:!0})),i},p.load=function(i,n){var a=this;i&&(n.filter&&(i=i.filter(n.filter)),(n.type||n.types)&&i.forEach(function(t){var e=n.types&&n.types[t.id]?n.types[t.id]:n.type;a.setTargetType(t.id,e)}),a.data.targets.forEach(function(t){for(var e=0;e<i.length;e++)if(t.id===i[e].id){t.values=i[e].values,i.splice(e,1);break}}),a.data.targets=a.data.targets.concat(i)),a.updateTargets(a.data.targets),a.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.done&&n.done()},p.loadFromArgs=function(e){var i=this;e.data?i.load(i.convertDataToTargets(e.data),e):e.url?i.convertUrlToData(e.url,e.mimeType,e.headers,e.keys,function(t){i.load(i.convertDataToTargets(t),e)}):e.json?i.load(i.convertDataToTargets(i.convertJsonToData(e.json,e.keys)),e):e.rows?i.load(i.convertDataToTargets(i.convertRowsToData(e.rows)),e):e.columns?i.load(i.convertDataToTargets(i.convertColumnsToData(e.columns)),e):i.load(null,e)},p.unload=function(t,e){var i=this;e||(e=function(){}),(t=t.filter(function(t){return i.hasTarget(i.data.targets,t)}))&&0!==t.length?(i.svg.selectAll(t.map(function(t){return i.selectorTarget(t)})).transition().style(\"opacity\",0).remove().call(i.endall,e),t.forEach(function(e){i.withoutFadeIn[e]=!1,i.legend&&i.legend.selectAll(\".\"+H.legendItem+i.getTargetSelectorSuffix(e)).remove(),i.data.targets=i.data.targets.filter(function(t){return t.id!==e})})):e()},p.getYDomainMin=function(t){var e,i,n,a,r,s,o=this,c=o.config,d=o.mapToIds(t),l=o.getValuesAsIdKeyed(t);if(0<c.data_groups.length)for(s=o.hasNegativeValueInTargets(t),e=0;e<c.data_groups.length;e++)if(0!==(a=c.data_groups[e].filter(function(t){return 0<=d.indexOf(t)})).length)for(n=a[0],s&&l[n]&&l[n].forEach(function(t,e){l[n][e]=t<0?t:0}),i=1;i<a.length;i++)r=a[i],l[r]&&l[r].forEach(function(t,e){o.axis.getId(r)!==o.axis.getId(n)||!l[n]||s&&0<+t||(l[n][e]+=+t)});return o.d3.min(Object.keys(l).map(function(t){return o.d3.min(l[t])}))},p.getYDomainMax=function(t){var e,i,n,a,r,s,o=this,c=o.config,d=o.mapToIds(t),l=o.getValuesAsIdKeyed(t);if(0<c.data_groups.length)for(s=o.hasPositiveValueInTargets(t),e=0;e<c.data_groups.length;e++)if(0!==(a=c.data_groups[e].filter(function(t){return 0<=d.indexOf(t)})).length)for(n=a[0],s&&l[n]&&l[n].forEach(function(t,e){l[n][e]=0<t?t:0}),i=1;i<a.length;i++)r=a[i],l[r]&&l[r].forEach(function(t,e){o.axis.getId(r)!==o.axis.getId(n)||!l[n]||s&&+t<0||(l[n][e]+=+t)});return o.d3.max(Object.keys(l).map(function(t){return o.d3.max(l[t])}))},p.getYDomain=function(t,e,i){var n,a,r,s,o,c,d,l,u,h,g=this,f=g.config,p=t.filter(function(t){return g.axis.getId(t.id)===e}),_=i?g.filterByXDomain(p,i):p,x=\"y2\"===e?f.axis_y2_min:f.axis_y_min,m=\"y2\"===e?f.axis_y2_max:f.axis_y_max,y=g.getYDomainMin(_),S=g.getYDomainMax(_),w=\"y2\"===e?f.axis_y2_center:f.axis_y_center,v=g.hasType(\"bar\",_)&&f.bar_zerobased||g.hasType(\"area\",_)&&f.area_zerobased,b=\"y2\"===e?f.axis_y2_inverted:f.axis_y_inverted,T=g.hasDataLabel()&&f.axis_rotated,A=g.hasDataLabel()&&!f.axis_rotated;return y=P(x)?x:P(m)?y<m?y:m-10:y,S=P(m)?m:P(x)?x<S?S:x+10:S,0===_.length?\"y2\"===e?g.y2.domain():g.y.domain():(isNaN(y)&&(y=0),isNaN(S)&&(S=y),y===S&&(y<0?S=0:y=0),u=0<=y&&0<=S,h=y<=0&&S<=0,(P(x)&&u||P(m)&&h)&&(v=!1),v&&(u&&(y=0),h&&(S=0)),r=s=.1*(a=Math.abs(S-y)),void 0!==w&&(S=w+(o=Math.max(Math.abs(y),Math.abs(S))),y=w-o),T?(c=g.getDataLabelLength(y,S,\"width\"),d=D(g.y.range()),r+=a*((l=[c[0]/d,c[1]/d])[1]/(1-l[0]-l[1])),s+=a*(l[0]/(1-l[0]-l[1]))):A&&(c=g.getDataLabelLength(y,S,\"height\"),r+=g.axis.convertPixelsToAxisPadding(c[1],a),s+=g.axis.convertPixelsToAxisPadding(c[0],a)),\"y\"===e&&C(f.axis_y_padding)&&(r=g.axis.getPadding(f.axis_y_padding,\"top\",r,a),s=g.axis.getPadding(f.axis_y_padding,\"bottom\",s,a)),\"y2\"===e&&C(f.axis_y2_padding)&&(r=g.axis.getPadding(f.axis_y2_padding,\"top\",r,a),s=g.axis.getPadding(f.axis_y2_padding,\"bottom\",s,a)),v&&(u&&(s=y),h&&(r=-S)),n=[y-s,S+r],b?n.reverse():n)},p.getXDomainMin=function(t){var e=this,i=e.config;return k(i.axis_x_min)?e.isTimeSeries()?this.parseDate(i.axis_x_min):i.axis_x_min:e.d3.min(t,function(t){return e.d3.min(t.values,function(t){return t.x})})},p.getXDomainMax=function(t){var e=this,i=e.config;return k(i.axis_x_max)?e.isTimeSeries()?this.parseDate(i.axis_x_max):i.axis_x_max:e.d3.max(t,function(t){return e.d3.max(t.values,function(t){return t.x})})},p.getXDomainPadding=function(t){var e,i,n,a,r=this.config,s=t[1]-t[0];return i=this.isCategorized()?0:this.hasType(\"bar\")?1<(e=this.getMaxDataCount())?s/(e-1)/2:.5:.01*s,\"object\"===o(r.axis_x_padding)&&C(r.axis_x_padding)?(n=P(r.axis_x_padding.left)?r.axis_x_padding.left:i,a=P(r.axis_x_padding.right)?r.axis_x_padding.right:i):n=a=\"number\"==typeof r.axis_x_padding?r.axis_x_padding:i,{left:n,right:a}},p.getXDomain=function(t){var e=this,i=[e.getXDomainMin(t),e.getXDomainMax(t)],n=i[0],a=i[1],r=e.getXDomainPadding(i),s=0,o=0;return n-a!=0||e.isCategorized()||(e.isTimeSeries()?(n=new Date(.5*n.getTime()),a=new Date(1.5*a.getTime())):(n=0===n?1:.5*n,a=0===a?-1:1.5*a)),(n||0===n)&&(s=e.isTimeSeries()?new Date(n.getTime()-r.left):n-r.left),(a||0===a)&&(o=e.isTimeSeries()?new Date(a.getTime()+r.right):a+r.right),[s,o]},p.updateXDomain=function(t,e,i,n,a){var r=this,s=r.config;return i&&(r.x.domain(a||r.d3.extent(r.getXDomain(t))),r.orgXDomain=r.x.domain(),s.zoom_enabled&&r.zoom.scale(r.x).updateScaleExtent(),r.subX.domain(r.x.domain()),r.brush&&r.brush.scale(r.subX)),e&&(r.x.domain(a||(!r.brush||r.brush.empty()?r.orgXDomain:r.brush.extent())),s.zoom_enabled&&r.zoom.scale(r.x).updateScaleExtent()),n&&r.x.domain(r.trimXDomain(r.x.orgDomain())),r.x.domain()},p.trimXDomain=function(t){var e=this.getZoomDomain(),i=e[0],n=e[1];return t[0]<=i&&(t[1]=+t[1]+(i-t[0]),t[0]=i),n<=t[1]&&(t[0]=+t[0]-(t[1]-n),t[1]=n),t},p.drag=function(t){var e,i,n,a,h,g,f,p,_=this,r=_.config,s=_.main,x=_.d3;_.hasArcType()||r.data_selection_enabled&&(r.zoom_enabled&&!_.zoom.altDomain||r.data_selection_multiple&&(e=_.dragStart[0],i=_.dragStart[1],n=t[0],a=t[1],h=Math.min(e,n),g=Math.max(e,n),f=r.data_selection_grouped?_.margin.top:Math.min(i,a),p=r.data_selection_grouped?_.height:Math.max(i,a),s.select(\".\"+H.dragarea).attr(\"x\",h).attr(\"y\",f).attr(\"width\",g-h).attr(\"height\",p-f),s.selectAll(\".\"+H.shapes).selectAll(\".\"+H.shape).filter(function(t){return r.data_selection_isselectable(t)}).each(function(t,e){var i,n,a,r,s,o,c=x.select(this),d=c.classed(H.SELECTED),l=c.classed(H.INCLUDED),u=!1;if(c.classed(H.circle))i=1*c.attr(\"cx\"),n=1*c.attr(\"cy\"),s=_.togglePoint,u=h<i&&i<g&&f<n&&n<p;else{if(!c.classed(H.bar))return;i=(o=m(this)).x,n=o.y,a=o.width,r=o.height,s=_.togglePath,u=!(g<i||i+a<h||p<n||n+r<f)}u^l&&(c.classed(H.INCLUDED,!l),c.classed(H.SELECTED,!d),s.call(_,!d,c,t,e))})))},p.dragstart=function(t){var e=this,i=e.config;e.hasArcType()||i.data_selection_enabled&&(e.dragStart=t,e.main.select(\".\"+H.chart).append(\"rect\").attr(\"class\",H.dragarea).style(\"opacity\",.1),e.dragging=!0)},p.dragend=function(){var t=this,e=t.config;t.hasArcType()||e.data_selection_enabled&&(t.main.select(\".\"+H.dragarea).transition().duration(100).style(\"opacity\",0).remove(),t.main.selectAll(\".\"+H.shape).classed(H.INCLUDED,!1),t.dragging=!1)},p.getYFormat=function(t){var n=this,a=t&&!n.hasType(\"gauge\")?n.defaultArcValueFormat:n.yFormat,r=t&&!n.hasType(\"gauge\")?n.defaultArcValueFormat:n.y2Format;return function(t,e,i){return(\"y2\"===n.axis.getId(i)?r:a).call(n,t,e)}},p.yFormat=function(t){var e=this.config;return(e.axis_y_tick_format?e.axis_y_tick_format:this.defaultValueFormat)(t)},p.y2Format=function(t){var e=this.config;return(e.axis_y2_tick_format?e.axis_y2_tick_format:this.defaultValueFormat)(t)},p.defaultValueFormat=function(t){return P(t)?+t:\"\"},p.defaultArcValueFormat=function(t,e){return(100*e).toFixed(1)+\"%\"},p.dataLabelFormat=function(t){var e=this.config.data_labels,i=function(t){return P(t)?+t:\"\"};return\"function\"==typeof e.format?e.format:\"object\"===o(e.format)?e.format[t]?!0===e.format[t]?i:e.format[t]:function(){return\"\"}:i},p.initGrid=function(){var t=this,e=t.config,i=t.d3;t.grid=t.main.append(\"g\").attr(\"clip-path\",t.clipPathForGrid).attr(\"class\",H.grid),e.grid_x_show&&t.grid.append(\"g\").attr(\"class\",H.xgrids),e.grid_y_show&&t.grid.append(\"g\").attr(\"class\",H.ygrids),e.grid_focus_show&&t.grid.append(\"g\").attr(\"class\",H.xgridFocus).append(\"line\").attr(\"class\",H.xgridFocus),t.xgrid=i.selectAll([]),e.grid_lines_front||t.initGridLines()},p.initGridLines=function(){var t=this,e=t.d3;t.gridLines=t.main.append(\"g\").attr(\"clip-path\",t.clipPathForGrid).attr(\"class\",H.grid+\" \"+H.gridLines),t.gridLines.append(\"g\").attr(\"class\",H.xgridLines),t.gridLines.append(\"g\").attr(\"class\",H.ygridLines),t.xgridLines=e.selectAll([])},p.updateXGrid=function(t){var e=this,i=e.config,n=e.d3,a=e.generateGridData(i.grid_x_type,e.x),r=e.isCategorized()?e.xAxis.tickOffset():0;e.xgridAttr=i.axis_rotated?{x1:0,x2:e.width,y1:function(t){return e.x(t)-r},y2:function(t){return e.x(t)-r}}:{x1:function(t){return e.x(t)+r},x2:function(t){return e.x(t)+r},y1:0,y2:e.height},e.xgrid=e.main.select(\".\"+H.xgrids).selectAll(\".\"+H.xgrid).data(a),e.xgrid.enter().append(\"line\").attr(\"class\",H.xgrid),t||e.xgrid.attr(e.xgridAttr).style(\"opacity\",function(){return+n.select(this).attr(i.axis_rotated?\"y1\":\"x1\")===(i.axis_rotated?e.height:0)?0:1}),e.xgrid.exit().remove()},p.updateYGrid=function(){var t=this,e=t.config,i=t.yAxis.tickValues()||t.y.ticks(e.grid_y_ticks);t.ygrid=t.main.select(\".\"+H.ygrids).selectAll(\".\"+H.ygrid).data(i),t.ygrid.enter().append(\"line\").attr(\"class\",H.ygrid),t.ygrid.attr(\"x1\",e.axis_rotated?t.y:0).attr(\"x2\",e.axis_rotated?t.y:t.width).attr(\"y1\",e.axis_rotated?0:t.y).attr(\"y2\",e.axis_rotated?t.height:t.y),t.ygrid.exit().remove(),t.smoothLines(t.ygrid,\"grid\")},p.gridTextAnchor=function(t){return t.position?t.position:\"end\"},p.gridTextDx=function(t){return\"start\"===t.position?4:\"middle\"===t.position?0:-4},p.xGridTextX=function(t){return\"start\"===t.position?-this.height:\"middle\"===t.position?-this.height/2:0},p.yGridTextX=function(t){return\"start\"===t.position?0:\"middle\"===t.position?this.width/2:this.width},p.updateGrid=function(t){var e,i,n,a=this,r=a.main,s=a.config;a.grid.style(\"visibility\",a.hasArcType()?\"hidden\":\"visible\"),r.select(\"line.\"+H.xgridFocus).style(\"visibility\",\"hidden\"),s.grid_x_show&&a.updateXGrid(),a.xgridLines=r.select(\".\"+H.xgridLines).selectAll(\".\"+H.xgridLine).data(s.grid_x_lines),(e=a.xgridLines.enter().append(\"g\").attr(\"class\",function(t){return H.xgridLine+(t.class?\" \"+t.class:\"\")})).append(\"line\").style(\"opacity\",0),e.append(\"text\").attr(\"text-anchor\",a.gridTextAnchor).attr(\"transform\",s.axis_rotated?\"\":\"rotate(-90)\").attr(\"dx\",a.gridTextDx).attr(\"dy\",-5).style(\"opacity\",0),a.xgridLines.exit().transition().duration(t).style(\"opacity\",0).remove(),s.grid_y_show&&a.updateYGrid(),a.ygridLines=r.select(\".\"+H.ygridLines).selectAll(\".\"+H.ygridLine).data(s.grid_y_lines),(i=a.ygridLines.enter().append(\"g\").attr(\"class\",function(t){return H.ygridLine+(t.class?\" \"+t.class:\"\")})).append(\"line\").style(\"opacity\",0),i.append(\"text\").attr(\"text-anchor\",a.gridTextAnchor).attr(\"transform\",s.axis_rotated?\"rotate(-90)\":\"\").attr(\"dx\",a.gridTextDx).attr(\"dy\",-5).style(\"opacity\",0),n=a.yv.bind(a),a.ygridLines.select(\"line\").transition().duration(t).attr(\"x1\",s.axis_rotated?n:0).attr(\"x2\",s.axis_rotated?n:a.width).attr(\"y1\",s.axis_rotated?0:n).attr(\"y2\",s.axis_rotated?a.height:n).style(\"opacity\",1),a.ygridLines.select(\"text\").transition().duration(t).attr(\"x\",s.axis_rotated?a.xGridTextX.bind(a):a.yGridTextX.bind(a)).attr(\"y\",n).text(function(t){return t.text}).style(\"opacity\",1),a.ygridLines.exit().transition().duration(t).style(\"opacity\",0).remove()},p.redrawGrid=function(t){var e=this,i=e.config,n=e.xv.bind(e),a=e.xgridLines.select(\"line\"),r=e.xgridLines.select(\"text\");return[(t?a.transition():a).attr(\"x1\",i.axis_rotated?0:n).attr(\"x2\",i.axis_rotated?e.width:n).attr(\"y1\",i.axis_rotated?n:0).attr(\"y2\",i.axis_rotated?n:e.height).style(\"opacity\",1),(t?r.transition():r).attr(\"x\",i.axis_rotated?e.yGridTextX.bind(e):e.xGridTextX.bind(e)).attr(\"y\",n).text(function(t){return t.text}).style(\"opacity\",1)]},p.showXGridFocus=function(t){var e=this,i=e.config,n=t.filter(function(t){return t&&P(t.value)}),a=e.main.selectAll(\"line.\"+H.xgridFocus),r=e.xx.bind(e);i.tooltip_show&&(e.hasType(\"scatter\")||e.hasArcType()||(a.style(\"visibility\",\"visible\").data([n[0]]).attr(i.axis_rotated?\"y1\":\"x1\",r).attr(i.axis_rotated?\"y2\":\"x2\",r),e.smoothLines(a,\"grid\")))},p.hideXGridFocus=function(){this.main.select(\"line.\"+H.xgridFocus).style(\"visibility\",\"hidden\")},p.updateXgridFocus=function(){var t=this.config;this.main.select(\"line.\"+H.xgridFocus).attr(\"x1\",t.axis_rotated?0:-10).attr(\"x2\",t.axis_rotated?this.width:-10).attr(\"y1\",t.axis_rotated?-10:0).attr(\"y2\",t.axis_rotated?-10:this.height)},p.generateGridData=function(t,e){var i,n,a,r,s=[],o=this.main.select(\".\"+H.axisX).selectAll(\".tick\").size();if(\"year\"===t)for(n=(i=this.getXDomain())[0].getFullYear(),a=i[1].getFullYear(),r=n;r<=a;r++)s.push(new Date(r+\"-01-01 00:00:00\"));else(s=e.ticks(10)).length>o&&(s=s.filter(function(t){return(\"\"+t).indexOf(\".\")<0}));return s},p.getGridFilterToRemove=function(t){return t?function(e){var i=!1;return[].concat(t).forEach(function(t){(\"value\"in t&&e.value===t.value||\"class\"in t&&e.class===t.class)&&(i=!0)}),i}:function(){return!0}},p.removeGridLines=function(t,e){var i=this.config,n=this.getGridFilterToRemove(t),a=function(t){return!n(t)},r=e?H.xgridLines:H.ygridLines,s=e?H.xgridLine:H.ygridLine;this.main.select(\".\"+r).selectAll(\".\"+s).filter(n).transition().duration(i.transition_duration).style(\"opacity\",0).remove(),e?i.grid_x_lines=i.grid_x_lines.filter(a):i.grid_y_lines=i.grid_y_lines.filter(a)},p.initEventRect=function(){this.main.select(\".\"+H.chart).append(\"g\").attr(\"class\",H.eventRects).style(\"fill-opacity\",0)},p.redrawEventRect=function(){var t,e,i=this,n=i.config,a=i.isMultipleX(),r=i.main.select(\".\"+H.eventRects).style(\"cursor\",n.zoom_enabled?n.axis_rotated?\"ns-resize\":\"ew-resize\":null).classed(H.eventRectsMultiple,a).classed(H.eventRectsSingle,!a);r.selectAll(\".\"+H.eventRect).remove(),i.eventRect=r.selectAll(\".\"+H.eventRect),a?(t=i.eventRect.data([0]),i.generateEventRectsForMultipleXs(t.enter()),i.updateEventRect(t)):(e=i.getMaxDataCountTarget(i.data.targets),r.datum(e?e.values:[]),i.eventRect=r.selectAll(\".\"+H.eventRect),t=i.eventRect.data(function(t){return t}),i.generateEventRectsForSingleX(t.enter()),i.updateEventRect(t),t.exit().remove())},p.updateEventRect=function(t){var e,i,n,a,r,s,o=this,c=o.config;t=t||o.eventRect.data(function(t){return t}),o.isMultipleX()?(i=e=0,n=o.width,a=o.height):(!o.isCustomX()&&!o.isTimeSeries()||o.isCategorized()?(r=o.getEventRectWidth(),s=function(t){return o.x(t.x)-r/2}):(o.updateXs(),r=function(t){var e=o.getPrevX(t.index),i=o.getNextX(t.index);return null===e&&null===i?c.axis_rotated?o.height:o.width:(null===e&&(e=o.x.domain()[0]),null===i&&(i=o.x.domain()[1]),Math.max(0,(o.x(i)-o.x(e))/2))},s=function(t){var e=o.getPrevX(t.index),i=o.getNextX(t.index),n=o.data.xs[t.id][t.index];return null===e&&null===i?0:(null===e&&(e=o.x.domain()[0]),(o.x(n)+o.x(e))/2)}),e=c.axis_rotated?0:s,i=c.axis_rotated?s:0,n=c.axis_rotated?o.width:r,a=c.axis_rotated?r:o.height),t.attr(\"class\",o.classEvent.bind(o)).attr(\"x\",e).attr(\"y\",i).attr(\"width\",n).attr(\"height\",a)},p.generateEventRectsForSingleX=function(t){var a=this,r=a.d3,s=a.config;t.append(\"rect\").attr(\"class\",a.classEvent.bind(a)).style(\"cursor\",s.data_selection_enabled&&s.data_selection_grouped?\"pointer\":null).on(\"mouseover\",function(t){var e=t.index;a.dragging||a.flowing||a.hasArcType()||(s.point_focus_expand_enabled&&a.expandCircles(e,null,!0),a.expandBars(e,null,!0),a.main.selectAll(\".\"+H.shape+\"-\"+e).each(function(t){s.data_onmouseover.call(a.api,t)}))}).on(\"mouseout\",function(t){var e=t.index;a.config&&(a.hasArcType()||(a.hideXGridFocus(),a.hideTooltip(),a.unexpandCircles(),a.unexpandBars(),a.main.selectAll(\".\"+H.shape+\"-\"+e).each(function(t){s.data_onmouseout.call(a.api,t)})))}).on(\"mousemove\",function(t){var e,i=t.index,n=a.svg.select(\".\"+H.eventRect+\"-\"+i);a.dragging||a.flowing||a.hasArcType()||(a.isStepType(t)&&\"step-after\"===a.config.line_step_type&&r.mouse(this)[0]<a.x(a.getXValue(t.id,i))&&(i-=1),e=a.filterTargetsToShow(a.data.targets).map(function(t){return a.addName(a.getValueOnIndex(t.values,i))}),s.tooltip_grouped&&(a.showTooltip(e,this),a.showXGridFocus(e)),(!s.tooltip_grouped||s.data_selection_enabled&&!s.data_selection_grouped)&&a.main.selectAll(\".\"+H.shape+\"-\"+i).each(function(){r.select(this).classed(H.EXPANDED,!0),s.data_selection_enabled&&n.style(\"cursor\",s.data_selection_grouped?\"pointer\":null),s.tooltip_grouped||(a.hideXGridFocus(),a.hideTooltip(),s.data_selection_grouped||(a.unexpandCircles(i),a.unexpandBars(i)))}).filter(function(t){return a.isWithinShape(this,t)}).each(function(t){s.data_selection_enabled&&(s.data_selection_grouped||s.data_selection_isselectable(t))&&n.style(\"cursor\",\"pointer\"),s.tooltip_grouped||(a.showTooltip([t],this),a.showXGridFocus([t]),s.point_focus_expand_enabled&&a.expandCircles(i,t.id,!0),a.expandBars(i,t.id,!0))}))}).on(\"click\",function(t){var e=t.index;!a.hasArcType()&&a.toggleShape&&(a.cancelClick?a.cancelClick=!1:(a.isStepType(t)&&\"step-after\"===s.line_step_type&&r.mouse(this)[0]<a.x(a.getXValue(t.id,e))&&(e-=1),a.main.selectAll(\".\"+H.shape+\"-\"+e).each(function(t){(s.data_selection_grouped||a.isWithinShape(this,t))&&(a.toggleShape(this,t,e),a.config.data_onclick.call(a.api,t,this))})))}).call(s.data_selection_draggable&&a.drag?r.behavior.drag().origin(Object).on(\"drag\",function(){a.drag(r.mouse(this))}).on(\"dragstart\",function(){a.dragstart(r.mouse(this))}).on(\"dragend\",function(){a.dragend()}):function(){})},p.generateEventRectsForMultipleXs=function(t){var a=this,r=a.d3,s=a.config;function o(){a.svg.select(\".\"+H.eventRect).style(\"cursor\",null),a.hideXGridFocus(),a.hideTooltip(),a.unexpandCircles(),a.unexpandBars()}t.append(\"rect\").attr(\"x\",0).attr(\"y\",0).attr(\"width\",a.width).attr(\"height\",a.height).attr(\"class\",H.eventRect).on(\"mouseout\",function(){a.config&&(a.hasArcType()||o())}).on(\"mousemove\",function(){var t,e,i,n=a.filterTargetsToShow(a.data.targets);a.dragging||a.hasArcType(n)||(t=r.mouse(this),e=a.findClosestFromTargets(n,t),!a.mouseover||e&&e.id===a.mouseover.id||(s.data_onmouseout.call(a.api,a.mouseover),a.mouseover=void 0),e?(i=(a.isScatterType(e)||!s.tooltip_grouped?[e]:a.filterByX(n,e.x)).map(function(t){return a.addName(t)}),a.showTooltip(i,this),s.point_focus_expand_enabled&&a.expandCircles(e.index,e.id,!0),a.expandBars(e.index,e.id,!0),a.showXGridFocus(i),(a.isBarType(e.id)||a.dist(e,t)<s.point_sensitivity)&&(a.svg.select(\".\"+H.eventRect).style(\"cursor\",\"pointer\"),a.mouseover||(s.data_onmouseover.call(a.api,e),a.mouseover=e))):o())}).on(\"click\",function(){var t,e,i=a.filterTargetsToShow(a.data.targets);a.hasArcType(i)||(t=r.mouse(this),(e=a.findClosestFromTargets(i,t))&&(a.isBarType(e.id)||a.dist(e,t)<s.point_sensitivity)&&a.main.selectAll(\".\"+H.shapes+a.getTargetSelectorSuffix(e.id)).selectAll(\".\"+H.shape+\"-\"+e.index).each(function(){(s.data_selection_grouped||a.isWithinShape(this,e))&&(a.toggleShape(this,e,e.index),a.config.data_onclick.call(a.api,e,this))}))}).call(s.data_selection_draggable&&a.drag?r.behavior.drag().origin(Object).on(\"drag\",function(){a.drag(r.mouse(this))}).on(\"dragstart\",function(){a.dragstart(r.mouse(this))}).on(\"dragend\",function(){a.dragend()}):function(){})},p.dispatchEvent=function(t,e,i){var n=\".\"+H.eventRect+(this.isMultipleX()?\"\":\"-\"+e),a=this.main.select(n).node(),r=a.getBoundingClientRect(),s=r.left+(i?i[0]:0),o=r.top+(i?i[1]:0),c=document.createEvent(\"MouseEvents\");c.initMouseEvent(t,!0,!0,window,0,s,o,s,o,!1,!1,!1,!1,0,null),a.dispatchEvent(c)},p.initLegend=function(){var t=this;if(t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append(\"g\").attr(\"transform\",t.getTranslate(\"legend\")),!t.config.legend_show)return t.legend.style(\"visibility\",\"hidden\"),void(t.hiddenLegendIds=t.mapToIds(t.data.targets));t.updateLegendWithDefaults()},p.updateLegendWithDefaults=function(){this.updateLegend(this.mapToIds(this.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},p.updateSizeForLegend=function(t,e){var i=this,n=i.config,a={top:i.isLegendTop?i.getCurrentPaddingTop()+n.legend_inset_y+5.5:i.currentHeight-t-i.getCurrentPaddingBottom()-n.legend_inset_y,left:i.isLegendLeft?i.getCurrentPaddingLeft()+n.legend_inset_x+.5:i.currentWidth-e-i.getCurrentPaddingRight()-n.legend_inset_x+.5};i.margin3={top:i.isLegendRight?0:i.isLegendInset?a.top:i.currentHeight-t,right:NaN,bottom:0,left:i.isLegendRight?i.currentWidth-e:i.isLegendInset?a.left:0}},p.transformLegend=function(t){(t?this.legend.transition():this.legend).attr(\"transform\",this.getTranslate(\"legend\"))},p.updateLegendStep=function(t){this.legendStep=t},p.updateLegendItemWidth=function(t){this.legendItemWidth=t},p.updateLegendItemHeight=function(t){this.legendItemHeight=t},p.getLegendWidth=function(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},p.getLegendHeight=function(){var t=this,e=0;return t.config.legend_show&&(e=t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1)),e},p.opacityForLegend=function(t){return t.classed(H.legendItemHidden)?null:1},p.opacityForUnfocusedLegend=function(t){return t.classed(H.legendItemHidden)?null:.3},p.toggleFocusLegend=function(e,t){var i=this;e=i.mapToTargetIds(e),i.legend.selectAll(\".\"+H.legendItem).filter(function(t){return 0<=e.indexOf(t)}).classed(H.legendItemFocused,t).transition().duration(100).style(\"opacity\",function(){return(t?i.opacityForLegend:i.opacityForUnfocusedLegend).call(i,i.d3.select(this))})},p.revertLegend=function(){var t=this,e=t.d3;t.legend.selectAll(\".\"+H.legendItem).classed(H.legendItemFocused,!1).transition().duration(100).style(\"opacity\",function(){return t.opacityForLegend(e.select(this))})},p.showLegend=function(t){var e=this,i=e.config;i.legend_show||(i.legend_show=!0,e.legend.style(\"visibility\",\"visible\"),e.legendHasRendered||e.updateLegendWithDefaults()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style(\"visibility\",\"visible\").transition().style(\"opacity\",function(){return e.opacityForLegend(e.d3.select(this))})},p.hideLegend=function(t){var e=this,i=e.config;i.legend_show&&u(t)&&(i.legend_show=!1,e.legend.style(\"visibility\",\"hidden\")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style(\"opacity\",0).style(\"visibility\",\"hidden\")},p.clearLegendItemTextBoxCache=function(){this.legendItemTextBox={}},p.updateLegend=function(p,t,e){var i,n,a,r,s,o,c,d,l,u,h,g,f,_,x,m,y=this,S=y.config,w=4,v=10,b=0,T=0,A=10,P=S.legend_item_tile_width+5,C=0,L={},V={},G={},E=[0],O={},I=0;function R(t,e,i){var n,a,r,s,o=0===i,c=i===p.length-1,d=(r=t,s=e,y.legendItemTextBox[s]||(y.legendItemTextBox[s]=y.getTextRect(r.textContent,H.legendItem,r)),y.legendItemTextBox[s]),l=d.width+P+(!c||y.isLegendRight||y.isLegendInset?v:0)+S.legend_padding,u=d.height+w,h=y.isLegendRight||y.isLegendInset?u:l,g=y.isLegendRight||y.isLegendInset?y.getLegendHeight():y.getLegendWidth();function f(t,e){e||(n=(g-C-h)/2)<A&&(n=(g-h)/2,C=0,I++),O[t]=I,E[I]=y.isLegendInset?10:n,L[t]=C,C+=h}o&&(T=b=I=C=0),!S.legend_show||y.isLegendToShow(e)?(V[e]=l,G[e]=u,(!b||b<=l)&&(b=l),(!T||T<=u)&&(T=u),a=y.isLegendRight||y.isLegendInset?T:b,S.legend_equally?(Object.keys(V).forEach(function(t){V[t]=b}),Object.keys(G).forEach(function(t){G[t]=T}),(n=(g-a*p.length)/2)<A?(I=C=0,p.forEach(function(t){f(t)})):f(e,!0)):f(e)):V[e]=G[e]=O[e]=L[e]=0}p=p.filter(function(t){return!k(S.data_names[t])||null!==S.data_names[t]}),h=B(t=t||{},\"withTransition\",!0),g=B(t,\"withTransitionForTransform\",!0),y.isLegendInset&&(I=S.legend_inset_step?S.legend_inset_step:p.length,y.updateLegendStep(I)),y.isLegendRight?(i=function(t){return b*O[t]},r=function(t){return E[O[t]]+L[t]}):y.isLegendInset?(i=function(t){return b*O[t]+10},r=function(t){return E[O[t]]+L[t]}):(i=function(t){return E[O[t]]+L[t]},r=function(t){return T*O[t]}),n=function(t,e){return i(t,e)+4+S.legend_item_tile_width},s=function(t,e){return r(t,e)+9},a=function(t,e){return i(t,e)},o=function(t,e){return r(t,e)-5},c=function(t,e){return i(t,e)-2},d=function(t,e){return i(t,e)-2+S.legend_item_tile_width},l=function(t,e){return r(t,e)+4},(u=y.legend.selectAll(\".\"+H.legendItem).data(p).enter().append(\"g\").attr(\"class\",function(t){return y.generateClass(H.legendItem,t)}).style(\"visibility\",function(t){return y.isLegendToShow(t)?\"visible\":\"hidden\"}).style(\"cursor\",\"pointer\").on(\"click\",function(t){S.legend_item_onclick?S.legend_item_onclick.call(y,t):y.d3.event.altKey?(y.api.hide(),y.api.show(t)):(y.api.toggle(t),y.isTargetToShow(t)?y.api.focus(t):y.api.revert())}).on(\"mouseover\",function(t){S.legend_item_onmouseover?S.legend_item_onmouseover.call(y,t):(y.d3.select(this).classed(H.legendItemFocused,!0),!y.transiting&&y.isTargetToShow(t)&&y.api.focus(t))}).on(\"mouseout\",function(t){S.legend_item_onmouseout?S.legend_item_onmouseout.call(y,t):(y.d3.select(this).classed(H.legendItemFocused,!1),y.api.revert())})).append(\"text\").text(function(t){return k(S.data_names[t])?S.data_names[t]:t}).each(function(t,e){R(this,t,e)}).style(\"pointer-events\",\"none\").attr(\"x\",y.isLegendRight||y.isLegendInset?n:-200).attr(\"y\",y.isLegendRight||y.isLegendInset?-200:s),u.append(\"rect\").attr(\"class\",H.legendItemEvent).style(\"fill-opacity\",0).attr(\"x\",y.isLegendRight||y.isLegendInset?a:-200).attr(\"y\",y.isLegendRight||y.isLegendInset?-200:o),u.append(\"line\").attr(\"class\",H.legendItemTile).style(\"stroke\",y.color).style(\"pointer-events\",\"none\").attr(\"x1\",y.isLegendRight||y.isLegendInset?c:-200).attr(\"y1\",y.isLegendRight||y.isLegendInset?-200:l).attr(\"x2\",y.isLegendRight||y.isLegendInset?d:-200).attr(\"y2\",y.isLegendRight||y.isLegendInset?-200:l).attr(\"stroke-width\",S.legend_item_tile_height),m=y.legend.select(\".\"+H.legendBackground+\" rect\"),y.isLegendInset&&0<b&&0===m.size()&&(m=y.legend.insert(\"g\",\".\"+H.legendItem).attr(\"class\",H.legendBackground).append(\"rect\")),f=y.legend.selectAll(\"text\").data(p).text(function(t){return k(S.data_names[t])?S.data_names[t]:t}).each(function(t,e){R(this,t,e)}),(h?f.transition():f).attr(\"x\",n).attr(\"y\",s),_=y.legend.selectAll(\"rect.\"+H.legendItemEvent).data(p),(h?_.transition():_).attr(\"width\",function(t){return V[t]}).attr(\"height\",function(t){return G[t]}).attr(\"x\",a).attr(\"y\",o),x=y.legend.selectAll(\"line.\"+H.legendItemTile).data(p),(h?x.transition():x).style(\"stroke\",y.levelColor?function(t){return y.levelColor(y.cache[t].values[0].value)}:y.color).attr(\"x1\",c).attr(\"y1\",l).attr(\"x2\",d).attr(\"y2\",l),m&&(h?m.transition():m).attr(\"height\",y.getLegendHeight()-12).attr(\"width\",b*(I+1)+10),y.legend.selectAll(\".\"+H.legendItem).classed(H.legendItemHidden,function(t){return!y.isTargetToShow(t)}),y.updateLegendItemWidth(b),y.updateLegendItemHeight(T),y.updateLegendStep(I),y.updateSizes(),y.updateScales(),y.updateSvgSize(),y.transformAll(g,e),y.legendHasRendered=!0},p.initRegion=function(){this.region=this.main.append(\"g\").attr(\"clip-path\",this.clipPath).attr(\"class\",H.regions)},p.updateRegion=function(t){var e=this,i=e.config;e.region.style(\"visibility\",e.hasArcType()?\"hidden\":\"visible\"),e.mainRegion=e.main.select(\".\"+H.regions).selectAll(\".\"+H.region).data(i.regions),e.mainRegion.enter().append(\"g\").append(\"rect\").style(\"fill-opacity\",0),e.mainRegion.attr(\"class\",e.classRegion.bind(e)),e.mainRegion.exit().transition().duration(t).style(\"opacity\",0).remove()},p.redrawRegion=function(t){var e=this,i=e.mainRegion.selectAll(\"rect\").each(function(){var t=e.d3.select(this.parentNode).datum();e.d3.select(this).datum(t)}),n=e.regionX.bind(e),a=e.regionY.bind(e),r=e.regionWidth.bind(e),s=e.regionHeight.bind(e);return[(t?i.transition():i).attr(\"x\",n).attr(\"y\",a).attr(\"width\",r).attr(\"height\",s).style(\"fill-opacity\",function(t){return P(t.opacity)?t.opacity:.1})]},p.regionX=function(t){var e=this,i=e.config,n=\"y\"===t.axis?e.y:e.y2;return\"y\"===t.axis||\"y2\"===t.axis?i.axis_rotated&&\"start\"in t?n(t.start):0:i.axis_rotated?0:\"start\"in t?e.x(e.isTimeSeries()?e.parseDate(t.start):t.start):0},p.regionY=function(t){var e=this,i=e.config,n=\"y\"===t.axis?e.y:e.y2;return\"y\"===t.axis||\"y2\"===t.axis?i.axis_rotated?0:\"end\"in t?n(t.end):0:i.axis_rotated&&\"start\"in t?e.x(e.isTimeSeries()?e.parseDate(t.start):t.start):0},p.regionWidth=function(t){var e,i=this,n=i.config,a=i.regionX(t),r=\"y\"===t.axis?i.y:i.y2;return(e=\"y\"===t.axis||\"y2\"===t.axis?n.axis_rotated&&\"end\"in t?r(t.end):i.width:n.axis_rotated?i.width:\"end\"in t?i.x(i.isTimeSeries()?i.parseDate(t.end):t.end):i.width)<a?0:e-a},p.regionHeight=function(t){var e,i=this,n=i.config,a=this.regionY(t),r=\"y\"===t.axis?i.y:i.y2;return(e=\"y\"===t.axis||\"y2\"===t.axis?n.axis_rotated?i.height:\"start\"in t?r(t.start):i.height:n.axis_rotated&&\"end\"in t?i.x(i.isTimeSeries()?i.parseDate(t.end):t.end):i.height)<a?0:e-a},p.isRegionOnX=function(t){return!t.axis||\"x\"===t.axis},p.getScale=function(t,e,i){return(i?this.d3.time.scale():this.d3.scale.linear()).range([t,e])},p.getX=function(t,e,i,n){var a,r=this.getScale(t,e,this.isTimeSeries()),s=i?r.domain(i):r;for(a in this.isCategorized()?(n=n||function(){return 0},r=function(t,e){var i=s(t)+n(t);return e?i:Math.ceil(i)}):r=function(t,e){var i=s(t);return e?i:Math.ceil(i)},s)r[a]=s[a];return r.orgDomain=function(){return s.domain()},this.isCategorized()&&(r.domain=function(t){return arguments.length?(s.domain(t),r):[(t=this.orgDomain())[0],t[1]+1]}),r},p.getY=function(t,e,i){var n=this.getScale(t,e,this.isTimeSeriesY());return i&&n.domain(i),n},p.getYScale=function(t){return\"y2\"===this.axis.getId(t)?this.y2:this.y},p.getSubYScale=function(t){return\"y2\"===this.axis.getId(t)?this.subY2:this.subY},p.updateScales=function(){var e=this,t=e.config,i=!e.x;e.xMin=t.axis_rotated?1:0,e.xMax=t.axis_rotated?e.height:e.width,e.yMin=t.axis_rotated?0:e.height,e.yMax=t.axis_rotated?e.width:1,e.subXMin=e.xMin,e.subXMax=e.xMax,e.subYMin=t.axis_rotated?0:e.height2,e.subYMax=t.axis_rotated?e.width2:1,e.x=e.getX(e.xMin,e.xMax,i?void 0:e.x.orgDomain(),function(){return e.xAxis.tickOffset()}),e.y=e.getY(e.yMin,e.yMax,i?t.axis_y_default:e.y.domain()),e.y2=e.getY(e.yMin,e.yMax,i?t.axis_y2_default:e.y2.domain()),e.subX=e.getX(e.xMin,e.xMax,e.orgXDomain,function(t){return t%1?0:e.subXAxis.tickOffset()}),e.subY=e.getY(e.subYMin,e.subYMax,i?t.axis_y_default:e.subY.domain()),e.subY2=e.getY(e.subYMin,e.subYMax,i?t.axis_y2_default:e.subY2.domain()),e.xAxisTickFormat=e.axis.getXAxisTickFormat(),e.xAxisTickValues=e.axis.getXAxisTickValues(),e.yAxisTickValues=e.axis.getYAxisTickValues(),e.y2AxisTickValues=e.axis.getY2AxisTickValues(),e.xAxis=e.axis.getXAxis(e.x,e.xOrient,e.xAxisTickFormat,e.xAxisTickValues,t.axis_x_tick_outer),e.subXAxis=e.axis.getXAxis(e.subX,e.subXOrient,e.xAxisTickFormat,e.xAxisTickValues,t.axis_x_tick_outer),e.yAxis=e.axis.getYAxis(e.y,e.yOrient,t.axis_y_tick_format,e.yAxisTickValues,t.axis_y_tick_outer),e.y2Axis=e.axis.getYAxis(e.y2,e.y2Orient,t.axis_y2_tick_format,e.y2AxisTickValues,t.axis_y2_tick_outer),i||(e.brush&&e.brush.scale(e.subX),t.zoom_enabled&&e.zoom.scale(e.x)),e.updateArc&&e.updateArc()},p.selectPoint=function(t,e,i){var n=this,a=n.config,r=(a.axis_rotated?n.circleY:n.circleX).bind(n),s=(a.axis_rotated?n.circleX:n.circleY).bind(n),o=n.pointSelectR.bind(n);a.data_onselected.call(n.api,e,t.node()),n.main.select(\".\"+H.selectedCircles+n.getTargetSelectorSuffix(e.id)).selectAll(\".\"+H.selectedCircle+\"-\"+i).data([e]).enter().append(\"circle\").attr(\"class\",function(){return n.generateClass(H.selectedCircle,i)}).attr(\"cx\",r).attr(\"cy\",s).attr(\"stroke\",function(){return n.color(e)}).attr(\"r\",function(t){return 1.4*n.pointSelectR(t)}).transition().duration(100).attr(\"r\",o)},p.unselectPoint=function(t,e,i){this.config.data_onunselected.call(this.api,e,t.node()),this.main.select(\".\"+H.selectedCircles+this.getTargetSelectorSuffix(e.id)).selectAll(\".\"+H.selectedCircle+\"-\"+i).transition().duration(100).attr(\"r\",0).remove()},p.togglePoint=function(t,e,i,n){t?this.selectPoint(e,i,n):this.unselectPoint(e,i,n)},p.selectPath=function(t,e){var i=this;i.config.data_onselected.call(i,e,t.node()),i.config.interaction_brighten&&t.transition().duration(100).style(\"fill\",function(){return i.d3.rgb(i.color(e)).brighter(.75)})},p.unselectPath=function(t,e){var i=this;i.config.data_onunselected.call(i,e,t.node()),i.config.interaction_brighten&&t.transition().duration(100).style(\"fill\",function(){return i.color(e)})},p.togglePath=function(t,e,i,n){t?this.selectPath(e,i,n):this.unselectPath(e,i,n)},p.getToggle=function(t,e){var i;return\"circle\"===t.nodeName?i=this.isStepType(e)?function(){}:this.togglePoint:\"path\"===t.nodeName&&(i=this.togglePath),i},p.toggleShape=function(t,e,i){var n=this,a=n.d3,r=n.config,s=a.select(t),o=s.classed(H.SELECTED),c=n.getToggle(t,e).bind(n);r.data_selection_enabled&&r.data_selection_isselectable(e)&&(r.data_selection_multiple||n.main.selectAll(\".\"+H.shapes+(r.data_selection_grouped?n.getTargetSelectorSuffix(e.id):\"\")).selectAll(\".\"+H.shape).each(function(t,e){var i=a.select(this);i.classed(H.SELECTED)&&c(!1,i.classed(H.SELECTED,!1),t,e)}),s.classed(H.SELECTED,!o),c(!o,s,e,i))},p.initBar=function(){this.main.select(\".\"+H.chart).append(\"g\").attr(\"class\",H.chartBars)},p.updateTargetsForBar=function(t){var e=this,i=e.config,n=e.classChartBar.bind(e),a=e.classBars.bind(e),r=e.classFocus.bind(e);e.main.select(\".\"+H.chartBars).selectAll(\".\"+H.chartBar).data(t).attr(\"class\",function(t){return n(t)+r(t)}).enter().append(\"g\").attr(\"class\",n).style(\"pointer-events\",\"none\").append(\"g\").attr(\"class\",a).style(\"cursor\",function(t){return i.data_selection_isselectable(t)?\"pointer\":null})},p.updateBar=function(t){var e=this,i=e.barData.bind(e),n=e.classBar.bind(e),a=e.initialOpacity.bind(e),r=function(t){return e.color(t.id)};e.mainBar=e.main.selectAll(\".\"+H.bars).selectAll(\".\"+H.bar).data(i),e.mainBar.enter().append(\"path\").attr(\"class\",n).style(\"stroke\",r).style(\"fill\",r),e.mainBar.style(\"opacity\",a),e.mainBar.exit().transition().duration(t).remove()},p.redrawBar=function(t,e){return[(e?this.mainBar.transition(Math.random().toString()):this.mainBar).attr(\"d\",t).style(\"stroke\",this.color).style(\"fill\",this.color).style(\"opacity\",1)]},p.getBarW=function(t,e){var i=this.config,n=\"number\"==typeof i.bar_width?i.bar_width:e?t.tickInterval()*i.bar_width_ratio/e:0;return i.bar_width_max&&n>i.bar_width_max?i.bar_width_max:n},p.getBars=function(t,e){return(e?this.main.selectAll(\".\"+H.bars+this.getTargetSelectorSuffix(e)):this.main).selectAll(\".\"+H.bar+(P(t)?\"-\"+t:\"\"))},p.expandBars=function(t,e,i){i&&this.unexpandBars(),this.getBars(t,e).classed(H.EXPANDED,!0)},p.unexpandBars=function(t){this.getBars(t).classed(H.EXPANDED,!1)},p.generateDrawBar=function(t,e){var r=this.config,s=this.generateGetBarPoints(t,e);return function(t,e){var i=s(t,e),n=r.axis_rotated?1:0,a=r.axis_rotated?0:1;return\"M \"+i[0][n]+\",\"+i[0][a]+\" L\"+i[1][n]+\",\"+i[1][a]+\" L\"+i[2][n]+\",\"+i[2][a]+\" L\"+i[3][n]+\",\"+i[3][a]+\" z\"}},p.generateGetBarPoints=function(t,e){var s=this,i=e?s.subXAxis:s.xAxis,n=t.__max__+1,o=s.getBarW(i,n),c=s.getShapeX(o,n,t,!!e),d=s.getShapeY(!!e),l=s.getShapeOffset(s.isBarType,t,!!e),u=o*(s.config.bar_space/2),h=e?s.getSubYScale:s.getYScale;return function(t,e){var i=h.call(s,t.id)(0),n=l(t,e)||i,a=c(t),r=d(t);return s.config.axis_rotated&&(0<t.value&&r<i||t.value<0&&i<r)&&(r=i),[[a+u,n],[a+u,r-(i-n)],[a+o-u,r-(i-n)],[a+o-u,n]]}},p.isWithinBar=function(t){var e=this.d3.mouse(t),i=t.getBoundingClientRect(),n=t.pathSegList.getItem(0),a=t.pathSegList.getItem(1),r=Math.min(n.x,a.x),s=Math.min(n.y,a.y),o=r+i.width+2,c=s+i.height+2,d=s-2;return r-2<e[0]&&e[0]<o&&d<e[1]&&e[1]<c},p.getShapeIndices=function(t){var e,i,n=this.config,a={},r=0;return this.filterTargetsToShow(this.data.targets.filter(t,this)).forEach(function(t){for(e=0;e<n.data_groups.length;e++)if(!(n.data_groups[e].indexOf(t.id)<0))for(i=0;i<n.data_groups[e].length;i++)if(n.data_groups[e][i]in a){a[t.id]=a[n.data_groups[e][i]];break}v(a[t.id])&&(a[t.id]=r++)}),a.__max__=r-1,a},p.getShapeX=function(i,n,a,t){var r=t?this.subX:this.x;return function(t){var e=t.id in a?a[t.id]:0;return t.x||0===t.x?r(t.x)-i*(n/2-e):0}},p.getShapeY=function(e){var i=this;return function(t){return(e?i.getSubYScale(t.id):i.getYScale(t.id))(t.value)}},p.getShapeOffset=function(t,o,e){var c=this,d=c.orderTargets(c.filterTargetsToShow(c.data.targets.filter(t,c))),l=d.map(function(t){return t.id});return function(i,n){var a=e?c.getSubYScale(i.id):c.getYScale(i.id),r=a(0),s=r;return d.forEach(function(t){var e=c.isStepType(i)?c.convertValuesToStep(t.values):t.values;t.id!==i.id&&o[t.id]===o[i.id]&&l.indexOf(t.id)<l.indexOf(i.id)&&(void 0!==e[n]&&+e[n].x==+i.x||(n=-1,e.forEach(function(t,e){t.x===i.x&&(n=e)})),n in e&&0<=e[n].value*i.value&&(s+=a(e[n].value)-r))}),s}},p.isWithinShape=function(t,e){var i,n=this,a=n.d3.select(t);return n.isTargetToShow(e.id)?\"circle\"===t.nodeName?i=n.isStepType(e)?n.isWithinStep(t,n.getYScale(e.id)(e.value)):n.isWithinCircle(t,1.5*n.pointSelectR(e)):\"path\"===t.nodeName&&(i=!a.classed(H.bar)||n.isWithinBar(t)):i=!1,i},p.getInterpolate=function(t){var e=this,i=e.isInterpolationType(e.config.spline_interpolation_type)?e.config.spline_interpolation_type:\"cardinal\";return e.isSplineType(t)?i:e.isStepType(t)?e.config.line_step_type:\"linear\"},p.initLine=function(){this.main.select(\".\"+H.chart).append(\"g\").attr(\"class\",H.chartLines)},p.updateTargetsForLine=function(t){var e,i=this,n=i.config,a=i.classChartLine.bind(i),r=i.classLines.bind(i),s=i.classAreas.bind(i),o=i.classCircles.bind(i),c=i.classFocus.bind(i);(e=i.main.select(\".\"+H.chartLines).selectAll(\".\"+H.chartLine).data(t).attr(\"class\",function(t){return a(t)+c(t)}).enter().append(\"g\").attr(\"class\",a).style(\"opacity\",0).style(\"pointer-events\",\"none\")).append(\"g\").attr(\"class\",r),e.append(\"g\").attr(\"class\",s),e.append(\"g\").attr(\"class\",function(t){return i.generateClass(H.selectedCircles,t.id)}),e.append(\"g\").attr(\"class\",o).style(\"cursor\",function(t){return n.data_selection_isselectable(t)?\"pointer\":null}),t.forEach(function(e){i.main.selectAll(\".\"+H.selectedCircles+i.getTargetSelectorSuffix(e.id)).selectAll(\".\"+H.selectedCircle).each(function(t){t.value=e.values[t.index].value})})},p.updateLine=function(t){var e=this;e.mainLine=e.main.selectAll(\".\"+H.lines).selectAll(\".\"+H.line).data(e.lineData.bind(e)),e.mainLine.enter().append(\"path\").attr(\"class\",e.classLine.bind(e)).style(\"stroke\",e.color),e.mainLine.style(\"opacity\",e.initialOpacity.bind(e)).style(\"shape-rendering\",function(t){return e.isStepType(t)?\"crispEdges\":\"\"}).attr(\"transform\",null),e.mainLine.exit().transition().duration(t).style(\"opacity\",0).remove()},p.redrawLine=function(t,e){return[(e?this.mainLine.transition(Math.random().toString()):this.mainLine).attr(\"d\",t).style(\"stroke\",this.color).style(\"opacity\",1)]},p.generateDrawLine=function(t,o){var c=this,d=c.config,l=c.d3.svg.line(),i=c.generateGetLinePoints(t,o),u=o?c.getSubYScale:c.getYScale,e=function(t){return(o?c.subxx:c.xx).call(c,t)},n=function(t,e){return 0<d.data_groups.length?i(t,e)[0][1]:u.call(c,t.id)(t.value)};return l=d.axis_rotated?l.x(n).y(e):l.x(e).y(n),d.line_connectNull||(l=l.defined(function(t){return null!=t.value})),function(t){var e,i=d.line_connectNull?c.filterRemoveNull(t.values):t.values,n=o?c.subX:c.x,a=u.call(c,t.id),r=0,s=0;return c.isLineType(t)?d.data_regions[t.id]?e=c.lineWithRegions(i,n,a,d.data_regions[t.id]):(c.isStepType(t)&&(i=c.convertValuesToStep(i)),e=l.interpolate(c.getInterpolate(t))(i)):(i[0]&&(r=n(i[0].x),s=a(i[0].value)),e=d.axis_rotated?\"M \"+s+\" \"+r:\"M \"+r+\" \"+s),e||\"M 0 0\"}},p.generateGetLinePoints=function(t,e){var s=this,o=s.config,i=t.__max__+1,c=s.getShapeX(0,i,t,!!e),d=s.getShapeY(!!e),l=s.getShapeOffset(s.isLineType,t,!!e),u=e?s.getSubYScale:s.getYScale;return function(t,e){var i=u.call(s,t.id)(0),n=l(t,e)||i,a=c(t),r=d(t);return o.axis_rotated&&(0<t.value&&r<i||t.value<0&&i<r)&&(r=i),[[a,r-(i-n)],[a,r-(i-n)],[a,r-(i-n)],[a,r-(i-n)]]}},p.lineWithRegions=function(t,c,d,e){var i,n,a,r,l,s,o,u,h,g,f,p=this,_=p.config,x=\"M\",m=p.isCategorized()?.5:0,y=[];function S(t,e){var i;for(i=0;i<e.length;i++)if(e[i].start<t&&t<=e[i].end)return!0;return!1}if(k(e))for(i=0;i<e.length;i++)y[i]={},v(e[i].start)?y[i].start=t[0].x:y[i].start=p.isTimeSeries()?p.parseDate(e[i].start):e[i].start,v(e[i].end)?y[i].end=t[t.length-1].x:y[i].end=p.isTimeSeries()?p.parseDate(e[i].end):e[i].end;function w(t){return\"M\"+t[0][0]+\" \"+t[0][1]+\" \"+t[1][0]+\" \"+t[1][1]}for(g=_.axis_rotated?function(t){return d(t.value)}:function(t){return c(t.x)},f=_.axis_rotated?function(t){return c(t.x)}:function(t){return d(t.value)},a=p.isTimeSeries()?function(t,e,i,n){var a=t.x.getTime(),r=e.x-t.x,s=new Date(a+r*i),o=new Date(a+r*(i+n));return w(_.axis_rotated?[[d(l(i)),c(s)],[d(l(i+n)),c(o)]]:[[c(s),d(l(i))],[c(o),d(l(i+n))]])}:function(t,e,i,n){return w(_.axis_rotated?[[d(l(i),!0),c(r(i))],[d(l(i+n),!0),c(r(i+n))]]:[[c(r(i),!0),d(l(i))],[c(r(i+n),!0),d(l(i+n))]])},i=0;i<t.length;i++){if(v(y)||!S(t[i].x,y))x+=\" \"+g(t[i])+\" \"+f(t[i]);else for(r=p.getScale(t[i-1].x+m,t[i].x+m,p.isTimeSeries()),l=p.getScale(t[i-1].value,t[i].value),s=c(t[i].x)-c(t[i-1].x),o=d(t[i].value)-d(t[i-1].value),h=2*(u=2/Math.sqrt(Math.pow(s,2)+Math.pow(o,2))),n=u;n<=1;n+=h)x+=a(t[i-1],t[i],n,u);t[i].x}return x},p.updateArea=function(t){var e=this,i=e.d3;e.mainArea=e.main.selectAll(\".\"+H.areas).selectAll(\".\"+H.area).data(e.lineData.bind(e)),e.mainArea.enter().append(\"path\").attr(\"class\",e.classArea.bind(e)).style(\"fill\",e.color).style(\"opacity\",function(){return e.orgAreaOpacity=+i.select(this).style(\"opacity\"),0}),e.mainArea.style(\"opacity\",e.orgAreaOpacity),e.mainArea.exit().transition().duration(t).style(\"opacity\",0).remove()},p.redrawArea=function(t,e){return[(e?this.mainArea.transition(Math.random().toString()):this.mainArea).attr(\"d\",t).style(\"fill\",this.color).style(\"opacity\",this.orgAreaOpacity)]},p.generateDrawArea=function(t,e){var r=this,s=r.config,o=r.d3.svg.area(),i=r.generateGetAreaPoints(t,e),n=e?r.getSubYScale:r.getYScale,a=function(t){return(e?r.subxx:r.xx).call(r,t)},c=function(t,e){return 0<s.data_groups.length?i(t,e)[0][1]:n.call(r,t.id)(r.getAreaBaseValue(t.id))},d=function(t,e){return 0<s.data_groups.length?i(t,e)[1][1]:n.call(r,t.id)(t.value)};return o=s.axis_rotated?o.x0(c).x1(d).y(a):o.x(a).y0(s.area_above?0:c).y1(d),s.line_connectNull||(o=o.defined(function(t){return null!==t.value})),function(t){var e,i=s.line_connectNull?r.filterRemoveNull(t.values):t.values,n=0,a=0;return r.isAreaType(t)?(r.isStepType(t)&&(i=r.convertValuesToStep(i)),e=o.interpolate(r.getInterpolate(t))(i)):(i[0]&&(n=r.x(i[0].x),a=r.getYScale(t.id)(i[0].value)),e=s.axis_rotated?\"M \"+a+\" \"+n:\"M \"+n+\" \"+a),e||\"M 0 0\"}},p.getAreaBaseValue=function(){return 0},p.generateGetAreaPoints=function(t,e){var s=this,o=s.config,i=t.__max__+1,c=s.getShapeX(0,i,t,!!e),d=s.getShapeY(!!e),l=s.getShapeOffset(s.isAreaType,t,!!e),u=e?s.getSubYScale:s.getYScale;return function(t,e){var i=u.call(s,t.id)(0),n=l(t,e)||i,a=c(t),r=d(t);return o.axis_rotated&&(0<t.value&&r<i||t.value<0&&i<r)&&(r=i),[[a,n],[a,r-(i-n)],[a,r-(i-n)],[a,n]]}},p.updateCircle=function(){var t=this;t.mainCircle=t.main.selectAll(\".\"+H.circles).selectAll(\".\"+H.circle).data(t.lineOrScatterData.bind(t)),t.mainCircle.enter().append(\"circle\").attr(\"class\",t.classCircle.bind(t)).attr(\"r\",t.pointR.bind(t)).style(\"fill\",t.color),t.mainCircle.style(\"opacity\",t.initialOpacityForCircle.bind(t)),t.mainCircle.exit().remove()},p.redrawCircle=function(t,e,i){var n=this.main.selectAll(\".\"+H.selectedCircle);return[(i?this.mainCircle.transition(Math.random().toString()):this.mainCircle).style(\"opacity\",this.opacityForCircle.bind(this)).style(\"fill\",this.color).attr(\"cx\",t).attr(\"cy\",e),(i?n.transition(Math.random().toString()):n).attr(\"cx\",t).attr(\"cy\",e)]},p.circleX=function(t){return t.x||0===t.x?this.x(t.x):null},p.updateCircleY=function(){var t,i,e=this;0<e.config.data_groups.length?(t=e.getShapeIndices(e.isLineType),i=e.generateGetLinePoints(t),e.circleY=function(t,e){return i(t,e)[0][1]}):e.circleY=function(t){return e.getYScale(t.id)(t.value)}},p.getCircles=function(t,e){return(e?this.main.selectAll(\".\"+H.circles+this.getTargetSelectorSuffix(e)):this.main).selectAll(\".\"+H.circle+(P(t)?\"-\"+t:\"\"))},p.expandCircles=function(t,e,i){var n=this.pointExpandedR.bind(this);i&&this.unexpandCircles(),this.getCircles(t,e).classed(H.EXPANDED,!0).attr(\"r\",n)},p.unexpandCircles=function(t){var e=this,i=e.pointR.bind(e);e.getCircles(t).filter(function(){return e.d3.select(this).classed(H.EXPANDED)}).classed(H.EXPANDED,!1).attr(\"r\",i)},p.pointR=function(t){var e=this.config;return this.isStepType(t)?0:h(e.point_r)?e.point_r(t):e.point_r},p.pointExpandedR=function(t){var e=this.config;return e.point_focus_expand_enabled?h(e.point_focus_expand_r)?e.point_focus_expand_r(t):e.point_focus_expand_r?e.point_focus_expand_r:1.75*this.pointR(t):this.pointR(t)},p.pointSelectR=function(t){var e=this.config;return h(e.point_select_r)?e.point_select_r(t):e.point_select_r?e.point_select_r:4*this.pointR(t)},p.isWithinCircle=function(t,e){var i=this.d3,n=i.mouse(t),a=i.select(t),r=+a.attr(\"cx\"),s=+a.attr(\"cy\");return Math.sqrt(Math.pow(r-n[0],2)+Math.pow(s-n[1],2))<e},p.isWithinStep=function(t,e){return Math.abs(e-this.d3.mouse(t)[1])<30},p.getCurrentWidth=function(){var t=this.config;return t.size_width?t.size_width:this.getParentWidth()},p.getCurrentHeight=function(){var t=this.config,e=t.size_height?t.size_height:this.getParentHeight();return 0<e?e:320/(this.hasType(\"gauge\")&&!t.gauge_fullCircle?2:1)},p.getCurrentPaddingTop=function(){var t=this.config,e=P(t.padding_top)?t.padding_top:0;return this.title&&this.title.node()&&(e+=this.getTitlePadding()),e},p.getCurrentPaddingBottom=function(){var t=this.config;return P(t.padding_bottom)?t.padding_bottom:0},p.getCurrentPaddingLeft=function(t){var e=this.config;return P(e.padding_left)?e.padding_left:e.axis_rotated?!e.axis_x_show||e.axis_x_inner?1:Math.max(n(this.getAxisWidthByAxisId(\"x\",t)),40):!e.axis_y_show||e.axis_y_inner?this.axis.getYAxisLabelPosition().isOuter?30:1:n(this.getAxisWidthByAxisId(\"y\",t))},p.getCurrentPaddingRight=function(){var t=this,e=t.config,i=t.isLegendRight?t.getLegendWidth()+20:0;return P(e.padding_right)?e.padding_right+1:e.axis_rotated?10+i:!e.axis_y2_show||e.axis_y2_inner?2+i+(t.axis.getY2AxisLabelPosition().isOuter?20:0):n(t.getAxisWidthByAxisId(\"y2\"))+i},p.getParentRectValue=function(e){for(var i,n=this.selectChart.node();n&&\"BODY\"!==n.tagName;){try{i=n.getBoundingClientRect()[e]}catch(t){\"width\"===e&&(i=n.offsetWidth)}if(i)break;n=n.parentNode}return i},p.getParentWidth=function(){return this.getParentRectValue(\"width\")},p.getParentHeight=function(){var t=this.selectChart.style(\"height\");return 0<t.indexOf(\"px\")?+t.replace(\"px\",\"\"):0},p.getSvgLeft=function(t){var e=this,i=e.config,n=i.axis_rotated||!i.axis_rotated&&!i.axis_y_inner,a=i.axis_rotated?H.axisX:H.axisY,r=e.main.select(\".\"+a).node(),s=r&&n?r.getBoundingClientRect():{right:0},o=e.selectChart.node().getBoundingClientRect(),c=e.hasArcType(),d=s.right-o.left-(c?0:e.getCurrentPaddingLeft(t));return 0<d?d:0},p.getAxisWidthByAxisId=function(t,e){var i=this.axis.getLabelPositionById(t);return this.axis.getMaxTickWidth(t,e)+(i.isInner?20:40)},p.getHorizontalAxisHeight=function(t){var e=this,i=e.config,n=30;return\"x\"!==t||i.axis_x_show?\"x\"===t&&i.axis_x_height?i.axis_x_height:\"y\"!==t||i.axis_y_show?\"y2\"!==t||i.axis_y2_show?(\"x\"===t&&!i.axis_rotated&&i.axis_x_tick_rotate&&(n=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-i.axis_x_tick_rotate)/180)),\"y\"===t&&i.axis_rotated&&i.axis_y_tick_rotate&&(n=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-i.axis_y_tick_rotate)/180)),n+(e.axis.getLabelPositionById(t).isInner?0:10)+(\"y2\"===t?-10:0)):e.rotated_padding_top:!i.legend_show||e.isLegendRight||e.isLegendInset?1:10:8},p.getEventRectWidth=function(){return Math.max(0,this.xAxis.tickInterval())},p.initBrush=function(){var e=this,t=e.d3;e.brush=t.svg.brush().on(\"brush\",function(){e.redrawForBrush()}),e.brush.update=function(){return e.context&&e.context.select(\".\"+H.brush).call(this),this},e.brush.scale=function(t){return e.config.axis_rotated?this.y(t):this.x(t)}},p.initSubchart=function(){var t=this,e=t.config,i=t.context=t.svg.append(\"g\").attr(\"transform\",t.getTranslate(\"context\")),n=e.subchart_show?\"visible\":\"hidden\";i.style(\"visibility\",n),i.append(\"g\").attr(\"clip-path\",t.clipPathForSubchart).attr(\"class\",H.chart),i.select(\".\"+H.chart).append(\"g\").attr(\"class\",H.chartBars),i.select(\".\"+H.chart).append(\"g\").attr(\"class\",H.chartLines),i.append(\"g\").attr(\"clip-path\",t.clipPath).attr(\"class\",H.brush).call(t.brush),t.axes.subx=i.append(\"g\").attr(\"class\",H.axisX).attr(\"transform\",t.getTranslate(\"subx\")).attr(\"clip-path\",e.axis_rotated?\"\":t.clipPathForXAxis).style(\"visibility\",e.subchart_axis_x_show?n:\"hidden\")},p.updateTargetsForSubchart=function(t){var e,i=this,n=i.context,a=i.config,r=i.classChartBar.bind(i),s=i.classBars.bind(i),o=i.classChartLine.bind(i),c=i.classLines.bind(i),d=i.classAreas.bind(i);a.subchart_show&&(n.select(\".\"+H.chartBars).selectAll(\".\"+H.chartBar).data(t).attr(\"class\",r).enter().append(\"g\").style(\"opacity\",0).attr(\"class\",r).append(\"g\").attr(\"class\",s),(e=n.select(\".\"+H.chartLines).selectAll(\".\"+H.chartLine).data(t).attr(\"class\",o).enter().append(\"g\").style(\"opacity\",0).attr(\"class\",o)).append(\"g\").attr(\"class\",c),e.append(\"g\").attr(\"class\",d),n.selectAll(\".\"+H.brush+\" rect\").attr(a.axis_rotated?\"width\":\"height\",a.axis_rotated?i.width2:i.height2))},p.updateBarForSubchart=function(t){var e=this;e.contextBar=e.context.selectAll(\".\"+H.bars).selectAll(\".\"+H.bar).data(e.barData.bind(e)),e.contextBar.enter().append(\"path\").attr(\"class\",e.classBar.bind(e)).style(\"stroke\",\"none\").style(\"fill\",e.color),e.contextBar.style(\"opacity\",e.initialOpacity.bind(e)),e.contextBar.exit().transition().duration(t).style(\"opacity\",0).remove()},p.redrawBarForSubchart=function(t,e,i){(e?this.contextBar.transition(Math.random().toString()).duration(i):this.contextBar).attr(\"d\",t).style(\"opacity\",1)},p.updateLineForSubchart=function(t){var e=this;e.contextLine=e.context.selectAll(\".\"+H.lines).selectAll(\".\"+H.line).data(e.lineData.bind(e)),e.contextLine.enter().append(\"path\").attr(\"class\",e.classLine.bind(e)).style(\"stroke\",e.color),e.contextLine.style(\"opacity\",e.initialOpacity.bind(e)),e.contextLine.exit().transition().duration(t).style(\"opacity\",0).remove()},p.redrawLineForSubchart=function(t,e,i){(e?this.contextLine.transition(Math.random().toString()).duration(i):this.contextLine).attr(\"d\",t).style(\"opacity\",1)},p.updateAreaForSubchart=function(t){var e=this,i=e.d3;e.contextArea=e.context.selectAll(\".\"+H.areas).selectAll(\".\"+H.area).data(e.lineData.bind(e)),e.contextArea.enter().append(\"path\").attr(\"class\",e.classArea.bind(e)).style(\"fill\",e.color).style(\"opacity\",function(){return e.orgAreaOpacity=+i.select(this).style(\"opacity\"),0}),e.contextArea.style(\"opacity\",0),e.contextArea.exit().transition().duration(t).style(\"opacity\",0).remove()},p.redrawAreaForSubchart=function(t,e,i){(e?this.contextArea.transition(Math.random().toString()).duration(i):this.contextArea).attr(\"d\",t).style(\"fill\",this.color).style(\"opacity\",this.orgAreaOpacity)},p.redrawSubchart=function(t,e,i,n,a,r,s){var o,c,d,l=this,u=l.d3,h=l.config;l.context.style(\"visibility\",h.subchart_show?\"visible\":\"hidden\"),h.subchart_show&&(u.event&&\"zoom\"===u.event.type&&l.brush.extent(l.x.orgDomain()).update(),t&&(l.brush.empty()||l.brush.extent(l.x.orgDomain()).update(),o=l.generateDrawArea(a,!0),c=l.generateDrawBar(r,!0),d=l.generateDrawLine(s,!0),l.updateBarForSubchart(i),l.updateLineForSubchart(i),l.updateAreaForSubchart(i),l.redrawBarForSubchart(c,i,i),l.redrawLineForSubchart(d,i,i),l.redrawAreaForSubchart(o,i,i)))},p.redrawForBrush=function(){var t=this,e=t.x;t.redraw({withTransition:!1,withY:t.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t.config.subchart_onbrush.call(t.api,e.orgDomain())},p.transformContext=function(t,e){var i;e&&e.axisSubX?i=e.axisSubX:(i=this.context.select(\".\"+H.axisX),t&&(i=i.transition())),this.context.attr(\"transform\",this.getTranslate(\"context\")),i.attr(\"transform\",this.getTranslate(\"subx\"))},p.getDefaultExtent=function(){var t=this,e=t.config,i=h(e.axis_x_extent)?e.axis_x_extent(t.getXDomain(t.data.targets)):e.axis_x_extent;return t.isTimeSeries()&&(i=[t.parseDate(i[0]),t.parseDate(i[1])]),i},p.initText=function(){this.main.select(\".\"+H.chart).append(\"g\").attr(\"class\",H.chartTexts),this.mainText=this.d3.selectAll([])},p.updateTargetsForText=function(t){var e=this,i=e.classChartText.bind(e),n=e.classTexts.bind(e),a=e.classFocus.bind(e);e.main.select(\".\"+H.chartTexts).selectAll(\".\"+H.chartText).data(t).attr(\"class\",function(t){return i(t)+a(t)}).enter().append(\"g\").attr(\"class\",i).style(\"opacity\",0).style(\"pointer-events\",\"none\").append(\"g\").attr(\"class\",n)},p.updateText=function(t){var n=this,e=n.config,i=n.barOrLineData.bind(n),a=n.classText.bind(n);n.mainText=n.main.selectAll(\".\"+H.texts).selectAll(\".\"+H.text).data(i),n.mainText.enter().append(\"text\").attr(\"class\",a).attr(\"text-anchor\",function(t){return e.axis_rotated?t.value<0?\"end\":\"start\":\"middle\"}).style(\"stroke\",\"none\").style(\"fill\",function(t){return n.color(t)}).style(\"fill-opacity\",0),n.mainText.text(function(t,e,i){return n.dataLabelFormat(t.id)(t.value,t.id,e,i)}),n.mainText.exit().transition().duration(t).style(\"fill-opacity\",0).remove()},p.redrawText=function(t,e,i,n){return[(n?this.mainText.transition():this.mainText).attr(\"x\",t).attr(\"y\",e).style(\"fill\",this.color).style(\"fill-opacity\",i?0:this.opacityForText.bind(this))]},p.getTextRect=function(t,e,i){var n,a=this.d3.select(\"body\").append(\"div\").classed(\"c3\",!0),r=a.append(\"svg\").style(\"visibility\",\"hidden\").style(\"position\",\"fixed\").style(\"top\",0).style(\"left\",0),s=this.d3.select(i).style(\"font\");return r.selectAll(\".dummy\").data([t]).enter().append(\"text\").classed(e||\"\",!0).style(\"font\",s).text(t).each(function(){n=this.getBoundingClientRect()}),a.remove(),n},p.generateXYForText=function(t,e,i,n){var a=this,r=a.generateGetAreaPoints(t,!1),s=a.generateGetBarPoints(e,!1),o=a.generateGetLinePoints(i,!1),c=n?a.getXForText:a.getYForText;return function(t,e){var i=a.isAreaType(t)?r:a.isBarType(t)?s:o;return c.call(a,i(t,e),t,this)}},p.getXForText=function(t,e,i){var n,a,r=this,s=i.getBoundingClientRect();return r.config.axis_rotated?(a=r.isBarType(e)?4:6,n=t[2][1]+a*(e.value<0?-1:1)):n=r.hasType(\"bar\")?(t[2][0]+t[0][0])/2:t[0][0],null===e.value&&(n>r.width?n=r.width-s.width:n<0&&(n=4)),n},p.getYForText=function(t,e,i){var n,a=this,r=i.getBoundingClientRect();return a.config.axis_rotated?n=(t[0][0]+t[2][0]+.6*r.height)/2:(n=t[2][1],e.value<0||0===e.value&&!a.hasPositiveValue?(n+=r.height,a.isBarType(e)&&a.isSafari()?n-=3:!a.isBarType(e)&&a.isChrome()&&(n+=3)):n+=a.isBarType(e)?-3:-6),null!==e.value||a.config.axis_rotated||(n<r.height?n=r.height:n>this.height&&(n=this.height-4)),n},p.initTitle=function(){this.title=this.svg.append(\"text\").text(this.config.title_text).attr(\"class\",this.CLASS.title)},p.redrawTitle=function(){var t=this;t.title.attr(\"x\",t.xForTitle.bind(t)).attr(\"y\",t.yForTitle.bind(t))},p.xForTitle=function(){var t=this,e=t.config,i=e.title_position||\"left\";return 0<=i.indexOf(\"right\")?t.currentWidth-t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).width-e.title_padding.right:0<=i.indexOf(\"center\")?(t.currentWidth-t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).width)/2:e.title_padding.left},p.yForTitle=function(){var t=this;return t.config.title_padding.top+t.getTextRect(t.title.node().textContent,t.CLASS.title,t.title.node()).height},p.getTitlePadding=function(){return this.yForTitle()+this.config.title_padding.bottom},p.initTooltip=function(){var t,e=this,i=e.config;if(e.tooltip=e.selectChart.style(\"position\",\"relative\").append(\"div\").attr(\"class\",H.tooltipContainer).style(\"position\",\"absolute\").style(\"pointer-events\",\"none\").style(\"display\",\"none\"),i.tooltip_init_show){if(e.isTimeSeries()&&c(i.tooltip_init_x)){for(i.tooltip_init_x=e.parseDate(i.tooltip_init_x),t=0;t<e.data.targets[0].values.length&&e.data.targets[0].values[t].x-i.tooltip_init_x!=0;t++);i.tooltip_init_x=t}e.tooltip.html(i.tooltip_contents.call(e,e.data.targets.map(function(t){return e.addName(t.values[i.tooltip_init_x])}),e.axis.getXAxisTickFormat(),e.getYFormat(e.hasArcType()),e.color)),e.tooltip.style(\"top\",i.tooltip_init_position.top).style(\"left\",i.tooltip_init_position.left).style(\"display\",\"block\")}},p.getTooltipSortFunction=function(){var t=this,e=t.config;if(0!==e.data_groups.length&&void 0===e.tooltip_order){var i=t.orderTargets(t.data.targets).map(function(t){return t.id});return(t.isOrderAsc()||t.isOrderDesc())&&(i=i.reverse()),function(t,e){return i.indexOf(t.id)-i.indexOf(e.id)}}var n=e.tooltip_order;void 0===n&&(n=e.data_order);var a=function(t){return t?t.value:null};if(c(n)&&\"asc\"===n.toLowerCase())return function(t,e){return a(t)-a(e)};if(c(n)&&\"desc\"===n.toLowerCase())return function(t,e){return a(e)-a(t)};if(h(n)){var r=n;return void 0===e.tooltip_order&&(r=function(t,e){return n(t?{id:t.id,values:[t]}:null,e?{id:e.id,values:[e]}:null)}),r}return s(n)?function(t,e){return n.indexOf(t.id)-n.indexOf(e.id)}:void 0},p.getTooltipContent=function(t,e,i,n){var a,r,s,o,c,d,l=this,u=l.config,h=u.tooltip_format_title||e,g=u.tooltip_format_name||function(t){return t},f=u.tooltip_format_value||i,p=this.getTooltipSortFunction();for(p&&t.sort(p),r=0;r<t.length;r++)if(t[r]&&(t[r].value||0===t[r].value)&&(a||(s=_(h?h(t[r].x):t[r].x),a=\"<table class='\"+l.CLASS.tooltip+\"'>\"+(s||0===s?\"<tr><th colspan='2'>\"+s+\"</th></tr>\":\"\")),void 0!==(o=_(f(t[r].value,t[r].ratio,t[r].id,t[r].index,t))))){if(null===t[r].name)continue;c=_(g(t[r].name,t[r].ratio,t[r].id,t[r].index)),d=l.levelColor?l.levelColor(t[r].value):n(t[r].id),a+=\"<tr class='\"+l.CLASS.tooltipName+\"-\"+l.getTargetSelectorSuffix(t[r].id)+\"'>\",a+=\"<td class='name'><span style='background-color:\"+d+\"'></span>\"+c+\"</td>\",a+=\"<td class='value'>\"+o+\"</td>\",a+=\"</tr>\"}return a+\"</table>\"},p.tooltipPosition=function(t,e,i,n){var a,r,s,o,c,d=this,l=d.config,u=d.d3,h=d.hasArcType(),g=u.mouse(n);return h?(r=(d.width-(d.isLegendRight?d.getLegendWidth():0))/2+g[0],o=(d.hasType(\"gauge\")?d.height:d.height/2)+g[1]+20):(a=d.getSvgLeft(!0),l.axis_rotated?(s=(r=a+g[0]+100)+e,c=d.currentWidth-d.getCurrentPaddingRight(),o=d.x(t[0].x)+20):(s=(r=a+d.getCurrentPaddingLeft(!0)+d.x(t[0].x)+20)+e,c=a+d.currentWidth-d.getCurrentPaddingRight(),o=g[1]+15),c<s&&(r-=s-c+20),o+i>d.currentHeight&&(o-=i+30)),o<0&&(o=0),{top:o,left:r}},p.showTooltip=function(t,e){var i,n,a,r=this,s=r.config,o=r.hasArcType(),c=t.filter(function(t){return t&&P(t.value)}),d=s.tooltip_position||p.tooltipPosition;0!==c.length&&s.tooltip_show&&(r.tooltip.html(s.tooltip_contents.call(r,t,r.axis.getXAxisTickFormat(),r.getYFormat(o),r.color)).style(\"display\",\"block\"),i=r.tooltip.property(\"offsetWidth\"),n=r.tooltip.property(\"offsetHeight\"),a=d.call(this,c,i,n,e),r.tooltip.style(\"top\",a.top+\"px\").style(\"left\",a.left+\"px\"))},p.hideTooltip=function(){this.tooltip.style(\"display\",\"none\")},p.setTargetType=function(t,e){var i=this,n=i.config;i.mapToTargetIds(t).forEach(function(t){i.withoutFadeIn[t]=e===n.data_types[t],n.data_types[t]=e}),t||(n.data_type=e)},p.hasType=function(i,t){var n=this.config.data_types,a=!1;return(t=t||this.data.targets)&&t.length?t.forEach(function(t){var e=n[t.id];(e&&0<=e.indexOf(i)||!e&&\"line\"===i)&&(a=!0)}):Object.keys(n).length?Object.keys(n).forEach(function(t){n[t]===i&&(a=!0)}):a=this.config.data_type===i,a},p.hasArcType=function(t){return this.hasType(\"pie\",t)||this.hasType(\"donut\",t)||this.hasType(\"gauge\",t)},p.isLineType=function(t){var e=this.config,i=c(t)?t:t.id;return!e.data_types[i]||0<=[\"line\",\"spline\",\"area\",\"area-spline\",\"step\",\"area-step\"].indexOf(e.data_types[i])},p.isStepType=function(t){var e=c(t)?t:t.id;return 0<=[\"step\",\"area-step\"].indexOf(this.config.data_types[e])},p.isSplineType=function(t){var e=c(t)?t:t.id;return 0<=[\"spline\",\"area-spline\"].indexOf(this.config.data_types[e])},p.isAreaType=function(t){var e=c(t)?t:t.id;return 0<=[\"area\",\"area-spline\",\"area-step\"].indexOf(this.config.data_types[e])},p.isBarType=function(t){var e=c(t)?t:t.id;return\"bar\"===this.config.data_types[e]},p.isScatterType=function(t){var e=c(t)?t:t.id;return\"scatter\"===this.config.data_types[e]},p.isPieType=function(t){var e=c(t)?t:t.id;return\"pie\"===this.config.data_types[e]},p.isGaugeType=function(t){var e=c(t)?t:t.id;return\"gauge\"===this.config.data_types[e]},p.isDonutType=function(t){var e=c(t)?t:t.id;return\"donut\"===this.config.data_types[e]},p.isArcType=function(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)},p.lineData=function(t){return this.isLineType(t)?[t]:[]},p.arcData=function(t){return this.isArcType(t.data)?[t]:[]},p.barData=function(t){return this.isBarType(t)?t.values:[]},p.lineOrScatterData=function(t){return this.isLineType(t)||this.isScatterType(t)?t.values:[]},p.barOrLineData=function(t){return this.isBarType(t)||this.isLineType(t)?t.values:[]},p.isInterpolationType=function(t){return 0<=[\"linear\",\"linear-closed\",\"basis\",\"basis-open\",\"basis-closed\",\"bundle\",\"cardinal\",\"cardinal-open\",\"cardinal-closed\",\"monotone\"].indexOf(t)},p.isSafari=function(){var t=window.navigator.userAgent;return 0<=t.indexOf(\"Safari\")&&t.indexOf(\"Chrome\")<0},p.isChrome=function(){return 0<=window.navigator.userAgent.indexOf(\"Chrome\")},p.initZoom=function(){var e,i=this,n=i.d3,a=i.config;i.zoom=n.behavior.zoom().on(\"zoomstart\",function(){e=n.event.sourceEvent,i.zoom.altDomain=n.event.sourceEvent.altKey?i.x.orgDomain():null,a.zoom_onzoomstart.call(i.api,n.event.sourceEvent)}).on(\"zoom\",function(){i.redrawForZoom.call(i)}).on(\"zoomend\",function(){var t=n.event.sourceEvent;t&&e.clientX===t.clientX&&e.clientY===t.clientY||(i.redrawEventRect(),i.updateZoom(),a.zoom_onzoomend.call(i.api,i.x.orgDomain()))}),i.zoom.scale=function(t){return a.axis_rotated?this.y(t):this.x(t)},i.zoom.orgScaleExtent=function(){var t=a.zoom_extent?a.zoom_extent:[1,10];return[t[0],Math.max(i.getMaxDataCount()/t[1],t[1])]},i.zoom.updateScaleExtent=function(){var t=D(i.x.orgDomain())/D(i.getZoomDomain()),e=this.orgScaleExtent();return this.scaleExtent([e[0]*t,e[1]*t]),this}},p.getZoomDomain=function(){var t=this.config,e=this.d3;return[e.min([this.orgXDomain[0],t.zoom_x_min]),e.max([this.orgXDomain[1],t.zoom_x_max])]},p.updateZoom=function(){var t=this.config.zoom_enabled?this.zoom:function(){};this.main.select(\".\"+H.zoomRect).call(t).on(\"dblclick.zoom\",null),this.main.selectAll(\".\"+H.eventRect).call(t).on(\"dblclick.zoom\",null)},p.redrawForZoom=function(){var t=this,e=t.d3,i=t.config,n=t.zoom,a=t.x;if(i.zoom_enabled&&0!==t.filterTargetsToShow(t.data.targets).length){if(\"mousemove\"===e.event.sourceEvent.type&&n.altDomain)return a.domain(n.altDomain),void n.scale(a).updateScaleExtent();t.isCategorized()&&a.orgDomain()[0]===t.orgXDomain[0]&&a.domain([t.orgXDomain[0]-1e-10,a.orgDomain()[1]]),t.redraw({withTransition:!1,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),\"mousemove\"===e.event.sourceEvent.type&&(t.cancelClick=!0),i.zoom_onzoom.call(t.api,a.orgDomain())}},x});","// https://d3js.org v7.9.0 Copyright 2010-2023 Mike Bostock\n!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?n(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],n):n((t=\"undefined\"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){\"use strict\";function n(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function e(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function r(t){let r,o,a;function u(t,n,e=0,i=t.length){if(e<i){if(0!==r(n,n))return i;do{const r=e+i>>>1;o(t[r],n)<0?e=r+1:i=r}while(e<i)}return e}return 2!==t.length?(r=n,o=(e,r)=>n(t(e),r),a=(n,e)=>t(n)-e):(r=t===n||t===e?t:i,o=t,a=t),{left:u,center:function(t,n,e=0,r=t.length){const i=u(t,n,e,r-1);return i>e&&a(t[i-1],n)>-a(t[i],n)?i-1:i},right:function(t,n,e=0,i=t.length){if(e<i){if(0!==r(n,n))return i;do{const r=e+i>>>1;o(t[r],n)<=0?e=r+1:i=r}while(e<i)}return e}}}function i(){return 0}function o(t){return null===t?NaN:+t}const a=r(n),u=a.right,c=a.left,f=r(o).center;var s=u;const l=d(y),h=d((function(t){const n=y(t);return(t,e,r,i,o)=>{n(t,e,(r<<=2)+0,(i<<=2)+0,o<<=2),n(t,e,r+1,i+1,o),n(t,e,r+2,i+2,o),n(t,e,r+3,i+3,o)}}));function d(t){return function(n,e,r=e){if(!((e=+e)>=0))throw new RangeError(\"invalid rx\");if(!((r=+r)>=0))throw new RangeError(\"invalid ry\");let{data:i,width:o,height:a}=n;if(!((o=Math.floor(o))>=0))throw new RangeError(\"invalid width\");if(!((a=Math.floor(void 0!==a?a:i.length/o))>=0))throw new RangeError(\"invalid height\");if(!o||!a||!e&&!r)return n;const u=e&&t(e),c=r&&t(r),f=i.slice();return u&&c?(p(u,f,i,o,a),p(u,i,f,o,a),p(u,f,i,o,a),g(c,i,f,o,a),g(c,f,i,o,a),g(c,i,f,o,a)):u?(p(u,i,f,o,a),p(u,f,i,o,a),p(u,i,f,o,a)):c&&(g(c,i,f,o,a),g(c,f,i,o,a),g(c,i,f,o,a)),n}}function p(t,n,e,r,i){for(let o=0,a=r*i;o<a;)t(n,e,o,o+=r,1)}function g(t,n,e,r,i){for(let o=0,a=r*i;o<r;++o)t(n,e,o,o+a,r)}function y(t){const n=Math.floor(t);if(n===t)return function(t){const n=2*t+1;return(e,r,i,o,a)=>{if(!((o-=a)>=i))return;let u=t*r[i];const c=a*t;for(let t=i,n=i+c;t<n;t+=a)u+=r[Math.min(o,t)];for(let t=i,f=o;t<=f;t+=a)u+=r[Math.min(o,t+c)],e[t]=u/n,u-=r[Math.max(i,t-c)]}}(t);const e=t-n,r=2*t+1;return(t,i,o,a,u)=>{if(!((a-=u)>=o))return;let c=n*i[o];const f=u*n,s=f+u;for(let t=o,n=o+f;t<n;t+=u)c+=i[Math.min(a,t)];for(let n=o,l=a;n<=l;n+=u)c+=i[Math.min(a,n+f)],t[n]=(c+e*(i[Math.max(o,n-s)]+i[Math.min(a,n+s)]))/r,c-=i[Math.max(o,n-f)]}}function v(t,n){let e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function _(t){return 0|t.length}function b(t){return!(t>0)}function m(t){return\"object\"!=typeof t||\"length\"in t?t:Array.from(t)}function x(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function w(t,n){const e=x(t,n);return e?Math.sqrt(e):e}function M(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r<n&&(r=n)));else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(void 0===e?o>=o&&(e=r=o):(e>o&&(e=o),r<o&&(r=o)))}return[e,r]}class T{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let e=0;for(let r=0;r<this._n&&r<32;r++){const i=n[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(n[e++]=a),t=o}return n[e]=t,this._n=e+1,this}valueOf(){const t=this._partials;let n,e,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}class InternMap extends Map{constructor(t,n=N){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[n,e]of t)this.set(n,e)}get(t){return super.get(A(this,t))}has(t){return super.has(A(this,t))}set(t,n){return super.set(S(this,t),n)}delete(t){return super.delete(E(this,t))}}class InternSet extends Set{constructor(t,n=N){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const n of t)this.add(n)}has(t){return super.has(A(this,t))}add(t){return super.add(S(this,t))}delete(t){return super.delete(E(this,t))}}function A({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):e}function S({_intern:t,_key:n},e){const r=n(e);return t.has(r)?t.get(r):(t.set(r,e),e)}function E({_intern:t,_key:n},e){const r=n(e);return t.has(r)&&(e=t.get(r),t.delete(r)),e}function N(t){return null!==t&&\"object\"==typeof t?t.valueOf():t}function k(t){return t}function C(t,...n){return F(t,k,k,n)}function P(t,...n){return F(t,Array.from,k,n)}function z(t,n){for(let e=1,r=n.length;e<r;++e)t=t.flatMap((t=>t.pop().map((([n,e])=>[...t,n,e]))));return t}function $(t,n,...e){return F(t,k,n,e)}function D(t,n,...e){return F(t,Array.from,n,e)}function R(t){if(1!==t.length)throw new Error(\"duplicate key\");return t[0]}function F(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new InternMap,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}function q(t,n){return Array.from(n,(n=>t[n]))}function U(t,...n){if(\"function\"!=typeof t[Symbol.iterator])throw new TypeError(\"values is not iterable\");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));return n.length>1?(n=n.map((n=>t.map(n))),r.sort(((t,e)=>{for(const r of n){const n=O(r[t],r[e]);if(n)return n}}))):(e=t.map(e),r.sort(((t,n)=>O(e[t],e[n])))),q(t,r)}return t.sort(I(e))}function I(t=n){if(t===n)return O;if(\"function\"!=typeof t)throw new TypeError(\"compare is not a function\");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function O(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}var B=Array.prototype.slice;function Y(t){return()=>t}const L=Math.sqrt(50),j=Math.sqrt(10),H=Math.sqrt(2);function X(t,n,e){const r=(n-t)/Math.max(0,e),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=L?10:o>=j?5:o>=H?2:1;let u,c,f;return i<0?(f=Math.pow(10,-i)/a,u=Math.round(t*f),c=Math.round(n*f),u/f<t&&++u,c/f>n&&--c,f=-f):(f=Math.pow(10,i)*a,u=Math.round(t/f),c=Math.round(n/f),u*f<t&&++u,c*f>n&&--c),c<u&&.5<=e&&e<2?X(t,n,2*e):[u,c,f]}function G(t,n,e){if(!((e=+e)>0))return[];if((t=+t)===(n=+n))return[t];const r=n<t,[i,o,a]=r?X(n,t,e):X(t,n,e);if(!(o>=i))return[];const u=o-i+1,c=new Array(u);if(r)if(a<0)for(let t=0;t<u;++t)c[t]=(o-t)/-a;else for(let t=0;t<u;++t)c[t]=(o-t)*a;else if(a<0)for(let t=0;t<u;++t)c[t]=(i+t)/-a;else for(let t=0;t<u;++t)c[t]=(i+t)*a;return c}function V(t,n,e){return X(t=+t,n=+n,e=+e)[2]}function W(t,n,e){e=+e;const r=(n=+n)<(t=+t),i=r?V(n,t,e):V(t,n,e);return(r?-1:1)*(i<0?1/-i:i)}function Z(t,n,e){let r;for(;;){const i=V(t,n,e);if(i===r||0===i||!isFinite(i))return[t,n];i>0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function K(t){return Math.max(1,Math.ceil(Math.log(v(t))/Math.LN2)+1)}function Q(){var t=k,n=M,e=K;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a,u=r.length,c=new Array(u);for(i=0;i<u;++i)c[i]=t(r[i],i,r);var f=n(c),l=f[0],h=f[1],d=e(c,l,h);if(!Array.isArray(d)){const t=h,e=+d;if(n===M&&([l,h]=Z(l,h,e)),(d=G(l,h,e))[0]<=l&&(a=V(l,h,e)),d[d.length-1]>=h)if(t>=h&&n===M){const t=V(l,h,e);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else d.pop()}for(var p=d.length,g=0,y=p;d[g]<=l;)++g;for(;d[y-1]>h;)--y;(g||y<p)&&(d=d.slice(g,y),p=y-g);var v,_=new Array(p+1);for(i=0;i<=p;++i)(v=_[i]=[]).x0=i>0?d[i-1]:l,v.x1=i<p?d[i]:h;if(isFinite(a)){if(a>0)for(i=0;i<u;++i)null!=(o=c[i])&&l<=o&&o<=h&&_[Math.min(p,Math.floor((o-l)/a))].push(r[i]);else if(a<0)for(i=0;i<u;++i)if(null!=(o=c[i])&&l<=o&&o<=h){const t=Math.floor((l-o)*a);_[Math.min(p,t+(d[t]<=o))].push(r[i])}}else for(i=0;i<u;++i)null!=(o=c[i])&&l<=o&&o<=h&&_[s(d,o,0,p)].push(r[i]);return _}return r.value=function(n){return arguments.length?(t=\"function\"==typeof n?n:Y(n),r):t},r.domain=function(t){return arguments.length?(n=\"function\"==typeof t?t:Y([t[0],t[1]]),r):n},r.thresholds=function(t){return arguments.length?(e=\"function\"==typeof t?t:Y(Array.isArray(t)?B.call(t):t),r):e},r}function J(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e<i||void 0===e&&i>=i)&&(e=i)}return e}function tt(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e<n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e<o||void 0===e&&o>=o)&&(e=o,r=i);return r}function nt(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}function et(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e>n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e>o||void 0===e&&o>=o)&&(e=o,r=i);return r}function rt(t,n,e=0,r=1/0,i){if(n=Math.floor(n),e=Math.floor(Math.max(0,e)),r=Math.floor(Math.min(t.length-1,r)),!(e<=n&&n<=r))return t;for(i=void 0===i?O:I(i);r>e;){if(r-e>600){const o=r-e+1,a=n-e+1,u=Math.log(o),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(o-c)/o)*(a-o/2<0?-1:1);rt(t,n,Math.max(e,Math.floor(n-a*c/o+f)),Math.min(r,Math.floor(n+(o-a)*c/o+f)),i)}const o=t[n];let a=e,u=r;for(it(t,e,n),i(t[r],o)>0&&it(t,e,r);a<u;){for(it(t,a,u),++a,--u;i(t[a],o)<0;)++a;for(;i(t[u],o)>0;)--u}0===i(t[e],o)?it(t,e,u):(++u,it(t,u,r)),u<=n&&(e=u+1),n<=u&&(r=u-1)}return t}function it(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function ot(t,e=n){let r,i=!1;if(1===e.length){let o;for(const a of t){const t=e(a);(i?n(t,o)>0:0===n(t,t))&&(r=a,o=t,i=!0)}}else for(const n of t)(i?e(n,r)>0:0===e(n,n))&&(r=n,i=!0);return r}function at(t,n,e){if(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(r=+r)>=r&&(yield r)}}(t,e)),(r=t.length)&&!isNaN(n=+n)){if(n<=0||r<2)return nt(t);if(n>=1)return J(t);var r,i=(r-1)*n,o=Math.floor(i),a=J(rt(t,o).subarray(0,o+1));return a+(nt(t.subarray(o+1))-a)*(i-o)}}function ut(t,n,e=o){if((r=t.length)&&!isNaN(n=+n)){if(n<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,a=Math.floor(i),u=+e(t[a],a,t);return u+(+e(t[a+1],a+1,t)-u)*(i-a)}}function ct(t,n,e=o){if(!isNaN(n=+n)){if(r=Float64Array.from(t,((n,r)=>o(e(t[r],r,t)))),n<=0)return et(r);if(n>=1)return tt(r);var r,i=Uint32Array.from(t,((t,n)=>n)),a=r.length-1,u=Math.floor(a*n);return rt(i,u,0,a,((t,n)=>O(r[t],r[n]))),(u=ot(i.subarray(0,u+1),(t=>r[t])))>=0?u:-1}}function ft(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}function st(t,n){return[t,n]}function lt(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o}function ht(t,e=n){if(1===e.length)return et(t,e);let r,i=-1,o=-1;for(const n of t)++o,(i<0?0===e(n,n):e(n,r)<0)&&(r=n,i=o);return i}var dt=pt(Math.random);function pt(t){return function(n,e=0,r=n.length){let i=r-(e=+e);for(;i;){const r=t()*i--|0,o=n[i+e];n[i+e]=n[r+e],n[r+e]=o}return n}}function gt(t){if(!(i=t.length))return[];for(var n=-1,e=nt(t,yt),r=new Array(e);++n<e;)for(var i,o=-1,a=r[n]=new Array(i);++o<i;)a[o]=t[o][n];return r}function yt(t){return t.length}function vt(t){return t instanceof InternSet?t:new InternSet(t)}function _t(t,n){const e=t[Symbol.iterator](),r=new Set;for(const t of n){const n=bt(t);if(r.has(n))continue;let i,o;for(;({value:i,done:o}=e.next());){if(o)return!1;const t=bt(i);if(r.add(t),Object.is(n,t))break}}return!0}function bt(t){return null!==t&&\"object\"==typeof t?t.valueOf():t}function mt(t){return t}var xt=1,wt=2,Mt=3,Tt=4,At=1e-6;function St(t){return\"translate(\"+t+\",0)\"}function Et(t){return\"translate(0,\"+t+\")\"}function Nt(t){return n=>+t(n)}function kt(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function Ct(){return!this.__axis}function Pt(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,c=\"undefined\"!=typeof window&&window.devicePixelRatio>1?0:.5,f=t===xt||t===Tt?-1:1,s=t===Tt||t===wt?\"x\":\"y\",l=t===xt||t===Mt?St:Et;function h(h){var d=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,p=null==i?n.tickFormat?n.tickFormat.apply(n,e):mt:i,g=Math.max(o,0)+u,y=n.range(),v=+y[0]+c,_=+y[y.length-1]+c,b=(n.bandwidth?kt:Nt)(n.copy(),c),m=h.selection?h.selection():h,x=m.selectAll(\".domain\").data([null]),w=m.selectAll(\".tick\").data(d,n).order(),M=w.exit(),T=w.enter().append(\"g\").attr(\"class\",\"tick\"),A=w.select(\"line\"),S=w.select(\"text\");x=x.merge(x.enter().insert(\"path\",\".tick\").attr(\"class\",\"domain\").attr(\"stroke\",\"currentColor\")),w=w.merge(T),A=A.merge(T.append(\"line\").attr(\"stroke\",\"currentColor\").attr(s+\"2\",f*o)),S=S.merge(T.append(\"text\").attr(\"fill\",\"currentColor\").attr(s,f*g).attr(\"dy\",t===xt?\"0em\":t===Mt?\"0.71em\":\"0.32em\")),h!==m&&(x=x.transition(h),w=w.transition(h),A=A.transition(h),S=S.transition(h),M=M.transition(h).attr(\"opacity\",At).attr(\"transform\",(function(t){return isFinite(t=b(t))?l(t+c):this.getAttribute(\"transform\")})),T.attr(\"opacity\",At).attr(\"transform\",(function(t){var n=this.parentNode.__axis;return l((n&&isFinite(n=n(t))?n:b(t))+c)}))),M.remove(),x.attr(\"d\",t===Tt||t===wt?a?\"M\"+f*a+\",\"+v+\"H\"+c+\"V\"+_+\"H\"+f*a:\"M\"+c+\",\"+v+\"V\"+_:a?\"M\"+v+\",\"+f*a+\"V\"+c+\"H\"+_+\"V\"+f*a:\"M\"+v+\",\"+c+\"H\"+_),w.attr(\"opacity\",1).attr(\"transform\",(function(t){return l(b(t)+c)})),A.attr(s+\"2\",f*o),S.attr(s,f*g).text(p),m.filter(Ct).attr(\"fill\",\"none\").attr(\"font-size\",10).attr(\"font-family\",\"sans-serif\").attr(\"text-anchor\",t===wt?\"start\":t===Tt?\"end\":\"middle\"),m.each((function(){this.__axis=b}))}return h.scale=function(t){return arguments.length?(n=t,h):n},h.ticks=function(){return e=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),h):e.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(u=+t,h):u},h.offset=function(t){return arguments.length?(c=+t,h):c},h}var zt={value:()=>{}};function $t(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+\"\")||t in r||/[\\s.]/.test(t))throw new Error(\"illegal type: \"+t);r[t]=[]}return new Dt(r)}function Dt(t){this._=t}function Rt(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function Ft(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=zt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}Dt.prototype=$t.prototype={constructor:Dt,on:function(t,n){var e,r,i=this._,o=(r=i,(t+\"\").trim().split(/^|\\s+/).map((function(t){var n=\"\",e=t.indexOf(\".\");if(e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);return{type:t,name:n}}))),a=-1,u=o.length;if(!(arguments.length<2)){if(null!=n&&\"function\"!=typeof n)throw new Error(\"invalid callback: \"+n);for(;++a<u;)if(e=(t=o[a]).type)i[e]=Ft(i[e],t.name,n);else if(null==n)for(e in i)i[e]=Ft(i[e],t.name,null);return this}for(;++a<u;)if((e=(t=o[a]).type)&&(e=Rt(i[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new Dt(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error(\"unknown type: \"+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var qt=\"http://www.w3.org/1999/xhtml\",Ut={svg:\"http://www.w3.org/2000/svg\",xhtml:qt,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};function It(t){var n=t+=\"\",e=n.indexOf(\":\");return e>=0&&\"xmlns\"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ut.hasOwnProperty(n)?{space:Ut[n],local:t}:t}function Ot(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===qt&&n.documentElement.namespaceURI===qt?n.createElement(t):n.createElementNS(e,t)}}function Bt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Yt(t){var n=It(t);return(n.local?Bt:Ot)(n)}function Lt(){}function jt(t){return null==t?Lt:function(){return this.querySelector(t)}}function Ht(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Xt(){return[]}function Gt(t){return null==t?Xt:function(){return this.querySelectorAll(t)}}function Vt(t){return function(){return this.matches(t)}}function Wt(t){return function(n){return n.matches(t)}}var Zt=Array.prototype.find;function Kt(){return this.firstElementChild}var Qt=Array.prototype.filter;function Jt(){return Array.from(this.children)}function tn(t){return new Array(t.length)}function nn(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function en(t,n,e,r,i,o){for(var a,u=0,c=n.length,f=o.length;u<f;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new nn(t,o[u]);for(;u<c;++u)(a=n[u])&&(i[u]=a)}function rn(t,n,e,r,i,o,a){var u,c,f,s=new Map,l=n.length,h=o.length,d=new Array(l);for(u=0;u<l;++u)(c=n[u])&&(d[u]=f=a.call(c,c.__data__,u,n)+\"\",s.has(f)?i[u]=c:s.set(f,c));for(u=0;u<h;++u)f=a.call(t,o[u],u,o)+\"\",(c=s.get(f))?(r[u]=c,c.__data__=o[u],s.delete(f)):e[u]=new nn(t,o[u]);for(u=0;u<l;++u)(c=n[u])&&s.get(d[u])===c&&(i[u]=c)}function on(t){return t.__data__}function an(t){return\"object\"==typeof t&&\"length\"in t?t:Array.from(t)}function un(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function cn(t){return function(){this.removeAttribute(t)}}function fn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function sn(t,n){return function(){this.setAttribute(t,n)}}function ln(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function hn(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function dn(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function pn(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function gn(t){return function(){this.style.removeProperty(t)}}function yn(t,n,e){return function(){this.style.setProperty(t,n,e)}}function vn(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function _n(t,n){return t.style.getPropertyValue(n)||pn(t).getComputedStyle(t,null).getPropertyValue(n)}function bn(t){return function(){delete this[t]}}function mn(t,n){return function(){this[t]=n}}function xn(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function wn(t){return t.trim().split(/^|\\s+/)}function Mn(t){return t.classList||new Tn(t)}function Tn(t){this._node=t,this._names=wn(t.getAttribute(\"class\")||\"\")}function An(t,n){for(var e=Mn(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function Sn(t,n){for(var e=Mn(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function En(t){return function(){An(this,t)}}function Nn(t){return function(){Sn(this,t)}}function kn(t,n){return function(){(n.apply(this,arguments)?An:Sn)(this,t)}}function Cn(){this.textContent=\"\"}function Pn(t){return function(){this.textContent=t}}function zn(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?\"\":n}}function $n(){this.innerHTML=\"\"}function Dn(t){return function(){this.innerHTML=t}}function Rn(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?\"\":n}}function Fn(){this.nextSibling&&this.parentNode.appendChild(this)}function qn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Un(){return null}function In(){var t=this.parentNode;t&&t.removeChild(this)}function On(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Bn(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Yn(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function Ln(t,n,e){return function(){var r,i=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(i)for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),void(r.value=n);this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function jn(t,n,e){var r=pn(t),i=r.CustomEvent;\"function\"==typeof i?i=new i(n,e):(i=r.document.createEvent(\"Event\"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Hn(t,n){return function(){return jn(this,t,n)}}function Xn(t,n){return function(){return jn(this,t,n.apply(this,arguments))}}nn.prototype={constructor:nn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Tn.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute(\"class\",this._names.join(\" \")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute(\"class\",this._names.join(\" \")))},contains:function(t){return this._names.indexOf(t)>=0}};var Gn=[null];function Vn(t,n){this._groups=t,this._parents=n}function Wn(){return new Vn([[document.documentElement]],Gn)}function Zn(t){return\"string\"==typeof t?new Vn([[document.querySelector(t)]],[document.documentElement]):new Vn([[t]],Gn)}Vn.prototype=Wn.prototype={constructor:Vn,select:function(t){\"function\"!=typeof t&&(t=jt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,u=n[i],c=u.length,f=r[i]=new Array(c),s=0;s<c;++s)(o=u[s])&&(a=t.call(o,o.__data__,s,u))&&(\"__data__\"in o&&(a.__data__=o.__data__),f[s]=a);return new Vn(r,this._parents)},selectAll:function(t){t=\"function\"==typeof t?function(t){return function(){return Ht(t.apply(this,arguments))}}(t):Gt(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],c=u.length,f=0;f<c;++f)(a=u[f])&&(r.push(t.call(a,a.__data__,f,u)),i.push(a));return new Vn(r,i)},selectChild:function(t){return this.select(null==t?Kt:function(t){return function(){return Zt.call(this.children,t)}}(\"function\"==typeof t?t:Wt(t)))},selectChildren:function(t){return this.selectAll(null==t?Jt:function(t){return function(){return Qt.call(this.children,t)}}(\"function\"==typeof t?t:Wt(t)))},filter:function(t){\"function\"!=typeof t&&(t=Vt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,c=r[i]=[],f=0;f<u;++f)(o=a[f])&&t.call(o,o.__data__,f,a)&&c.push(o);return new Vn(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,on);var e=n?rn:en,r=this._parents,i=this._groups;\"function\"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),f=0;f<o;++f){var s=r[f],l=i[f],h=l.length,d=an(t.call(s,s&&s.__data__,f,r)),p=d.length,g=u[f]=new Array(p),y=a[f]=new Array(p);e(s,l,g,y,c[f]=new Array(h),d,n);for(var v,_,b=0,m=0;b<p;++b)if(v=g[b]){for(b>=m&&(m=b+1);!(_=y[m])&&++m<p;);v._next=_||null}}return(a=new Vn(a,r))._enter=u,a._exit=c,a},enter:function(){return new Vn(this._enter||this._groups.map(tn),this._parents)},exit:function(){return new Vn(this._exit||this._groups.map(tn),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return\"function\"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+\"\"),null!=n&&(i=n(i))&&(i=i.selection()),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,a=Math.min(i,o),u=new Array(i),c=0;c<a;++c)for(var f,s=e[c],l=r[c],h=s.length,d=u[c]=new Array(h),p=0;p<h;++p)(f=s[p]||l[p])&&(d[p]=f);for(;c<i;++c)u[c]=e[c];return new Vn(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=un);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],c=u.length,f=i[o]=new Array(c),s=0;s<c;++s)(a=u[s])&&(f[s]=a);f.sort(n)}return new Vn(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=It(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?fn:cn:\"function\"==typeof n?e.local?dn:hn:e.local?ln:sn)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?gn:\"function\"==typeof n?vn:yn)(t,n,null==e?\"\":e)):_n(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?bn:\"function\"==typeof n?xn:mn)(t,n)):this.node()[t]},classed:function(t,n){var e=wn(t+\"\");if(arguments.length<2){for(var r=Mn(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((\"function\"==typeof n?kn:n?En:Nn)(e,n))},text:function(t){return arguments.length?this.each(null==t?Cn:(\"function\"==typeof t?zn:Pn)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?$n:(\"function\"==typeof t?Rn:Dn)(t)):this.node().innerHTML},raise:function(){return this.each(Fn)},lower:function(){return this.each(qn)},append:function(t){var n=\"function\"==typeof t?t:Yt(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e=\"function\"==typeof t?t:Yt(t),r=null==n?Un:\"function\"==typeof n?n:jt(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(In)},clone:function(t){return this.select(t?Bn:On)},datum:function(t){return arguments.length?this.property(\"__data__\",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\\s+/).map((function(t){var n=\"\",e=t.indexOf(\".\");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+\"\"),a=o.length;if(!(arguments.length<2)){for(u=n?Ln:Yn,r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var c,f=0,s=u.length;f<s;++f)for(r=0,c=u[f];r<a;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,n){return this.each((\"function\"==typeof n?Xn:Hn)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Kn=0;function Qn(){return new Jn}function Jn(){this._=\"@\"+(++Kn).toString(36)}function te(t){let n;for(;n=t.sourceEvent;)t=n;return t}function ne(t,n){if(t=te(t),void 0===n&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(n.getScreenCTM().inverse())).x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}Jn.prototype=Qn.prototype={constructor:Jn,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const ee={passive:!1},re={capture:!0,passive:!1};function ie(t){t.stopImmediatePropagation()}function oe(t){t.preventDefault(),t.stopImmediatePropagation()}function ae(t){var n=t.document.documentElement,e=Zn(t).on(\"dragstart.drag\",oe,re);\"onselectstart\"in n?e.on(\"selectstart.drag\",oe,re):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect=\"none\")}function ue(t,n){var e=t.document.documentElement,r=Zn(t).on(\"dragstart.drag\",null);n&&(r.on(\"click.drag\",oe,re),setTimeout((function(){r.on(\"click.drag\",null)}),0)),\"onselectstart\"in e?r.on(\"selectstart.drag\",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var ce=t=>()=>t;function fe(t,{sourceEvent:n,subject:e,target:r,identifier:i,active:o,x:a,y:u,dx:c,dy:f,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:s}})}function se(t){return!t.ctrlKey&&!t.button}function le(){return this.parentNode}function he(t,n){return null==n?{x:t.x,y:t.y}:n}function de(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function pe(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function ge(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function ye(){}fe.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ve=.7,_e=1/ve,be=\"\\\\s*([+-]?\\\\d+)\\\\s*\",me=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",xe=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",we=/^#([0-9a-f]{3,8})$/,Me=new RegExp(`^rgb\\\\(${be},${be},${be}\\\\)$`),Te=new RegExp(`^rgb\\\\(${xe},${xe},${xe}\\\\)$`),Ae=new RegExp(`^rgba\\\\(${be},${be},${be},${me}\\\\)$`),Se=new RegExp(`^rgba\\\\(${xe},${xe},${xe},${me}\\\\)$`),Ee=new RegExp(`^hsl\\\\(${me},${xe},${xe}\\\\)$`),Ne=new RegExp(`^hsla\\\\(${me},${xe},${xe},${me}\\\\)$`),ke={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ce(){return this.rgb().formatHex()}function Pe(){return this.rgb().formatRgb()}function ze(t){var n,e;return t=(t+\"\").trim().toLowerCase(),(n=we.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?$e(n):3===e?new qe(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?De(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?De(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Me.exec(t))?new qe(n[1],n[2],n[3],1):(n=Te.exec(t))?new qe(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Ae.exec(t))?De(n[1],n[2],n[3],n[4]):(n=Se.exec(t))?De(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Ee.exec(t))?Le(n[1],n[2]/100,n[3]/100,1):(n=Ne.exec(t))?Le(n[1],n[2]/100,n[3]/100,n[4]):ke.hasOwnProperty(t)?$e(ke[t]):\"transparent\"===t?new qe(NaN,NaN,NaN,0):null}function $e(t){return new qe(t>>16&255,t>>8&255,255&t,1)}function De(t,n,e,r){return r<=0&&(t=n=e=NaN),new qe(t,n,e,r)}function Re(t){return t instanceof ye||(t=ze(t)),t?new qe((t=t.rgb()).r,t.g,t.b,t.opacity):new qe}function Fe(t,n,e,r){return 1===arguments.length?Re(t):new qe(t,n,e,null==r?1:r)}function qe(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Ue(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}`}function Ie(){const t=Oe(this.opacity);return`${1===t?\"rgb(\":\"rgba(\"}${Be(this.r)}, ${Be(this.g)}, ${Be(this.b)}${1===t?\")\":`, ${t})`}`}function Oe(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Be(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ye(t){return((t=Be(t))<16?\"0\":\"\")+t.toString(16)}function Le(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Xe(t,n,e,r)}function je(t){if(t instanceof Xe)return new Xe(t.h,t.s,t.l,t.opacity);if(t instanceof ye||(t=ze(t)),!t)return new Xe;if(t instanceof Xe)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new Xe(a,u,c,t.opacity)}function He(t,n,e,r){return 1===arguments.length?je(t):new Xe(t,n,e,null==r?1:r)}function Xe(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Ge(t){return(t=(t||0)%360)<0?t+360:t}function Ve(t){return Math.max(0,Math.min(1,t||0))}function We(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}pe(ye,ze,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ce,formatHex:Ce,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return je(this).formatHsl()},formatRgb:Pe,toString:Pe}),pe(qe,Fe,ge(ye,{brighter(t){return t=null==t?_e:Math.pow(_e,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new qe(Be(this.r),Be(this.g),Be(this.b),Oe(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ue,formatHex:Ue,formatHex8:function(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}${Ye(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ie,toString:Ie})),pe(Xe,He,ge(ye,{brighter(t){return t=null==t?_e:Math.pow(_e,t),new Xe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new Xe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new qe(We(t>=240?t-240:t+120,i,r),We(t,i,r),We(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Xe(Ge(this.h),Ve(this.s),Ve(this.l),Oe(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Oe(this.opacity);return`${1===t?\"hsl(\":\"hsla(\"}${Ge(this.h)}, ${100*Ve(this.s)}%, ${100*Ve(this.l)}%${1===t?\")\":`, ${t})`}`}}));const Ze=Math.PI/180,Ke=180/Math.PI,Qe=.96422,Je=1,tr=.82521,nr=4/29,er=6/29,rr=3*er*er,ir=er*er*er;function or(t){if(t instanceof ur)return new ur(t.l,t.a,t.b,t.opacity);if(t instanceof pr)return gr(t);t instanceof qe||(t=Re(t));var n,e,r=lr(t.r),i=lr(t.g),o=lr(t.b),a=cr((.2225045*r+.7168786*i+.0606169*o)/Je);return r===i&&i===o?n=e=a:(n=cr((.4360747*r+.3850649*i+.1430804*o)/Qe),e=cr((.0139322*r+.0971045*i+.7141733*o)/tr)),new ur(116*a-16,500*(n-a),200*(a-e),t.opacity)}function ar(t,n,e,r){return 1===arguments.length?or(t):new ur(t,n,e,null==r?1:r)}function ur(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function cr(t){return t>ir?Math.pow(t,1/3):t/rr+nr}function fr(t){return t>er?t*t*t:rr*(t-nr)}function sr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function lr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function hr(t){if(t instanceof pr)return new pr(t.h,t.c,t.l,t.opacity);if(t instanceof ur||(t=or(t)),0===t.a&&0===t.b)return new pr(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*Ke;return new pr(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function dr(t,n,e,r){return 1===arguments.length?hr(t):new pr(t,n,e,null==r?1:r)}function pr(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function gr(t){if(isNaN(t.h))return new ur(t.l,0,0,t.opacity);var n=t.h*Ze;return new ur(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}pe(ur,ar,ge(ye,{brighter(t){return new ur(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new ur(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new qe(sr(3.1338561*(n=Qe*fr(n))-1.6168667*(t=Je*fr(t))-.4906146*(e=tr*fr(e))),sr(-.9787684*n+1.9161415*t+.033454*e),sr(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),pe(pr,dr,ge(ye,{brighter(t){return new pr(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new pr(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return gr(this).rgb()}}));var yr=-.14861,vr=1.78277,_r=-.29227,br=-.90649,mr=1.97294,xr=mr*br,wr=mr*vr,Mr=vr*_r-br*yr;function Tr(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Ar)return new Ar(t.h,t.s,t.l,t.opacity);t instanceof qe||(t=Re(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Mr*r+xr*n-wr*e)/(Mr+xr-wr),o=r-i,a=(mr*(e-i)-_r*o)/br,u=Math.sqrt(a*a+o*o)/(mr*i*(1-i)),c=u?Math.atan2(a,o)*Ke-120:NaN;return new Ar(c<0?c+360:c,u,i,t.opacity)}(t):new Ar(t,n,e,null==r?1:r)}function Ar(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Sr(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function Er(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return Sr((e-r/n)*n,a,i,o,u)}}function Nr(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return Sr((e-r/n)*n,i,o,a,u)}}pe(Ar,Tr,ge(ye,{brighter(t){return t=null==t?_e:Math.pow(_e,t),new Ar(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new Ar(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Ze,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new qe(255*(n+e*(yr*r+vr*i)),255*(n+e*(_r*r+br*i)),255*(n+e*(mr*r)),this.opacity)}}));var kr=t=>()=>t;function Cr(t,n){return function(e){return t+e*n}}function Pr(t,n){var e=n-t;return e?Cr(t,e>180||e<-180?e-360*Math.round(e/360):e):kr(isNaN(t)?n:t)}function zr(t){return 1==(t=+t)?$r:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):kr(isNaN(n)?e:n)}}function $r(t,n){var e=n-t;return e?Cr(t,e):kr(isNaN(t)?n:t)}var Dr=function t(n){var e=zr(n);function r(t,n){var r=e((t=Fe(t)).r,(n=Fe(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=$r(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+\"\"}}return r.gamma=t,r}(1);function Rr(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=Fe(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+\"\"}}}var Fr=Rr(Er),qr=Rr(Nr);function Ur(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e<r;++e)i[e]=t[e]*(1-o)+n[e]*o;return i}}function Ir(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Or(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=Gr(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}function Br(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function Yr(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function Lr(t,n){var e,r={},i={};for(e in null!==t&&\"object\"==typeof t||(t={}),null!==n&&\"object\"==typeof n||(n={}),n)e in t?r[e]=Gr(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}var jr=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,Hr=new RegExp(jr.source,\"g\");function Xr(t,n){var e,r,i,o=jr.lastIndex=Hr.lastIndex=0,a=-1,u=[],c=[];for(t+=\"\",n+=\"\";(e=jr.exec(t))&&(r=Hr.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:Yr(e,r)})),o=Hr.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?c[0]?function(t){return function(n){return t(n)+\"\"}}(c[0].x):function(t){return function(){return t}}(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)u[(e=c[r]).i]=e.x(t);return u.join(\"\")})}function Gr(t,n){var e,r=typeof n;return null==n||\"boolean\"===r?kr(n):(\"number\"===r?Yr:\"string\"===r?(e=ze(n))?(n=e,Dr):Xr:n instanceof ze?Dr:n instanceof Date?Br:Ir(n)?Ur:Array.isArray(n)?Or:\"function\"!=typeof n.valueOf&&\"function\"!=typeof n.toString||isNaN(n)?Lr:Yr)(t,n)}function Vr(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}var Wr,Zr=180/Math.PI,Kr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Qr(t,n,e,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,c/=u),t*r<n*e&&(t=-t,n=-n,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Zr,skewX:Math.atan(c)*Zr,scaleX:a,scaleY:u}}function Jr(t,n,e,r){function i(t){return t.length?t.pop()+\" \":\"\"}return function(o,a){var u=[],c=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var c=a.push(\"translate(\",null,n,null,e);u.push({i:c-4,x:Yr(t,i)},{i:c-2,x:Yr(r,o)})}else(i||o)&&a.push(\"translate(\"+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,u,c),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+\"rotate(\",null,r)-2,x:Yr(t,n)})):n&&e.push(i(e)+\"rotate(\"+n+r)}(o.rotate,a.rotate,u,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+\"skewX(\",null,r)-2,x:Yr(t,n)}):n&&e.push(i(e)+\"skewX(\"+n+r)}(o.skewX,a.skewX,u,c),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+\"scale(\",null,\",\",null,\")\");a.push({i:u-4,x:Yr(t,e)},{i:u-2,x:Yr(n,r)})}else 1===e&&1===r||o.push(i(o)+\"scale(\"+e+\",\"+r+\")\")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var n,e=-1,r=c.length;++e<r;)u[(n=c[e]).i]=n.x(t);return u.join(\"\")}}}var ti=Jr((function(t){const n=new(\"function\"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+\"\");return n.isIdentity?Kr:Qr(n.a,n.b,n.c,n.d,n.e,n.f)}),\"px, \",\"px)\",\"deg)\"),ni=Jr((function(t){return null==t?Kr:(Wr||(Wr=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\")),Wr.setAttribute(\"transform\",t),(t=Wr.transform.baseVal.consolidate())?Qr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Kr)}),\", \",\")\",\")\");function ei(t){return((t=Math.exp(t))+1/t)/2}var ri=function t(n,e,r){function i(t,i){var o,a,u=t[0],c=t[1],f=t[2],s=i[0],l=i[1],h=i[2],d=s-u,p=l-c,g=d*d+p*p;if(g<1e-12)a=Math.log(h/f)/n,o=function(t){return[u+t*d,c+t*p,f*Math.exp(n*t*a)]};else{var y=Math.sqrt(g),v=(h*h-f*f+r*g)/(2*f*e*y),_=(h*h-f*f-r*g)/(2*h*e*y),b=Math.log(Math.sqrt(v*v+1)-v),m=Math.log(Math.sqrt(_*_+1)-_);a=(m-b)/n,o=function(t){var r=t*a,i=ei(b),o=f/(e*y)*(i*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(n*r+b)-function(t){return((t=Math.exp(t))-1/t)/2}(b));return[u+o*d,c+o*p,f*i/ei(n*r+b)]}}return o.duration=1e3*a*n/Math.SQRT2,o}return i.rho=function(n){var e=Math.max(.001,+n),r=e*e;return t(e,r,r*r)},i}(Math.SQRT2,2,4);function ii(t){return function(n,e){var r=t((n=He(n)).h,(e=He(e)).h),i=$r(n.s,e.s),o=$r(n.l,e.l),a=$r(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=a(t),n+\"\"}}}var oi=ii(Pr),ai=ii($r);function ui(t){return function(n,e){var r=t((n=dr(n)).h,(e=dr(e)).h),i=$r(n.c,e.c),o=$r(n.l,e.l),a=$r(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=a(t),n+\"\"}}}var ci=ui(Pr),fi=ui($r);function si(t){return function n(e){function r(n,r){var i=t((n=Tr(n)).h,(r=Tr(r)).h),o=$r(n.s,r.s),a=$r(n.l,r.l),u=$r(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(Math.pow(t,e)),n.opacity=u(t),n+\"\"}}return e=+e,r.gamma=n,r}(1)}var li=si(Pr),hi=si($r);function di(t,n){void 0===n&&(n=t,t=Gr);for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e<r;)o[e]=t(i,i=n[++e]);return function(t){var n=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[n](t-n)}}var pi,gi,yi=0,vi=0,_i=0,bi=1e3,mi=0,xi=0,wi=0,Mi=\"object\"==typeof performance&&performance.now?performance:Date,Ti=\"object\"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ai(){return xi||(Ti(Si),xi=Mi.now()+wi)}function Si(){xi=0}function Ei(){this._call=this._time=this._next=null}function Ni(t,n,e){var r=new Ei;return r.restart(t,n,e),r}function ki(){Ai(),++yi;for(var t,n=pi;n;)(t=xi-n._time)>=0&&n._call.call(void 0,t),n=n._next;--yi}function Ci(){xi=(mi=Mi.now())+wi,yi=vi=0;try{ki()}finally{yi=0,function(){var t,n,e=pi,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:pi=n);gi=t,zi(r)}(),xi=0}}function Pi(){var t=Mi.now(),n=t-mi;n>bi&&(wi-=n,mi=t)}function zi(t){yi||(vi&&(vi=clearTimeout(vi)),t-xi>24?(t<1/0&&(vi=setTimeout(Ci,t-Mi.now()-wi)),_i&&(_i=clearInterval(_i))):(_i||(mi=Mi.now(),_i=setInterval(Pi,bi)),yi=1,Ti(Ci)))}function $i(t,n,e){var r=new Ei;return n=null==n?0:+n,r.restart((e=>{r.stop(),t(e+n)}),n,e),r}Ei.prototype=Ni.prototype={constructor:Ei,restart:function(t,n,e){if(\"function\"!=typeof t)throw new TypeError(\"callback is not a function\");e=(null==e?Ai():+e)+(null==n?0:+n),this._next||gi===this||(gi?gi._next=this:pi=this,gi=this),this._call=t,this._time=e,zi()},stop:function(){this._call&&(this._call=null,this._time=1/0,zi())}};var Di=$t(\"start\",\"end\",\"cancel\",\"interrupt\"),Ri=[],Fi=0,qi=1,Ui=2,Ii=3,Oi=4,Bi=5,Yi=6;function Li(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(t){e.state=qi,e.timer.restart(a,e.delay,e.time),e.delay<=t&&a(t-e.delay)}function a(o){var f,s,l,h;if(e.state!==qi)return c();for(f in i)if((h=i[f]).name===e.name){if(h.state===Ii)return $i(a);h.state===Oi?(h.state=Yi,h.timer.stop(),h.on.call(\"interrupt\",t,t.__data__,h.index,h.group),delete i[f]):+f<n&&(h.state=Yi,h.timer.stop(),h.on.call(\"cancel\",t,t.__data__,h.index,h.group),delete i[f])}if($i((function(){e.state===Ii&&(e.state=Oi,e.timer.restart(u,e.delay,e.time),u(o))})),e.state=Ui,e.on.call(\"start\",t,t.__data__,e.index,e.group),e.state===Ui){for(e.state=Ii,r=new Array(l=e.tween.length),f=0,s=-1;f<l;++f)(h=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(r[++s]=h);r.length=s+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(c),e.state=Bi,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);e.state===Bi&&(e.on.call(\"end\",t,t.__data__,e.index,e.group),c())}function c(){for(var r in e.state=Yi,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Ni(o,0,e.time)}(t,e,{name:n,index:r,group:i,on:Di,tween:Ri,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Fi})}function ji(t,n){var e=Xi(t,n);if(e.state>Fi)throw new Error(\"too late; already scheduled\");return e}function Hi(t,n){var e=Xi(t,n);if(e.state>Ii)throw new Error(\"too late; already running\");return e}function Xi(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error(\"transition not found\");return e}function Gi(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+\"\",o)(e=o[i]).name===n?(r=e.state>Ui&&e.state<Bi,e.state=Yi,e.timer.stop(),e.on.call(r?\"interrupt\":\"cancel\",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function Vi(t,n){var e,r;return function(){var i=Hi(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}i.tween=r}}function Wi(t,n,e){var r,i;if(\"function\"!=typeof e)throw new Error;return function(){var o=Hi(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},c=0,f=i.length;c<f;++c)if(i[c].name===n){i[c]=u;break}c===f&&i.push(u)}o.tween=i}}function Zi(t,n,e){var r=t._id;return t.each((function(){var t=Hi(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Xi(t,r).value[n]}}function Ki(t,n){var e;return(\"number\"==typeof n?Yr:n instanceof ze?Dr:(e=ze(n))?(n=e,Dr):Xr)(t,n)}function Qi(t){return function(){this.removeAttribute(t)}}function Ji(t){return function(){this.removeAttributeNS(t.space,t.local)}}function to(t,n,e){var r,i,o=e+\"\";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}}function no(t,n,e){var r,i,o=e+\"\";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}function eo(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttribute(t))===(u=c+\"\")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttribute(t)}}function ro(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttributeNS(t.space,t.local))===(u=c+\"\")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttributeNS(t.space,t.local)}}function io(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}(t,i)),e}return i._value=n,i}function oo(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}(t,i)),e}return i._value=n,i}function ao(t,n){return function(){ji(this,t).delay=+n.apply(this,arguments)}}function uo(t,n){return n=+n,function(){ji(this,t).delay=n}}function co(t,n){return function(){Hi(this,t).duration=+n.apply(this,arguments)}}function fo(t,n){return n=+n,function(){Hi(this,t).duration=n}}var so=Wn.prototype.constructor;function lo(t){return function(){this.style.removeProperty(t)}}var ho=0;function po(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function go(t){return Wn().transition(t)}function yo(){return++ho}var vo=Wn.prototype;po.prototype=go.prototype={constructor:po,select:function(t){var n=this._name,e=this._id;\"function\"!=typeof t&&(t=jt(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,c,f=r[a],s=f.length,l=o[a]=new Array(s),h=0;h<s;++h)(u=f[h])&&(c=t.call(u,u.__data__,h,f))&&(\"__data__\"in u&&(c.__data__=u.__data__),l[h]=c,Li(l[h],n,e,h,l,Xi(u,e)));return new po(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;\"function\"!=typeof t&&(t=Gt(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c,f=r[u],s=f.length,l=0;l<s;++l)if(c=f[l]){for(var h,d=t.call(c,c.__data__,l,f),p=Xi(c,e),g=0,y=d.length;g<y;++g)(h=d[g])&&Li(h,n,e,g,d,p);o.push(d),a.push(c)}return new po(o,a,n,e)},selectChild:vo.selectChild,selectChildren:vo.selectChildren,filter:function(t){\"function\"!=typeof t&&(t=Vt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,c=r[i]=[],f=0;f<u;++f)(o=a[f])&&t.call(o,o.__data__,f,a)&&c.push(o);return new po(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c,f=n[u],s=e[u],l=f.length,h=a[u]=new Array(l),d=0;d<l;++d)(c=f[d]||s[d])&&(h[d]=c);for(;u<r;++u)a[u]=n[u];return new po(a,this._parents,this._name,this._id)},selection:function(){return new so(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=yo(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],c=u.length,f=0;f<c;++f)if(a=u[f]){var s=Xi(a,n);Li(a,t,e,f,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new po(r,this._parents,t,e)},call:vo.call,nodes:vo.nodes,node:vo.node,size:vo.size,empty:vo.empty,each:vo.each,on:function(t,n){var e=this._id;return arguments.length<2?Xi(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+\"\").trim().split(/^|\\s+/).every((function(t){var n=t.indexOf(\".\");return n>=0&&(t=t.slice(0,n)),!t||\"start\"===t}))}(n)?ji:Hi;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}(e,t,n))},attr:function(t,n){var e=It(t),r=\"transform\"===e?ni:Ki;return this.attrTween(t,\"function\"==typeof n?(e.local?ro:eo)(e,r,Zi(this,\"attr.\"+t,n)):null==n?(e.local?Ji:Qi)(e):(e.local?no:to)(e,r,n))},attrTween:function(t,n){var e=\"attr.\"+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if(\"function\"!=typeof n)throw new Error;var r=It(t);return this.tween(e,(r.local?io:oo)(r,n))},style:function(t,n,e){var r=\"transform\"==(t+=\"\")?ti:Ki;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=_n(this,t),a=(this.style.removeProperty(t),_n(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on(\"end.style.\"+t,lo(t)):\"function\"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=_n(this,t),u=e(this),c=u+\"\";return null==u&&(this.style.removeProperty(t),c=u=_n(this,t)),a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u))}}(t,r,Zi(this,\"style.\"+t,n))).each(function(t,n){var e,r,i,o,a=\"style.\"+n,u=\"end.\"+a;return function(){var c=Hi(this,t),f=c.on,s=null==c.value[a]?o||(o=lo(n)):void 0;f===e&&i===s||(r=(e=f).copy()).on(u,i=s),c.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+\"\";return function(){var a=_n(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on(\"end.style.\"+t,null)},styleTween:function(t,n,e){var r=\"style.\"+(t+=\"\");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if(\"function\"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?\"\":e))},text:function(t){return this.tween(\"text\",\"function\"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?\"\":n}}(Zi(this,\"text\",t)):function(t){return function(){this.textContent=t}}(null==t?\"\":t+\"\"))},textTween:function(t){var n=\"text\";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if(\"function\"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return r._value=t,r}(t))},remove:function(){return this.on(\"end.remove\",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+=\"\",arguments.length<2){for(var r,i=Xi(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?Vi:Wi)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each((\"function\"==typeof t?ao:uo)(n,t)):Xi(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each((\"function\"==typeof t?co:fo)(n,t)):Xi(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if(\"function\"!=typeof n)throw new Error;return function(){Hi(this,t).ease=n}}(n,t)):Xi(this.node(),n).ease},easeVarying:function(t){if(\"function\"!=typeof t)throw new Error;return this.each(function(t,n){return function(){var e=n.apply(this,arguments);if(\"function\"!=typeof e)throw new Error;Hi(this,t).ease=e}}(this._id,t))},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,a){var u={value:a},c={value:function(){0==--i&&o()}};e.each((function(){var e=Hi(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(c)),e.on=n})),0===i&&o()}))},[Symbol.iterator]:vo[Symbol.iterator]};function _o(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function bo(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var mo=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),xo=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),wo=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Mo=Math.PI,To=Mo/2;function Ao(t){return(1-Math.cos(Mo*t))/2}function So(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Eo(t){return((t*=2)<=1?So(1-t):2-So(t-1))/2}function No(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var ko=4/11,Co=6/11,Po=8/11,zo=3/4,$o=9/11,Do=10/11,Ro=15/16,Fo=21/22,qo=63/64,Uo=1/ko/ko;function Io(t){return(t=+t)<ko?Uo*t*t:t<Po?Uo*(t-=Co)*t+zo:t<Do?Uo*(t-=$o)*t+Ro:Uo*(t-=Fo)*t+qo}var Oo=1.70158,Bo=function t(n){function e(t){return(t=+t)*t*(n*(t-1)+t)}return n=+n,e.overshoot=t,e}(Oo),Yo=function t(n){function e(t){return--t*t*((t+1)*n+t)+1}return n=+n,e.overshoot=t,e}(Oo),Lo=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(Oo),jo=2*Math.PI,Ho=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=jo);function i(t){return n*So(- --t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*jo)},i.period=function(e){return t(n,e)},i}(1,.3),Xo=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=jo);function i(t){return 1-n*So(t=+t)*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*jo)},i.period=function(e){return t(n,e)},i}(1,.3),Go=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=jo);function i(t){return((t=2*t-1)<0?n*So(-t)*Math.sin((r-t)/e):2-n*So(t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*jo)},i.period=function(e){return t(n,e)},i}(1,.3),Vo={time:null,delay:0,duration:250,ease:bo};function Wo(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}Wn.prototype.interrupt=function(t){return this.each((function(){Gi(this,t)}))},Wn.prototype.transition=function(t){var n,e;t instanceof po?(n=t._id,t=t._name):(n=yo(),(e=Vo).time=Ai(),t=null==t?null:t+\"\");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],c=u.length,f=0;f<c;++f)(a=u[f])&&Li(a,t,n,f,u,e||Wo(a,n));return new po(r,this._parents,t,n)};var Zo=[null];var Ko=t=>()=>t;function Qo(t,{sourceEvent:n,target:e,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Jo(t){t.preventDefault(),t.stopImmediatePropagation()}var ta={name:\"drag\"},na={name:\"space\"},ea={name:\"handle\"},ra={name:\"center\"};const{abs:ia,max:oa,min:aa}=Math;function ua(t){return[+t[0],+t[1]]}function ca(t){return[ua(t[0]),ua(t[1])]}var fa={name:\"x\",handles:[\"w\",\"e\"].map(va),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},sa={name:\"y\",handles:[\"n\",\"s\"].map(va),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},la={name:\"xy\",handles:[\"n\",\"w\",\"e\",\"s\",\"nw\",\"ne\",\"sw\",\"se\"].map(va),input:function(t){return null==t?null:ca(t)},output:function(t){return t}},ha={overlay:\"crosshair\",selection:\"move\",n:\"ns-resize\",e:\"ew-resize\",s:\"ns-resize\",w:\"ew-resize\",nw:\"nwse-resize\",ne:\"nesw-resize\",se:\"nwse-resize\",sw:\"nesw-resize\"},da={e:\"w\",w:\"e\",nw:\"ne\",ne:\"nw\",se:\"sw\",sw:\"se\"},pa={n:\"s\",s:\"n\",nw:\"sw\",ne:\"se\",se:\"ne\",sw:\"nw\"},ga={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},ya={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function va(t){return{type:t}}function _a(t){return!t.ctrlKey&&!t.button}function ba(){var t=this.ownerSVGElement||this;return t.hasAttribute(\"viewBox\")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function ma(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function xa(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function wa(t){var n,e=ba,r=_a,i=ma,o=!0,a=$t(\"start\",\"brush\",\"end\"),u=6;function c(n){var e=n.property(\"__brush\",g).selectAll(\".overlay\").data([va(\"overlay\")]);e.enter().append(\"rect\").attr(\"class\",\"overlay\").attr(\"pointer-events\",\"all\").attr(\"cursor\",ha.overlay).merge(e).each((function(){var t=xa(this).extent;Zn(this).attr(\"x\",t[0][0]).attr(\"y\",t[0][1]).attr(\"width\",t[1][0]-t[0][0]).attr(\"height\",t[1][1]-t[0][1])})),n.selectAll(\".selection\").data([va(\"selection\")]).enter().append(\"rect\").attr(\"class\",\"selection\").attr(\"cursor\",ha.selection).attr(\"fill\",\"#777\").attr(\"fill-opacity\",.3).attr(\"stroke\",\"#fff\").attr(\"shape-rendering\",\"crispEdges\");var r=n.selectAll(\".handle\").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append(\"rect\").attr(\"class\",(function(t){return\"handle handle--\"+t.type})).attr(\"cursor\",(function(t){return ha[t.type]})),n.each(f).attr(\"fill\",\"none\").attr(\"pointer-events\",\"all\").on(\"mousedown.brush\",h).filter(i).on(\"touchstart.brush\",h).on(\"touchmove.brush\",d).on(\"touchend.brush touchcancel.brush\",p).style(\"touch-action\",\"none\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\")}function f(){var t=Zn(this),n=xa(this).selection;n?(t.selectAll(\".selection\").style(\"display\",null).attr(\"x\",n[0][0]).attr(\"y\",n[0][1]).attr(\"width\",n[1][0]-n[0][0]).attr(\"height\",n[1][1]-n[0][1]),t.selectAll(\".handle\").style(\"display\",null).attr(\"x\",(function(t){return\"e\"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr(\"y\",(function(t){return\"s\"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr(\"width\",(function(t){return\"n\"===t.type||\"s\"===t.type?n[1][0]-n[0][0]+u:u})).attr(\"height\",(function(t){return\"e\"===t.type||\"w\"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(\".selection,.handle\").style(\"display\",\"none\").attr(\"x\",null).attr(\"y\",null).attr(\"width\",null).attr(\"height\",null)}function s(t,n,e){var r=t.__brush.emitter;return!r||e&&r.clean?new l(t,n,e):r}function l(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function h(e){if((!n||e.touches)&&r.apply(this,arguments)){var i,a,u,c,l,h,d,p,g,y,v,_=this,b=e.target.__data__.type,m=\"selection\"===(o&&e.metaKey?b=\"overlay\":b)?ta:o&&e.altKey?ra:ea,x=t===sa?null:ga[b],w=t===fa?null:ya[b],M=xa(_),T=M.extent,A=M.selection,S=T[0][0],E=T[0][1],N=T[1][0],k=T[1][1],C=0,P=0,z=x&&w&&o&&e.shiftKey,$=Array.from(e.touches||[e],(t=>{const n=t.identifier;return(t=ne(t,_)).point0=t.slice(),t.identifier=n,t}));Gi(_);var D=s(_,arguments,!0).beforestart();if(\"overlay\"===b){A&&(g=!0);const n=[$[0],$[1]||$[0]];M.selection=A=[[i=t===sa?S:aa(n[0][0],n[1][0]),u=t===fa?E:aa(n[0][1],n[1][1])],[l=t===sa?N:oa(n[0][0],n[1][0]),d=t===fa?k:oa(n[0][1],n[1][1])]],$.length>1&&I(e)}else i=A[0][0],u=A[0][1],l=A[1][0],d=A[1][1];a=i,c=u,h=l,p=d;var R=Zn(_).attr(\"pointer-events\",\"none\"),F=R.selectAll(\".overlay\").attr(\"cursor\",ha[b]);if(e.touches)D.moved=U,D.ended=O;else{var q=Zn(e.view).on(\"mousemove.brush\",U,!0).on(\"mouseup.brush\",O,!0);o&&q.on(\"keydown.brush\",(function(t){switch(t.keyCode){case 16:z=x&&w;break;case 18:m===ea&&(x&&(l=h-C*x,i=a+C*x),w&&(d=p-P*w,u=c+P*w),m=ra,I(t));break;case 32:m!==ea&&m!==ra||(x<0?l=h-C:x>0&&(i=a-C),w<0?d=p-P:w>0&&(u=c-P),m=na,F.attr(\"cursor\",ha.selection),I(t));break;default:return}Jo(t)}),!0).on(\"keyup.brush\",(function(t){switch(t.keyCode){case 16:z&&(y=v=z=!1,I(t));break;case 18:m===ra&&(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=ea,I(t));break;case 32:m===na&&(t.altKey?(x&&(l=h-C*x,i=a+C*x),w&&(d=p-P*w,u=c+P*w),m=ra):(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=ea),F.attr(\"cursor\",ha[b]),I(t));break;default:return}Jo(t)}),!0),ae(e.view)}f.call(_),D.start(e,m.name)}function U(t){for(const n of t.changedTouches||[t])for(const t of $)t.identifier===n.identifier&&(t.cur=ne(n,_));if(z&&!y&&!v&&1===$.length){const t=$[0];ia(t.cur[0]-t[0])>ia(t.cur[1]-t[1])?v=!0:y=!0}for(const t of $)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,Jo(t),I(t)}function I(t){const n=$[0],e=n.point0;var r;switch(C=n[0]-e[0],P=n[1]-e[1],m){case na:case ta:x&&(C=oa(S-i,aa(N-l,C)),a=i+C,h=l+C),w&&(P=oa(E-u,aa(k-d,P)),c=u+P,p=d+P);break;case ea:$[1]?(x&&(a=oa(S,aa(N,$[0][0])),h=oa(S,aa(N,$[1][0])),x=1),w&&(c=oa(E,aa(k,$[0][1])),p=oa(E,aa(k,$[1][1])),w=1)):(x<0?(C=oa(S-i,aa(N-i,C)),a=i+C,h=l):x>0&&(C=oa(S-l,aa(N-l,C)),a=i,h=l+C),w<0?(P=oa(E-u,aa(k-u,P)),c=u+P,p=d):w>0&&(P=oa(E-d,aa(k-d,P)),c=u,p=d+P));break;case ra:x&&(a=oa(S,aa(N,i-C*x)),h=oa(S,aa(N,l+C*x))),w&&(c=oa(E,aa(k,u-P*w)),p=oa(E,aa(k,d+P*w)))}h<a&&(x*=-1,r=i,i=l,l=r,r=a,a=h,h=r,b in da&&F.attr(\"cursor\",ha[b=da[b]])),p<c&&(w*=-1,r=u,u=d,d=r,r=c,c=p,p=r,b in pa&&F.attr(\"cursor\",ha[b=pa[b]])),M.selection&&(A=M.selection),y&&(a=A[0][0],h=A[1][0]),v&&(c=A[0][1],p=A[1][1]),A[0][0]===a&&A[0][1]===c&&A[1][0]===h&&A[1][1]===p||(M.selection=[[a,c],[h,p]],f.call(_),D.brush(t,m.name))}function O(t){if(function(t){t.stopImmediatePropagation()}(t),t.touches){if(t.touches.length)return;n&&clearTimeout(n),n=setTimeout((function(){n=null}),500)}else ue(t.view,g),q.on(\"keydown.brush keyup.brush mousemove.brush mouseup.brush\",null);R.attr(\"pointer-events\",\"all\"),F.attr(\"cursor\",ha.overlay),M.selection&&(A=M.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(A)&&(M.selection=null,f.call(_)),D.end(t,m.name)}}function d(t){s(this,arguments).moved(t)}function p(t){s(this,arguments).ended(t)}function g(){var n=this.__brush||{selection:null};return n.extent=ca(e.apply(this,arguments)),n.dim=t,n}return c.move=function(n,e,r){n.tween?n.on(\"start.brush\",(function(t){s(this,arguments).beforestart().start(t)})).on(\"interrupt.brush end.brush\",(function(t){s(this,arguments).end(t)})).tween(\"brush\",(function(){var n=this,r=n.__brush,i=s(n,arguments),o=r.selection,a=t.input(\"function\"==typeof e?e.apply(this,arguments):e,r.extent),u=Gr(o,a);function c(t){r.selection=1===t&&null===a?null:u(t),f.call(n),i.brush()}return null!==o&&null!==a?c:c(1)})):n.each((function(){var n=this,i=arguments,o=n.__brush,a=t.input(\"function\"==typeof e?e.apply(n,i):e,o.extent),u=s(n,i).beforestart();Gi(n),o.selection=null===a?null:a,f.call(n),u.start(r).brush(r).end(r)}))},c.clear=function(t,n){c.move(t,null,n)},l.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,n){return this.starting?(this.starting=!1,this.emit(\"start\",t,n)):this.emit(\"brush\",t),this},brush:function(t,n){return this.emit(\"brush\",t,n),this},end:function(t,n){return 0==--this.active&&(delete this.state.emitter,this.emit(\"end\",t,n)),this},emit:function(n,e,r){var i=Zn(this.that).datum();a.call(n,this.that,new Qo(n,{sourceEvent:e,target:c,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},c.extent=function(t){return arguments.length?(e=\"function\"==typeof t?t:Ko(ca(t)),c):e},c.filter=function(t){return arguments.length?(r=\"function\"==typeof t?t:Ko(!!t),c):r},c.touchable=function(t){return arguments.length?(i=\"function\"==typeof t?t:Ko(!!t),c):i},c.handleSize=function(t){return arguments.length?(u=+t,c):u},c.keyModifiers=function(t){return arguments.length?(o=!!t,c):o},c.on=function(){var t=a.on.apply(a,arguments);return t===a?c:t},c}var Ma=Math.abs,Ta=Math.cos,Aa=Math.sin,Sa=Math.PI,Ea=Sa/2,Na=2*Sa,ka=Math.max,Ca=1e-12;function Pa(t,n){return Array.from({length:n-t},((n,e)=>t+e))}function za(t,n){var e=0,r=null,i=null,o=null;function a(a){var u,c=a.length,f=new Array(c),s=Pa(0,c),l=new Array(c*c),h=new Array(c),d=0;a=Float64Array.from({length:c*c},n?(t,n)=>a[n%c][n/c|0]:(t,n)=>a[n/c|0][n%c]);for(let n=0;n<c;++n){let e=0;for(let r=0;r<c;++r)e+=a[n*c+r]+t*a[r*c+n];d+=f[n]=e}u=(d=ka(0,Na-e*c)/d)?e:Na/c;{let n=0;r&&s.sort(((t,n)=>r(f[t],f[n])));for(const e of s){const r=n;if(t){const t=Pa(1+~c,c).filter((t=>t<0?a[~t*c+e]:a[e*c+t]));i&&t.sort(((t,n)=>i(t<0?-a[~t*c+e]:a[e*c+t],n<0?-a[~n*c+e]:a[e*c+n])));for(const r of t)if(r<0){(l[~r*c+e]||(l[~r*c+e]={source:null,target:null})).target={index:e,startAngle:n,endAngle:n+=a[~r*c+e]*d,value:a[~r*c+e]}}else{(l[e*c+r]||(l[e*c+r]={source:null,target:null})).source={index:e,startAngle:n,endAngle:n+=a[e*c+r]*d,value:a[e*c+r]}}h[e]={index:e,startAngle:r,endAngle:n,value:f[e]}}else{const t=Pa(0,c).filter((t=>a[e*c+t]||a[t*c+e]));i&&t.sort(((t,n)=>i(a[e*c+t],a[e*c+n])));for(const r of t){let t;if(e<r?(t=l[e*c+r]||(l[e*c+r]={source:null,target:null}),t.source={index:e,startAngle:n,endAngle:n+=a[e*c+r]*d,value:a[e*c+r]}):(t=l[r*c+e]||(l[r*c+e]={source:null,target:null}),t.target={index:e,startAngle:n,endAngle:n+=a[e*c+r]*d,value:a[e*c+r]},e===r&&(t.source=t.target)),t.source&&t.target&&t.source.value<t.target.value){const n=t.source;t.source=t.target,t.target=n}}h[e]={index:e,startAngle:r,endAngle:n,value:f[e]}}n+=u}}return(l=Object.values(l)).groups=h,o?l.sort(o):l}return a.padAngle=function(t){return arguments.length?(e=ka(0,t),a):e},a.sortGroups=function(t){return arguments.length?(r=t,a):r},a.sortSubgroups=function(t){return arguments.length?(i=t,a):i},a.sortChords=function(t){return arguments.length?(null==t?o=null:(n=t,o=function(t,e){return n(t.source.value+t.target.value,e.source.value+e.target.value)})._=t,a):o&&o._;var n},a}const $a=Math.PI,Da=2*$a,Ra=1e-6,Fa=Da-Ra;function qa(t){this._+=t[0];for(let n=1,e=t.length;n<e;++n)this._+=arguments[n]+t[n]}let Ua=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._=\"\",this._append=null==t?qa:function(t){let n=Math.floor(t);if(!(n>=0))throw new Error(`invalid digits: ${t}`);if(n>15)return qa;const e=10**n;return function(t){this._+=t[0];for(let n=1,r=t.length;n<r;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,e,r){this._append`Q${+t},${+n},${this._x1=+e},${this._y1=+r}`}bezierCurveTo(t,n,e,r,i,o){this._append`C${+t},${+n},${+e},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,n,e,r,i){if(t=+t,n=+n,e=+e,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,u=e-t,c=r-n,f=o-t,s=a-n,l=f*f+s*s;if(null===this._x1)this._append`M${this._x1=t},${this._y1=n}`;else if(l>Ra)if(Math.abs(s*u-c*f)>Ra&&i){let h=e-o,d=r-a,p=u*u+c*c,g=h*h+d*d,y=Math.sqrt(p),v=Math.sqrt(l),_=i*Math.tan(($a-Math.acos((p+l-g)/(2*y*v)))/2),b=_/v,m=_/y;Math.abs(b-1)>Ra&&this._append`L${t+b*f},${n+b*s}`,this._append`A${i},${i},0,0,${+(s*h>f*d)},${this._x1=t+m*u},${this._y1=n+m*c}`}else this._append`L${this._x1=t},${this._y1=n}`;else;}arc(t,n,e,r,i,o){if(t=+t,n=+n,o=!!o,(e=+e)<0)throw new Error(`negative radius: ${e}`);let a=e*Math.cos(r),u=e*Math.sin(r),c=t+a,f=n+u,s=1^o,l=o?r-i:i-r;null===this._x1?this._append`M${c},${f}`:(Math.abs(this._x1-c)>Ra||Math.abs(this._y1-f)>Ra)&&this._append`L${c},${f}`,e&&(l<0&&(l=l%Da+Da),l>Fa?this._append`A${e},${e},0,1,${s},${t-a},${n-u}A${e},${e},0,1,${s},${this._x1=c},${this._y1=f}`:l>Ra&&this._append`A${e},${e},0,${+(l>=$a)},${s},${this._x1=t+e*Math.cos(i)},${this._y1=n+e*Math.sin(i)}`)}rect(t,n,e,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${e=+e}v${+r}h${-e}Z`}toString(){return this._}};function Ia(){return new Ua}Ia.prototype=Ua.prototype;var Oa=Array.prototype.slice;function Ba(t){return function(){return t}}function Ya(t){return t.source}function La(t){return t.target}function ja(t){return t.radius}function Ha(t){return t.startAngle}function Xa(t){return t.endAngle}function Ga(){return 0}function Va(){return 10}function Wa(t){var n=Ya,e=La,r=ja,i=ja,o=Ha,a=Xa,u=Ga,c=null;function f(){var f,s=n.apply(this,arguments),l=e.apply(this,arguments),h=u.apply(this,arguments)/2,d=Oa.call(arguments),p=+r.apply(this,(d[0]=s,d)),g=o.apply(this,d)-Ea,y=a.apply(this,d)-Ea,v=+i.apply(this,(d[0]=l,d)),_=o.apply(this,d)-Ea,b=a.apply(this,d)-Ea;if(c||(c=f=Ia()),h>Ca&&(Ma(y-g)>2*h+Ca?y>g?(g+=h,y-=h):(g-=h,y+=h):g=y=(g+y)/2,Ma(b-_)>2*h+Ca?b>_?(_+=h,b-=h):(_-=h,b+=h):_=b=(_+b)/2),c.moveTo(p*Ta(g),p*Aa(g)),c.arc(0,0,p,g,y),g!==_||y!==b)if(t){var m=v-+t.apply(this,arguments),x=(_+b)/2;c.quadraticCurveTo(0,0,m*Ta(_),m*Aa(_)),c.lineTo(v*Ta(x),v*Aa(x)),c.lineTo(m*Ta(b),m*Aa(b))}else c.quadraticCurveTo(0,0,v*Ta(_),v*Aa(_)),c.arc(0,0,v,_,b);if(c.quadraticCurveTo(0,0,p*Ta(g),p*Aa(g)),c.closePath(),f)return c=null,f+\"\"||null}return t&&(f.headRadius=function(n){return arguments.length?(t=\"function\"==typeof n?n:Ba(+n),f):t}),f.radius=function(t){return arguments.length?(r=i=\"function\"==typeof t?t:Ba(+t),f):r},f.sourceRadius=function(t){return arguments.length?(r=\"function\"==typeof t?t:Ba(+t),f):r},f.targetRadius=function(t){return arguments.length?(i=\"function\"==typeof t?t:Ba(+t),f):i},f.startAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:Ba(+t),f):o},f.endAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:Ba(+t),f):a},f.padAngle=function(t){return arguments.length?(u=\"function\"==typeof t?t:Ba(+t),f):u},f.source=function(t){return arguments.length?(n=t,f):n},f.target=function(t){return arguments.length?(e=t,f):e},f.context=function(t){return arguments.length?(c=null==t?null:t,f):c},f}var Za=Array.prototype.slice;function Ka(t,n){return t-n}var Qa=t=>()=>t;function Ja(t,n){for(var e,r=-1,i=n.length;++r<i;)if(e=tu(t,n[r]))return e;return 0}function tu(t,n){for(var e=n[0],r=n[1],i=-1,o=0,a=t.length,u=a-1;o<a;u=o++){var c=t[o],f=c[0],s=c[1],l=t[u],h=l[0],d=l[1];if(nu(c,l,n))return 0;s>r!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function nu(t,n,e){var r,i,o,a;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],a=n[r],i<=o&&o<=a||a<=o&&o<=i)}function eu(){}var ru=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function iu(){var t=1,n=1,e=K,r=u;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(Ka);else{const e=M(t,ou);for(n=G(...Z(e[0],e[1],n),n);n[n.length-1]>=e[1];)n.pop();for(;n[1]<e[0];)n.shift()}return n.map((n=>o(t,n)))}function o(e,i){const o=null==i?NaN:+i;if(isNaN(o))throw new Error(`invalid value: ${i}`);var u=[],c=[];return function(e,r,i){var o,u,c,f,s,l,h=new Array,d=new Array;o=u=-1,f=au(e[0],r),ru[f<<1].forEach(p);for(;++o<t-1;)c=f,f=au(e[o+1],r),ru[c|f<<1].forEach(p);ru[f|0].forEach(p);for(;++u<n-1;){for(o=-1,f=au(e[u*t+t],r),s=au(e[u*t],r),ru[f<<1|s<<2].forEach(p);++o<t-1;)c=f,f=au(e[u*t+t+o+1],r),l=s,s=au(e[u*t+o+1],r),ru[c|f<<1|s<<2|l<<3].forEach(p);ru[f|s<<3].forEach(p)}o=-1,s=e[u*t]>=r,ru[s<<2].forEach(p);for(;++o<t-1;)l=s,s=au(e[u*t+o+1],r),ru[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+o,t[0][1]+u],c=[t[1][0]+o,t[1][1]+u],f=a(r),s=a(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}ru[s<<3].forEach(p)}(e,o,(function(t){r(t,e,o),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n<e;)r+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return r}(t)>0?u.push([t]):c.push(t)})),c.forEach((function(t){for(var n,e=0,r=u.length;e<r;++e)if(-1!==Ja((n=u[e])[0],t))return void n.push(t)})),{type:\"MultiPolygon\",value:i,coordinates:u}}function a(n){return 2*n[0]+n[1]*(t+1)*4}function u(e,r,i){e.forEach((function(e){var o=e[0],a=e[1],u=0|o,c=0|a,f=uu(r[c*t+u]);o>0&&o<t&&u===o&&(e[0]=cu(o,uu(r[c*t+u-1]),f,i)),a>0&&a<n&&c===a&&(e[1]=cu(a,uu(r[(c-1)*t+u]),f,i))}))}return i.contour=o,i.size=function(e){if(!arguments.length)return[t,n];var r=Math.floor(e[0]),o=Math.floor(e[1]);if(!(r>=0&&o>=0))throw new Error(\"invalid size\");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e=\"function\"==typeof t?t:Array.isArray(t)?Qa(Za.call(t)):Qa(t),i):e},i.smooth=function(t){return arguments.length?(r=t?u:eu,i):r===u},i}function ou(t){return isFinite(t)?t:NaN}function au(t,n){return null!=t&&+t>=n}function uu(t){return null==t||isNaN(t=+t)?-1/0:t}function cu(t,n,e,r){const i=r-n,o=e-n,a=isFinite(i)||isFinite(o)?i/o:Math.sign(i)/Math.sign(o);return isNaN(a)?t:t+a-.5}function fu(t){return t[0]}function su(t){return t[1]}function lu(){return 1}const hu=134217729,du=33306690738754706e-32;function pu(t,n,e,r,i){let o,a,u,c,f=n[0],s=r[0],l=0,h=0;s>f==s>-f?(o=f,f=n[++l]):(o=s,s=r[++h]);let d=0;if(l<t&&h<e)for(s>f==s>-f?(a=f+o,u=o-(a-f),f=n[++l]):(a=s+o,u=o-(a-s),s=r[++h]),o=a,0!==u&&(i[d++]=u);l<t&&h<e;)s>f==s>-f?(a=o+f,c=a-o,u=o-(a-c)+(f-c),f=n[++l]):(a=o+s,c=a-o,u=o-(a-c)+(s-c),s=r[++h]),o=a,0!==u&&(i[d++]=u);for(;l<t;)a=o+f,c=a-o,u=o-(a-c)+(f-c),f=n[++l],o=a,0!==u&&(i[d++]=u);for(;h<e;)a=o+s,c=a-o,u=o-(a-c)+(s-c),s=r[++h],o=a,0!==u&&(i[d++]=u);return 0===o&&0!==d||(i[d++]=o),d}function gu(t){return new Float64Array(t)}const yu=22204460492503146e-32,vu=11093356479670487e-47,_u=gu(4),bu=gu(8),mu=gu(12),xu=gu(16),wu=gu(4);function Mu(t,n,e,r,i,o){const a=(n-o)*(e-i),u=(t-i)*(r-o),c=a-u,f=Math.abs(a+u);return Math.abs(c)>=33306690738754716e-32*f?c:-function(t,n,e,r,i,o,a){let u,c,f,s,l,h,d,p,g,y,v,_,b,m,x,w,M,T;const A=t-i,S=e-i,E=n-o,N=r-o;m=A*N,h=hu*A,d=h-(h-A),p=A-d,h=hu*N,g=h-(h-N),y=N-g,x=p*y-(m-d*g-p*g-d*y),w=E*S,h=hu*E,d=h-(h-E),p=E-d,h=hu*S,g=h-(h-S),y=S-g,M=p*y-(w-d*g-p*g-d*y),v=x-M,l=x-v,_u[0]=x-(v+l)+(l-M),_=m+v,l=_-m,b=m-(_-l)+(v-l),v=b-w,l=b-v,_u[1]=b-(v+l)+(l-w),T=_+v,l=T-_,_u[2]=_-(T-l)+(v-l),_u[3]=T;let k=function(t,n){let e=n[0];for(let r=1;r<t;r++)e+=n[r];return e}(4,_u),C=yu*a;if(k>=C||-k>=C)return k;if(l=t-A,u=t-(A+l)+(l-i),l=e-S,f=e-(S+l)+(l-i),l=n-E,c=n-(E+l)+(l-o),l=r-N,s=r-(N+l)+(l-o),0===u&&0===c&&0===f&&0===s)return k;if(C=vu*a+du*Math.abs(k),k+=A*s+N*u-(E*f+S*c),k>=C||-k>=C)return k;m=u*N,h=hu*u,d=h-(h-u),p=u-d,h=hu*N,g=h-(h-N),y=N-g,x=p*y-(m-d*g-p*g-d*y),w=c*S,h=hu*c,d=h-(h-c),p=c-d,h=hu*S,g=h-(h-S),y=S-g,M=p*y-(w-d*g-p*g-d*y),v=x-M,l=x-v,wu[0]=x-(v+l)+(l-M),_=m+v,l=_-m,b=m-(_-l)+(v-l),v=b-w,l=b-v,wu[1]=b-(v+l)+(l-w),T=_+v,l=T-_,wu[2]=_-(T-l)+(v-l),wu[3]=T;const P=pu(4,_u,4,wu,bu);m=A*s,h=hu*A,d=h-(h-A),p=A-d,h=hu*s,g=h-(h-s),y=s-g,x=p*y-(m-d*g-p*g-d*y),w=E*f,h=hu*E,d=h-(h-E),p=E-d,h=hu*f,g=h-(h-f),y=f-g,M=p*y-(w-d*g-p*g-d*y),v=x-M,l=x-v,wu[0]=x-(v+l)+(l-M),_=m+v,l=_-m,b=m-(_-l)+(v-l),v=b-w,l=b-v,wu[1]=b-(v+l)+(l-w),T=_+v,l=T-_,wu[2]=_-(T-l)+(v-l),wu[3]=T;const z=pu(P,bu,4,wu,mu);m=u*s,h=hu*u,d=h-(h-u),p=u-d,h=hu*s,g=h-(h-s),y=s-g,x=p*y-(m-d*g-p*g-d*y),w=c*f,h=hu*c,d=h-(h-c),p=c-d,h=hu*f,g=h-(h-f),y=f-g,M=p*y-(w-d*g-p*g-d*y),v=x-M,l=x-v,wu[0]=x-(v+l)+(l-M),_=m+v,l=_-m,b=m-(_-l)+(v-l),v=b-w,l=b-v,wu[1]=b-(v+l)+(l-w),T=_+v,l=T-_,wu[2]=_-(T-l)+(v-l),wu[3]=T;const $=pu(z,mu,4,wu,xu);return xu[$-1]}(t,n,e,r,i,o,f)}const Tu=Math.pow(2,-52),Au=new Uint32Array(512);class Su{static from(t,n=zu,e=$u){const r=t.length,i=new Float64Array(2*r);for(let o=0;o<r;o++){const r=t[o];i[2*o]=n(r),i[2*o+1]=e(r)}return new Su(i)}constructor(t){const n=t.length>>1;if(n>0&&\"number\"!=typeof t[0])throw new Error(\"Expected coords to contain numbers.\");this.coords=t;const e=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*e),this._halfedges=new Int32Array(3*e),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:e,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let a=1/0,u=1/0,c=-1/0,f=-1/0;for(let n=0;n<o;n++){const e=t[2*n],r=t[2*n+1];e<a&&(a=e),r<u&&(u=r),e>c&&(c=e),r>f&&(f=r),this._ids[n]=n}const s=(a+c)/2,l=(u+f)/2;let h,d,p;for(let n=0,e=1/0;n<o;n++){const r=Eu(s,l,t[2*n],t[2*n+1]);r<e&&(h=n,e=r)}const g=t[2*h],y=t[2*h+1];for(let n=0,e=1/0;n<o;n++){if(n===h)continue;const r=Eu(g,y,t[2*n],t[2*n+1]);r<e&&r>0&&(d=n,e=r)}let v=t[2*d],_=t[2*d+1],b=1/0;for(let n=0;n<o;n++){if(n===h||n===d)continue;const e=ku(g,y,v,_,t[2*n],t[2*n+1]);e<b&&(p=n,b=e)}let m=t[2*p],x=t[2*p+1];if(b===1/0){for(let n=0;n<o;n++)this._dists[n]=t[2*n]-t[0]||t[2*n+1]-t[1];Cu(this._ids,this._dists,0,o-1);const n=new Uint32Array(o);let e=0;for(let t=0,r=-1/0;t<o;t++){const i=this._ids[t],o=this._dists[i];o>r&&(n[e++]=i,r=o)}return this.hull=n.subarray(0,e),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Mu(g,y,v,_,m,x)<0){const t=d,n=v,e=_;d=p,v=m,_=x,p=t,m=n,x=e}const w=function(t,n,e,r,i,o){const a=e-t,u=r-n,c=i-t,f=o-n,s=a*a+u*u,l=c*c+f*f,h=.5/(a*f-u*c),d=t+(f*s-u*l)*h,p=n+(a*l-c*s)*h;return{x:d,y:p}}(g,y,v,_,m,x);this._cx=w.x,this._cy=w.y;for(let n=0;n<o;n++)this._dists[n]=Eu(t[2*n],t[2*n+1],w.x,w.y);Cu(this._ids,this._dists,0,o-1),this._hullStart=h;let M=3;e[h]=n[p]=d,e[d]=n[h]=p,e[p]=n[d]=h,r[h]=0,r[d]=1,r[p]=2,i.fill(-1),i[this._hashKey(g,y)]=h,i[this._hashKey(v,_)]=d,i[this._hashKey(m,x)]=p,this.trianglesLen=0,this._addTriangle(h,d,p,-1,-1,-1);for(let o,a,u=0;u<this._ids.length;u++){const c=this._ids[u],f=t[2*c],s=t[2*c+1];if(u>0&&Math.abs(f-o)<=Tu&&Math.abs(s-a)<=Tu)continue;if(o=f,a=s,c===h||c===d||c===p)continue;let l=0;for(let t=0,n=this._hashKey(f,s);t<this._hashSize&&(l=i[(n+t)%this._hashSize],-1===l||l===e[l]);t++);l=n[l];let g,y=l;for(;g=e[y],Mu(f,s,t[2*y],t[2*y+1],t[2*g],t[2*g+1])>=0;)if(y=g,y===l){y=-1;break}if(-1===y)continue;let v=this._addTriangle(y,c,e[y],-1,-1,r[y]);r[c]=this._legalize(v+2),r[y]=v,M++;let _=e[y];for(;g=e[_],Mu(f,s,t[2*_],t[2*_+1],t[2*g],t[2*g+1])<0;)v=this._addTriangle(_,c,g,r[c],-1,r[_]),r[c]=this._legalize(v+2),e[_]=_,M--,_=g;if(y===l)for(;g=n[y],Mu(f,s,t[2*g],t[2*g+1],t[2*y],t[2*y+1])<0;)v=this._addTriangle(g,c,y,-1,r[y],r[g]),this._legalize(v+2),r[g]=v,e[y]=y,M--,y=g;this._hullStart=n[c]=y,e[y]=n[_]=c,e[c]=_,i[this._hashKey(f,s)]=c,i[this._hashKey(t[2*y],t[2*y+1])]=y}this.hull=new Uint32Array(M);for(let t=0,n=this._hullStart;t<M;t++)this.hull[t]=n,n=e[n];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,n){return Math.floor(function(t,n){const e=t/(Math.abs(t)+Math.abs(n));return(n>0?3-e:1+e)/4}(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:e,coords:r}=this;let i=0,o=0;for(;;){const a=e[t],u=t-t%3;if(o=u+(t+2)%3,-1===a){if(0===i)break;t=Au[--i];continue}const c=a-a%3,f=u+(t+1)%3,s=c+(a+2)%3,l=n[o],h=n[t],d=n[f],p=n[s];if(Nu(r[2*l],r[2*l+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){n[t]=p,n[a]=l;const r=e[s];if(-1===r){let n=this._hullStart;do{if(this._hullTri[n]===s){this._hullTri[n]=t;break}n=this._hullPrev[n]}while(n!==this._hullStart)}this._link(t,r),this._link(a,e[o]),this._link(o,s);const u=c+(a+1)%3;i<Au.length&&(Au[i++]=u)}else{if(0===i)break;t=Au[--i]}}return o}_link(t,n){this._halfedges[t]=n,-1!==n&&(this._halfedges[n]=t)}_addTriangle(t,n,e,r,i,o){const a=this.trianglesLen;return this._triangles[a]=t,this._triangles[a+1]=n,this._triangles[a+2]=e,this._link(a,r),this._link(a+1,i),this._link(a+2,o),this.trianglesLen+=3,a}}function Eu(t,n,e,r){const i=t-e,o=n-r;return i*i+o*o}function Nu(t,n,e,r,i,o,a,u){const c=t-a,f=n-u,s=e-a,l=r-u,h=i-a,d=o-u,p=s*s+l*l,g=h*h+d*d;return c*(l*g-p*d)-f*(s*g-p*h)+(c*c+f*f)*(s*d-l*h)<0}function ku(t,n,e,r,i,o){const a=e-t,u=r-n,c=i-t,f=o-n,s=a*a+u*u,l=c*c+f*f,h=.5/(a*f-u*c),d=(f*s-u*l)*h,p=(a*l-c*s)*h;return d*d+p*p}function Cu(t,n,e,r){if(r-e<=20)for(let i=e+1;i<=r;i++){const r=t[i],o=n[r];let a=i-1;for(;a>=e&&n[t[a]]>o;)t[a+1]=t[a--];t[a+1]=r}else{let i=e+1,o=r;Pu(t,e+r>>1,i),n[t[e]]>n[t[r]]&&Pu(t,e,r),n[t[i]]>n[t[r]]&&Pu(t,i,r),n[t[e]]>n[t[i]]&&Pu(t,e,i);const a=t[i],u=n[a];for(;;){do{i++}while(n[t[i]]<u);do{o--}while(n[t[o]]>u);if(o<i)break;Pu(t,i,o)}t[e+1]=t[o],t[o]=a,r-i+1>=o-e?(Cu(t,n,i,r),Cu(t,n,e,o-1)):(Cu(t,n,e,o-1),Cu(t,n,i,r))}}function Pu(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function zu(t){return t[0]}function $u(t){return t[1]}const Du=1e-6;class Ru{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=\"\"}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+=\"Z\")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,e){const r=(t=+t)+(e=+e),i=n=+n;if(e<0)throw new Error(\"negative radius\");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>Du||Math.abs(this._y1-i)>Du)&&(this._+=\"L\"+r+\",\"+i),e&&(this._+=`A${e},${e},0,1,1,${t-e},${n}A${e},${e},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,n,e,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+e}v${+r}h${-e}Z`}value(){return this._||null}}class Fu{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class qu{constructor(t,[n,e,r,i]=[0,0,960,500]){if(!((r=+r)>=(n=+n)&&(i=+i)>=(e=+e)))throw new Error(\"invalid bounds\");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=n,this.ymax=i,this.ymin=e,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:e},vectors:r}=this;let i,o;const a=this.circumcenters=this._circumcenters.subarray(0,e.length/3*2);for(let r,u,c=0,f=0,s=e.length;c<s;c+=3,f+=2){const s=2*e[c],l=2*e[c+1],h=2*e[c+2],d=t[s],p=t[s+1],g=t[l],y=t[l+1],v=t[h],_=t[h+1],b=g-d,m=y-p,x=v-d,w=_-p,M=2*(b*w-m*x);if(Math.abs(M)<1e-9){if(void 0===i){i=o=0;for(const e of n)i+=t[2*e],o+=t[2*e+1];i/=n.length,o/=n.length}const e=1e9*Math.sign((i-d)*w-(o-p)*x);r=(d+v)/2-e*w,u=(p+_)/2+e*x}else{const t=1/M,n=b*b+m*m,e=x*x+w*w;r=d+(w*n-m*e)*t,u=p+(b*e-x*n)*t}a[f]=r,a[f+1]=u}let u,c,f,s=n[n.length-1],l=4*s,h=t[2*s],d=t[2*s+1];r.fill(0);for(let e=0;e<n.length;++e)s=n[e],u=l,c=h,f=d,l=4*s,h=t[2*s],d=t[2*s+1],r[u+2]=r[l]=f-d,r[u+3]=r[l+1]=h-c}render(t){const n=null==t?t=new Ru:void 0,{delaunay:{halfedges:e,inedges:r,hull:i},circumcenters:o,vectors:a}=this;if(i.length<=1)return null;for(let n=0,r=e.length;n<r;++n){const r=e[n];if(r<n)continue;const i=2*Math.floor(n/3),a=2*Math.floor(r/3),u=o[i],c=o[i+1],f=o[a],s=o[a+1];this._renderSegment(u,c,f,s,t)}let u,c=i[i.length-1];for(let n=0;n<i.length;++n){u=c,c=i[n];const e=2*Math.floor(r[c]/3),f=o[e],s=o[e+1],l=4*u,h=this._project(f,s,a[l+2],a[l+3]);h&&this._renderSegment(f,s,h[0],h[1],t)}return n&&n.value()}renderBounds(t){const n=null==t?t=new Ru:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(t,n){const e=null==n?n=new Ru:void 0,r=this._clip(t);if(null===r||!r.length)return;n.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let t=2;t<i;t+=2)r[t]===r[t-2]&&r[t+1]===r[t-1]||n.lineTo(r[t],r[t+1]);return n.closePath(),e&&e.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let n=0,e=t.length/2;n<e;++n){const t=this.cellPolygon(n);t&&(t.index=n,yield t)}}cellPolygon(t){const n=new Fu;return this.renderCell(t,n),n.value()}_renderSegment(t,n,e,r,i){let o;const a=this._regioncode(t,n),u=this._regioncode(e,r);0===a&&0===u?(i.moveTo(t,n),i.lineTo(e,r)):(o=this._clipSegment(t,n,e,r,a,u))&&(i.moveTo(o[0],o[1]),i.lineTo(o[2],o[3]))}contains(t,n,e){return(n=+n)==n&&(e=+e)==e&&this.delaunay._step(t,n,e)===t}*neighbors(t){const n=this._clip(t);if(n)for(const e of this.delaunay.neighbors(t)){const t=this._clip(e);if(t)t:for(let r=0,i=n.length;r<i;r+=2)for(let o=0,a=t.length;o<a;o+=2)if(n[r]===t[o]&&n[r+1]===t[o+1]&&n[(r+2)%i]===t[(o+a-2)%a]&&n[(r+3)%i]===t[(o+a-1)%a]){yield e;break t}}}_cell(t){const{circumcenters:n,delaunay:{inedges:e,halfedges:r,triangles:i}}=this,o=e[t];if(-1===o)return null;const a=[];let u=o;do{const e=Math.floor(u/3);if(a.push(n[2*e],n[2*e+1]),u=u%3==2?u-2:u+1,i[u]!==t)break;u=r[u]}while(u!==o&&-1!==u);return a}_clip(t){if(0===t&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(t);if(null===n)return null;const{vectors:e}=this,r=4*t;return this._simplify(e[r]||e[r+1]?this._clipInfinite(t,n,e[r],e[r+1],e[r+2],e[r+3]):this._clipFinite(t,n))}_clipFinite(t,n){const e=n.length;let r,i,o,a,u=null,c=n[e-2],f=n[e-1],s=this._regioncode(c,f),l=0;for(let h=0;h<e;h+=2)if(r=c,i=f,c=n[h],f=n[h+1],o=s,s=this._regioncode(c,f),0===o&&0===s)a=l,l=0,u?u.push(c,f):u=[c,f];else{let n,e,h,d,p;if(0===o){if(null===(n=this._clipSegment(r,i,c,f,o,s)))continue;[e,h,d,p]=n}else{if(null===(n=this._clipSegment(c,f,r,i,s,o)))continue;[d,p,e,h]=n,a=l,l=this._edgecode(e,h),a&&l&&this._edge(t,a,l,u,u.length),u?u.push(e,h):u=[e,h]}a=l,l=this._edgecode(d,p),a&&l&&this._edge(t,a,l,u,u.length),u?u.push(d,p):u=[d,p]}if(u)a=l,l=this._edgecode(u[0],u[1]),a&&l&&this._edge(t,a,l,u,u.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return u}_clipSegment(t,n,e,r,i,o){const a=i<o;for(a&&([t,n,e,r,i,o]=[e,r,t,n,o,i]);;){if(0===i&&0===o)return a?[e,r,t,n]:[t,n,e,r];if(i&o)return null;let u,c,f=i||o;8&f?(u=t+(e-t)*(this.ymax-n)/(r-n),c=this.ymax):4&f?(u=t+(e-t)*(this.ymin-n)/(r-n),c=this.ymin):2&f?(c=n+(r-n)*(this.xmax-t)/(e-t),u=this.xmax):(c=n+(r-n)*(this.xmin-t)/(e-t),u=this.xmin),i?(t=u,n=c,i=this._regioncode(t,n)):(e=u,r=c,o=this._regioncode(e,r))}}_clipInfinite(t,n,e,r,i,o){let a,u=Array.from(n);if((a=this._project(u[0],u[1],e,r))&&u.unshift(a[0],a[1]),(a=this._project(u[u.length-2],u[u.length-1],i,o))&&u.push(a[0],a[1]),u=this._clipFinite(t,u))for(let n,e=0,r=u.length,i=this._edgecode(u[r-2],u[r-1]);e<r;e+=2)n=i,i=this._edgecode(u[e],u[e+1]),n&&i&&(e=this._edge(t,n,i,u,e),r=u.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(u=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return u}_edge(t,n,e,r,i){for(;n!==e;){let e,o;switch(n){case 5:n=4;continue;case 4:n=6,e=this.xmax,o=this.ymin;break;case 6:n=2;continue;case 2:n=10,e=this.xmax,o=this.ymax;break;case 10:n=8;continue;case 8:n=9,e=this.xmin,o=this.ymax;break;case 9:n=1;continue;case 1:n=5,e=this.xmin,o=this.ymin}r[i]===e&&r[i+1]===o||!this.contains(t,e,o)||(r.splice(i,0,e,o),i+=2)}return i}_project(t,n,e,r){let i,o,a,u=1/0;if(r<0){if(n<=this.ymin)return null;(i=(this.ymin-n)/r)<u&&(a=this.ymin,o=t+(u=i)*e)}else if(r>0){if(n>=this.ymax)return null;(i=(this.ymax-n)/r)<u&&(a=this.ymax,o=t+(u=i)*e)}if(e>0){if(t>=this.xmax)return null;(i=(this.xmax-t)/e)<u&&(o=this.xmax,a=n+(u=i)*r)}else if(e<0){if(t<=this.xmin)return null;(i=(this.xmin-t)/e)<u&&(o=this.xmin,a=n+(u=i)*r)}return[o,a]}_edgecode(t,n){return(t===this.xmin?1:t===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(t,n){return(t<this.xmin?1:t>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n<t.length;n+=2){const e=(n+2)%t.length,r=(n+4)%t.length;(t[n]===t[e]&&t[e]===t[r]||t[n+1]===t[e+1]&&t[e+1]===t[r+1])&&(t.splice(e,2),n-=2)}t.length||(t=null)}return t}}const Uu=2*Math.PI,Iu=Math.pow;function Ou(t){return t[0]}function Bu(t){return t[1]}function Yu(t,n,e){return[t+Math.sin(t+n)*e,n+Math.cos(t-n)*e]}class Lu{static from(t,n=Ou,e=Bu,r){return new Lu(\"length\"in t?function(t,n,e,r){const i=t.length,o=new Float64Array(2*i);for(let a=0;a<i;++a){const i=t[a];o[2*a]=n.call(r,i,a,t),o[2*a+1]=e.call(r,i,a,t)}return o}(t,n,e,r):Float64Array.from(function*(t,n,e,r){let i=0;for(const o of t)yield n.call(r,o,i,t),yield e.call(r,o,i,t),++i}(t,n,e,r)))}constructor(t){this._delaunator=new Su(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&function(t){const{triangles:n,coords:e}=t;for(let t=0;t<n.length;t+=3){const r=2*n[t],i=2*n[t+1],o=2*n[t+2];if((e[o]-e[r])*(e[i+1]-e[r+1])-(e[i]-e[r])*(e[o+1]-e[r+1])>1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:n.length/2},((t,n)=>n)).sort(((t,e)=>n[2*t]-n[2*e]||n[2*t+1]-n[2*e+1]));const t=this.collinear[0],e=this.collinear[this.collinear.length-1],r=[n[2*t],n[2*t+1],n[2*e],n[2*e+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,e=n.length/2;t<e;++t){const e=Yu(n[2*t],n[2*t+1],i);n[2*t]=e[0],n[2*t+1]=e[1]}this._delaunator=new Su(n)}else delete this.collinear;const e=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,o=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let t=0,n=e.length;t<n;++t){const n=i[t%3==2?t-2:t+1];-1!==e[t]&&-1!==o[n]||(o[n]=t)}for(let t=0,n=r.length;t<n;++t)a[r[t]]=t;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],o[r[0]]=1,2===r.length&&(o[r[1]]=0,this.triangles[1]=r[1],this.triangles[2]=r[1]))}voronoi(t){return new qu(this,t)}*neighbors(t){const{inedges:n,hull:e,_hullIndex:r,halfedges:i,triangles:o,collinear:a}=this;if(a){const n=a.indexOf(t);return n>0&&(yield a[n-1]),void(n<a.length-1&&(yield a[n+1]))}const u=n[t];if(-1===u)return;let c=u,f=-1;do{if(yield f=o[c],c=c%3==2?c-2:c+1,o[c]!==t)return;if(c=i[c],-1===c){const n=e[(r[t]+1)%e.length];return void(n!==f&&(yield n))}}while(c!==u)}find(t,n,e=0){if((t=+t)!=t||(n=+n)!=n)return-1;const r=e;let i;for(;(i=this._step(e,t,n))>=0&&i!==e&&i!==r;)e=i;return i}_step(t,n,e){const{inedges:r,hull:i,_hullIndex:o,halfedges:a,triangles:u,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let f=t,s=Iu(n-c[2*t],2)+Iu(e-c[2*t+1],2);const l=r[t];let h=l;do{let r=u[h];const l=Iu(n-c[2*r],2)+Iu(e-c[2*r+1],2);if(l<s&&(s=l,f=r),h=h%3==2?h-2:h+1,u[h]!==t)break;if(h=a[h],-1===h){if(h=i[(o[t]+1)%i.length],h!==r&&Iu(n-c[2*h],2)+Iu(e-c[2*h+1],2)<s)return h;break}}while(h!==l);return f}render(t){const n=null==t?t=new Ru:void 0,{points:e,halfedges:r,triangles:i}=this;for(let n=0,o=r.length;n<o;++n){const o=r[n];if(o<n)continue;const a=2*i[n],u=2*i[o];t.moveTo(e[a],e[a+1]),t.lineTo(e[u],e[u+1])}return this.renderHull(t),n&&n.value()}renderPoints(t,n){void 0!==n||t&&\"function\"==typeof t.moveTo||(n=t,t=null),n=null==n?2:+n;const e=null==t?t=new Ru:void 0,{points:r}=this;for(let e=0,i=r.length;e<i;e+=2){const i=r[e],o=r[e+1];t.moveTo(i+n,o),t.arc(i,o,n,0,Uu)}return e&&e.value()}renderHull(t){const n=null==t?t=new Ru:void 0,{hull:e,points:r}=this,i=2*e[0],o=e.length;t.moveTo(r[i],r[i+1]);for(let n=1;n<o;++n){const i=2*e[n];t.lineTo(r[i],r[i+1])}return t.closePath(),n&&n.value()}hullPolygon(){const t=new Fu;return this.renderHull(t),t.value()}renderTriangle(t,n){const e=null==n?n=new Ru:void 0,{points:r,triangles:i}=this,o=2*i[t*=3],a=2*i[t+1],u=2*i[t+2];return n.moveTo(r[o],r[o+1]),n.lineTo(r[a],r[a+1]),n.lineTo(r[u],r[u+1]),n.closePath(),e&&e.value()}*trianglePolygons(){const{triangles:t}=this;for(let n=0,e=t.length/3;n<e;++n)yield this.trianglePolygon(n)}trianglePolygon(t){const n=new Fu;return this.renderTriangle(t,n),n.value()}}var ju={},Hu={},Xu=34,Gu=10,Vu=13;function Wu(t){return new Function(\"d\",\"return {\"+t.map((function(t,n){return JSON.stringify(t)+\": d[\"+n+'] || \"\"'})).join(\",\")+\"}\")}function Zu(t){var n=Object.create(null),e=[];return t.forEach((function(t){for(var r in t)r in n||e.push(n[r]=r)})),e}function Ku(t,n){var e=t+\"\",r=e.length;return r<n?new Array(n-r+1).join(0)+e:e}function Qu(t){var n,e=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?\"Invalid Date\":((n=t.getUTCFullYear())<0?\"-\"+Ku(-n,6):n>9999?\"+\"+Ku(n,6):Ku(n,4))+\"-\"+Ku(t.getUTCMonth()+1,2)+\"-\"+Ku(t.getUTCDate(),2)+(o?\"T\"+Ku(e,2)+\":\"+Ku(r,2)+\":\"+Ku(i,2)+\".\"+Ku(o,3)+\"Z\":i?\"T\"+Ku(e,2)+\":\"+Ku(r,2)+\":\"+Ku(i,2)+\"Z\":r||e?\"T\"+Ku(e,2)+\":\"+Ku(r,2)+\"Z\":\"\")}function Ju(t){var n=new RegExp('[\"'+t+\"\\n\\r]\"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,a=0,u=0,c=o<=0,f=!1;function s(){if(c)return Hu;if(f)return f=!1,ju;var n,r,i=a;if(t.charCodeAt(i)===Xu){for(;a++<o&&t.charCodeAt(a)!==Xu||t.charCodeAt(++a)===Xu;);return(n=a)>=o?c=!0:(r=t.charCodeAt(a++))===Gu?f=!0:r===Vu&&(f=!0,t.charCodeAt(a)===Gu&&++a),t.slice(i+1,n-1).replace(/\"\"/g,'\"')}for(;a<o;){if((r=t.charCodeAt(n=a++))===Gu)f=!0;else if(r===Vu)f=!0,t.charCodeAt(a)===Gu&&++a;else if(r!==e)continue;return t.slice(i,n)}return c=!0,t.slice(i,o)}for(t.charCodeAt(o-1)===Gu&&--o,t.charCodeAt(o-1)===Vu&&--o;(r=s())!==Hu;){for(var l=[];r!==ju&&r!==Hu;)l.push(r),r=s();n&&null==(l=n(l,u++))||i.push(l)}return i}function i(n,e){return n.map((function(n){return e.map((function(t){return a(n[t])})).join(t)}))}function o(n){return n.map(a).join(t)}function a(t){return null==t?\"\":t instanceof Date?Qu(t):n.test(t+=\"\")?'\"'+t.replace(/\"/g,'\"\"')+'\"':t}return{parse:function(t,n){var e,i,o=r(t,(function(t,r){if(e)return e(t,r-1);i=t,e=n?function(t,n){var e=Wu(t);return function(r,i){return n(e(r),i,t)}}(t,n):Wu(t)}));return o.columns=i||[],o},parseRows:r,format:function(n,e){return null==e&&(e=Zu(n)),[e.map(a).join(t)].concat(i(n,e)).join(\"\\n\")},formatBody:function(t,n){return null==n&&(n=Zu(t)),i(t,n).join(\"\\n\")},formatRows:function(t){return t.map(o).join(\"\\n\")},formatRow:o,formatValue:a}}var tc=Ju(\",\"),nc=tc.parse,ec=tc.parseRows,rc=tc.format,ic=tc.formatBody,oc=tc.formatRows,ac=tc.formatRow,uc=tc.formatValue,cc=Ju(\"\\t\"),fc=cc.parse,sc=cc.parseRows,lc=cc.format,hc=cc.formatBody,dc=cc.formatRows,pc=cc.formatRow,gc=cc.formatValue;const yc=new Date(\"2019-01-01T00:00\").getHours()||new Date(\"2019-07-01T00:00\").getHours();function vc(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.blob()}function _c(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.arrayBuffer()}function bc(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);return t.text()}function mc(t,n){return fetch(t,n).then(bc)}function xc(t){return function(n,e,r){return 2===arguments.length&&\"function\"==typeof e&&(r=e,e=void 0),mc(n,e).then((function(n){return t(n,r)}))}}var wc=xc(nc),Mc=xc(fc);function Tc(t){if(!t.ok)throw new Error(t.status+\" \"+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Ac(t){return(n,e)=>mc(n,e).then((n=>(new DOMParser).parseFromString(n,t)))}var Sc=Ac(\"application/xml\"),Ec=Ac(\"text/html\"),Nc=Ac(\"image/svg+xml\");function kc(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,a,u,c,f,s,l,h,d=t._root,p={data:r},g=t._x0,y=t._y0,v=t._x1,_=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((f=n>=(o=(g+v)/2))?g=o:v=o,(s=e>=(a=(y+_)/2))?y=a:_=a,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===u&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(g+v)/2))?g=o:v=o,(s=e>=(a=(y+_)/2))?y=a:_=a}while((l=s<<1|f)==(h=(c>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}function Cc(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function Pc(t){return t[0]}function zc(t){return t[1]}function $c(t,n,e){var r=new Dc(null==n?Pc:n,null==e?zc:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Dc(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Rc(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Fc=$c.prototype=Dc.prototype;function qc(t){return function(){return t}}function Uc(t){return 1e-6*(t()-.5)}function Ic(t){return t.x+t.vx}function Oc(t){return t.y+t.vy}function Bc(t){return t.index}function Yc(t,n){var e=t.get(n);if(!e)throw new Error(\"node not found: \"+n);return e}Fc.copy=function(){var t,n,e=new Dc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Rc(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Rc(n));return e},Fc.add=function(t){const n=+this._x.call(null,t),e=+this._y.call(null,t);return kc(this.cover(n,e),n,e,t)},Fc.addAll=function(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;e<o;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(a[e]=r,u[e]=i,r<c&&(c=r),r>s&&(s=r),i<f&&(f=i),i>l&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;e<o;++e)kc(this,a[e],u[e],t[e]);return this},Fc.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{for(var a,u,c=i-e||1,f=this._root;e>t||t>=i||r>n||n>=o;)switch(u=(n<r)<<1|t<e,(a=new Array(4))[u]=f,f=a,c*=2,u){case 0:i=e+c,o=r+c;break;case 1:e=i-c,o=r+c;break;case 2:i=e+c,r=o-c;break;case 3:e=i-c,r=o-c}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},Fc.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},Fc.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Fc.find=function(t,n,e){var r,i,o,a,u,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new Cc(g,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>h||(o=c.y0)>d||(a=c.x1)<s||(u=c.y1)<l))if(g.length){var y=(i+a)/2,v=(o+u)/2;p.push(new Cc(g[3],y,v,a,u),new Cc(g[2],i,v,y,u),new Cc(g[1],y,o,a,v),new Cc(g[0],i,o,y,v)),(f=(n>=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,g.data),b=n-+this._y.call(null,g.data),m=_*_+b*b;if(m<e){var x=Math.sqrt(e=m);s=t-x,l=n-x,h=t+x,d=n+x,r=g.data}}return r},Fc.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var n,e,r,i,o,a,u,c,f,s,l,h,d=this._root,p=this._x0,g=this._y0,y=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((f=o>=(u=(p+y)/2))?p=u:y=u,(s=a>=(c=(g+v)/2))?g=c:v=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},Fc.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Fc.root=function(){return this._root},Fc.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},Fc.visit=function(t){var n,e,r,i,o,a,u=[],c=this._root;for(c&&u.push(new Cc(c,this._x0,this._y0,this._x1,this._y1));n=u.pop();)if(!t(c=n.node,r=n.x0,i=n.y0,o=n.x1,a=n.y1)&&c.length){var f=(r+o)/2,s=(i+a)/2;(e=c[3])&&u.push(new Cc(e,f,s,o,a)),(e=c[2])&&u.push(new Cc(e,r,s,f,a)),(e=c[1])&&u.push(new Cc(e,f,i,o,s)),(e=c[0])&&u.push(new Cc(e,r,i,f,s))}return this},Fc.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new Cc(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,a=n.x0,u=n.y0,c=n.x1,f=n.y1,s=(a+c)/2,l=(u+f)/2;(o=i[0])&&e.push(new Cc(o,a,u,s,l)),(o=i[1])&&e.push(new Cc(o,s,u,c,l)),(o=i[2])&&e.push(new Cc(o,a,l,s,f)),(o=i[3])&&e.push(new Cc(o,s,l,c,f))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Fc.x=function(t){return arguments.length?(this._x=t,this):this._x},Fc.y=function(t){return arguments.length?(this._y=t,this):this._y};const Lc=1664525,jc=1013904223,Hc=4294967296;function Xc(t){return t.x}function Gc(t){return t.y}var Vc=Math.PI*(3-Math.sqrt(5));function Wc(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf(\"e\"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Zc(t){return(t=Wc(Math.abs(t)))?t[1]:NaN}var Kc,Qc=/^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;function Jc(t){if(!(n=Qc.exec(t)))throw new Error(\"invalid format: \"+t);var n;return new tf({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function tf(t){this.fill=void 0===t.fill?\" \":t.fill+\"\",this.align=void 0===t.align?\">\":t.align+\"\",this.sign=void 0===t.sign?\"-\":t.sign+\"\",this.symbol=void 0===t.symbol?\"\":t.symbol+\"\",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?\"\":t.type+\"\"}function nf(t,n){var e=Wc(t,n);if(!e)return t+\"\";var r=e[0],i=e[1];return i<0?\"0.\"+new Array(-i).join(\"0\")+r:r.length>i+1?r.slice(0,i+1)+\".\"+r.slice(i+1):r+new Array(i-r.length+2).join(\"0\")}Jc.prototype=tf.prototype,tf.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?\"0\":\"\")+(void 0===this.width?\"\":Math.max(1,0|this.width))+(this.comma?\",\":\"\")+(void 0===this.precision?\"\":\".\"+Math.max(0,0|this.precision))+(this.trim?\"~\":\"\")+this.type};var ef={\"%\":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+\"\",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString(\"en\").replace(/,/g,\"\"):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>nf(100*t,n),r:nf,s:function(t,n){var e=Wc(t,n);if(!e)return t+\"\";var r=e[0],i=e[1],o=i-(Kc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join(\"0\"):o>0?r.slice(0,o)+\".\"+r.slice(o):\"0.\"+new Array(1-o).join(\"0\")+Wc(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function rf(t){return t}var of,af=Array.prototype.map,uf=[\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];function cf(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?rf:(n=af.call(t.grouping,Number),e=t.thousands+\"\",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(t.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?\"\":t.currency[0]+\"\",o=void 0===t.currency?\"\":t.currency[1]+\"\",a=void 0===t.decimal?\".\":t.decimal+\"\",u=void 0===t.numerals?rf:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(af.call(t.numerals,String)),c=void 0===t.percent?\"%\":t.percent+\"\",f=void 0===t.minus?\"−\":t.minus+\"\",s=void 0===t.nan?\"NaN\":t.nan+\"\";function l(t){var n=(t=Jc(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,v=t.trim,_=t.type;\"n\"===_?(g=!0,_=\"g\"):ef[_]||(void 0===y&&(y=12),v=!0,_=\"g\"),(d||\"0\"===n&&\"=\"===e)&&(d=!0,n=\"0\",e=\"=\");var b=\"$\"===h?i:\"#\"===h&&/[boxX]/.test(_)?\"0\"+_.toLowerCase():\"\",m=\"$\"===h?o:/[%p]/.test(_)?c:\"\",x=ef[_],w=/[defgprs%]/.test(_);function M(t){var i,o,c,h=b,M=m;if(\"c\"===_)M=x(t)+M,t=\"\";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),y),v&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case\".\":i=n=r;break;case\"0\":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),T&&0==+t&&\"+\"!==l&&(T=!1),h=(T?\"(\"===l?l:f:\"-\"===l||\"(\"===l?\"\":l)+h,M=(\"s\"===_?uf[8+Kc/3]:\"\")+M+(T&&\"(\"===l?\")\":\"\"),w)for(i=-1,o=t.length;++i<o;)if(48>(c=t.charCodeAt(i))||c>57){M=(46===c?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var A=h.length+t.length+M.length,S=A<p?new Array(p-A+1).join(n):\"\";switch(g&&d&&(t=r(S+t,S.length?p-M.length:1/0),S=\"\"),e){case\"<\":t=h+t+M+S;break;case\"=\":t=h+S+t+M;break;case\"^\":t=S.slice(0,A=S.length>>1)+h+t+M+S.slice(A);break;default:t=S+h+t+M}return u(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return t+\"\"},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Jc(t)).type=\"f\",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Zc(n)/3))),i=Math.pow(10,-r),o=uf[8+r/3];return function(t){return e(i*t)+o}}}}function ff(n){return of=cf(n),t.format=of.format,t.formatPrefix=of.formatPrefix,of}function sf(t){return Math.max(0,-Zc(Math.abs(t)))}function lf(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Zc(n)/3)))-Zc(Math.abs(t)))}function hf(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Zc(n)-Zc(t))+1}t.format=void 0,t.formatPrefix=void 0,ff({thousands:\",\",grouping:[3],currency:[\"$\",\"\"]});var df=1e-6,pf=1e-12,gf=Math.PI,yf=gf/2,vf=gf/4,_f=2*gf,bf=180/gf,mf=gf/180,xf=Math.abs,wf=Math.atan,Mf=Math.atan2,Tf=Math.cos,Af=Math.ceil,Sf=Math.exp,Ef=Math.hypot,Nf=Math.log,kf=Math.pow,Cf=Math.sin,Pf=Math.sign||function(t){return t>0?1:t<0?-1:0},zf=Math.sqrt,$f=Math.tan;function Df(t){return t>1?0:t<-1?gf:Math.acos(t)}function Rf(t){return t>1?yf:t<-1?-yf:Math.asin(t)}function Ff(t){return(t=Cf(t/2))*t}function qf(){}function Uf(t,n){t&&Of.hasOwnProperty(t.type)&&Of[t.type](t,n)}var If={Feature:function(t,n){Uf(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)Uf(e[r].geometry,n)}},Of={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){Bf(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)Bf(e[r],n,0)},Polygon:function(t,n){Yf(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)Yf(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)Uf(e[r],n)}};function Bf(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i<o;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function Yf(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)Bf(t[e],n,1);n.polygonEnd()}function Lf(t,n){t&&If.hasOwnProperty(t.type)?If[t.type](t,n):Uf(t,n)}var jf,Hf,Xf,Gf,Vf,Wf,Zf,Kf,Qf,Jf,ts,ns,es,rs,is,os,as=new T,us=new T,cs={point:qf,lineStart:qf,lineEnd:qf,polygonStart:function(){as=new T,cs.lineStart=fs,cs.lineEnd=ss},polygonEnd:function(){var t=+as;us.add(t<0?_f+t:t),this.lineStart=this.lineEnd=this.point=qf},sphere:function(){us.add(_f)}};function fs(){cs.point=ls}function ss(){hs(jf,Hf)}function ls(t,n){cs.point=hs,jf=t,Hf=n,Xf=t*=mf,Gf=Tf(n=(n*=mf)/2+vf),Vf=Cf(n)}function hs(t,n){var e=(t*=mf)-Xf,r=e>=0?1:-1,i=r*e,o=Tf(n=(n*=mf)/2+vf),a=Cf(n),u=Vf*a,c=Gf*o+u*Tf(i),f=u*r*Cf(i);as.add(Mf(f,c)),Xf=t,Gf=o,Vf=a}function ds(t){return[Mf(t[1],t[0]),Rf(t[2])]}function ps(t){var n=t[0],e=t[1],r=Tf(e);return[r*Tf(n),r*Cf(n),Cf(e)]}function gs(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ys(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function vs(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function _s(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function bs(t){var n=zf(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ms,xs,ws,Ms,Ts,As,Ss,Es,Ns,ks,Cs,Ps,zs,$s,Ds,Rs,Fs={point:qs,lineStart:Is,lineEnd:Os,polygonStart:function(){Fs.point=Bs,Fs.lineStart=Ys,Fs.lineEnd=Ls,rs=new T,cs.polygonStart()},polygonEnd:function(){cs.polygonEnd(),Fs.point=qs,Fs.lineStart=Is,Fs.lineEnd=Os,as<0?(Wf=-(Kf=180),Zf=-(Qf=90)):rs>df?Qf=90:rs<-df&&(Zf=-90),os[0]=Wf,os[1]=Kf},sphere:function(){Wf=-(Kf=180),Zf=-(Qf=90)}};function qs(t,n){is.push(os=[Wf=t,Kf=t]),n<Zf&&(Zf=n),n>Qf&&(Qf=n)}function Us(t,n){var e=ps([t*mf,n*mf]);if(es){var r=ys(es,e),i=ys([r[1],-r[0],0],r);bs(i),i=ds(i);var o,a=t-Jf,u=a>0?1:-1,c=i[0]*bf*u,f=xf(a)>180;f^(u*Jf<c&&c<u*t)?(o=i[1]*bf)>Qf&&(Qf=o):f^(u*Jf<(c=(c+360)%360-180)&&c<u*t)?(o=-i[1]*bf)<Zf&&(Zf=o):(n<Zf&&(Zf=n),n>Qf&&(Qf=n)),f?t<Jf?js(Wf,t)>js(Wf,Kf)&&(Kf=t):js(t,Kf)>js(Wf,Kf)&&(Wf=t):Kf>=Wf?(t<Wf&&(Wf=t),t>Kf&&(Kf=t)):t>Jf?js(Wf,t)>js(Wf,Kf)&&(Kf=t):js(t,Kf)>js(Wf,Kf)&&(Wf=t)}else is.push(os=[Wf=t,Kf=t]);n<Zf&&(Zf=n),n>Qf&&(Qf=n),es=e,Jf=t}function Is(){Fs.point=Us}function Os(){os[0]=Wf,os[1]=Kf,Fs.point=qs,es=null}function Bs(t,n){if(es){var e=t-Jf;rs.add(xf(e)>180?e+(e>0?360:-360):e)}else ts=t,ns=n;cs.point(t,n),Us(t,n)}function Ys(){cs.lineStart()}function Ls(){Bs(ts,ns),cs.lineEnd(),xf(rs)>df&&(Wf=-(Kf=180)),os[0]=Wf,os[1]=Kf,es=null}function js(t,n){return(n-=t)<0?n+360:n}function Hs(t,n){return t[0]-n[0]}function Xs(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var Gs={sphere:qf,point:Vs,lineStart:Zs,lineEnd:Js,polygonStart:function(){Gs.lineStart=tl,Gs.lineEnd=nl},polygonEnd:function(){Gs.lineStart=Zs,Gs.lineEnd=Js}};function Vs(t,n){t*=mf;var e=Tf(n*=mf);Ws(e*Tf(t),e*Cf(t),Cf(n))}function Ws(t,n,e){++ms,ws+=(t-ws)/ms,Ms+=(n-Ms)/ms,Ts+=(e-Ts)/ms}function Zs(){Gs.point=Ks}function Ks(t,n){t*=mf;var e=Tf(n*=mf);$s=e*Tf(t),Ds=e*Cf(t),Rs=Cf(n),Gs.point=Qs,Ws($s,Ds,Rs)}function Qs(t,n){t*=mf;var e=Tf(n*=mf),r=e*Tf(t),i=e*Cf(t),o=Cf(n),a=Mf(zf((a=Ds*o-Rs*i)*a+(a=Rs*r-$s*o)*a+(a=$s*i-Ds*r)*a),$s*r+Ds*i+Rs*o);xs+=a,As+=a*($s+($s=r)),Ss+=a*(Ds+(Ds=i)),Es+=a*(Rs+(Rs=o)),Ws($s,Ds,Rs)}function Js(){Gs.point=Vs}function tl(){Gs.point=el}function nl(){rl(Ps,zs),Gs.point=Vs}function el(t,n){Ps=t,zs=n,t*=mf,n*=mf,Gs.point=rl;var e=Tf(n);$s=e*Tf(t),Ds=e*Cf(t),Rs=Cf(n),Ws($s,Ds,Rs)}function rl(t,n){t*=mf;var e=Tf(n*=mf),r=e*Tf(t),i=e*Cf(t),o=Cf(n),a=Ds*o-Rs*i,u=Rs*r-$s*o,c=$s*i-Ds*r,f=Ef(a,u,c),s=Rf(f),l=f&&-s/f;Ns.add(l*a),ks.add(l*u),Cs.add(l*c),xs+=s,As+=s*($s+($s=r)),Ss+=s*(Ds+(Ds=i)),Es+=s*(Rs+(Rs=o)),Ws($s,Ds,Rs)}function il(t){return function(){return t}}function ol(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return(e=n.invert(e,r))&&t.invert(e[0],e[1])}),e}function al(t,n){return xf(t)>gf&&(t-=Math.round(t/_f)*_f),[t,n]}function ul(t,n,e){return(t%=_f)?n||e?ol(fl(t),sl(n,e)):fl(t):n||e?sl(n,e):al}function cl(t){return function(n,e){return xf(n+=t)>gf&&(n-=Math.round(n/_f)*_f),[n,e]}}function fl(t){var n=cl(t);return n.invert=cl(-t),n}function sl(t,n){var e=Tf(t),r=Cf(t),i=Tf(n),o=Cf(n);function a(t,n){var a=Tf(n),u=Tf(t)*a,c=Cf(t)*a,f=Cf(n),s=f*e+u*r;return[Mf(c*i-s*o,u*e-f*r),Rf(s*i+c*o)]}return a.invert=function(t,n){var a=Tf(n),u=Tf(t)*a,c=Cf(t)*a,f=Cf(n),s=f*i-c*o;return[Mf(c*i+f*o,u*e+s*r),Rf(s*e-u*r)]},a}function ll(t){function n(n){return(n=t(n[0]*mf,n[1]*mf))[0]*=bf,n[1]*=bf,n}return t=ul(t[0]*mf,t[1]*mf,t.length>2?t[2]*mf:0),n.invert=function(n){return(n=t.invert(n[0]*mf,n[1]*mf))[0]*=bf,n[1]*=bf,n},n}function hl(t,n,e,r,i,o){if(e){var a=Tf(n),u=Cf(n),c=r*e;null==i?(i=n+r*_f,o=n-c/2):(i=dl(a,i),o=dl(a,o),(r>0?i<o:i>o)&&(i+=r*_f));for(var f,s=i;r>0?s>o:s<o;s-=c)f=ds([a,-u*Tf(s),-u*Cf(s)]),t.point(f[0],f[1])}}function dl(t,n){(n=ps(n))[0]-=t,bs(n);var e=Df(-n[1]);return((-n[2]<0?-e:e)+_f-df)%_f}function pl(){var t,n=[];return{point:function(n,e,r){t.push([n,e,r])},lineStart:function(){n.push(t=[])},lineEnd:qf,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function gl(t,n){return xf(t[0]-n[0])<df&&xf(t[1]-n[1])<df}function yl(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function vl(t,n,e,r,i){var o,a,u=[],c=[];if(t.forEach((function(t){if(!((n=t.length-1)<=0)){var n,e,r=t[0],a=t[n];if(gl(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<n;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2*df}u.push(e=new yl(r,t,null,!0)),c.push(e.o=new yl(r,null,e,!1)),u.push(e=new yl(a,t,null,!1)),c.push(e.o=new yl(a,null,e,!0))}})),u.length){for(c.sort(n),_l(u),_l(c),o=0,a=c.length;o<a;++o)c[o].e=e=!e;for(var f,s,l=u[0];;){for(var h=l,d=!0;h.v;)if((h=h.n)===l)return;f=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,a=f.length;o<a;++o)i.point((s=f[o])[0],s[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(f=h.p.z,o=f.length-1;o>=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function _l(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}function bl(t){return xf(t[0])<=gf?t[0]:Pf(t[0])*((xf(t[0])+gf)%_f-gf)}function ml(t,n){var e=bl(n),r=n[1],i=Cf(r),o=[Cf(e),-Tf(e),0],a=0,u=0,c=new T;1===i?r=yf+df:-1===i&&(r=-yf-df);for(var f=0,s=t.length;f<s;++f)if(h=(l=t[f]).length)for(var l,h,d=l[h-1],p=bl(d),g=d[1]/2+vf,y=Cf(g),v=Tf(g),_=0;_<h;++_,p=m,y=w,v=M,d=b){var b=l[_],m=bl(b),x=b[1]/2+vf,w=Cf(x),M=Tf(x),A=m-p,S=A>=0?1:-1,E=S*A,N=E>gf,k=y*w;if(c.add(Mf(k*S*Cf(E),v*M+k*Tf(E))),a+=N?A+S*_f:A,N^p>=e^m>=e){var C=ys(ps(d),ps(b));bs(C);var P=ys(o,C);bs(P);var z=(N^A>=0?-1:1)*Rf(P[2]);(r>z||r===z&&(C[0]||C[1]))&&(u+=N^A>=0?1:-1)}}return(a<-df||a<df&&c<-pf)^1&u}function xl(t,n,e,r){return function(i){var o,a,u,c=n(i),f=pl(),s=n(f),l=!1,h={point:d,lineStart:g,lineEnd:y,polygonStart:function(){h.point=v,h.lineStart=_,h.lineEnd=b,a=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=g,h.lineEnd=y,a=ft(a);var t=ml(o,r);a.length?(l||(i.polygonStart(),l=!0),vl(a,Ml,t,e,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(n,e){t(n,e)&&i.point(n,e)}function p(t,n){c.point(t,n)}function g(){h.point=p,c.lineStart()}function y(){h.point=d,c.lineEnd()}function v(t,n){u.push([t,n]),s.point(t,n)}function _(){s.lineStart(),u=[]}function b(){v(u[0][0],u[0][1]),s.lineEnd();var t,n,e,r,c=s.clean(),h=f.result(),d=h.length;if(u.pop(),o.push(u),u=null,d)if(1&c){if((n=(e=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t<n;++t)i.point((r=e[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(wl))}return h}}function wl(t){return t.length>1}function Ml(t,n){return((t=t.x)[0]<0?t[1]-yf-df:yf-t[1])-((n=n.x)[0]<0?n[1]-yf-df:yf-n[1])}al.invert=al;var Tl=xl((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?gf:-gf,c=xf(o-e);xf(c-gf)<df?(t.point(e,r=(r+a)/2>0?yf:-yf),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&c>=gf&&(xf(e-i)<df&&(e-=i*df),xf(o-u)<df&&(o-=u*df),r=function(t,n,e,r){var i,o,a=Cf(t-e);return xf(a)>df?wf((Cf(n)*(o=Tf(r))*Cf(e)-Cf(r)*(i=Tf(n))*Cf(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*yf,r.point(-gf,i),r.point(0,i),r.point(gf,i),r.point(gf,0),r.point(gf,-i),r.point(0,-i),r.point(-gf,-i),r.point(-gf,0),r.point(-gf,i);else if(xf(t[0]-n[0])>df){var o=t[0]<n[0]?gf:-gf;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])}),[-gf,-yf]);function Al(t){var n=Tf(t),e=2*mf,r=n>0,i=xf(n)>df;function o(t,e){return Tf(t)*Tf(e)>n}function a(t,e,r){var i=[1,0,0],o=ys(ps(t),ps(e)),a=gs(o,o),u=o[0],c=a-u*u;if(!c)return!r&&t;var f=n*a/c,s=-n*u/c,l=ys(i,o),h=_s(i,f);vs(h,_s(o,s));var d=l,p=gs(h,d),g=gs(d,d),y=p*p-g*(gs(h,h)-1);if(!(y<0)){var v=zf(y),_=_s(d,(-p-v)/g);if(vs(_,h),_=ds(_),!r)return _;var b,m=t[0],x=e[0],w=t[1],M=e[1];x<m&&(b=m,m=x,x=b);var T=x-m,A=xf(T-gf)<df;if(!A&&M<w&&(b=w,w=M,M=b),A||T<df?A?w+M>0^_[1]<(xf(_[0]-m)<df?w:M):w<=_[1]&&_[1]<=M:T>gf^(m<=_[0]&&_[0]<=x)){var S=_s(d,(-p+v)/g);return vs(S,h),[_,ds(S)]}}}function u(n,e){var i=r?t:gf-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return xl(o,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],g=o(l,h),y=r?g?0:u(l,h):g?u(l+(l<0?gf:-gf),h):0;if(!n&&(f=c=g)&&t.lineStart(),g!==c&&(!(d=a(n,p))||gl(n,d)||gl(p,d))&&(p[2]=1),g!==c)s=0,g?(t.lineStart(),d=a(p,n),t.point(d[0],d[1])):(d=a(n,p),t.point(d[0],d[1],2),t.lineEnd()),n=d;else if(i&&n&&r^g){var v;y&e||!(v=a(p,n,!0))||(s=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3)))}!g||n&&gl(n,p)||t.point(p[0],p[1]),n=p,c=g,e=y},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,o){hl(o,t,e,i,n,r)}),r?[0,-t]:[-gf,t-gf])}var Sl,El,Nl,kl,Cl=1e9,Pl=-Cl;function zl(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,u,f){var s=0,l=0;if(null==i||(s=a(i,u))!==(l=a(o,u))||c(i,o)<0^u>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+u+4)%4)!==l);else f.point(o[0],o[1])}function a(r,i){return xf(r[0]-t)<df?i>0?0:3:xf(r[0]-e)<df?i>0?2:1:xf(r[1]-n)<df?i>0?1:0:i>0?3:2}function u(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,f,s,l,h,d,p,g,y,v,_,b=a,m=pl(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);v=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(M(l,h),d&&y&&m.rejoin(),c.push(m.result()));x.point=w,y&&b.lineEnd()},polygonStart:function(){b=m,c=[],f=[],_=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;e<i;++e)for(var o,a,u=f[e],c=1,s=u.length,l=u[0],h=l[0],d=l[1];c<s;++c)o=h,a=d,h=(l=u[c])[0],d=l[1],a<=r?d>r&&(h-o)*(r-a)>(d-a)*(t-o)&&++n:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--n;return n}(),e=_&&n,i=(c=ft(c)).length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&vl(c,u,n,o,a),a.polygonEnd());b=a,c=f=s=null}};function w(t,n){i(t,n)&&b.point(t,n)}function M(o,a){var u=i(o,a);if(f&&s.push([o,a]),v)l=o,h=a,d=u,v=!1,u&&(b.lineStart(),b.point(o,a));else if(u&&y)b.point(o,a);else{var c=[p=Math.max(Pl,Math.min(Cl,p)),g=Math.max(Pl,Math.min(Cl,g))],m=[o=Math.max(Pl,Math.min(Cl,o)),a=Math.max(Pl,Math.min(Cl,a))];!function(t,n,e,r,i,o){var a,u=t[0],c=t[1],f=0,s=1,l=n[0]-u,h=n[1]-c;if(a=e-u,l||!(a>0)){if(a/=l,l<0){if(a<f)return;a<s&&(s=a)}else if(l>0){if(a>s)return;a>f&&(f=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>s)return;a>f&&(f=a)}else if(l>0){if(a<f)return;a<s&&(s=a)}if(a=r-c,h||!(a>0)){if(a/=h,h<0){if(a<f)return;a<s&&(s=a)}else if(h>0){if(a>s)return;a>f&&(f=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>s)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<s&&(s=a)}return f>0&&(t[0]=u+f*l,t[1]=c+f*h),s<1&&(n[0]=u+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?u&&(b.lineStart(),b.point(o,a),_=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(m[0],m[1]),u||b.lineEnd(),_=!1)}p=o,g=a,y=u}return x}}var $l={sphere:qf,point:qf,lineStart:function(){$l.point=Rl,$l.lineEnd=Dl},lineEnd:qf,polygonStart:qf,polygonEnd:qf};function Dl(){$l.point=$l.lineEnd=qf}function Rl(t,n){El=t*=mf,Nl=Cf(n*=mf),kl=Tf(n),$l.point=Fl}function Fl(t,n){t*=mf;var e=Cf(n*=mf),r=Tf(n),i=xf(t-El),o=Tf(i),a=r*Cf(i),u=kl*e-Nl*r*o,c=Nl*e+kl*r*o;Sl.add(Mf(zf(a*a+u*u),c)),El=t,Nl=e,kl=r}function ql(t){return Sl=new T,Lf(t,$l),+Sl}var Ul=[null,null],Il={type:\"LineString\",coordinates:Ul};function Ol(t,n){return Ul[0]=t,Ul[1]=n,ql(Il)}var Bl={Feature:function(t,n){return Ll(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)if(Ll(e[r].geometry,n))return!0;return!1}},Yl={Sphere:function(){return!0},Point:function(t,n){return jl(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(jl(e[r],n))return!0;return!1},LineString:function(t,n){return Hl(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(Hl(e[r],n))return!0;return!1},Polygon:function(t,n){return Xl(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(Xl(e[r],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)if(Ll(e[r],n))return!0;return!1}};function Ll(t,n){return!(!t||!Yl.hasOwnProperty(t.type))&&Yl[t.type](t,n)}function jl(t,n){return 0===Ol(t,n)}function Hl(t,n){for(var e,r,i,o=0,a=t.length;o<a;o++){if(0===(r=Ol(t[o],n)))return!0;if(o>0&&(i=Ol(t[o],t[o-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))<pf*i)return!0;e=r}return!1}function Xl(t,n){return!!ml(t.map(Gl),Vl(n))}function Gl(t){return(t=t.map(Vl)).pop(),t}function Vl(t){return[t[0]*mf,t[1]*mf]}function Wl(t,n,e){var r=lt(t,n-df,e).concat(n);return function(t){return r.map((function(n){return[t,n]}))}}function Zl(t,n,e){var r=lt(t,n-df,e).concat(n);return function(t){return r.map((function(n){return[n,t]}))}}function Kl(){var t,n,e,r,i,o,a,u,c,f,s,l,h=10,d=h,p=90,g=360,y=2.5;function v(){return{type:\"MultiLineString\",coordinates:_()}}function _(){return lt(Af(r/p)*p,e,p).map(s).concat(lt(Af(u/g)*g,a,g).map(l)).concat(lt(Af(n/h)*h,t,h).filter((function(t){return xf(t%p)>df})).map(c)).concat(lt(Af(o/d)*d,i,d).filter((function(t){return xf(t%g)>df})).map(f))}return v.lines=function(){return _().map((function(t){return{type:\"LineString\",coordinates:t}}))},v.outline=function(){return{type:\"Polygon\",coordinates:[s(r).concat(l(a).slice(1),s(e).reverse().slice(1),l(u).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],u=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),u>a&&(t=u,u=a,a=t),v.precision(y)):[[r,u],[e,a]]},v.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),v.precision(y)):[[n,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],v):[p,g]},v.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],v):[h,d]},v.precision=function(h){return arguments.length?(y=+h,c=Wl(o,i,90),f=Zl(n,t,y),s=Wl(u,a,90),l=Zl(r,e,y),v):y},v.extentMajor([[-180,-90+df],[180,90-df]]).extentMinor([[-180,-80-df],[180,80+df]])}var Ql,Jl,th,nh,eh=t=>t,rh=new T,ih=new T,oh={point:qf,lineStart:qf,lineEnd:qf,polygonStart:function(){oh.lineStart=ah,oh.lineEnd=fh},polygonEnd:function(){oh.lineStart=oh.lineEnd=oh.point=qf,rh.add(xf(ih)),ih=new T},result:function(){var t=rh/2;return rh=new T,t}};function ah(){oh.point=uh}function uh(t,n){oh.point=ch,Ql=th=t,Jl=nh=n}function ch(t,n){ih.add(nh*t-th*n),th=t,nh=n}function fh(){ch(Ql,Jl)}var sh=oh,lh=1/0,hh=lh,dh=-lh,ph=dh,gh={point:function(t,n){t<lh&&(lh=t);t>dh&&(dh=t);n<hh&&(hh=n);n>ph&&(ph=n)},lineStart:qf,lineEnd:qf,polygonStart:qf,polygonEnd:qf,result:function(){var t=[[lh,hh],[dh,ph]];return dh=ph=-(hh=lh=1/0),t}};var yh,vh,_h,bh,mh=gh,xh=0,wh=0,Mh=0,Th=0,Ah=0,Sh=0,Eh=0,Nh=0,kh=0,Ch={point:Ph,lineStart:zh,lineEnd:Rh,polygonStart:function(){Ch.lineStart=Fh,Ch.lineEnd=qh},polygonEnd:function(){Ch.point=Ph,Ch.lineStart=zh,Ch.lineEnd=Rh},result:function(){var t=kh?[Eh/kh,Nh/kh]:Sh?[Th/Sh,Ah/Sh]:Mh?[xh/Mh,wh/Mh]:[NaN,NaN];return xh=wh=Mh=Th=Ah=Sh=Eh=Nh=kh=0,t}};function Ph(t,n){xh+=t,wh+=n,++Mh}function zh(){Ch.point=$h}function $h(t,n){Ch.point=Dh,Ph(_h=t,bh=n)}function Dh(t,n){var e=t-_h,r=n-bh,i=zf(e*e+r*r);Th+=i*(_h+t)/2,Ah+=i*(bh+n)/2,Sh+=i,Ph(_h=t,bh=n)}function Rh(){Ch.point=Ph}function Fh(){Ch.point=Uh}function qh(){Ih(yh,vh)}function Uh(t,n){Ch.point=Ih,Ph(yh=_h=t,vh=bh=n)}function Ih(t,n){var e=t-_h,r=n-bh,i=zf(e*e+r*r);Th+=i*(_h+t)/2,Ah+=i*(bh+n)/2,Sh+=i,Eh+=(i=bh*t-_h*n)*(_h+t),Nh+=i*(bh+n),kh+=3*i,Ph(_h=t,bh=n)}var Oh=Ch;function Bh(t){this._context=t}Bh.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,_f)}},result:qf};var Yh,Lh,jh,Hh,Xh,Gh=new T,Vh={point:qf,lineStart:function(){Vh.point=Wh},lineEnd:function(){Yh&&Zh(Lh,jh),Vh.point=qf},polygonStart:function(){Yh=!0},polygonEnd:function(){Yh=null},result:function(){var t=+Gh;return Gh=new T,t}};function Wh(t,n){Vh.point=Zh,Lh=Hh=t,jh=Xh=n}function Zh(t,n){Hh-=t,Xh-=n,Gh.add(zf(Hh*Hh+Xh*Xh)),Hh=t,Xh=n}var Kh=Vh;let Qh,Jh,td,nd;class ed{constructor(t){this._append=null==t?rd:function(t){const n=Math.floor(t);if(!(n>=0))throw new RangeError(`invalid digits: ${t}`);if(n>15)return rd;if(n!==Qh){const t=10**n;Qh=n,Jh=function(n){let e=1;this._+=n[0];for(const r=n.length;e<r;++e)this._+=Math.round(arguments[e]*t)/t+n[e]}}return Jh}(t),this._radius=4.5,this._=\"\"}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+=\"Z\"),this._point=NaN}point(t,n){switch(this._point){case 0:this._append`M${t},${n}`,this._point=1;break;case 1:this._append`L${t},${n}`;break;default:if(this._append`M${t},${n}`,this._radius!==td||this._append!==Jh){const t=this._radius,n=this._;this._=\"\",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,td=t,Jh=this._append,nd=this._,this._=n}this._+=nd}}result(){const t=this._;return this._=\"\",t.length?t:null}}function rd(t){let n=1;this._+=t[0];for(const e=t.length;n<e;++n)this._+=arguments[n]+t[n]}function id(t){return function(n){var e=new od;for(var r in t)e[r]=t[r];return e.stream=n,e}}function od(){}function ad(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Lf(e,t.stream(mh)),n(mh.result()),null!=r&&t.clipExtent(r),t}function ud(t,n,e){return ad(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),a=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,u=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([a,u])}),e)}function cd(t,n,e){return ud(t,[[0,0],n],e)}function fd(t,n,e){return ad(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,a=-i*e[0][1];t.scale(150*i).translate([o,a])}),e)}function sd(t,n,e){return ad(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],a=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,a])}),e)}od.prototype={constructor:od,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var ld=16,hd=Tf(30*mf);function dd(t,n){return+n?function(t,n){function e(r,i,o,a,u,c,f,s,l,h,d,p,g,y){var v=f-r,_=s-i,b=v*v+_*_;if(b>4*n&&g--){var m=a+h,x=u+d,w=c+p,M=zf(m*m+x*x+w*w),T=Rf(w/=M),A=xf(xf(w)-1)<df||xf(o-l)<df?(o+l)/2:Mf(x,m),S=t(A,T),E=S[0],N=S[1],k=E-r,C=N-i,P=_*k-v*C;(P*P/b>n||xf((v*k+_*C)/b-.5)>.3||a*h+u*d+c*p<hd)&&(e(r,i,o,a,u,c,E,N,A,m/=M,x/=M,w,g,y),y.point(E,N),e(E,N,A,m,x,w,f,s,l,h,d,p,g,y))}}return function(n){var r,i,o,a,u,c,f,s,l,h,d,p,g={point:y,lineStart:v,lineEnd:b,polygonStart:function(){n.polygonStart(),g.lineStart=m},polygonEnd:function(){n.polygonEnd(),g.lineStart=v}};function y(e,r){e=t(e,r),n.point(e[0],e[1])}function v(){s=NaN,g.point=_,n.lineStart()}function _(r,i){var o=ps([r,i]),a=t(r,i);e(s,l,f,h,d,p,s=a[0],l=a[1],f=r,h=o[0],d=o[1],p=o[2],ld,n),n.point(s,l)}function b(){g.point=y,n.lineEnd()}function m(){v(),g.point=x,g.lineEnd=w}function x(t,n){_(r=t,n),i=s,o=l,a=h,u=d,c=p,g.point=_}function w(){e(s,l,f,h,d,p,i,o,r,a,u,c,ld,n),g.lineEnd=b,b()}return g}}(t,n):function(t){return id({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}(t)}var pd=id({point:function(t,n){this.stream.point(t*mf,n*mf)}});function gd(t,n,e,r,i,o){if(!o)return function(t,n,e,r,i){function o(o,a){return[n+t*(o*=r),e-t*(a*=i)]}return o.invert=function(o,a){return[(o-n)/t*r,(e-a)/t*i]},o}(t,n,e,r,i);var a=Tf(o),u=Cf(o),c=a*t,f=u*t,s=a/t,l=u/t,h=(u*e-a*n)/t,d=(u*n+a*e)/t;function p(t,o){return[c*(t*=r)-f*(o*=i)+n,e-f*t-c*o]}return p.invert=function(t,n){return[r*(s*t-l*n+h),i*(d-l*t-s*n)]},p}function yd(t){return vd((function(){return t}))()}function vd(t){var n,e,r,i,o,a,u,c,f,s,l=150,h=480,d=250,p=0,g=0,y=0,v=0,_=0,b=0,m=1,x=1,w=null,M=Tl,T=null,A=eh,S=.5;function E(t){return c(t[0]*mf,t[1]*mf)}function N(t){return(t=c.invert(t[0],t[1]))&&[t[0]*bf,t[1]*bf]}function k(){var t=gd(l,0,0,m,x,b).apply(null,n(p,g)),r=gd(l,h-t[0],d-t[1],m,x,b);return e=ul(y,v,_),u=ol(n,r),c=ol(e,u),a=dd(u,S),C()}function C(){return f=s=null,E}return E.stream=function(t){return f&&s===t?f:f=pd(function(t){return id({point:function(n,e){var r=t(n,e);return this.stream.point(r[0],r[1])}})}(e)(M(a(A(s=t)))))},E.preclip=function(t){return arguments.length?(M=t,w=void 0,C()):M},E.postclip=function(t){return arguments.length?(A=t,T=r=i=o=null,C()):A},E.clipAngle=function(t){return arguments.length?(M=+t?Al(w=t*mf):(w=null,Tl),C()):w*bf},E.clipExtent=function(t){return arguments.length?(A=null==t?(T=r=i=o=null,eh):zl(T=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),C()):null==T?null:[[T,r],[i,o]]},E.scale=function(t){return arguments.length?(l=+t,k()):l},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],k()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*mf,g=t[1]%360*mf,k()):[p*bf,g*bf]},E.rotate=function(t){return arguments.length?(y=t[0]%360*mf,v=t[1]%360*mf,_=t.length>2?t[2]%360*mf:0,k()):[y*bf,v*bf,_*bf]},E.angle=function(t){return arguments.length?(b=t%360*mf,k()):b*bf},E.reflectX=function(t){return arguments.length?(m=t?-1:1,k()):m<0},E.reflectY=function(t){return arguments.length?(x=t?-1:1,k()):x<0},E.precision=function(t){return arguments.length?(a=dd(u,S=t*t),C()):zf(S)},E.fitExtent=function(t,n){return ud(E,t,n)},E.fitSize=function(t,n){return cd(E,t,n)},E.fitWidth=function(t,n){return fd(E,t,n)},E.fitHeight=function(t,n){return sd(E,t,n)},function(){return n=t.apply(this,arguments),E.invert=n.invert&&N,k()}}function _d(t){var n=0,e=gf/3,r=vd(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*mf,e=t[1]*mf):[n*bf,e*bf]},i}function bd(t,n){var e=Cf(t),r=(e+Cf(n))/2;if(xf(r)<df)return function(t){var n=Tf(t);function e(t,e){return[t*n,Cf(e)/n]}return e.invert=function(t,e){return[t/n,Rf(e*n)]},e}(t);var i=1+e*(2*r-e),o=zf(i)/r;function a(t,n){var e=zf(i-2*r*Cf(n))/r;return[e*Cf(t*=r),o-e*Tf(t)]}return a.invert=function(t,n){var e=o-n,a=Mf(t,xf(e))*Pf(e);return e*r<0&&(a-=gf*Pf(t)*Pf(e)),[a/r,Rf((i-(t*t+e*e)*r*r)/(2*r))]},a}function md(){return _d(bd).scale(155.424).center([0,33.6442])}function xd(){return md().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function wd(t){return function(n,e){var r=Tf(n),i=Tf(e),o=t(r*i);return o===1/0?[2,0]:[o*i*Cf(n),o*Cf(e)]}}function Md(t){return function(n,e){var r=zf(n*n+e*e),i=t(r),o=Cf(i),a=Tf(i);return[Mf(n*o,r*a),Rf(r&&e*o/r)]}}var Td=wd((function(t){return zf(2/(1+t))}));Td.invert=Md((function(t){return 2*Rf(t/2)}));var Ad=wd((function(t){return(t=Df(t))&&t/Cf(t)}));function Sd(t,n){return[t,Nf($f((yf+n)/2))]}function Ed(t){var n,e,r,i=yd(t),o=i.center,a=i.scale,u=i.translate,c=i.clipExtent,f=null;function s(){var o=gf*a(),u=i(ll(i.rotate()).invert([0,0]));return c(null==f?[[u[0]-o,u[1]-o],[u[0]+o,u[1]+o]]:t===Sd?[[Math.max(u[0]-o,f),n],[Math.min(u[0]+o,e),r]]:[[f,Math.max(u[1]-o,n)],[e,Math.min(u[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),s()):a()},i.translate=function(t){return arguments.length?(u(t),s()):u()},i.center=function(t){return arguments.length?(o(t),s()):o()},i.clipExtent=function(t){return arguments.length?(null==t?f=n=e=r=null:(f=+t[0][0],n=+t[0][1],e=+t[1][0],r=+t[1][1]),s()):null==f?null:[[f,n],[e,r]]},s()}function Nd(t){return $f((yf+t)/2)}function kd(t,n){var e=Tf(t),r=t===n?Cf(t):Nf(e/Tf(n))/Nf(Nd(n)/Nd(t)),i=e*kf(Nd(t),r)/r;if(!r)return Sd;function o(t,n){i>0?n<-yf+df&&(n=-yf+df):n>yf-df&&(n=yf-df);var e=i/kf(Nd(n),r);return[e*Cf(r*t),i-e*Tf(r*t)]}return o.invert=function(t,n){var e=i-n,o=Pf(r)*zf(t*t+e*e),a=Mf(t,xf(e))*Pf(e);return e*r<0&&(a-=gf*Pf(t)*Pf(e)),[a/r,2*wf(kf(i/o,1/r))-yf]},o}function Cd(t,n){return[t,n]}function Pd(t,n){var e=Tf(t),r=t===n?Cf(t):(e-Tf(n))/(n-t),i=e/r+t;if(xf(r)<df)return Cd;function o(t,n){var e=i-n,o=r*t;return[e*Cf(o),i-e*Tf(o)]}return o.invert=function(t,n){var e=i-n,o=Mf(t,xf(e))*Pf(e);return e*r<0&&(o-=gf*Pf(t)*Pf(e)),[o/r,i-Pf(r)*zf(t*t+e*e)]},o}Ad.invert=Md((function(t){return t})),Sd.invert=function(t,n){return[t,2*wf(Sf(n))-yf]},Cd.invert=Cd;var zd=1.340264,$d=-.081106,Dd=893e-6,Rd=.003796,Fd=zf(3)/2;function qd(t,n){var e=Rf(Fd*Cf(n)),r=e*e,i=r*r*r;return[t*Tf(e)/(Fd*(zd+3*$d*r+i*(7*Dd+9*Rd*r))),e*(zd+$d*r+i*(Dd+Rd*r))]}function Ud(t,n){var e=Tf(n),r=Tf(t)*e;return[e*Cf(t)/r,Cf(n)/r]}function Id(t,n){var e=n*n,r=e*e;return[t*(.8707-.131979*e+r*(r*(.003971*e-.001529*r)-.013791)),n*(1.007226+e*(.015085+r*(.028874*e-.044475-.005916*r)))]}function Od(t,n){return[Tf(n)*Cf(t),Cf(n)]}function Bd(t,n){var e=Tf(n),r=1+Tf(t)*e;return[e*Cf(t)/r,Cf(n)/r]}function Yd(t,n){return[Nf($f((yf+n)/2)),-t]}function Ld(t,n){return t.parent===n.parent?1:2}function jd(t,n){return t+n.x}function Hd(t,n){return Math.max(t,n.y)}function Xd(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function Gd(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=Wd)):void 0===n&&(n=Vd);for(var e,r,i,o,a,u=new Qd(t),c=[u];e=c.pop();)if((i=n(e.data))&&(a=(i=Array.from(i)).length))for(e.children=i,o=a-1;o>=0;--o)c.push(r=i[o]=new Qd(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(Kd)}function Vd(t){return t.children}function Wd(t){return Array.isArray(t)?t[1]:null}function Zd(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Kd(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function Qd(t){this.data=t,this.depth=this.height=0,this.parent=null}function Jd(t){return null==t?null:tp(t)}function tp(t){if(\"function\"!=typeof t)throw new Error;return t}function np(){return 0}function ep(t){return function(){return t}}qd.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=e=(r*(zd+$d*i+o*(Dd+Rd*i))-n)/(zd+3*$d*i+o*(7*Dd+9*Rd*i)))*r)*i*i,!(xf(e)<pf));++a);return[Fd*t*(zd+3*$d*i+o*(7*Dd+9*Rd*i))/Tf(r),Rf(Cf(r)/Fd)]},Ud.invert=Md(wf),Id.invert=function(t,n){var e,r=n,i=25;do{var o=r*r,a=o*o;r-=e=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-n)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(xf(e)>df&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},Od.invert=Md(Rf),Bd.invert=Md((function(t){return 2*wf(t)})),Yd.invert=function(t,n){return[-n,2*wf(Sf(t))-yf]},Qd.prototype=Gd.prototype={constructor:Qd,count:function(){return this.eachAfter(Xd)},each:function(t,n){let e=-1;for(const r of this)t.call(n,r,++e,this);return this},eachAfter:function(t,n){for(var e,r,i,o=this,a=[o],u=[],c=-1;o=a.pop();)if(u.push(o),e=o.children)for(r=0,i=e.length;r<i;++r)a.push(e[r]);for(;o=u.pop();)t.call(n,o,++c,this);return this},eachBefore:function(t,n){for(var e,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(n,i,++a,this),e=i.children)for(r=e.length-1;r>=0;--r)o.push(e[r]);return this},find:function(t,n){let e=-1;for(const r of this)if(t.call(n,r,++e,this))return r},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return Gd(this).eachBefore(Zd)},[Symbol.iterator]:function*(){var t,n,e,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e])}while(o.length)}};const rp=1664525,ip=1013904223,op=4294967296;function ap(){let t=1;return()=>(t=(rp*t+ip)%op)/op}function up(t,n){for(var e,r,i=0,o=(t=function(t,n){let e,r,i=t.length;for(;i;)r=n()*i--|0,e=t[i],t[i]=t[r],t[r]=e;return t}(Array.from(t),n)).length,a=[];i<o;)e=t[i],r&&sp(r,e)?++i:(r=hp(a=cp(a,e)),i=0);return r}function cp(t,n){var e,r;if(lp(n,t))return[n];for(e=0;e<t.length;++e)if(fp(n,t[e])&&lp(dp(t[e],n),t))return[t[e],n];for(e=0;e<t.length-1;++e)for(r=e+1;r<t.length;++r)if(fp(dp(t[e],t[r]),n)&&fp(dp(t[e],n),t[r])&&fp(dp(t[r],n),t[e])&&lp(pp(t[e],t[r],n),t))return[t[e],t[r],n];throw new Error}function fp(t,n){var e=t.r-n.r,r=n.x-t.x,i=n.y-t.y;return e<0||e*e<r*r+i*i}function sp(t,n){var e=t.r-n.r+1e-9*Math.max(t.r,n.r,1),r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function lp(t,n){for(var e=0;e<n.length;++e)if(!sp(t,n[e]))return!1;return!0}function hp(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return dp(t[0],t[1]);case 3:return pp(t[0],t[1],t[2])}}function dp(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,a=n.y,u=n.r,c=o-e,f=a-r,s=u-i,l=Math.sqrt(c*c+f*f);return{x:(e+o+c/l*s)/2,y:(r+a+f/l*s)/2,r:(l+i+u)/2}}function pp(t,n,e){var r=t.x,i=t.y,o=t.r,a=n.x,u=n.y,c=n.r,f=e.x,s=e.y,l=e.r,h=r-a,d=r-f,p=i-u,g=i-s,y=c-o,v=l-o,_=r*r+i*i-o*o,b=_-a*a-u*u+c*c,m=_-f*f-s*s+l*l,x=d*p-h*g,w=(p*m-g*b)/(2*x)-r,M=(g*y-p*v)/x,T=(d*b-h*m)/(2*x)-i,A=(h*v-d*y)/x,S=M*M+A*A-1,E=2*(o+w*M+T*A),N=w*w+T*T-o*o,k=-(Math.abs(S)>1e-6?(E+Math.sqrt(E*E-4*S*N))/(2*S):N/E);return{x:r+w+M*k,y:i+T+A*k,r:k}}function gp(t,n,e){var r,i,o,a,u=t.x-n.x,c=t.y-n.y,f=u*u+c*c;f?(i=n.r+e.r,i*=i,a=t.r+e.r,i>(a*=a)?(r=(f+a-i)/(2*f),o=Math.sqrt(Math.max(0,a/f-r*r)),e.x=t.x-r*u-o*c,e.y=t.y-r*c+o*u):(r=(f+i-a)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*u-o*c,e.y=n.y+r*c+o*u)):(e.x=n.x+e.r,e.y=n.y)}function yp(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function vp(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function _p(t){this._=t,this.next=null,this.previous=null}function bp(t,n){if(!(o=(t=function(t){return\"object\"==typeof t&&\"length\"in t?t:Array.from(t)}(t)).length))return 0;var e,r,i,o,a,u,c,f,s,l,h;if((e=t[0]).x=0,e.y=0,!(o>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(o>2))return e.r+r.r;gp(r,e,i=t[2]),e=new _p(e),r=new _p(r),i=new _p(i),e.next=i.previous=r,r.next=e.previous=i,i.next=r.previous=e;t:for(c=3;c<o;++c){gp(e._,r._,i=t[c]),i=new _p(i),f=r.next,s=e.previous,l=r._.r,h=e._.r;do{if(l<=h){if(yp(f._,i._)){r=f,e.next=r,r.previous=e,--c;continue t}l+=f._.r,f=f.next}else{if(yp(s._,i._)){(e=s).next=r,r.previous=e,--c;continue t}h+=s._.r,s=s.previous}}while(f!==s.next);for(i.previous=e,i.next=r,e.next=r.previous=r=i,a=vp(e);(i=i.next)!==r;)(u=vp(i))<a&&(e=i,a=u);r=e.next}for(e=[r._],i=r;(i=i.next)!==r;)e.push(i._);for(i=up(e,n),c=0;c<o;++c)(e=t[c]).x-=i.x,e.y-=i.y;return i.r}function mp(t){return Math.sqrt(t.value)}function xp(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function wp(t,n,e){return function(r){if(i=r.children){var i,o,a,u=i.length,c=t(r)*n||0;if(c)for(o=0;o<u;++o)i[o].r+=c;if(a=bp(i,e),c)for(o=0;o<u;++o)i[o].r-=c;r.r=a+c}}}function Mp(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}function Tp(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Ap(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,f=t.value&&(r-n)/t.value;++u<c;)(o=a[u]).y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*f}var Sp={depth:-1},Ep={},Np={};function kp(t){return t.id}function Cp(t){return t.parentId}function Pp(t){let n=t.length;if(n<2)return\"\";for(;--n>1&&!zp(t,n););return t.slice(0,n)}function zp(t,n){if(\"/\"===t[n]){let e=0;for(;n>0&&\"\\\\\"===t[--n];)++e;if(!(1&e))return!0}return!1}function $p(t,n){return t.parent===n.parent?1:2}function Dp(t){var n=t.children;return n?n[0]:t.t}function Rp(t){var n=t.children;return n?n[n.length-1]:t.t}function Fp(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function qp(t,n,e){return t.a.parent===n.parent?t.a:e}function Up(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function Ip(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,f=t.value&&(i-e)/t.value;++u<c;)(o=a[u]).x0=n,o.x1=r,o.y0=e,o.y1=e+=o.value*f}Up.prototype=Object.create(Qd.prototype);var Op=(1+Math.sqrt(5))/2;function Bp(t,n,e,r,i,o){for(var a,u,c,f,s,l,h,d,p,g,y,v=[],_=n.children,b=0,m=0,x=_.length,w=n.value;b<x;){c=i-e,f=o-r;do{s=_[m++].value}while(!s&&m<x);for(l=h=s,y=s*s*(g=Math.max(f/c,c/f)/(w*t)),p=Math.max(h/y,y/l);m<x;++m){if(s+=u=_[m].value,u<l&&(l=u),u>h&&(h=u),y=s*s*g,(d=Math.max(h/y,y/l))>p){s-=u;break}p=d}v.push(a={value:s,dice:c<f,children:_.slice(b,m)}),a.dice?Ap(a,e,r,i,w?r+=f*s/w:o):Ip(a,e,r,w?e+=c*s/w:i,o),w-=s,b=m}return v}var Yp=function t(n){function e(t,e,r,i,o){Bp(n,t,e,r,i,o)}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(Op);var Lp=function t(n){function e(t,e,r,i,o){if((a=t._squarify)&&a.ratio===n)for(var a,u,c,f,s,l=-1,h=a.length,d=t.value;++l<h;){for(c=(u=a[l]).children,f=u.value=0,s=c.length;f<s;++f)u.value+=c[f].value;u.dice?Ap(u,e,r,i,d?r+=(o-r)*u.value/d:o):Ip(u,e,r,d?e+=(i-e)*u.value/d:i,o),d-=u.value}else t._squarify=a=Bp(n,t,e,r,i,o),a.ratio=n}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(Op);function jp(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function Hp(t,n){return t[0]-n[0]||t[1]-n[1]}function Xp(t){const n=t.length,e=[0,1];let r,i=2;for(r=2;r<n;++r){for(;i>1&&jp(t[e[i-2]],t[e[i-1]],t[r])<=0;)--i;e[i++]=r}return e.slice(0,i)}var Gp=Math.random,Vp=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(Gp),Wp=function t(n){function e(t,e){return arguments.length<2&&(e=t,t=0),t=Math.floor(t),e=Math.floor(e)-t,function(){return Math.floor(n()*e+t)}}return e.source=t,e}(Gp),Zp=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else do{r=2*n()-1,o=2*n()-1,i=r*r+o*o}while(!i||i>1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Gp),Kp=function t(n){var e=Zp.source(n);function r(){var t=e.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(Gp),Qp=function t(n){function e(t){return(t=+t)<=0?()=>0:function(){for(var e=0,r=t;r>1;--r)e+=n();return e+r*n()}}return e.source=t,e}(Gp),Jp=function t(n){var e=Qp.source(n);function r(t){if(0==(t=+t))return n;var r=e(t);return function(){return r()/t}}return r.source=t,r}(Gp),tg=function t(n){function e(t){return function(){return-Math.log1p(-n())/t}}return e.source=t,e}(Gp),ng=function t(n){function e(t){if((t=+t)<0)throw new RangeError(\"invalid alpha\");return t=1/-t,function(){return Math.pow(1-n(),t)}}return e.source=t,e}(Gp),eg=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError(\"invalid p\");return function(){return Math.floor(n()+t)}}return e.source=t,e}(Gp),rg=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError(\"invalid p\");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-n())/t)})}return e.source=t,e}(Gp),ig=function t(n){var e=Zp.source(n)();function r(t,r){if((t=+t)<0)throw new RangeError(\"invalid k\");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-n())*r;var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),a=t<1?()=>Math.pow(n(),1/t):()=>1;return function(){do{do{var t=e(),u=1+o*t}while(u<=0);u*=u*u;var c=1-n()}while(c>=1-.0331*t*t*t*t&&Math.log(c)>=.5*t*t+i*(1-u+Math.log(u)));return i*u*a()*r}}return r.source=t,r}(Gp),og=function t(n){var e=ig.source(n);function r(t,n){var r=e(t),i=e(n);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(Gp),ag=function t(n){var e=rg.source(n),r=og.source(n);function i(t,n){return t=+t,(n=+n)>=1?()=>t:n<=0?()=>0:function(){for(var i=0,o=t,a=n;o*a>16&&o*(1-a)>16;){var u=Math.floor((o+1)*a),c=r(u,o-u+1)();c<=a?(i+=u,o-=u,a=(a-c)/(1-c)):(o=u-1,a/=c)}for(var f=a<.5,s=e(f?a:1-a),l=s(),h=0;l<=o;++h)l+=s();return i+(f?h:o-h)}}return i.source=t,i}(Gp),ug=function t(n){function e(t,e,r){var i;return 0==(t=+t)?i=t=>-Math.log(t):(t=1/t,i=n=>Math.pow(n,t)),e=null==e?0:+e,r=null==r?1:+r,function(){return e+r*i(-Math.log1p(-n()))}}return e.source=t,e}(Gp),cg=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){return t+e*Math.tan(Math.PI*n())}}return e.source=t,e}(Gp),fg=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){var r=n();return t+e*Math.log(r/(1-r))}}return e.source=t,e}(Gp),sg=function t(n){var e=ig.source(n),r=ag.source(n);function i(t){return function(){for(var i=0,o=t;o>16;){var a=Math.floor(.875*o),u=e(a)();if(u>o)return i+r(a-1,o/u)();i+=a,o-=u}for(var c=-Math.log1p(-n()),f=0;c<=o;++f)c-=Math.log1p(-n());return i+f}}return i.source=t,i}(Gp);const lg=1/4294967296;function hg(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function dg(t,n){switch(arguments.length){case 0:break;case 1:\"function\"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),\"function\"==typeof n?this.interpolator(n):this.range(n)}return this}const pg=Symbol(\"implicit\");function gg(){var t=new InternMap,n=[],e=[],r=pg;function i(i){let o=t.get(i);if(void 0===o){if(r!==pg)return r;t.set(i,o=n.push(i)-1)}return e[o%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new InternMap;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return i},i.range=function(t){return arguments.length?(e=Array.from(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return gg(n,e).unknown(r)},hg.apply(i,arguments),i}function yg(){var t,n,e=gg().unknown(void 0),r=e.domain,i=e.range,o=0,a=1,u=!1,c=0,f=0,s=.5;function l(){var e=r().length,l=a<o,h=l?a:o,d=l?o:a;t=(d-h)/Math.max(1,e-c+2*f),u&&(t=Math.floor(t)),h+=(d-h-t*(e-c))*s,n=t*(1-c),u&&(h=Math.round(h),n=Math.round(n));var p=lt(e).map((function(n){return h+t*n}));return i(l?p.reverse():p)}return delete e.unknown,e.domain=function(t){return arguments.length?(r(t),l()):r()},e.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,l()):[o,a]},e.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,u=!0,l()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(u=!!t,l()):u},e.padding=function(t){return arguments.length?(c=Math.min(1,f=+t),l()):c},e.paddingInner=function(t){return arguments.length?(c=Math.min(1,t),l()):c},e.paddingOuter=function(t){return arguments.length?(f=+t,l()):f},e.align=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),l()):s},e.copy=function(){return yg(r(),[o,a]).round(u).paddingInner(c).paddingOuter(f).align(s)},hg.apply(l(),arguments)}function vg(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return vg(n())},t}function _g(t){return+t}var bg=[0,1];function mg(t){return t}function xg(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function(t){return function(){return t}}(isNaN(n)?NaN:.5)}function wg(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=xg(i,r),o=e(a,o)):(r=xg(r,i),o=e(o,a)),function(t){return o(r(t))}}function Mg(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)i[a]=xg(t[a],t[a+1]),o[a]=e(n[a],n[a+1]);return function(n){var e=s(t,n,1,r)-1;return o[e](i[e](n))}}function Tg(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ag(){var t,n,e,r,i,o,a=bg,u=bg,c=Gr,f=mg;function s(){var t=Math.min(a.length,u.length);return f!==mg&&(f=function(t,n){var e;return t>n&&(e=t,t=n,n=e),function(e){return Math.max(t,Math.min(n,e))}}(a[0],a[t-1])),r=t>2?Mg:wg,i=o=null,l}function l(n){return null==n||isNaN(n=+n)?e:(i||(i=r(a.map(t),u,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(u,a.map(t),Yr)))(e)))},l.domain=function(t){return arguments.length?(a=Array.from(t,_g),s()):a.slice()},l.range=function(t){return arguments.length?(u=Array.from(t),s()):u.slice()},l.rangeRound=function(t){return u=Array.from(t),c=Vr,s()},l.clamp=function(t){return arguments.length?(f=!!t||mg,s()):f!==mg},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function Sg(){return Ag()(mg,mg)}function Eg(n,e,r,i){var o,a=W(n,e,r);switch((i=Jc(null==i?\",f\":i)).type){case\"s\":var u=Math.max(Math.abs(n),Math.abs(e));return null!=i.precision||isNaN(o=lf(a,u))||(i.precision=o),t.formatPrefix(i,u);case\"\":case\"e\":case\"g\":case\"p\":case\"r\":null!=i.precision||isNaN(o=hf(a,Math.max(Math.abs(n),Math.abs(e))))||(i.precision=o-(\"e\"===i.type));break;case\"f\":case\"%\":null!=i.precision||isNaN(o=sf(a))||(i.precision=o-2*(\"%\"===i.type))}return t.format(i)}function Ng(t){var n=t.domain;return t.ticks=function(t){var e=n();return G(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return Eg(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),a=0,u=o.length-1,c=o[a],f=o[u],s=10;for(f<c&&(i=c,c=f,f=i,i=a,a=u,u=i);s-- >0;){if((i=V(c,f,e))===r)return o[a]=c,o[u]=f,n(o);if(i>0)c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i}r=i}return t},t}function kg(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(e=r,r=i,i=e,e=o,o=a,a=e),t[r]=n.floor(o),t[i]=n.ceil(a),t}function Cg(t){return Math.log(t)}function Pg(t){return Math.exp(t)}function zg(t){return-Math.log(-t)}function $g(t){return-Math.exp(-t)}function Dg(t){return isFinite(t)?+(\"1e\"+t):t<0?0:t}function Rg(t){return(n,e)=>-t(-n,e)}function Fg(n){const e=n(Cg,Pg),r=e.domain;let i,o,a=10;function u(){return i=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),n=>Math.log(n)/t)}(a),o=function(t){return 10===t?Dg:t===Math.E?Math.exp:n=>Math.pow(t,n)}(a),r()[0]<0?(i=Rg(i),o=Rg(o),n(zg,$g)):n(Cg,Pg),e}return e.base=function(t){return arguments.length?(a=+t,u()):a},e.domain=function(t){return arguments.length?(r(t),u()):r()},e.ticks=t=>{const n=r();let e=n[0],u=n[n.length-1];const c=u<e;c&&([e,u]=[u,e]);let f,s,l=i(e),h=i(u);const d=null==t?10:+t;let p=[];if(!(a%1)&&h-l<d){if(l=Math.floor(l),h=Math.ceil(h),e>0){for(;l<=h;++l)for(f=1;f<a;++f)if(s=l<0?f/o(-l):f*o(l),!(s<e)){if(s>u)break;p.push(s)}}else for(;l<=h;++l)for(f=a-1;f>=1;--f)if(s=l>0?f/o(-l):f*o(l),!(s<e)){if(s>u)break;p.push(s)}2*p.length<d&&(p=G(e,u,d))}else p=G(l,h,Math.min(h-l,d)).map(o);return c?p.reverse():p},e.tickFormat=(n,r)=>{if(null==n&&(n=10),null==r&&(r=10===a?\"s\":\",\"),\"function\"!=typeof r&&(a%1||null!=(r=Jc(r)).precision||(r.trim=!0),r=t.format(r)),n===1/0)return r;const u=Math.max(1,a*n/e.ticks().length);return t=>{let n=t/o(Math.round(i(t)));return n*a<a-.5&&(n*=a),n<=u?r(t):\"\"}},e.nice=()=>r(kg(r(),{floor:t=>o(Math.floor(i(t))),ceil:t=>o(Math.ceil(i(t)))})),e}function qg(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function Ug(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function Ig(t){var n=1,e=t(qg(n),Ug(n));return e.constant=function(e){return arguments.length?t(qg(n=+e),Ug(n)):n},Ng(e)}function Og(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function Bg(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Yg(t){return t<0?-t*t:t*t}function Lg(t){var n=t(mg,mg),e=1;return n.exponent=function(n){return arguments.length?1===(e=+n)?t(mg,mg):.5===e?t(Bg,Yg):t(Og(e),Og(1/e)):e},Ng(n)}function jg(){var t=Lg(Ag());return t.copy=function(){return Tg(t,jg()).exponent(t.exponent())},hg.apply(t,arguments),t}function Hg(t){return Math.sign(t)*t*t}const Xg=new Date,Gg=new Date;function Vg(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=n=>(t(n=new Date(+n)),n),i.ceil=e=>(t(e=new Date(e-1)),n(e,1),t(e),e),i.round=t=>{const n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=(t,e)=>(n(t=new Date(+t),null==e?1:Math.floor(e)),t),i.range=(e,r,o)=>{const a=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&o>0))return a;let u;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(u<e&&e<r);return a},i.filter=e=>Vg((n=>{if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})),e&&(i.count=(n,r)=>(Xg.setTime(+n),Gg.setTime(+r),t(Xg),t(Gg),Math.floor(e(Xg,Gg))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?n=>r(n)%t==0:n=>i.count(0,n)%t==0):i:null)),i}const Wg=Vg((()=>{}),((t,n)=>{t.setTime(+t+n)}),((t,n)=>n-t));Wg.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Vg((n=>{n.setTime(Math.floor(n/t)*t)}),((n,e)=>{n.setTime(+n+e*t)}),((n,e)=>(e-n)/t)):Wg:null);const Zg=Wg.range,Kg=1e3,Qg=6e4,Jg=36e5,ty=864e5,ny=6048e5,ey=2592e6,ry=31536e6,iy=Vg((t=>{t.setTime(t-t.getMilliseconds())}),((t,n)=>{t.setTime(+t+n*Kg)}),((t,n)=>(n-t)/Kg),(t=>t.getUTCSeconds())),oy=iy.range,ay=Vg((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kg)}),((t,n)=>{t.setTime(+t+n*Qg)}),((t,n)=>(n-t)/Qg),(t=>t.getMinutes())),uy=ay.range,cy=Vg((t=>{t.setUTCSeconds(0,0)}),((t,n)=>{t.setTime(+t+n*Qg)}),((t,n)=>(n-t)/Qg),(t=>t.getUTCMinutes())),fy=cy.range,sy=Vg((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Kg-t.getMinutes()*Qg)}),((t,n)=>{t.setTime(+t+n*Jg)}),((t,n)=>(n-t)/Jg),(t=>t.getHours())),ly=sy.range,hy=Vg((t=>{t.setUTCMinutes(0,0,0)}),((t,n)=>{t.setTime(+t+n*Jg)}),((t,n)=>(n-t)/Jg),(t=>t.getUTCHours())),dy=hy.range,py=Vg((t=>t.setHours(0,0,0,0)),((t,n)=>t.setDate(t.getDate()+n)),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Qg)/ty),(t=>t.getDate()-1)),gy=py.range,yy=Vg((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/ty),(t=>t.getUTCDate()-1)),vy=yy.range,_y=Vg((t=>{t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+n)}),((t,n)=>(n-t)/ty),(t=>Math.floor(t/ty))),by=_y.range;function my(t){return Vg((n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),((t,n)=>{t.setDate(t.getDate()+7*n)}),((t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Qg)/ny))}const xy=my(0),wy=my(1),My=my(2),Ty=my(3),Ay=my(4),Sy=my(5),Ey=my(6),Ny=xy.range,ky=wy.range,Cy=My.range,Py=Ty.range,zy=Ay.range,$y=Sy.range,Dy=Ey.range;function Ry(t){return Vg((n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)}),((t,n)=>(n-t)/ny))}const Fy=Ry(0),qy=Ry(1),Uy=Ry(2),Iy=Ry(3),Oy=Ry(4),By=Ry(5),Yy=Ry(6),Ly=Fy.range,jy=qy.range,Hy=Uy.range,Xy=Iy.range,Gy=Oy.range,Vy=By.range,Wy=Yy.range,Zy=Vg((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,n)=>{t.setMonth(t.getMonth()+n)}),((t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())),(t=>t.getMonth())),Ky=Zy.range,Qy=Vg((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)}),((t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth())),Jy=Qy.range,tv=Vg((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n)}),((t,n)=>n.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));tv.every=t=>isFinite(t=Math.floor(t))&&t>0?Vg((n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),((n,e)=>{n.setFullYear(n.getFullYear()+e*t)})):null;const nv=tv.range,ev=Vg((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)}),((t,n)=>n.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));ev.every=t=>isFinite(t=Math.floor(t))&&t>0?Vg((n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),((n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null;const rv=ev.range;function iv(t,n,e,i,o,a){const u=[[iy,1,Kg],[iy,5,5e3],[iy,15,15e3],[iy,30,3e4],[a,1,Qg],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,Jg],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,ty],[i,2,1728e5],[e,1,ny],[n,1,ey],[n,3,7776e6],[t,1,ry]];function c(n,e,i){const o=Math.abs(e-n)/i,a=r((([,,t])=>t)).right(u,o);if(a===u.length)return t.every(W(n/ry,e/ry,i));if(0===a)return Wg.every(Math.max(W(n,e,i),1));const[c,f]=u[o/u[a-1][2]<u[a][2]/o?a-1:a];return c.every(f)}return[function(t,n,e){const r=n<t;r&&([t,n]=[n,t]);const i=e&&\"function\"==typeof e.range?e:c(t,n,e),o=i?i.range(t,+n+1):[];return r?o.reverse():o},c]}const[ov,av]=iv(ev,Qy,Fy,_y,hy,cy),[uv,cv]=iv(tv,Zy,xy,py,sy,ay);function fv(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function sv(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function lv(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}function hv(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,c=t.shortMonths,f=mv(i),s=xv(i),l=mv(o),h=xv(o),d=mv(a),p=xv(a),g=mv(u),y=xv(u),v=mv(c),_=xv(c),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Yv,e:Yv,f:Gv,g:i_,G:a_,H:Lv,I:jv,j:Hv,L:Xv,m:Vv,M:Wv,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:k_,s:C_,S:Zv,u:Kv,U:Qv,V:t_,w:n_,W:e_,x:null,X:null,y:r_,Y:o_,Z:u_,\"%\":N_},m={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:c_,e:c_,f:d_,g:T_,G:S_,H:f_,I:s_,j:l_,L:h_,m:p_,M:g_,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:k_,s:C_,S:y_,u:v_,U:__,V:m_,w:x_,W:w_,x:null,X:null,y:M_,Y:A_,Z:E_,\"%\":N_},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=_.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:zv,e:zv,f:Uv,g:Nv,G:Ev,H:Dv,I:Dv,j:$v,L:qv,m:Pv,M:Rv,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s.get(r[0].toLowerCase()),e+r[0].length):-1},q:Cv,Q:Ov,s:Bv,S:Fv,u:Mv,U:Tv,V:Av,w:wv,W:Sv,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:Nv,Y:Ev,Z:kv,\"%\":Iv};function w(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++u<f;)37===t.charCodeAt(u)&&(a.push(t.slice(c,u)),null!=(i=pv[r=t.charAt(++u)])?r=t.charAt(++u):i=\"e\"===r?\" \":\"0\",(o=n[r])&&(r=o(e,i)),a.push(r),c=u+1);return a.push(t.slice(c,u)),a.join(\"\")}}function M(t,n){return function(e){var r,i,o=lv(1900,void 0,1);if(T(o,t,e+=\"\",0)!=e.length)return null;if(\"Q\"in o)return new Date(o.Q);if(\"s\"in o)return new Date(1e3*o.s+(\"L\"in o?o.L:0));if(n&&!(\"Z\"in o)&&(o.Z=0),\"p\"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m=\"q\"in o?o.q:0),\"V\"in o){if(o.V<1||o.V>53)return null;\"w\"in o||(o.w=1),\"Z\"in o?(i=(r=sv(lv(o.y,0,1))).getUTCDay(),r=i>4||0===i?qy.ceil(r):qy(r),r=yy.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=fv(lv(o.y,0,1))).getDay(),r=i>4||0===i?wy.ceil(r):wy(r),r=py.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else(\"W\"in o||\"U\"in o)&&(\"w\"in o||(o.w=\"u\"in o?o.u%7:\"W\"in o?1:0),i=\"Z\"in o?sv(lv(o.y,0,1)).getUTCDay():fv(lv(o.y,0,1)).getDay(),o.m=0,o.d=\"W\"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return\"Z\"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,sv(o)):fv(o)}}function T(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;a<u;){if(r>=c)return-1;if(37===(i=n.charCodeAt(a++))){if(i=n.charAt(a++),!(o=x[i in pv?n.charAt(a++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+=\"\",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+=\"\",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+=\"\",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+=\"\",!0);return n.toString=function(){return t},n}}}var dv,pv={\"-\":\"\",_:\" \",0:\"0\"},gv=/^\\s*\\d+/,yv=/^%/,vv=/[\\\\^$*+?|[\\]().{}]/g;function _v(t,n,e){var r=t<0?\"-\":\"\",i=(r?-t:t)+\"\",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function bv(t){return t.replace(vv,\"\\\\$&\")}function mv(t){return new RegExp(\"^(?:\"+t.map(bv).join(\"|\")+\")\",\"i\")}function xv(t){return new Map(t.map(((t,n)=>[t.toLowerCase(),n])))}function wv(t,n,e){var r=gv.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Mv(t,n,e){var r=gv.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function Tv(t,n,e){var r=gv.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function Av(t,n,e){var r=gv.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function Sv(t,n,e){var r=gv.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function Ev(t,n,e){var r=gv.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function Nv(t,n,e){var r=gv.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function kv(t,n,e){var r=/^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||\"00\")),e+r[0].length):-1}function Cv(t,n,e){var r=gv.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function Pv(t,n,e){var r=gv.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function zv(t,n,e){var r=gv.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function $v(t,n,e){var r=gv.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function Dv(t,n,e){var r=gv.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function Rv(t,n,e){var r=gv.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function Fv(t,n,e){var r=gv.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function qv(t,n,e){var r=gv.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Uv(t,n,e){var r=gv.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function Iv(t,n,e){var r=yv.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function Ov(t,n,e){var r=gv.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function Bv(t,n,e){var r=gv.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function Yv(t,n){return _v(t.getDate(),n,2)}function Lv(t,n){return _v(t.getHours(),n,2)}function jv(t,n){return _v(t.getHours()%12||12,n,2)}function Hv(t,n){return _v(1+py.count(tv(t),t),n,3)}function Xv(t,n){return _v(t.getMilliseconds(),n,3)}function Gv(t,n){return Xv(t,n)+\"000\"}function Vv(t,n){return _v(t.getMonth()+1,n,2)}function Wv(t,n){return _v(t.getMinutes(),n,2)}function Zv(t,n){return _v(t.getSeconds(),n,2)}function Kv(t){var n=t.getDay();return 0===n?7:n}function Qv(t,n){return _v(xy.count(tv(t)-1,t),n,2)}function Jv(t){var n=t.getDay();return n>=4||0===n?Ay(t):Ay.ceil(t)}function t_(t,n){return t=Jv(t),_v(Ay.count(tv(t),t)+(4===tv(t).getDay()),n,2)}function n_(t){return t.getDay()}function e_(t,n){return _v(wy.count(tv(t)-1,t),n,2)}function r_(t,n){return _v(t.getFullYear()%100,n,2)}function i_(t,n){return _v((t=Jv(t)).getFullYear()%100,n,2)}function o_(t,n){return _v(t.getFullYear()%1e4,n,4)}function a_(t,n){var e=t.getDay();return _v((t=e>=4||0===e?Ay(t):Ay.ceil(t)).getFullYear()%1e4,n,4)}function u_(t){var n=t.getTimezoneOffset();return(n>0?\"-\":(n*=-1,\"+\"))+_v(n/60|0,\"0\",2)+_v(n%60,\"0\",2)}function c_(t,n){return _v(t.getUTCDate(),n,2)}function f_(t,n){return _v(t.getUTCHours(),n,2)}function s_(t,n){return _v(t.getUTCHours()%12||12,n,2)}function l_(t,n){return _v(1+yy.count(ev(t),t),n,3)}function h_(t,n){return _v(t.getUTCMilliseconds(),n,3)}function d_(t,n){return h_(t,n)+\"000\"}function p_(t,n){return _v(t.getUTCMonth()+1,n,2)}function g_(t,n){return _v(t.getUTCMinutes(),n,2)}function y_(t,n){return _v(t.getUTCSeconds(),n,2)}function v_(t){var n=t.getUTCDay();return 0===n?7:n}function __(t,n){return _v(Fy.count(ev(t)-1,t),n,2)}function b_(t){var n=t.getUTCDay();return n>=4||0===n?Oy(t):Oy.ceil(t)}function m_(t,n){return t=b_(t),_v(Oy.count(ev(t),t)+(4===ev(t).getUTCDay()),n,2)}function x_(t){return t.getUTCDay()}function w_(t,n){return _v(qy.count(ev(t)-1,t),n,2)}function M_(t,n){return _v(t.getUTCFullYear()%100,n,2)}function T_(t,n){return _v((t=b_(t)).getUTCFullYear()%100,n,2)}function A_(t,n){return _v(t.getUTCFullYear()%1e4,n,4)}function S_(t,n){var e=t.getUTCDay();return _v((t=e>=4||0===e?Oy(t):Oy.ceil(t)).getUTCFullYear()%1e4,n,4)}function E_(){return\"+0000\"}function N_(){return\"%\"}function k_(t){return+t}function C_(t){return Math.floor(+t/1e3)}function P_(n){return dv=hv(n),t.timeFormat=dv.format,t.timeParse=dv.parse,t.utcFormat=dv.utcFormat,t.utcParse=dv.utcParse,dv}t.timeFormat=void 0,t.timeParse=void 0,t.utcFormat=void 0,t.utcParse=void 0,P_({dateTime:\"%x, %X\",date:\"%-m/%-d/%Y\",time:\"%-I:%M:%S %p\",periods:[\"AM\",\"PM\"],days:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],shortDays:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],shortMonths:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"]});var z_=\"%Y-%m-%dT%H:%M:%S.%LZ\";var $_=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(z_),D_=$_;var R_=+new Date(\"2000-01-01T00:00:00.000Z\")?function(t){var n=new Date(t);return isNaN(n)?null:n}:t.utcParse(z_),F_=R_;function q_(t){return new Date(t)}function U_(t){return t instanceof Date?+t:+new Date(+t)}function I_(t,n,e,r,i,o,a,u,c,f){var s=Sg(),l=s.invert,h=s.domain,d=f(\".%L\"),p=f(\":%S\"),g=f(\"%I:%M\"),y=f(\"%I %p\"),v=f(\"%a %d\"),_=f(\"%b %d\"),b=f(\"%B\"),m=f(\"%Y\");function x(t){return(c(t)<t?d:u(t)<t?p:a(t)<t?g:o(t)<t?y:r(t)<t?i(t)<t?v:_:e(t)<t?b:m)(t)}return s.invert=function(t){return new Date(l(t))},s.domain=function(t){return arguments.length?h(Array.from(t,U_)):h().map(q_)},s.ticks=function(n){var e=h();return t(e[0],e[e.length-1],null==n?10:n)},s.tickFormat=function(t,n){return null==n?x:f(n)},s.nice=function(t){var e=h();return t&&\"function\"==typeof t.range||(t=n(e[0],e[e.length-1],null==t?10:t)),t?h(kg(e,t)):s},s.copy=function(){return Tg(s,I_(t,n,e,r,i,o,a,u,c,f))},s}function O_(){var t,n,e,r,i,o=0,a=1,u=mg,c=!1;function f(n){return null==n||isNaN(n=+n)?i:u(0===e?.5:(n=(r(n)-t)*e,c?Math.max(0,Math.min(1,n)):n))}function s(t){return function(n){var e,r;return arguments.length?([e,r]=n,u=t(e,r),f):[u(0),u(1)]}}return f.domain=function(i){return arguments.length?([o,a]=i,t=r(o=+o),n=r(a=+a),e=t===n?0:1/(n-t),f):[o,a]},f.clamp=function(t){return arguments.length?(c=!!t,f):c},f.interpolator=function(t){return arguments.length?(u=t,f):u},f.range=s(Gr),f.rangeRound=s(Vr),f.unknown=function(t){return arguments.length?(i=t,f):i},function(i){return r=i,t=i(o),n=i(a),e=t===n?0:1/(n-t),f}}function B_(t,n){return n.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Y_(){var t=Lg(O_());return t.copy=function(){return B_(t,Y_()).exponent(t.exponent())},dg.apply(t,arguments)}function L_(){var t,n,e,r,i,o,a,u=0,c=.5,f=1,s=1,l=mg,h=!1;function d(t){return isNaN(t=+t)?a:(t=.5+((t=+o(t))-n)*(s*t<s*n?r:i),l(h?Math.max(0,Math.min(1,t)):t))}function p(t){return function(n){var e,r,i;return arguments.length?([e,r,i]=n,l=di(t,[e,r,i]),d):[l(0),l(.5),l(1)]}}return d.domain=function(a){return arguments.length?([u,c,f]=a,t=o(u=+u),n=o(c=+c),e=o(f=+f),r=t===n?0:.5/(n-t),i=n===e?0:.5/(e-n),s=n<t?-1:1,d):[u,c,f]},d.clamp=function(t){return arguments.length?(h=!!t,d):h},d.interpolator=function(t){return arguments.length?(l=t,d):l},d.range=p(Gr),d.rangeRound=p(Vr),d.unknown=function(t){return arguments.length?(a=t,d):a},function(a){return o=a,t=a(u),n=a(c),e=a(f),r=t===n?0:.5/(n-t),i=n===e?0:.5/(e-n),s=n<t?-1:1,d}}function j_(){var t=Lg(L_());return t.copy=function(){return B_(t,j_()).exponent(t.exponent())},dg.apply(t,arguments)}function H_(t){for(var n=t.length/6|0,e=new Array(n),r=0;r<n;)e[r]=\"#\"+t.slice(6*r,6*++r);return e}var X_=H_(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\"),G_=H_(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\"),V_=H_(\"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666\"),W_=H_(\"4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0\"),Z_=H_(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\"),K_=H_(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\"),Q_=H_(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\"),J_=H_(\"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999\"),tb=H_(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\"),nb=H_(\"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f\"),eb=H_(\"4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab\"),rb=t=>Fr(t[t.length-1]),ib=new Array(3).concat(\"d8b365f5f5f55ab4ac\",\"a6611adfc27d80cdc1018571\",\"a6611adfc27df5f5f580cdc1018571\",\"8c510ad8b365f6e8c3c7eae55ab4ac01665e\",\"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\",\"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\",\"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\",\"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\",\"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\").map(H_),ob=rb(ib),ab=new Array(3).concat(\"af8dc3f7f7f77fbf7b\",\"7b3294c2a5cfa6dba0008837\",\"7b3294c2a5cff7f7f7a6dba0008837\",\"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\",\"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\",\"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\",\"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\",\"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\",\"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\").map(H_),ub=rb(ab),cb=new Array(3).concat(\"e9a3c9f7f7f7a1d76a\",\"d01c8bf1b6dab8e1864dac26\",\"d01c8bf1b6daf7f7f7b8e1864dac26\",\"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\",\"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\",\"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\",\"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\",\"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\",\"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\").map(H_),fb=rb(cb),sb=new Array(3).concat(\"998ec3f7f7f7f1a340\",\"5e3c99b2abd2fdb863e66101\",\"5e3c99b2abd2f7f7f7fdb863e66101\",\"542788998ec3d8daebfee0b6f1a340b35806\",\"542788998ec3d8daebf7f7f7fee0b6f1a340b35806\",\"5427888073acb2abd2d8daebfee0b6fdb863e08214b35806\",\"5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806\",\"2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08\",\"2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08\").map(H_),lb=rb(sb),hb=new Array(3).concat(\"ef8a62f7f7f767a9cf\",\"ca0020f4a58292c5de0571b0\",\"ca0020f4a582f7f7f792c5de0571b0\",\"b2182bef8a62fddbc7d1e5f067a9cf2166ac\",\"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\",\"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\",\"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\",\"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\",\"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\").map(H_),db=rb(hb),pb=new Array(3).concat(\"ef8a62ffffff999999\",\"ca0020f4a582bababa404040\",\"ca0020f4a582ffffffbababa404040\",\"b2182bef8a62fddbc7e0e0e09999994d4d4d\",\"b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d\",\"b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d\",\"b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d\",\"67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a\",\"67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a\").map(H_),gb=rb(pb),yb=new Array(3).concat(\"fc8d59ffffbf91bfdb\",\"d7191cfdae61abd9e92c7bb6\",\"d7191cfdae61ffffbfabd9e92c7bb6\",\"d73027fc8d59fee090e0f3f891bfdb4575b4\",\"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\",\"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\",\"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\",\"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\",\"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\").map(H_),vb=rb(yb),_b=new Array(3).concat(\"fc8d59ffffbf91cf60\",\"d7191cfdae61a6d96a1a9641\",\"d7191cfdae61ffffbfa6d96a1a9641\",\"d73027fc8d59fee08bd9ef8b91cf601a9850\",\"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\",\"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\",\"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\",\"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\",\"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\").map(H_),bb=rb(_b),mb=new Array(3).concat(\"fc8d59ffffbf99d594\",\"d7191cfdae61abdda42b83ba\",\"d7191cfdae61ffffbfabdda42b83ba\",\"d53e4ffc8d59fee08be6f59899d5943288bd\",\"d53e4ffc8d59fee08bffffbfe6f59899d5943288bd\",\"d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd\",\"d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd\",\"9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2\",\"9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2\").map(H_),xb=rb(mb),wb=new Array(3).concat(\"e5f5f999d8c92ca25f\",\"edf8fbb2e2e266c2a4238b45\",\"edf8fbb2e2e266c2a42ca25f006d2c\",\"edf8fbccece699d8c966c2a42ca25f006d2c\",\"edf8fbccece699d8c966c2a441ae76238b45005824\",\"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\",\"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\").map(H_),Mb=rb(wb),Tb=new Array(3).concat(\"e0ecf49ebcda8856a7\",\"edf8fbb3cde38c96c688419d\",\"edf8fbb3cde38c96c68856a7810f7c\",\"edf8fbbfd3e69ebcda8c96c68856a7810f7c\",\"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\",\"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\",\"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\").map(H_),Ab=rb(Tb),Sb=new Array(3).concat(\"e0f3dba8ddb543a2ca\",\"f0f9e8bae4bc7bccc42b8cbe\",\"f0f9e8bae4bc7bccc443a2ca0868ac\",\"f0f9e8ccebc5a8ddb57bccc443a2ca0868ac\",\"f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e\",\"f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081\").map(H_),Eb=rb(Sb),Nb=new Array(3).concat(\"fee8c8fdbb84e34a33\",\"fef0d9fdcc8afc8d59d7301f\",\"fef0d9fdcc8afc8d59e34a33b30000\",\"fef0d9fdd49efdbb84fc8d59e34a33b30000\",\"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\",\"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\",\"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\").map(H_),kb=rb(Nb),Cb=new Array(3).concat(\"ece2f0a6bddb1c9099\",\"f6eff7bdc9e167a9cf02818a\",\"f6eff7bdc9e167a9cf1c9099016c59\",\"f6eff7d0d1e6a6bddb67a9cf1c9099016c59\",\"f6eff7d0d1e6a6bddb67a9cf3690c002818a016450\",\"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450\",\"fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636\").map(H_),Pb=rb(Cb),zb=new Array(3).concat(\"ece7f2a6bddb2b8cbe\",\"f1eef6bdc9e174a9cf0570b0\",\"f1eef6bdc9e174a9cf2b8cbe045a8d\",\"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\",\"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\",\"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\").map(H_),$b=rb(zb),Db=new Array(3).concat(\"e7e1efc994c7dd1c77\",\"f1eef6d7b5d8df65b0ce1256\",\"f1eef6d7b5d8df65b0dd1c77980043\",\"f1eef6d4b9dac994c7df65b0dd1c77980043\",\"f1eef6d4b9dac994c7df65b0e7298ace125691003f\",\"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\",\"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\").map(H_),Rb=rb(Db),Fb=new Array(3).concat(\"fde0ddfa9fb5c51b8a\",\"feebe2fbb4b9f768a1ae017e\",\"feebe2fbb4b9f768a1c51b8a7a0177\",\"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\",\"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\",\"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\").map(H_),qb=rb(Fb),Ub=new Array(3).concat(\"edf8b17fcdbb2c7fb8\",\"ffffcca1dab441b6c4225ea8\",\"ffffcca1dab441b6c42c7fb8253494\",\"ffffccc7e9b47fcdbb41b6c42c7fb8253494\",\"ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84\",\"ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58\").map(H_),Ib=rb(Ub),Ob=new Array(3).concat(\"f7fcb9addd8e31a354\",\"ffffccc2e69978c679238443\",\"ffffccc2e69978c67931a354006837\",\"ffffccd9f0a3addd8e78c67931a354006837\",\"ffffccd9f0a3addd8e78c67941ab5d238443005a32\",\"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32\",\"ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529\").map(H_),Bb=rb(Ob),Yb=new Array(3).concat(\"fff7bcfec44fd95f0e\",\"ffffd4fed98efe9929cc4c02\",\"ffffd4fed98efe9929d95f0e993404\",\"ffffd4fee391fec44ffe9929d95f0e993404\",\"ffffd4fee391fec44ffe9929ec7014cc4c028c2d04\",\"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04\",\"ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506\").map(H_),Lb=rb(Yb),jb=new Array(3).concat(\"ffeda0feb24cf03b20\",\"ffffb2fecc5cfd8d3ce31a1c\",\"ffffb2fecc5cfd8d3cf03b20bd0026\",\"ffffb2fed976feb24cfd8d3cf03b20bd0026\",\"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\",\"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\").map(H_),Hb=rb(jb),Xb=new Array(3).concat(\"deebf79ecae13182bd\",\"eff3ffbdd7e76baed62171b5\",\"eff3ffbdd7e76baed63182bd08519c\",\"eff3ffc6dbef9ecae16baed63182bd08519c\",\"eff3ffc6dbef9ecae16baed64292c62171b5084594\",\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\",\"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\").map(H_),Gb=rb(Xb),Vb=new Array(3).concat(\"e5f5e0a1d99b31a354\",\"edf8e9bae4b374c476238b45\",\"edf8e9bae4b374c47631a354006d2c\",\"edf8e9c7e9c0a1d99b74c47631a354006d2c\",\"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\",\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\",\"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\").map(H_),Wb=rb(Vb),Zb=new Array(3).concat(\"f0f0f0bdbdbd636363\",\"f7f7f7cccccc969696525252\",\"f7f7f7cccccc969696636363252525\",\"f7f7f7d9d9d9bdbdbd969696636363252525\",\"f7f7f7d9d9d9bdbdbd969696737373525252252525\",\"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\",\"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\").map(H_),Kb=rb(Zb),Qb=new Array(3).concat(\"efedf5bcbddc756bb1\",\"f2f0f7cbc9e29e9ac86a51a3\",\"f2f0f7cbc9e29e9ac8756bb154278f\",\"f2f0f7dadaebbcbddc9e9ac8756bb154278f\",\"f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486\",\"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486\",\"fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d\").map(H_),Jb=rb(Qb),tm=new Array(3).concat(\"fee0d2fc9272de2d26\",\"fee5d9fcae91fb6a4acb181d\",\"fee5d9fcae91fb6a4ade2d26a50f15\",\"fee5d9fcbba1fc9272fb6a4ade2d26a50f15\",\"fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d\",\"fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d\").map(H_),nm=rb(tm),em=new Array(3).concat(\"fee6cefdae6be6550d\",\"feeddefdbe85fd8d3cd94701\",\"feeddefdbe85fd8d3ce6550da63603\",\"feeddefdd0a2fdae6bfd8d3ce6550da63603\",\"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\",\"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\").map(H_),rm=rb(em);var im=hi(Tr(300,.5,0),Tr(-240,.5,1)),om=hi(Tr(-100,.75,.35),Tr(80,1.5,.8)),am=hi(Tr(260,.75,.35),Tr(80,1.5,.8)),um=Tr();var cm=Fe(),fm=Math.PI/3,sm=2*Math.PI/3;function lm(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var hm=lm(H_(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\")),dm=lm(H_(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\")),pm=lm(H_(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\")),gm=lm(H_(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));function ym(t){return function(){return t}}const vm=Math.abs,_m=Math.atan2,bm=Math.cos,mm=Math.max,xm=Math.min,wm=Math.sin,Mm=Math.sqrt,Tm=1e-12,Am=Math.PI,Sm=Am/2,Em=2*Am;function Nm(t){return t>=1?Sm:t<=-1?-Sm:Math.asin(t)}function km(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);n=t}return t},()=>new Ua(n)}function Cm(t){return t.innerRadius}function Pm(t){return t.outerRadius}function zm(t){return t.startAngle}function $m(t){return t.endAngle}function Dm(t){return t&&t.padAngle}function Rm(t,n,e,r,i,o,a){var u=t-e,c=n-r,f=(a?o:-o)/Mm(u*u+c*c),s=f*c,l=-f*u,h=t+s,d=n+l,p=e+s,g=r+l,y=(h+p)/2,v=(d+g)/2,_=p-h,b=g-d,m=_*_+b*b,x=i-o,w=h*g-p*d,M=(b<0?-1:1)*Mm(mm(0,x*x*m-w*w)),T=(w*b-_*M)/m,A=(-w*_-b*M)/m,S=(w*b+_*M)/m,E=(-w*_+b*M)/m,N=T-y,k=A-v,C=S-y,P=E-v;return N*N+k*k>C*C+P*P&&(T=S,A=E),{cx:T,cy:A,x01:-s,y01:-l,x11:T*(i/x-1),y11:A*(i/x-1)}}var Fm=Array.prototype.slice;function qm(t){return\"object\"==typeof t&&\"length\"in t?t:Array.from(t)}function Um(t){this._context=t}function Im(t){return new Um(t)}function Om(t){return t[0]}function Bm(t){return t[1]}function Ym(t,n){var e=ym(!0),r=null,i=Im,o=null,a=km(u);function u(u){var c,f,s,l=(u=qm(u)).length,h=!1;for(null==r&&(o=i(s=a())),c=0;c<=l;++c)!(c<l&&e(f=u[c],c,u))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(f,c,u),+n(f,c,u));if(s)return o=null,s+\"\"||null}return t=\"function\"==typeof t?t:void 0===t?Om:ym(t),n=\"function\"==typeof n?n:void 0===n?Bm:ym(n),u.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:ym(+n),u):t},u.y=function(t){return arguments.length?(n=\"function\"==typeof t?t:ym(+t),u):n},u.defined=function(t){return arguments.length?(e=\"function\"==typeof t?t:ym(!!t),u):e},u.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),u):i},u.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),u):r},u}function Lm(t,n,e){var r=null,i=ym(!0),o=null,a=Im,u=null,c=km(f);function f(f){var s,l,h,d,p,g=(f=qm(f)).length,y=!1,v=new Array(g),_=new Array(g);for(null==o&&(u=a(p=c())),s=0;s<=g;++s){if(!(s<g&&i(d=f[s],s,f))===y)if(y=!y)l=s,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),h=s-1;h>=l;--h)u.point(v[h],_[h]);u.lineEnd(),u.areaEnd()}y&&(v[s]=+t(d,s,f),_[s]=+n(d,s,f),u.point(r?+r(d,s,f):v[s],e?+e(d,s,f):_[s]))}if(p)return u=null,p+\"\"||null}function s(){return Ym().defined(i).curve(a).context(o)}return t=\"function\"==typeof t?t:void 0===t?Om:ym(+t),n=\"function\"==typeof n?n:ym(void 0===n?0:+n),e=\"function\"==typeof e?e:void 0===e?Bm:ym(+e),f.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:ym(+n),r=null,f):t},f.x0=function(n){return arguments.length?(t=\"function\"==typeof n?n:ym(+n),f):t},f.x1=function(t){return arguments.length?(r=null==t?null:\"function\"==typeof t?t:ym(+t),f):r},f.y=function(t){return arguments.length?(n=\"function\"==typeof t?t:ym(+t),e=null,f):n},f.y0=function(t){return arguments.length?(n=\"function\"==typeof t?t:ym(+t),f):n},f.y1=function(t){return arguments.length?(e=null==t?null:\"function\"==typeof t?t:ym(+t),f):e},f.lineX0=f.lineY0=function(){return s().x(t).y(n)},f.lineY1=function(){return s().x(t).y(e)},f.lineX1=function(){return s().x(r).y(n)},f.defined=function(t){return arguments.length?(i=\"function\"==typeof t?t:ym(!!t),f):i},f.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),f):a},f.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),f):o},f}function jm(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function Hm(t){return t}Um.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var Xm=Vm(Im);function Gm(t){this._curve=t}function Vm(t){function n(n){return new Gm(t(n))}return n._curve=t,n}function Wm(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(Vm(t)):n()._curve},t}function Zm(){return Wm(Ym().curve(Xm))}function Km(){var t=Lm().curve(Xm),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Wm(e())},delete t.lineX0,t.lineEndAngle=function(){return Wm(r())},delete t.lineX1,t.lineInnerRadius=function(){return Wm(i())},delete t.lineY0,t.lineOuterRadius=function(){return Wm(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(Vm(t)):n()._curve},t}function Qm(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}Gm.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class Jm{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class tx{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0===this._point)this._point=1;else{const e=Qm(this._x0,this._y0),r=Qm(this._x0,this._y0=(this._y0+n)/2),i=Qm(t,this._y0),o=Qm(t,n);this._context.moveTo(...e),this._context.bezierCurveTo(...r,...i,...o)}this._x0=t,this._y0=n}}function nx(t){return new Jm(t,!0)}function ex(t){return new Jm(t,!1)}function rx(t){return new tx(t)}function ix(t){return t.source}function ox(t){return t.target}function ax(t){let n=ix,e=ox,r=Om,i=Bm,o=null,a=null,u=km(c);function c(){let c;const f=Fm.call(arguments),s=n.apply(this,f),l=e.apply(this,f);if(null==o&&(a=t(c=u())),a.lineStart(),f[0]=s,a.point(+r.apply(this,f),+i.apply(this,f)),f[0]=l,a.point(+r.apply(this,f),+i.apply(this,f)),a.lineEnd(),c)return a=null,c+\"\"||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(e=t,c):e},c.x=function(t){return arguments.length?(r=\"function\"==typeof t?t:ym(+t),c):r},c.y=function(t){return arguments.length?(i=\"function\"==typeof t?t:ym(+t),c):i},c.context=function(n){return arguments.length?(null==n?o=a=null:a=t(o=n),c):o},c}const ux=Mm(3);var cx={draw(t,n){const e=.59436*Mm(n+xm(n/28,.75)),r=e/2,i=r*ux;t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-i,-r),t.lineTo(i,r),t.moveTo(-i,r),t.lineTo(i,-r)}},fx={draw(t,n){const e=Mm(n/Am);t.moveTo(e,0),t.arc(0,0,e,0,Em)}},sx={draw(t,n){const e=Mm(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}};const lx=Mm(1/3),hx=2*lx;var dx={draw(t,n){const e=Mm(n/hx),r=e*lx;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},px={draw(t,n){const e=.62625*Mm(n);t.moveTo(0,-e),t.lineTo(e,0),t.lineTo(0,e),t.lineTo(-e,0),t.closePath()}},gx={draw(t,n){const e=.87559*Mm(n-xm(n/7,2));t.moveTo(-e,0),t.lineTo(e,0),t.moveTo(0,e),t.lineTo(0,-e)}},yx={draw(t,n){const e=Mm(n),r=-e/2;t.rect(r,r,e,e)}},vx={draw(t,n){const e=.4431*Mm(n);t.moveTo(e,e),t.lineTo(e,-e),t.lineTo(-e,-e),t.lineTo(-e,e),t.closePath()}};const _x=wm(Am/10)/wm(7*Am/10),bx=wm(Em/10)*_x,mx=-bm(Em/10)*_x;var xx={draw(t,n){const e=Mm(.8908130915292852*n),r=bx*e,i=mx*e;t.moveTo(0,-e),t.lineTo(r,i);for(let n=1;n<5;++n){const o=Em*n/5,a=bm(o),u=wm(o);t.lineTo(u*e,-a*e),t.lineTo(a*r-u*i,u*r+a*i)}t.closePath()}};const wx=Mm(3);var Mx={draw(t,n){const e=-Mm(n/(3*wx));t.moveTo(0,2*e),t.lineTo(-wx*e,-e),t.lineTo(wx*e,-e),t.closePath()}};const Tx=Mm(3);var Ax={draw(t,n){const e=.6824*Mm(n),r=e/2,i=e*Tx/2;t.moveTo(0,-e),t.lineTo(i,r),t.lineTo(-i,r),t.closePath()}};const Sx=-.5,Ex=Mm(3)/2,Nx=1/Mm(12),kx=3*(Nx/2+1);var Cx={draw(t,n){const e=Mm(n/kx),r=e/2,i=e*Nx,o=r,a=e*Nx+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(Sx*r-Ex*i,Ex*r+Sx*i),t.lineTo(Sx*o-Ex*a,Ex*o+Sx*a),t.lineTo(Sx*u-Ex*c,Ex*u+Sx*c),t.lineTo(Sx*r+Ex*i,Sx*i-Ex*r),t.lineTo(Sx*o+Ex*a,Sx*a-Ex*o),t.lineTo(Sx*u+Ex*c,Sx*c-Ex*u),t.closePath()}},Px={draw(t,n){const e=.6189*Mm(n-xm(n/6,1.7));t.moveTo(-e,-e),t.lineTo(e,e),t.moveTo(-e,e),t.lineTo(e,-e)}};const zx=[fx,sx,dx,yx,xx,Mx,Cx],$x=[fx,gx,Px,Ax,cx,vx,px];function Dx(){}function Rx(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function Fx(t){this._context=t}function qx(t){this._context=t}function Ux(t){this._context=t}function Ix(t,n){this._basis=new Fx(t),this._beta=n}Fx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Rx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Rx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},qx.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Rx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Ux.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Rx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Ix.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Ox=function t(n){function e(t){return 1===n?new Fx(t):new Ix(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Bx(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Yx(t,n){this._context=t,this._k=(1-n)/6}Yx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Bx(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Bx(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Lx=function t(n){function e(t){return new Yx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function jx(t,n){this._context=t,this._k=(1-n)/6}jx.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Bx(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Hx=function t(n){function e(t){return new jx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Xx(t,n){this._context=t,this._k=(1-n)/6}Xx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bx(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Gx=function t(n){function e(t){return new Xx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Vx(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Tm){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Tm){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Wx(t,n){this._context=t,this._alpha=n}Wx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Vx(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Zx=function t(n){function e(t){return n?new Wx(t,n):new Yx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Kx(t,n){this._context=t,this._alpha=n}Kx.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Vx(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Qx=function t(n){function e(t){return n?new Kx(t,n):new jx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Jx(t,n){this._context=t,this._alpha=n}Jx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vx(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var tw=function t(n){function e(t){return n?new Jx(t,n):new Xx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function nw(t){this._context=t}function ew(t){return t<0?-1:1}function rw(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(ew(o)+ew(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function iw(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function ow(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function aw(t){this._context=t}function uw(t){this._context=new cw(t)}function cw(t){this._context=t}function fw(t){this._context=t}function sw(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n<r-1;++n)i[n]=1,o[n]=4,a[n]=4*t[n]+2*t[n+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],n=1;n<r;++n)e=i[n]/o[n-1],o[n]-=e,a[n]-=e*a[n-1];for(i[r-1]=a[r-1]/o[r-1],n=r-2;n>=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n<r-1;++n)o[n]=2*t[n+1]-i[n+1];return[i,o]}function lw(t,n){this._context=t,this._t=n}function hw(t,n){if((i=t.length)>1)for(var e,r,i,o=1,a=t[n[0]],u=a.length;o<i;++o)for(r=a,a=t[n[o]],e=0;e<u;++e)a[e][1]+=a[e][0]=isNaN(r[e][1])?r[e][0]:r[e][1]}function dw(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e}function pw(t,n){return t[n]}function gw(t){const n=[];return n.key=t,n}function yw(t){var n=t.map(vw);return dw(t).sort((function(t,e){return n[t]-n[e]}))}function vw(t){for(var n,e=-1,r=0,i=t.length,o=-1/0;++e<i;)(n=+t[e][1])>o&&(o=n,r=e);return r}function _w(t){var n=t.map(bw);return dw(t).sort((function(t,e){return n[t]-n[e]}))}function bw(t){for(var n,e=0,r=-1,i=t.length;++r<i;)(n=+t[r][1])&&(e+=n);return e}nw.prototype={areaStart:Dx,areaEnd:Dx,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},aw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ow(this,this._t0,iw(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,ow(this,iw(this,e=rw(this,t,n)),e);break;default:ow(this,this._t0,e=rw(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(uw.prototype=Object.create(aw.prototype)).point=function(t,n){aw.prototype.point.call(this,n,t)},cw.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}},fw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=sw(t),i=sw(n),o=0,a=1;a<e;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],n[a]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},lw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var mw=t=>()=>t;function xw(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ww(t,n,e){this.k=t,this.x=n,this.y=e}ww.prototype={constructor:ww,scale:function(t){return 1===t?this:new ww(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new ww(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return\"translate(\"+this.x+\",\"+this.y+\") scale(\"+this.k+\")\"}};var Mw=new ww(1,0,0);function Tw(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Mw;return t.__zoom}function Aw(t){t.stopImmediatePropagation()}function Sw(t){t.preventDefault(),t.stopImmediatePropagation()}function Ew(t){return!(t.ctrlKey&&\"wheel\"!==t.type||t.button)}function Nw(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute(\"viewBox\")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function kw(){return this.__zoom||Mw}function Cw(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Pw(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function zw(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}Tw.prototype=ww.prototype,t.Adder=T,t.Delaunay=Lu,t.FormatSpecifier=tf,t.InternMap=InternMap,t.InternSet=InternSet,t.Node=Qd,t.Path=Ua,t.Voronoi=qu,t.ZoomTransform=ww,t.active=function(t,n){var e,r,i=t.__transition;if(i)for(r in n=null==n?null:n+\"\",i)if((e=i[r]).state>qi&&e.name===n)return new po([[t]],Zo,n,+r);return null},t.arc=function(){var t=Cm,n=Pm,e=ym(0),r=null,i=zm,o=$m,a=Dm,u=null,c=km(f);function f(){var f,s,l=+t.apply(this,arguments),h=+n.apply(this,arguments),d=i.apply(this,arguments)-Sm,p=o.apply(this,arguments)-Sm,g=vm(p-d),y=p>d;if(u||(u=f=c()),h<l&&(s=h,h=l,l=s),h>Tm)if(g>Em-Tm)u.moveTo(h*bm(d),h*wm(d)),u.arc(0,0,h,d,p,!y),l>Tm&&(u.moveTo(l*bm(p),l*wm(p)),u.arc(0,0,l,p,d,y));else{var v,_,b=d,m=p,x=d,w=p,M=g,T=g,A=a.apply(this,arguments)/2,S=A>Tm&&(r?+r.apply(this,arguments):Mm(l*l+h*h)),E=xm(vm(h-l)/2,+e.apply(this,arguments)),N=E,k=E;if(S>Tm){var C=Nm(S/l*wm(A)),P=Nm(S/h*wm(A));(M-=2*C)>Tm?(x+=C*=y?1:-1,w-=C):(M=0,x=w=(d+p)/2),(T-=2*P)>Tm?(b+=P*=y?1:-1,m-=P):(T=0,b=m=(d+p)/2)}var z=h*bm(b),$=h*wm(b),D=l*bm(w),R=l*wm(w);if(E>Tm){var F,q=h*bm(m),U=h*wm(m),I=l*bm(x),O=l*wm(x);if(g<Am)if(F=function(t,n,e,r,i,o,a,u){var c=e-t,f=r-n,s=a-i,l=u-o,h=l*c-s*f;if(!(h*h<Tm))return[t+(h=(s*(n-o)-l*(t-i))/h)*c,n+h*f]}(z,$,I,O,q,U,D,R)){var B=z-F[0],Y=$-F[1],L=q-F[0],j=U-F[1],H=1/wm(function(t){return t>1?0:t<-1?Am:Math.acos(t)}((B*L+Y*j)/(Mm(B*B+Y*Y)*Mm(L*L+j*j)))/2),X=Mm(F[0]*F[0]+F[1]*F[1]);N=xm(E,(l-X)/(H-1)),k=xm(E,(h-X)/(H+1))}else N=k=0}T>Tm?k>Tm?(v=Rm(I,O,z,$,h,k,y),_=Rm(q,U,D,R,h,k,y),u.moveTo(v.cx+v.x01,v.cy+v.y01),k<E?u.arc(v.cx,v.cy,k,_m(v.y01,v.x01),_m(_.y01,_.x01),!y):(u.arc(v.cx,v.cy,k,_m(v.y01,v.x01),_m(v.y11,v.x11),!y),u.arc(0,0,h,_m(v.cy+v.y11,v.cx+v.x11),_m(_.cy+_.y11,_.cx+_.x11),!y),u.arc(_.cx,_.cy,k,_m(_.y11,_.x11),_m(_.y01,_.x01),!y))):(u.moveTo(z,$),u.arc(0,0,h,b,m,!y)):u.moveTo(z,$),l>Tm&&M>Tm?N>Tm?(v=Rm(D,R,q,U,l,-N,y),_=Rm(z,$,I,O,l,-N,y),u.lineTo(v.cx+v.x01,v.cy+v.y01),N<E?u.arc(v.cx,v.cy,N,_m(v.y01,v.x01),_m(_.y01,_.x01),!y):(u.arc(v.cx,v.cy,N,_m(v.y01,v.x01),_m(v.y11,v.x11),!y),u.arc(0,0,l,_m(v.cy+v.y11,v.cx+v.x11),_m(_.cy+_.y11,_.cx+_.x11),y),u.arc(_.cx,_.cy,N,_m(_.y11,_.x11),_m(_.y01,_.x01),!y))):u.arc(0,0,l,w,x,y):u.lineTo(D,R)}else u.moveTo(0,0);if(u.closePath(),f)return u=null,f+\"\"||null}return f.centroid=function(){var e=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Am/2;return[bm(r)*e,wm(r)*e]},f.innerRadius=function(n){return arguments.length?(t=\"function\"==typeof n?n:ym(+n),f):t},f.outerRadius=function(t){return arguments.length?(n=\"function\"==typeof t?t:ym(+t),f):n},f.cornerRadius=function(t){return arguments.length?(e=\"function\"==typeof t?t:ym(+t),f):e},f.padRadius=function(t){return arguments.length?(r=null==t?null:\"function\"==typeof t?t:ym(+t),f):r},f.startAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:ym(+t),f):i},f.endAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:ym(+t),f):o},f.padAngle=function(t){return arguments.length?(a=\"function\"==typeof t?t:ym(+t),f):a},f.context=function(t){return arguments.length?(u=null==t?null:t,f):u},f},t.area=Lm,t.areaRadial=Km,t.ascending=n,t.autoType=function(t){for(var n in t){var e,r,i=t[n].trim();if(i)if(\"true\"===i)i=!0;else if(\"false\"===i)i=!1;else if(\"NaN\"===i)i=NaN;else if(isNaN(e=+i)){if(!(r=i.match(/^([-+]\\d{2})?\\d{4}(-\\d{2}(-\\d{2})?)?(T\\d{2}:\\d{2}(:\\d{2}(\\.\\d{3})?)?(Z|[-+]\\d{2}:\\d{2})?)?$/)))continue;yc&&r[4]&&!r[7]&&(i=i.replace(/-/g,\"/\").replace(/T/,\" \")),i=new Date(i)}else i=e;else i=null;t[n]=i}return t},t.axisBottom=function(t){return Pt(Mt,t)},t.axisLeft=function(t){return Pt(Tt,t)},t.axisRight=function(t){return Pt(wt,t)},t.axisTop=function(t){return Pt(xt,t)},t.bin=Q,t.bisect=s,t.bisectCenter=f,t.bisectLeft=c,t.bisectRight=u,t.bisector=r,t.blob=function(t,n){return fetch(t,n).then(vc)},t.blur=function(t,n){if(!((n=+n)>=0))throw new RangeError(\"invalid r\");let e=t.length;if(!((e=Math.floor(e))>=0))throw new RangeError(\"invalid length\");if(!e||!n)return t;const r=y(n),i=t.slice();return r(t,i,0,e,1),r(i,t,0,e,1),r(t,i,0,e,1),t},t.blur2=l,t.blurImage=h,t.brush=function(){return wa(la)},t.brushSelection=function(t){var n=t.__brush;return n?n.dim.output(n.selection):null},t.brushX=function(){return wa(fa)},t.brushY=function(){return wa(sa)},t.buffer=function(t,n){return fetch(t,n).then(_c)},t.chord=function(){return za(!1,!1)},t.chordDirected=function(){return za(!0,!1)},t.chordTranspose=function(){return za(!1,!0)},t.cluster=function(){var t=Ld,n=1,e=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(jd,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Hd,0)}(e)):(n.x=o?a+=t(n,o):0,n.y=0,o=n)}));var u=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=u.x-t(u,c)/2,s=c.x+t(c,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.color=ze,t.contourDensity=function(){var t=fu,n=su,e=lu,r=960,i=500,o=20,a=2,u=3*o,c=r+2*u>>a,f=i+2*u>>a,s=Qa(20);function h(r){var i=new Float32Array(c*f),s=Math.pow(2,-a),h=-1;for(const o of r){var d=(t(o,++h,r)+u)*s,p=(n(o,h,r)+u)*s,g=+e(o,h,r);if(g&&d>=0&&d<c&&p>=0&&p<f){var y=Math.floor(d),v=Math.floor(p),_=d-y-.5,b=p-v-.5;i[y+v*c]+=(1-_)*(1-b)*g,i[y+1+v*c]+=_*(1-b)*g,i[y+1+(v+1)*c]+=_*b*g,i[y+(v+1)*c]+=(1-_)*b*g}}return l({data:i,width:c,height:f},o*s),i}function d(t){var n=h(t),e=s(n),r=Math.pow(2,2*a);return Array.isArray(e)||(e=G(Number.MIN_VALUE,J(n)/r,e)),iu().size([c,f]).thresholds(e.map((t=>t*r)))(n).map(((t,n)=>(t.value=+e[n],p(t))))}function p(t){return t.coordinates.forEach(g),t}function g(t){t.forEach(y)}function y(t){t.forEach(v)}function v(t){t[0]=t[0]*Math.pow(2,a)-u,t[1]=t[1]*Math.pow(2,a)-u}function _(){return c=r+2*(u=3*o)>>a,f=i+2*u>>a,d}return d.contours=function(t){var n=h(t),e=iu().size([c,f]),r=Math.pow(2,2*a),i=t=>{t=+t;var i=p(e.contour(n,t*r));return i.value=t,i};return Object.defineProperty(i,\"max\",{get:()=>J(n)/r}),i},d.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:Qa(+n),d):t},d.y=function(t){return arguments.length?(n=\"function\"==typeof t?t:Qa(+t),d):n},d.weight=function(t){return arguments.length?(e=\"function\"==typeof t?t:Qa(+t),d):e},d.size=function(t){if(!arguments.length)return[r,i];var n=+t[0],e=+t[1];if(!(n>=0&&e>=0))throw new Error(\"invalid size\");return r=n,i=e,_()},d.cellSize=function(t){if(!arguments.length)return 1<<a;if(!((t=+t)>=1))throw new Error(\"invalid cell size\");return a=Math.floor(Math.log(t)/Math.LN2),_()},d.thresholds=function(t){return arguments.length?(s=\"function\"==typeof t?t:Array.isArray(t)?Qa(Za.call(t)):Qa(t),d):s},d.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error(\"invalid bandwidth\");return o=(Math.sqrt(4*t*t+1)-1)/2,_()},d},t.contours=iu,t.count=v,t.create=function(t){return Zn(Yt(t).call(document.documentElement))},t.creator=Yt,t.cross=function(...t){const n=\"function\"==typeof t[t.length-1]&&function(t){return n=>t(...n)}(t.pop()),e=(t=t.map(m)).map(_),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||e.some(b))return o;for(;;){o.push(i.map(((n,e)=>t[e][n])));let a=r;for(;++i[a]===e[a];){if(0===a)return n?o.map(n):o;i[a--]=0}}},t.csv=wc,t.csvFormat=rc,t.csvFormatBody=ic,t.csvFormatRow=ac,t.csvFormatRows=oc,t.csvFormatValue=uc,t.csvParse=nc,t.csvParseRows=ec,t.cubehelix=Tr,t.cumsum=function(t,n){var e=0,r=0;return Float64Array.from(t,void 0===n?t=>e+=+t||0:i=>e+=+n(i,r++,t)||0)},t.curveBasis=function(t){return new Fx(t)},t.curveBasisClosed=function(t){return new qx(t)},t.curveBasisOpen=function(t){return new Ux(t)},t.curveBumpX=nx,t.curveBumpY=ex,t.curveBundle=Ox,t.curveCardinal=Lx,t.curveCardinalClosed=Hx,t.curveCardinalOpen=Gx,t.curveCatmullRom=Zx,t.curveCatmullRomClosed=Qx,t.curveCatmullRomOpen=tw,t.curveLinear=Im,t.curveLinearClosed=function(t){return new nw(t)},t.curveMonotoneX=function(t){return new aw(t)},t.curveMonotoneY=function(t){return new uw(t)},t.curveNatural=function(t){return new fw(t)},t.curveStep=function(t){return new lw(t,.5)},t.curveStepAfter=function(t){return new lw(t,1)},t.curveStepBefore=function(t){return new lw(t,0)},t.descending=e,t.deviation=w,t.difference=function(t,...n){t=new InternSet(t);for(const e of n)for(const n of e)t.delete(n);return t},t.disjoint=function(t,n){const e=n[Symbol.iterator](),r=new InternSet;for(const n of t){if(r.has(n))return!1;let t,i;for(;({value:t,done:i}=e.next())&&!i;){if(Object.is(n,t))return!1;r.add(t)}}return!0},t.dispatch=$t,t.drag=function(){var t,n,e,r,i=se,o=le,a=he,u=de,c={},f=$t(\"start\",\"drag\",\"end\"),s=0,l=0;function h(t){t.on(\"mousedown.drag\",d).filter(u).on(\"touchstart.drag\",y).on(\"touchmove.drag\",v,ee).on(\"touchend.drag touchcancel.drag\",_).style(\"touch-action\",\"none\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\")}function d(a,u){if(!r&&i.call(this,a,u)){var c=b(this,o.call(this,a,u),a,u,\"mouse\");c&&(Zn(a.view).on(\"mousemove.drag\",p,re).on(\"mouseup.drag\",g,re),ae(a.view),ie(a),e=!1,t=a.clientX,n=a.clientY,c(\"start\",a))}}function p(r){if(oe(r),!e){var i=r.clientX-t,o=r.clientY-n;e=i*i+o*o>l}c.mouse(\"drag\",r)}function g(t){Zn(t.view).on(\"mousemove.drag mouseup.drag\",null),ue(t.view,e),oe(t),c.mouse(\"end\",t)}function y(t,n){if(i.call(this,t,n)){var e,r,a=t.changedTouches,u=o.call(this,t,n),c=a.length;for(e=0;e<c;++e)(r=b(this,u,t,n,a[e].identifier,a[e]))&&(ie(t),r(\"start\",t,a[e]))}}function v(t){var n,e,r=t.changedTouches,i=r.length;for(n=0;n<i;++n)(e=c[r[n].identifier])&&(oe(t),e(\"drag\",t,r[n]))}function _(t){var n,e,i=t.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),n=0;n<o;++n)(e=c[i[n].identifier])&&(ie(t),e(\"end\",t,i[n]))}function b(t,n,e,r,i,o){var u,l,d,p=f.copy(),g=ne(o||e,n);if(null!=(d=a.call(t,new fe(\"beforestart\",{sourceEvent:e,target:h,identifier:i,active:s,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),r)))return u=d.x-g[0]||0,l=d.y-g[1]||0,function e(o,a,f){var y,v=g;switch(o){case\"start\":c[i]=e,y=s++;break;case\"end\":delete c[i],--s;case\"drag\":g=ne(f||a,n),y=s}p.call(o,t,new fe(o,{sourceEvent:a,subject:d,target:h,identifier:i,active:y,x:g[0]+u,y:g[1]+l,dx:g[0]-v[0],dy:g[1]-v[1],dispatch:p}),r)}}return h.filter=function(t){return arguments.length?(i=\"function\"==typeof t?t:ce(!!t),h):i},h.container=function(t){return arguments.length?(o=\"function\"==typeof t?t:ce(t),h):o},h.subject=function(t){return arguments.length?(a=\"function\"==typeof t?t:ce(t),h):a},h.touchable=function(t){return arguments.length?(u=\"function\"==typeof t?t:ce(!!t),h):u},h.on=function(){var t=f.on.apply(f,arguments);return t===f?h:t},h.clickDistance=function(t){return arguments.length?(l=(t=+t)*t,h):Math.sqrt(l)},h},t.dragDisable=ae,t.dragEnable=ue,t.dsv=function(t,n,e,r){3===arguments.length&&\"function\"==typeof e&&(r=e,e=void 0);var i=Ju(t);return mc(n,e).then((function(t){return i.parse(t,r)}))},t.dsvFormat=Ju,t.easeBack=Lo,t.easeBackIn=Bo,t.easeBackInOut=Lo,t.easeBackOut=Yo,t.easeBounce=Io,t.easeBounceIn=function(t){return 1-Io(1-t)},t.easeBounceInOut=function(t){return((t*=2)<=1?1-Io(1-t):Io(t-1)+1)/2},t.easeBounceOut=Io,t.easeCircle=No,t.easeCircleIn=function(t){return 1-Math.sqrt(1-t*t)},t.easeCircleInOut=No,t.easeCircleOut=function(t){return Math.sqrt(1- --t*t)},t.easeCubic=bo,t.easeCubicIn=function(t){return t*t*t},t.easeCubicInOut=bo,t.easeCubicOut=function(t){return--t*t*t+1},t.easeElastic=Xo,t.easeElasticIn=Ho,t.easeElasticInOut=Go,t.easeElasticOut=Xo,t.easeExp=Eo,t.easeExpIn=function(t){return So(1-+t)},t.easeExpInOut=Eo,t.easeExpOut=function(t){return 1-So(t)},t.easeLinear=t=>+t,t.easePoly=wo,t.easePolyIn=mo,t.easePolyInOut=wo,t.easePolyOut=xo,t.easeQuad=_o,t.easeQuadIn=function(t){return t*t},t.easeQuadInOut=_o,t.easeQuadOut=function(t){return t*(2-t)},t.easeSin=Ao,t.easeSinIn=function(t){return 1==+t?1:1-Math.cos(t*To)},t.easeSinInOut=Ao,t.easeSinOut=function(t){return Math.sin(t*To)},t.every=function(t,n){if(\"function\"!=typeof n)throw new TypeError(\"test is not a function\");let e=-1;for(const r of t)if(!n(r,++e,t))return!1;return!0},t.extent=M,t.fcumsum=function(t,n){const e=new T;let r=-1;return Float64Array.from(t,void 0===n?t=>e.add(+t||0):i=>e.add(+n(i,++r,t)||0))},t.filter=function(t,n){if(\"function\"!=typeof n)throw new TypeError(\"test is not a function\");const e=[];let r=-1;for(const i of t)n(i,++r,t)&&e.push(i);return e},t.flatGroup=function(t,...n){return z(P(t,...n),n)},t.flatRollup=function(t,n,...e){return z(D(t,n,...e),e)},t.forceCenter=function(t,n){var e,r=1;function i(){var i,o,a=e.length,u=0,c=0;for(i=0;i<a;++i)u+=(o=e[i]).x,c+=o.y;for(u=(u/a-t)*r,c=(c/a-n)*r,i=0;i<a;++i)(o=e[i]).x-=u,o.y-=c}return null==t&&(t=0),null==n&&(n=0),i.initialize=function(t){e=t},i.x=function(n){return arguments.length?(t=+n,i):t},i.y=function(t){return arguments.length?(n=+t,i):n},i.strength=function(t){return arguments.length?(r=+t,i):r},i},t.forceCollide=function(t){var n,e,r,i=1,o=1;function a(){for(var t,a,c,f,s,l,h,d=n.length,p=0;p<o;++p)for(a=$c(n,Ic,Oc).visitAfter(u),t=0;t<d;++t)c=n[t],l=e[c.index],h=l*l,f=c.x+c.vx,s=c.y+c.vy,a.visit(g);function g(t,n,e,o,a){var u=t.data,d=t.r,p=l+d;if(!u)return n>f+p||o<f-p||e>s+p||a<s-p;if(u.index>c.index){var g=f-u.x-u.vx,y=s-u.y-u.vy,v=g*g+y*y;v<p*p&&(0===g&&(v+=(g=Uc(r))*g),0===y&&(v+=(y=Uc(r))*y),v=(p-(v=Math.sqrt(v)))/v*i,c.vx+=(g*=v)*(p=(d*=d)/(h+d)),c.vy+=(y*=v)*p,u.vx-=g*(p=1-p),u.vy-=y*p)}}}function u(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function c(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r<o;++r)i=n[r],e[i.index]=+t(i,r,n)}}return\"function\"!=typeof t&&(t=qc(null==t?1:+t)),a.initialize=function(t,e){n=t,r=e,c()},a.iterations=function(t){return arguments.length?(o=+t,a):o},a.strength=function(t){return arguments.length?(i=+t,a):i},a.radius=function(n){return arguments.length?(t=\"function\"==typeof n?n:qc(+n),c(),a):t},a},t.forceLink=function(t){var n,e,r,i,o,a,u=Bc,c=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},f=qc(30),s=1;function l(r){for(var i=0,u=t.length;i<s;++i)for(var c,f,l,h,d,p,g,y=0;y<u;++y)f=(c=t[y]).source,h=(l=c.target).x+l.vx-f.x-f.vx||Uc(a),d=l.y+l.vy-f.y-f.vy||Uc(a),h*=p=((p=Math.sqrt(h*h+d*d))-e[y])/p*r*n[y],d*=p,l.vx-=h*(g=o[y]),l.vy-=d*g,f.vx+=h*(g=1-g),f.vy+=d*g}function h(){if(r){var a,c,f=r.length,s=t.length,l=new Map(r.map(((t,n)=>[u(t,n,r),t])));for(a=0,i=new Array(f);a<s;++a)(c=t[a]).index=a,\"object\"!=typeof c.source&&(c.source=Yc(l,c.source)),\"object\"!=typeof c.target&&(c.target=Yc(l,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(a=0,o=new Array(s);a<s;++a)c=t[a],o[a]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);n=new Array(s),d(),e=new Array(s),p()}}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}function p(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+f(t[n],n,t)}return null==t&&(t=[]),l.initialize=function(t,n){r=t,a=n,h()},l.links=function(n){return arguments.length?(t=n,h(),l):t},l.id=function(t){return arguments.length?(u=t,l):u},l.iterations=function(t){return arguments.length?(s=+t,l):s},l.strength=function(t){return arguments.length?(c=\"function\"==typeof t?t:qc(+t),d(),l):c},l.distance=function(t){return arguments.length?(f=\"function\"==typeof t?t:qc(+t),p(),l):f},l},t.forceManyBody=function(){var t,n,e,r,i,o=qc(-30),a=1,u=1/0,c=.81;function f(e){var i,o=t.length,a=$c(t,Xc,Gc).visitAfter(l);for(r=e,i=0;i<o;++i)n=t[i],a.visit(h)}function s(){if(t){var n,e,r=t.length;for(i=new Array(r),n=0;n<r;++n)e=t[n],i[e.index]=+o(e,n,t)}}function l(t){var n,e,r,o,a,u=0,c=0;if(t.length){for(r=o=a=0;a<4;++a)(n=t[a])&&(e=Math.abs(n.value))&&(u+=n.value,c+=e,r+=e*n.x,o+=e*n.y);t.x=r/c,t.y=o/c}else{(n=t).x=n.data.x,n.y=n.data.y;do{u+=i[n.data.index]}while(n=n.next)}t.value=u}function h(t,o,f,s){if(!t.value)return!0;var l=t.x-n.x,h=t.y-n.y,d=s-o,p=l*l+h*h;if(d*d/c<p)return p<u&&(0===l&&(p+=(l=Uc(e))*l),0===h&&(p+=(h=Uc(e))*h),p<a&&(p=Math.sqrt(a*p)),n.vx+=l*t.value*r/p,n.vy+=h*t.value*r/p),!0;if(!(t.length||p>=u)){(t.data!==n||t.next)&&(0===l&&(p+=(l=Uc(e))*l),0===h&&(p+=(h=Uc(e))*h),p<a&&(p=Math.sqrt(a*p)));do{t.data!==n&&(d=i[t.data.index]*r/p,n.vx+=l*d,n.vy+=h*d)}while(t=t.next)}}return f.initialize=function(n,r){t=n,e=r,s()},f.strength=function(t){return arguments.length?(o=\"function\"==typeof t?t:qc(+t),s(),f):o},f.distanceMin=function(t){return arguments.length?(a=t*t,f):Math.sqrt(a)},f.distanceMax=function(t){return arguments.length?(u=t*t,f):Math.sqrt(u)},f.theta=function(t){return arguments.length?(c=t*t,f):Math.sqrt(c)},f},t.forceRadial=function(t,n,e){var r,i,o,a=qc(.1);function u(t){for(var a=0,u=r.length;a<u;++a){var c=r[a],f=c.x-n||1e-6,s=c.y-e||1e-6,l=Math.sqrt(f*f+s*s),h=(o[a]-l)*i[a]*t/l;c.vx+=f*h,c.vy+=s*h}}function c(){if(r){var n,e=r.length;for(i=new Array(e),o=new Array(e),n=0;n<e;++n)o[n]=+t(r[n],n,r),i[n]=isNaN(o[n])?0:+a(r[n],n,r)}}return\"function\"!=typeof t&&(t=qc(+t)),null==n&&(n=0),null==e&&(e=0),u.initialize=function(t){r=t,c()},u.strength=function(t){return arguments.length?(a=\"function\"==typeof t?t:qc(+t),c(),u):a},u.radius=function(n){return arguments.length?(t=\"function\"==typeof n?n:qc(+n),c(),u):t},u.x=function(t){return arguments.length?(n=+t,u):n},u.y=function(t){return arguments.length?(e=+t,u):e},u},t.forceSimulation=function(t){var n,e=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,u=new Map,c=Ni(l),f=$t(\"tick\",\"end\"),s=function(){let t=1;return()=>(t=(Lc*t+jc)%Hc)/Hc}();function l(){h(),f.call(\"tick\",n),e<r&&(c.stop(),f.call(\"end\",n))}function h(r){var c,f,s=t.length;void 0===r&&(r=1);for(var l=0;l<r;++l)for(e+=(o-e)*i,u.forEach((function(t){t(e)})),c=0;c<s;++c)null==(f=t[c]).fx?f.x+=f.vx*=a:(f.x=f.fx,f.vx=0),null==f.fy?f.y+=f.vy*=a:(f.y=f.fy,f.vy=0);return n}function d(){for(var n,e=0,r=t.length;e<r;++e){if((n=t[e]).index=e,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),isNaN(n.x)||isNaN(n.y)){var i=10*Math.sqrt(.5+e),o=e*Vc;n.x=i*Math.cos(o),n.y=i*Math.sin(o)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function p(n){return n.initialize&&n.initialize(t,s),n}return null==t&&(t=[]),d(),n={tick:h,restart:function(){return c.restart(l),n},stop:function(){return c.stop(),n},nodes:function(e){return arguments.length?(t=e,d(),u.forEach(p),n):t},alpha:function(t){return arguments.length?(e=+t,n):e},alphaMin:function(t){return arguments.length?(r=+t,n):r},alphaDecay:function(t){return arguments.length?(i=+t,n):+i},alphaTarget:function(t){return arguments.length?(o=+t,n):o},velocityDecay:function(t){return arguments.length?(a=1-t,n):1-a},randomSource:function(t){return arguments.length?(s=t,u.forEach(p),n):s},force:function(t,e){return arguments.length>1?(null==e?u.delete(t):u.set(t,p(e)),n):u.get(t)},find:function(n,e,r){var i,o,a,u,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f<s;++f)(a=(i=n-(u=t[f]).x)*i+(o=e-u.y)*o)<r&&(c=u,r=a);return c},on:function(t,e){return arguments.length>1?(f.on(t,e),n):f.on(t)}}},t.forceX=function(t){var n,e,r,i=qc(.1);function o(t){for(var i,o=0,a=n.length;o<a;++o)(i=n[o]).vx+=(r[o]-i.x)*e[o]*t}function a(){if(n){var o,a=n.length;for(e=new Array(a),r=new Array(a),o=0;o<a;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return\"function\"!=typeof t&&(t=qc(null==t?0:+t)),o.initialize=function(t){n=t,a()},o.strength=function(t){return arguments.length?(i=\"function\"==typeof t?t:qc(+t),a(),o):i},o.x=function(n){return arguments.length?(t=\"function\"==typeof n?n:qc(+n),a(),o):t},o},t.forceY=function(t){var n,e,r,i=qc(.1);function o(t){for(var i,o=0,a=n.length;o<a;++o)(i=n[o]).vy+=(r[o]-i.y)*e[o]*t}function a(){if(n){var o,a=n.length;for(e=new Array(a),r=new Array(a),o=0;o<a;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return\"function\"!=typeof t&&(t=qc(null==t?0:+t)),o.initialize=function(t){n=t,a()},o.strength=function(t){return arguments.length?(i=\"function\"==typeof t?t:qc(+t),a(),o):i},o.y=function(n){return arguments.length?(t=\"function\"==typeof n?n:qc(+n),a(),o):t},o},t.formatDefaultLocale=ff,t.formatLocale=cf,t.formatSpecifier=Jc,t.fsum=function(t,n){const e=new T;if(void 0===n)for(let n of t)(n=+n)&&e.add(n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&e.add(i)}return+e},t.geoAlbers=xd,t.geoAlbersUsa=function(){var t,n,e,r,i,o,a=xd(),u=md().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=md().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(t,n){o=[t,n]}};function s(t){var n=t[0],a=t[1];return o=null,e.point(n,a),o||(r.point(n,a),o)||(i.point(n,a),o)}function l(){return t=n=null,s}return s.invert=function(t){var n=a.scale(),e=a.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e<i;)r[e].point(t,n)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},s.precision=function(t){return arguments.length?(a.precision(t),u.precision(t),c.precision(t),l()):a.precision()},s.scale=function(t){return arguments.length?(a.scale(t),u.scale(.35*t),c.scale(t),s.translate(a.translate())):a.scale()},s.translate=function(t){if(!arguments.length)return a.translate();var n=a.scale(),o=+t[0],s=+t[1];return e=a.translate(t).clipExtent([[o-.455*n,s-.238*n],[o+.455*n,s+.238*n]]).stream(f),r=u.translate([o-.307*n,s+.201*n]).clipExtent([[o-.425*n+df,s+.12*n+df],[o-.214*n-df,s+.234*n-df]]).stream(f),i=c.translate([o-.205*n,s+.212*n]).clipExtent([[o-.214*n+df,s+.166*n+df],[o-.115*n-df,s+.234*n-df]]).stream(f),l()},s.fitExtent=function(t,n){return ud(s,t,n)},s.fitSize=function(t,n){return cd(s,t,n)},s.fitWidth=function(t,n){return fd(s,t,n)},s.fitHeight=function(t,n){return sd(s,t,n)},s.scale(1070)},t.geoArea=function(t){return us=new T,Lf(t,cs),2*us},t.geoAzimuthalEqualArea=function(){return yd(Td).scale(124.75).clipAngle(179.999)},t.geoAzimuthalEqualAreaRaw=Td,t.geoAzimuthalEquidistant=function(){return yd(Ad).scale(79.4188).clipAngle(179.999)},t.geoAzimuthalEquidistantRaw=Ad,t.geoBounds=function(t){var n,e,r,i,o,a,u;if(Qf=Kf=-(Wf=Zf=1/0),is=[],Lf(t,Fs),e=is.length){for(is.sort(Hs),n=1,o=[r=is[0]];n<e;++n)Xs(r,(i=is[n])[0])||Xs(r,i[1])?(js(r[0],i[1])>js(r[0],r[1])&&(r[1]=i[1]),js(i[0],r[1])>js(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=js(r[1],i[0]))>a&&(a=u,Wf=i[0],Kf=r[1])}return is=os=null,Wf===1/0||Zf===1/0?[[NaN,NaN],[NaN,NaN]]:[[Wf,Zf],[Kf,Qf]]},t.geoCentroid=function(t){ms=xs=ws=Ms=Ts=As=Ss=Es=0,Ns=new T,ks=new T,Cs=new T,Lf(t,Gs);var n=+Ns,e=+ks,r=+Cs,i=Ef(n,e,r);return i<pf&&(n=As,e=Ss,r=Es,xs<df&&(n=ws,e=Ms,r=Ts),(i=Ef(n,e,r))<pf)?[NaN,NaN]:[Mf(e,n)*bf,Rf(r/i)*bf]},t.geoCircle=function(){var t,n,e=il([0,0]),r=il(90),i=il(2),o={point:function(e,r){t.push(e=n(e,r)),e[0]*=bf,e[1]*=bf}};function a(){var a=e.apply(this,arguments),u=r.apply(this,arguments)*mf,c=i.apply(this,arguments)*mf;return t=[],n=ul(-a[0]*mf,-a[1]*mf,0).invert,hl(o,u,c,1),a={type:\"Polygon\",coordinates:[t]},t=n=null,a}return a.center=function(t){return arguments.length?(e=\"function\"==typeof t?t:il([+t[0],+t[1]]),a):e},a.radius=function(t){return arguments.length?(r=\"function\"==typeof t?t:il(+t),a):r},a.precision=function(t){return arguments.length?(i=\"function\"==typeof t?t:il(+t),a):i},a},t.geoClipAntimeridian=Tl,t.geoClipCircle=Al,t.geoClipExtent=function(){var t,n,e,r=0,i=0,o=960,a=500;return e={stream:function(e){return t&&n===e?t:t=zl(r,i,o,a)(n=e)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],t=n=null,e):[[r,i],[o,a]]}}},t.geoClipRectangle=zl,t.geoConicConformal=function(){return _d(kd).scale(109.5).parallels([30,30])},t.geoConicConformalRaw=kd,t.geoConicEqualArea=md,t.geoConicEqualAreaRaw=bd,t.geoConicEquidistant=function(){return _d(Pd).scale(131.154).center([0,13.9389])},t.geoConicEquidistantRaw=Pd,t.geoContains=function(t,n){return(t&&Bl.hasOwnProperty(t.type)?Bl[t.type]:Ll)(t,n)},t.geoDistance=Ol,t.geoEqualEarth=function(){return yd(qd).scale(177.158)},t.geoEqualEarthRaw=qd,t.geoEquirectangular=function(){return yd(Cd).scale(152.63)},t.geoEquirectangularRaw=Cd,t.geoGnomonic=function(){return yd(Ud).scale(144.049).clipAngle(60)},t.geoGnomonicRaw=Ud,t.geoGraticule=Kl,t.geoGraticule10=function(){return Kl()()},t.geoIdentity=function(){var t,n,e,r,i,o,a,u=1,c=0,f=0,s=1,l=1,h=0,d=null,p=1,g=1,y=id({point:function(t,n){var e=b([t,n]);this.stream.point(e[0],e[1])}}),v=eh;function _(){return p=u*s,g=u*l,o=a=null,b}function b(e){var r=e[0]*p,i=e[1]*g;if(h){var o=i*t-r*n;r=r*t+i*n,i=o}return[r+c,i+f]}return b.invert=function(e){var r=e[0]-c,i=e[1]-f;if(h){var o=i*t+r*n;r=r*t-i*n,i=o}return[r/p,i/g]},b.stream=function(t){return o&&a===t?o:o=y(v(a=t))},b.postclip=function(t){return arguments.length?(v=t,d=e=r=i=null,_()):v},b.clipExtent=function(t){return arguments.length?(v=null==t?(d=e=r=i=null,eh):zl(d=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),_()):null==d?null:[[d,e],[r,i]]},b.scale=function(t){return arguments.length?(u=+t,_()):u},b.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],_()):[c,f]},b.angle=function(e){return arguments.length?(n=Cf(h=e%360*mf),t=Tf(h),_()):h*bf},b.reflectX=function(t){return arguments.length?(s=t?-1:1,_()):s<0},b.reflectY=function(t){return arguments.length?(l=t?-1:1,_()):l<0},b.fitExtent=function(t,n){return ud(b,t,n)},b.fitSize=function(t,n){return cd(b,t,n)},b.fitWidth=function(t,n){return fd(b,t,n)},b.fitHeight=function(t,n){return sd(b,t,n)},b},t.geoInterpolate=function(t,n){var e=t[0]*mf,r=t[1]*mf,i=n[0]*mf,o=n[1]*mf,a=Tf(r),u=Cf(r),c=Tf(o),f=Cf(o),s=a*Tf(e),l=a*Cf(e),h=c*Tf(i),d=c*Cf(i),p=2*Rf(zf(Ff(o-r)+a*c*Ff(i-e))),g=Cf(p),y=p?function(t){var n=Cf(t*=p)/g,e=Cf(p-t)/g,r=e*s+n*h,i=e*l+n*d,o=e*u+n*f;return[Mf(i,r)*bf,Mf(o,zf(r*r+i*i))*bf]}:function(){return[e*bf,r*bf]};return y.distance=p,y},t.geoLength=ql,t.geoMercator=function(){return Ed(Sd).scale(961/_f)},t.geoMercatorRaw=Sd,t.geoNaturalEarth1=function(){return yd(Id).scale(175.295)},t.geoNaturalEarth1Raw=Id,t.geoOrthographic=function(){return yd(Od).scale(249.5).clipAngle(90+df)},t.geoOrthographicRaw=Od,t.geoPath=function(t,n){let e,r,i=3,o=4.5;function a(t){return t&&(\"function\"==typeof o&&r.pointRadius(+o.apply(this,arguments)),Lf(t,e(r))),r.result()}return a.area=function(t){return Lf(t,e(sh)),sh.result()},a.measure=function(t){return Lf(t,e(Kh)),Kh.result()},a.bounds=function(t){return Lf(t,e(mh)),mh.result()},a.centroid=function(t){return Lf(t,e(Oh)),Oh.result()},a.projection=function(n){return arguments.length?(e=null==n?(t=null,eh):(t=n).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(n=null,new ed(i)):new Bh(n=t),\"function\"!=typeof o&&r.pointRadius(o),a):n},a.pointRadius=function(t){return arguments.length?(o=\"function\"==typeof t?t:(r.pointRadius(+t),+t),a):o},a.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{const n=Math.floor(t);if(!(n>=0))throw new RangeError(`invalid digits: ${t}`);i=n}return null===n&&(r=new ed(i)),a},a.projection(t).digits(i).context(n)},t.geoProjection=yd,t.geoProjectionMutator=vd,t.geoRotation=ll,t.geoStereographic=function(){return yd(Bd).scale(250).clipAngle(142)},t.geoStereographicRaw=Bd,t.geoStream=Lf,t.geoTransform=function(t){return{stream:id(t)}},t.geoTransverseMercator=function(){var t=Ed(Yd),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=Yd,t.gray=function(t,n){return new ur(t,0,0,null==n?1:n)},t.greatest=ot,t.greatestIndex=function(t,e=n){if(1===e.length)return tt(t,e);let r,i=-1,o=-1;for(const n of t)++o,(i<0?0===e(n,n):e(n,r)>0)&&(r=n,i=o);return i},t.group=C,t.groupSort=function(t,e,r){return(2!==e.length?U($(t,e,r),(([t,e],[r,i])=>n(e,i)||n(t,r))):U(C(t,r),(([t,r],[i,o])=>e(r,o)||n(t,i)))).map((([t])=>t))},t.groups=P,t.hcl=dr,t.hierarchy=Gd,t.histogram=Q,t.hsl=He,t.html=Ec,t.image=function(t,n){return new Promise((function(e,r){var i=new Image;for(var o in n)i[o]=n[o];i.onerror=r,i.onload=function(){e(i)},i.src=t}))},t.index=function(t,...n){return F(t,k,R,n)},t.indexes=function(t,...n){return F(t,Array.from,R,n)},t.interpolate=Gr,t.interpolateArray=function(t,n){return(Ir(n)?Ur:Or)(t,n)},t.interpolateBasis=Er,t.interpolateBasisClosed=Nr,t.interpolateBlues=Gb,t.interpolateBrBG=ob,t.interpolateBuGn=Mb,t.interpolateBuPu=Ab,t.interpolateCividis=function(t){return t=Math.max(0,Math.min(1,t)),\"rgb(\"+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+\")\"},t.interpolateCool=am,t.interpolateCubehelix=li,t.interpolateCubehelixDefault=im,t.interpolateCubehelixLong=hi,t.interpolateDate=Br,t.interpolateDiscrete=function(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}},t.interpolateGnBu=Eb,t.interpolateGreens=Wb,t.interpolateGreys=Kb,t.interpolateHcl=ci,t.interpolateHclLong=fi,t.interpolateHsl=oi,t.interpolateHslLong=ai,t.interpolateHue=function(t,n){var e=Pr(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}},t.interpolateInferno=pm,t.interpolateLab=function(t,n){var e=$r((t=ar(t)).l,(n=ar(n)).l),r=$r(t.a,n.a),i=$r(t.b,n.b),o=$r(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+\"\"}},t.interpolateMagma=dm,t.interpolateNumber=Yr,t.interpolateNumberArray=Ur,t.interpolateObject=Lr,t.interpolateOrRd=kb,t.interpolateOranges=rm,t.interpolatePRGn=ub,t.interpolatePiYG=fb,t.interpolatePlasma=gm,t.interpolatePuBu=$b,t.interpolatePuBuGn=Pb,t.interpolatePuOr=lb,t.interpolatePuRd=Rb,t.interpolatePurples=Jb,t.interpolateRainbow=function(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return um.h=360*t-100,um.s=1.5-1.5*n,um.l=.8-.9*n,um+\"\"},t.interpolateRdBu=db,t.interpolateRdGy=gb,t.interpolateRdPu=qb,t.interpolateRdYlBu=vb,t.interpolateRdYlGn=bb,t.interpolateReds=nm,t.interpolateRgb=Dr,t.interpolateRgbBasis=Fr,t.interpolateRgbBasisClosed=qr,t.interpolateRound=Vr,t.interpolateSinebow=function(t){var n;return t=(.5-t)*Math.PI,cm.r=255*(n=Math.sin(t))*n,cm.g=255*(n=Math.sin(t+fm))*n,cm.b=255*(n=Math.sin(t+sm))*n,cm+\"\"},t.interpolateSpectral=xb,t.interpolateString=Xr,t.interpolateTransformCss=ti,t.interpolateTransformSvg=ni,t.interpolateTurbo=function(t){return t=Math.max(0,Math.min(1,t)),\"rgb(\"+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+\", \"+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+\")\"},t.interpolateViridis=hm,t.interpolateWarm=om,t.interpolateYlGn=Bb,t.interpolateYlGnBu=Ib,t.interpolateYlOrBr=Lb,t.interpolateYlOrRd=Hb,t.interpolateZoom=ri,t.interrupt=Gi,t.intersection=function(t,...n){t=new InternSet(t),n=n.map(vt);t:for(const e of t)for(const r of n)if(!r.has(e)){t.delete(e);continue t}return t},t.interval=function(t,n,e){var r=new Ei,i=n;return null==n?(r.restart(t,n,e),r):(r._restart=r.restart,r.restart=function(t,n,e){n=+n,e=null==e?Ai():+e,r._restart((function o(a){a+=i,r._restart(o,i+=n,e),t(a)}),n,e)},r.restart(t,n,e),r)},t.isoFormat=D_,t.isoParse=F_,t.json=function(t,n){return fetch(t,n).then(Tc)},t.lab=ar,t.lch=function(t,n,e,r){return 1===arguments.length?hr(t):new pr(e,n,t,null==r?1:r)},t.least=function(t,e=n){let r,i=!1;if(1===e.length){let o;for(const a of t){const t=e(a);(i?n(t,o)<0:0===n(t,t))&&(r=a,o=t,i=!0)}}else for(const n of t)(i?e(n,r)<0:0===e(n,n))&&(r=n,i=!0);return r},t.leastIndex=ht,t.line=Ym,t.lineRadial=Zm,t.link=ax,t.linkHorizontal=function(){return ax(nx)},t.linkRadial=function(){const t=ax(rx);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.linkVertical=function(){return ax(ex)},t.local=Qn,t.map=function(t,n){if(\"function\"!=typeof t[Symbol.iterator])throw new TypeError(\"values is not iterable\");if(\"function\"!=typeof n)throw new TypeError(\"mapper is not a function\");return Array.from(t,((e,r)=>n(e,r,t)))},t.matcher=Vt,t.max=J,t.maxIndex=tt,t.mean=function(t,n){let e=0,r=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++e,r+=n);else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(o=+o)>=o&&(++e,r+=o)}if(e)return r/e},t.median=function(t,n){return at(t,.5,n)},t.medianIndex=function(t,n){return ct(t,.5,n)},t.merge=ft,t.min=nt,t.minIndex=et,t.mode=function(t,n){const e=new InternMap;if(void 0===n)for(let n of t)null!=n&&n>=n&&e.set(n,(e.get(n)||0)+1);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&i>=i&&e.set(i,(e.get(i)||0)+1)}let r,i=0;for(const[t,n]of e)n>i&&(i=n,r=t);return r},t.namespace=It,t.namespaces=Ut,t.nice=Z,t.now=Ai,t.pack=function(){var t=null,n=1,e=1,r=np;function i(i){const o=ap();return i.x=n/2,i.y=e/2,t?i.eachBefore(xp(t)).eachAfter(wp(r,.5,o)).eachBefore(Mp(1)):i.eachBefore(xp(mp)).eachAfter(wp(np,1,o)).eachAfter(wp(r,i.r/Math.min(n,e),o)).eachBefore(Mp(Math.min(n,e)/(2*i.r))),i}return i.radius=function(n){return arguments.length?(t=Jd(n),i):t},i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.padding=function(t){return arguments.length?(r=\"function\"==typeof t?t:ep(+t),i):r},i},t.packEnclose=function(t){return up(t,ap())},t.packSiblings=function(t){return bp(t,ap()),t},t.pairs=function(t,n=st){const e=[];let r,i=!1;for(const o of t)i&&e.push(n(r,o)),r=o,i=!0;return e},t.partition=function(){var t=1,n=1,e=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=e,i.x1=t,i.y1=n/o,i.eachBefore(function(t,n){return function(r){r.children&&Ap(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n);var i=r.x0,o=r.y0,a=r.x1-e,u=r.y1-e;a<i&&(i=a=(i+a)/2),u<o&&(o=u=(o+u)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=u}}(n,o)),r&&i.eachBefore(Tp),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(t){return arguments.length?(e=+t,i):e},i},t.path=Ia,t.pathRound=function(t=3){return new Ua(+t)},t.permute=q,t.pie=function(){var t=Hm,n=jm,e=null,r=ym(0),i=ym(Em),o=ym(0);function a(a){var u,c,f,s,l,h=(a=qm(a)).length,d=0,p=new Array(h),g=new Array(h),y=+r.apply(this,arguments),v=Math.min(Em,Math.max(-Em,i.apply(this,arguments)-y)),_=Math.min(Math.abs(v)/h,o.apply(this,arguments)),b=_*(v<0?-1:1);for(u=0;u<h;++u)(l=g[p[u]=u]=+t(a[u],u,a))>0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(a[t],a[n])})),u=0,f=d?(v-h*b)/d:0;u<h;++u,y=s)c=p[u],s=y+((l=g[c])>0?l*f:0)+b,g[c]={data:a[c],index:u,value:l,startAngle:y,endAngle:s,padAngle:_};return g}return a.value=function(n){return arguments.length?(t=\"function\"==typeof n?n:ym(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r=\"function\"==typeof t?t:ym(+t),a):r},a.endAngle=function(t){return arguments.length?(i=\"function\"==typeof t?t:ym(+t),a):i},a.padAngle=function(t){return arguments.length?(o=\"function\"==typeof t?t:ym(+t),a):o},a},t.piecewise=di,t.pointRadial=Qm,t.pointer=ne,t.pointers=function(t,n){return t.target&&(t=te(t),void 0===n&&(n=t.currentTarget),t=t.touches||[t]),Array.from(t,(t=>ne(t,n)))},t.polygonArea=function(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++e<r;)n=i,i=t[e],o+=n[1]*i[0]-n[0]*i[1];return o/2},t.polygonCentroid=function(t){for(var n,e,r=-1,i=t.length,o=0,a=0,u=t[i-1],c=0;++r<i;)n=u,u=t[r],c+=e=n[0]*u[1]-u[0]*n[1],o+=(n[0]+u[0])*e,a+=(n[1]+u[1])*e;return[o/(c*=3),a/c]},t.polygonContains=function(t,n){for(var e,r,i=t.length,o=t[i-1],a=n[0],u=n[1],c=o[0],f=o[1],s=!1,l=0;l<i;++l)e=(o=t[l])[0],(r=o[1])>u!=f>u&&a<(c-e)*(u-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},t.polygonHull=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n<e;++n)r[n]=[+t[n][0],+t[n][1],n];for(r.sort(Hp),n=0;n<e;++n)i[n]=[r[n][0],-r[n][1]];var o=Xp(r),a=Xp(i),u=a[0]===o[0],c=a[a.length-1]===o[o.length-1],f=[];for(n=o.length-1;n>=0;--n)f.push(t[r[o[n]][2]]);for(n=+u;n<a.length-c;++n)f.push(t[r[a[n]][2]]);return f},t.polygonLength=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],c=0;++r<i;)n=a,e=u,n-=a=(o=t[r])[0],e-=u=o[1],c+=Math.hypot(n,e);return c},t.precisionFixed=sf,t.precisionPrefix=lf,t.precisionRound=hf,t.quadtree=$c,t.quantile=at,t.quantileIndex=ct,t.quantileSorted=ut,t.quantize=function(t,n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t(r/(n-1));return e},t.quickselect=rt,t.radialArea=Km,t.radialLine=Zm,t.randomBates=Jp,t.randomBernoulli=eg,t.randomBeta=og,t.randomBinomial=ag,t.randomCauchy=cg,t.randomExponential=tg,t.randomGamma=ig,t.randomGeometric=rg,t.randomInt=Wp,t.randomIrwinHall=Qp,t.randomLcg=function(t=Math.random()){let n=0|(0<=t&&t<1?t/lg:Math.abs(t));return()=>(n=1664525*n+1013904223|0,lg*(n>>>0))},t.randomLogNormal=Kp,t.randomLogistic=fg,t.randomNormal=Zp,t.randomPareto=ng,t.randomPoisson=sg,t.randomUniform=Vp,t.randomWeibull=ug,t.range=lt,t.rank=function(t,e=n){if(\"function\"!=typeof t[Symbol.iterator])throw new TypeError(\"values is not iterable\");let r=Array.from(t);const i=new Float64Array(r.length);2!==e.length&&(r=r.map(e),e=n);const o=(t,n)=>e(r[t],r[n]);let a,u;return(t=Uint32Array.from(r,((t,n)=>n))).sort(e===n?(t,n)=>O(r[t],r[n]):I(o)),t.forEach(((t,n)=>{const e=o(t,void 0===a?t:a);e>=0?((void 0===a||e>0)&&(a=t,u=n),i[t]=u):i[t]=NaN})),i},t.reduce=function(t,n,e){if(\"function\"!=typeof n)throw new TypeError(\"reducer is not a function\");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if(({done:i,value:e}=r.next()),i)return;++a}for(;({done:i,value:o}=r.next()),!i;)e=n(e,o,++a,t);return e},t.reverse=function(t){if(\"function\"!=typeof t[Symbol.iterator])throw new TypeError(\"values is not iterable\");return Array.from(t).reverse()},t.rgb=Fe,t.ribbon=function(){return Wa()},t.ribbonArrow=function(){return Wa(Va)},t.rollup=$,t.rollups=D,t.scaleBand=yg,t.scaleDiverging=function t(){var n=Ng(L_()(mg));return n.copy=function(){return B_(n,t())},dg.apply(n,arguments)},t.scaleDivergingLog=function t(){var n=Fg(L_()).domain([.1,1,10]);return n.copy=function(){return B_(n,t()).base(n.base())},dg.apply(n,arguments)},t.scaleDivergingPow=j_,t.scaleDivergingSqrt=function(){return j_.apply(null,arguments).exponent(.5)},t.scaleDivergingSymlog=function t(){var n=Ig(L_());return n.copy=function(){return B_(n,t()).constant(n.constant())},dg.apply(n,arguments)},t.scaleIdentity=function t(n){var e;function r(t){return null==t||isNaN(t=+t)?e:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(n=Array.from(t,_g),r):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return t(n).unknown(e)},n=arguments.length?Array.from(n,_g):[0,1],Ng(r)},t.scaleImplicit=pg,t.scaleLinear=function t(){var n=Sg();return n.copy=function(){return Tg(n,t())},hg.apply(n,arguments),Ng(n)},t.scaleLog=function t(){const n=Fg(Ag()).domain([1,10]);return n.copy=()=>Tg(n,t()).base(n.base()),hg.apply(n,arguments),n},t.scaleOrdinal=gg,t.scalePoint=function(){return vg(yg.apply(null,arguments).paddingInner(1))},t.scalePow=jg,t.scaleQuantile=function t(){var e,r=[],i=[],o=[];function a(){var t=0,n=Math.max(1,i.length);for(o=new Array(n-1);++t<n;)o[t-1]=ut(r,t/n);return u}function u(t){return null==t||isNaN(t=+t)?e:i[s(o,t)]}return u.invertExtent=function(t){var n=i.indexOf(t);return n<0?[NaN,NaN]:[n>0?o[n-1]:r[0],n<o.length?o[n]:r[r.length-1]]},u.domain=function(t){if(!arguments.length)return r.slice();r=[];for(let n of t)null==n||isNaN(n=+n)||r.push(n);return r.sort(n),a()},u.range=function(t){return arguments.length?(i=Array.from(t),a()):i.slice()},u.unknown=function(t){return arguments.length?(e=t,u):e},u.quantiles=function(){return o.slice()},u.copy=function(){return t().domain(r).range(i).unknown(e)},hg.apply(u,arguments)},t.scaleQuantize=function t(){var n,e=0,r=1,i=1,o=[.5],a=[0,1];function u(t){return null!=t&&t<=t?a[s(o,t,0,i)]:n}function c(){var t=-1;for(o=new Array(i);++t<i;)o[t]=((t+1)*r-(t-i)*e)/(i+1);return u}return u.domain=function(t){return arguments.length?([e,r]=t,e=+e,r=+r,c()):[e,r]},u.range=function(t){return arguments.length?(i=(a=Array.from(t)).length-1,c()):a.slice()},u.invertExtent=function(t){var n=a.indexOf(t);return n<0?[NaN,NaN]:n<1?[e,o[0]]:n>=i?[o[i-1],r]:[o[n-1],o[n]]},u.unknown=function(t){return arguments.length?(n=t,u):u},u.thresholds=function(){return o.slice()},u.copy=function(){return t().domain([e,r]).range(a).unknown(n)},hg.apply(Ng(u),arguments)},t.scaleRadial=function t(){var n,e=Sg(),r=[0,1],i=!1;function o(t){var r=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(t));return isNaN(r)?n:i?Math.round(r):r}return o.invert=function(t){return e.invert(Hg(t))},o.domain=function(t){return arguments.length?(e.domain(t),o):e.domain()},o.range=function(t){return arguments.length?(e.range((r=Array.from(t,_g)).map(Hg)),o):r.slice()},o.rangeRound=function(t){return o.range(t).round(!0)},o.round=function(t){return arguments.length?(i=!!t,o):i},o.clamp=function(t){return arguments.length?(e.clamp(t),o):e.clamp()},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t(e.domain(),r).round(i).clamp(e.clamp()).unknown(n)},hg.apply(o,arguments),Ng(o)},t.scaleSequential=function t(){var n=Ng(O_()(mg));return n.copy=function(){return B_(n,t())},dg.apply(n,arguments)},t.scaleSequentialLog=function t(){var n=Fg(O_()).domain([1,10]);return n.copy=function(){return B_(n,t()).base(n.base())},dg.apply(n,arguments)},t.scaleSequentialPow=Y_,t.scaleSequentialQuantile=function t(){var e=[],r=mg;function i(t){if(null!=t&&!isNaN(t=+t))return r((s(e,t,1)-1)/(e.length-1))}return i.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(n),i},i.interpolator=function(t){return arguments.length?(r=t,i):r},i.range=function(){return e.map(((t,n)=>r(n/(e.length-1))))},i.quantiles=function(t){return Array.from({length:t+1},((n,r)=>at(e,r/t)))},i.copy=function(){return t(r).domain(e)},dg.apply(i,arguments)},t.scaleSequentialSqrt=function(){return Y_.apply(null,arguments).exponent(.5)},t.scaleSequentialSymlog=function t(){var n=Ig(O_());return n.copy=function(){return B_(n,t()).constant(n.constant())},dg.apply(n,arguments)},t.scaleSqrt=function(){return jg.apply(null,arguments).exponent(.5)},t.scaleSymlog=function t(){var n=Ig(Ag());return n.copy=function(){return Tg(n,t()).constant(n.constant())},hg.apply(n,arguments)},t.scaleThreshold=function t(){var n,e=[.5],r=[0,1],i=1;function o(t){return null!=t&&t<=t?r[s(e,t,0,i)]:n}return o.domain=function(t){return arguments.length?(e=Array.from(t),i=Math.min(e.length,r.length-1),o):e.slice()},o.range=function(t){return arguments.length?(r=Array.from(t),i=Math.min(e.length,r.length-1),o):r.slice()},o.invertExtent=function(t){var n=r.indexOf(t);return[e[n-1],e[n]]},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t().domain(e).range(r).unknown(n)},hg.apply(o,arguments)},t.scaleTime=function(){return hg.apply(I_(uv,cv,tv,Zy,xy,py,sy,ay,iy,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleUtc=function(){return hg.apply(I_(ov,av,ev,Qy,Fy,yy,hy,cy,iy,t.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},t.scan=function(t,n){const e=ht(t,n);return e<0?void 0:e},t.schemeAccent=G_,t.schemeBlues=Xb,t.schemeBrBG=ib,t.schemeBuGn=wb,t.schemeBuPu=Tb,t.schemeCategory10=X_,t.schemeDark2=V_,t.schemeGnBu=Sb,t.schemeGreens=Vb,t.schemeGreys=Zb,t.schemeObservable10=W_,t.schemeOrRd=Nb,t.schemeOranges=em,t.schemePRGn=ab,t.schemePaired=Z_,t.schemePastel1=K_,t.schemePastel2=Q_,t.schemePiYG=cb,t.schemePuBu=zb,t.schemePuBuGn=Cb,t.schemePuOr=sb,t.schemePuRd=Db,t.schemePurples=Qb,t.schemeRdBu=hb,t.schemeRdGy=pb,t.schemeRdPu=Fb,t.schemeRdYlBu=yb,t.schemeRdYlGn=_b,t.schemeReds=tm,t.schemeSet1=J_,t.schemeSet2=tb,t.schemeSet3=nb,t.schemeSpectral=mb,t.schemeTableau10=eb,t.schemeYlGn=Ob,t.schemeYlGnBu=Ub,t.schemeYlOrBr=Yb,t.schemeYlOrRd=jb,t.select=Zn,t.selectAll=function(t){return\"string\"==typeof t?new Vn([document.querySelectorAll(t)],[document.documentElement]):new Vn([Ht(t)],Gn)},t.selection=Wn,t.selector=jt,t.selectorAll=Gt,t.shuffle=dt,t.shuffler=pt,t.some=function(t,n){if(\"function\"!=typeof n)throw new TypeError(\"test is not a function\");let e=-1;for(const r of t)if(n(r,++e,t))return!0;return!1},t.sort=U,t.stack=function(){var t=ym([]),n=dw,e=hw,r=pw;function i(i){var o,a,u=Array.from(t.apply(this,arguments),gw),c=u.length,f=-1;for(const t of i)for(o=0,++f;o<c;++o)(u[o][f]=[0,+r(t,u[o].key,f,i)]).data=t;for(o=0,a=qm(n(u));o<c;++o)u[a[o]].index=o;return e(u,a),u}return i.keys=function(n){return arguments.length?(t=\"function\"==typeof n?n:ym(Array.from(n)),i):t},i.value=function(t){return arguments.length?(r=\"function\"==typeof t?t:ym(+t),i):r},i.order=function(t){return arguments.length?(n=null==t?dw:\"function\"==typeof t?t:ym(Array.from(t)),i):n},i.offset=function(t){return arguments.length?(e=null==t?hw:t,i):e},i},t.stackOffsetDiverging=function(t,n){if((u=t.length)>0)for(var e,r,i,o,a,u,c=0,f=t[n[0]].length;c<f;++c)for(o=a=0,e=0;e<u;++e)(i=(r=t[n[e]][c])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},t.stackOffsetExpand=function(t,n){if((r=t.length)>0){for(var e,r,i,o=0,a=t[0].length;o<a;++o){for(i=e=0;e<r;++e)i+=t[e][o][1]||0;if(i)for(e=0;e<r;++e)t[e][o][1]/=i}hw(t,n)}},t.stackOffsetNone=hw,t.stackOffsetSilhouette=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r<o;++r){for(var a=0,u=0;a<e;++a)u+=t[a][r][1]||0;i[r][1]+=i[r][0]=-u/2}hw(t,n)}},t.stackOffsetWiggle=function(t,n){if((i=t.length)>0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;a<r;++a){for(var u=0,c=0,f=0;u<i;++u){for(var s=t[n[u]],l=s[a][1]||0,h=(l-(s[a-1][1]||0))/2,d=0;d<u;++d){var p=t[n[d]];h+=(p[a][1]||0)-(p[a-1][1]||0)}c+=l,f+=h*l}e[a-1][1]+=e[a-1][0]=o,c&&(o-=f/c)}e[a-1][1]+=e[a-1][0]=o,hw(t,n)}},t.stackOrderAppearance=yw,t.stackOrderAscending=_w,t.stackOrderDescending=function(t){return _w(t).reverse()},t.stackOrderInsideOut=function(t){var n,e,r=t.length,i=t.map(bw),o=yw(t),a=0,u=0,c=[],f=[];for(n=0;n<r;++n)e=o[n],a<u?(a+=i[e],c.push(e)):(u+=i[e],f.push(e));return f.reverse().concat(c)},t.stackOrderNone=dw,t.stackOrderReverse=function(t){return dw(t).reverse()},t.stratify=function(){var t,n=kp,e=Cp;function r(r){var i,o,a,u,c,f,s,l,h=Array.from(r),d=n,p=e,g=new Map;if(null!=t){const n=h.map(((n,e)=>function(t){t=`${t}`;let n=t.length;zp(t,n-1)&&!zp(t,n-2)&&(t=t.slice(0,-1));return\"/\"===t[0]?t:`/${t}`}(t(n,e,r)))),e=n.map(Pp),i=new Set(n).add(\"\");for(const t of e)i.has(t)||(i.add(t),n.push(t),e.push(Pp(t)),h.push(Np));d=(t,e)=>n[e],p=(t,n)=>e[n]}for(a=0,i=h.length;a<i;++a)o=h[a],f=h[a]=new Qd(o),null!=(s=d(o,a,r))&&(s+=\"\")&&(l=f.id=s,g.set(l,g.has(l)?Ep:f)),null!=(s=p(o,a,r))&&(s+=\"\")&&(f.parent=s);for(a=0;a<i;++a)if(s=(f=h[a]).parent){if(!(c=g.get(s)))throw new Error(\"missing: \"+s);if(c===Ep)throw new Error(\"ambiguous: \"+s);c.children?c.children.push(f):c.children=[f],f.parent=c}else{if(u)throw new Error(\"multiple roots\");u=f}if(!u)throw new Error(\"no root\");if(null!=t){for(;u.data===Np&&1===u.children.length;)u=u.children[0],--i;for(let t=h.length-1;t>=0&&(f=h[t]).data===Np;--t)f.data=null}if(u.parent=Sp,u.eachBefore((function(t){t.depth=t.parent.depth+1,--i})).eachBefore(Kd),u.parent=null,i>0)throw new Error(\"cycle\");return u}return r.id=function(t){return arguments.length?(n=Jd(t),r):n},r.parentId=function(t){return arguments.length?(e=Jd(t),r):e},r.path=function(n){return arguments.length?(t=Jd(n),r):t},r},t.style=_n,t.subset=function(t,n){return _t(n,t)},t.sum=function(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e},t.superset=_t,t.svg=Nc,t.symbol=function(t,n){let e=null,r=km(i);function i(){let i;if(e||(e=i=r()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+\"\"||null}return t=\"function\"==typeof t?t:ym(t||fx),n=\"function\"==typeof n?n:ym(void 0===n?64:+n),i.type=function(n){return arguments.length?(t=\"function\"==typeof n?n:ym(n),i):t},i.size=function(t){return arguments.length?(n=\"function\"==typeof t?t:ym(+t),i):n},i.context=function(t){return arguments.length?(e=null==t?null:t,i):e},i},t.symbolAsterisk=cx,t.symbolCircle=fx,t.symbolCross=sx,t.symbolDiamond=dx,t.symbolDiamond2=px,t.symbolPlus=gx,t.symbolSquare=yx,t.symbolSquare2=vx,t.symbolStar=xx,t.symbolTimes=Px,t.symbolTriangle=Mx,t.symbolTriangle2=Ax,t.symbolWye=Cx,t.symbolX=Px,t.symbols=zx,t.symbolsFill=zx,t.symbolsStroke=$x,t.text=mc,t.thresholdFreedmanDiaconis=function(t,n,e){const r=v(t),i=at(t,.75)-at(t,.25);return r&&i?Math.ceil((e-n)/(2*i*Math.pow(r,-1/3))):1},t.thresholdScott=function(t,n,e){const r=v(t),i=w(t);return r&&i?Math.ceil((e-n)*Math.cbrt(r)/(3.49*i)):1},t.thresholdSturges=K,t.tickFormat=Eg,t.tickIncrement=V,t.tickStep=W,t.ticks=G,t.timeDay=py,t.timeDays=gy,t.timeFormatDefaultLocale=P_,t.timeFormatLocale=hv,t.timeFriday=Sy,t.timeFridays=$y,t.timeHour=sy,t.timeHours=ly,t.timeInterval=Vg,t.timeMillisecond=Wg,t.timeMilliseconds=Zg,t.timeMinute=ay,t.timeMinutes=uy,t.timeMonday=wy,t.timeMondays=ky,t.timeMonth=Zy,t.timeMonths=Ky,t.timeSaturday=Ey,t.timeSaturdays=Dy,t.timeSecond=iy,t.timeSeconds=oy,t.timeSunday=xy,t.timeSundays=Ny,t.timeThursday=Ay,t.timeThursdays=zy,t.timeTickInterval=cv,t.timeTicks=uv,t.timeTuesday=My,t.timeTuesdays=Cy,t.timeWednesday=Ty,t.timeWednesdays=Py,t.timeWeek=xy,t.timeWeeks=Ny,t.timeYear=tv,t.timeYears=nv,t.timeout=$i,t.timer=Ni,t.timerFlush=ki,t.transition=go,t.transpose=gt,t.tree=function(){var t=$p,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,a=new Up(t,0),u=[a];n=u.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(e=n.children[i]=new Up(r[i],i)),e.parent=n;return(a.parent=new Up(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(u);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.x<f.x&&(f=t),t.x>s.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),g=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,a=n,u=e,c=o.parent.children[0],f=o.m,s=a.m,l=u.m,h=c.m;u=Rp(u),o=Dp(o),u&&o;)c=Dp(c),(a=Rp(a)).a=n,(i=u.z+l-o.z-f+t(u._,o._))>0&&(Fp(qp(u,n,r),n,i),f+=i,s+=i),l+=u.m,f+=o.m,h+=c.m,s+=a.m;u&&!Rp(a)&&(a.t=u,a.m+=l-s),o&&!Dp(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.treemap=function(){var t=Yp,n=!1,e=1,r=1,i=[0],o=np,a=np,u=np,c=np,f=np;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Tp),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l<r&&(r=l=(r+l)/2),h<s&&(s=h=(s+h)/2),n.x0=r,n.y0=s,n.x1=l,n.y1=h,n.children&&(e=i[n.depth+1]=o(n)/2,r+=f(n)-e,s+=a(n)-e,(l-=u(n)-e)<r&&(r=l=(r+l)/2),(h-=c(n)-e)<s&&(s=h=(s+h)/2),t(n,r,s,l,h))}return s.round=function(t){return arguments.length?(n=!!t,s):n},s.size=function(t){return arguments.length?(e=+t[0],r=+t[1],s):[e,r]},s.tile=function(n){return arguments.length?(t=tp(n),s):t},s.padding=function(t){return arguments.length?s.paddingInner(t).paddingOuter(t):s.paddingInner()},s.paddingInner=function(t){return arguments.length?(o=\"function\"==typeof t?t:ep(+t),s):o},s.paddingOuter=function(t){return arguments.length?s.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):s.paddingTop()},s.paddingTop=function(t){return arguments.length?(a=\"function\"==typeof t?t:ep(+t),s):a},s.paddingRight=function(t){return arguments.length?(u=\"function\"==typeof t?t:ep(+t),s):u},s.paddingBottom=function(t){return arguments.length?(c=\"function\"==typeof t?t:ep(+t),s):c},s.paddingLeft=function(t){return arguments.length?(f=\"function\"==typeof t?t:ep(+t),s):f},s},t.treemapBinary=function(t,n,e,r,i){var o,a,u=t.children,c=u.length,f=new Array(c+1);for(f[0]=a=o=0;o<c;++o)f[o+1]=a+=u[o].value;!function t(n,e,r,i,o,a,c){if(n>=e-1){var s=u[n];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}var l=f[n],h=r/2+l,d=n+1,p=e-1;for(;d<p;){var g=d+p>>>1;f[g]<h?d=g+1:p=g}h-f[d-1]<f[d]-h&&n+1<d&&--d;var y=f[d]-l,v=r-y;if(a-i>c-o){var _=r?(i*v+a*y)/r:a;t(n,d,y,i,o,_,c),t(d,e,v,_,o,a,c)}else{var b=r?(o*v+c*y)/r:c;t(n,d,y,i,o,a,b),t(d,e,v,i,b,a,c)}}(0,c,t.value,n,e,r,i)},t.treemapDice=Ap,t.treemapResquarify=Lp,t.treemapSlice=Ip,t.treemapSliceDice=function(t,n,e,r,i){(1&t.depth?Ip:Ap)(t,n,e,r,i)},t.treemapSquarify=Yp,t.tsv=Mc,t.tsvFormat=lc,t.tsvFormatBody=hc,t.tsvFormatRow=pc,t.tsvFormatRows=dc,t.tsvFormatValue=gc,t.tsvParse=fc,t.tsvParseRows=sc,t.union=function(...t){const n=new InternSet;for(const e of t)for(const t of e)n.add(t);return n},t.unixDay=_y,t.unixDays=by,t.utcDay=yy,t.utcDays=vy,t.utcFriday=By,t.utcFridays=Vy,t.utcHour=hy,t.utcHours=dy,t.utcMillisecond=Wg,t.utcMilliseconds=Zg,t.utcMinute=cy,t.utcMinutes=fy,t.utcMonday=qy,t.utcMondays=jy,t.utcMonth=Qy,t.utcMonths=Jy,t.utcSaturday=Yy,t.utcSaturdays=Wy,t.utcSecond=iy,t.utcSeconds=oy,t.utcSunday=Fy,t.utcSundays=Ly,t.utcThursday=Oy,t.utcThursdays=Gy,t.utcTickInterval=av,t.utcTicks=ov,t.utcTuesday=Uy,t.utcTuesdays=Hy,t.utcWednesday=Iy,t.utcWednesdays=Xy,t.utcWeek=Fy,t.utcWeeks=Ly,t.utcYear=ev,t.utcYears=rv,t.variance=x,t.version=\"7.9.0\",t.window=pn,t.xml=Sc,t.zip=function(){return gt(arguments)},t.zoom=function(){var t,n,e,r=Ew,i=Nw,o=zw,a=Cw,u=Pw,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],s=250,l=ri,h=$t(\"start\",\"zoom\",\"end\"),d=500,p=150,g=0,y=10;function v(t){t.property(\"__zoom\",kw).on(\"wheel.zoom\",T,{passive:!1}).on(\"mousedown.zoom\",A).on(\"dblclick.zoom\",S).filter(u).on(\"touchstart.zoom\",E).on(\"touchmove.zoom\",N).on(\"touchend.zoom touchcancel.zoom\",k).style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\")}function _(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new ww(n,t.x,t.y)}function b(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ww(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,n,e,r){t.on(\"start.zoom\",(function(){w(this,arguments).event(r).start()})).on(\"interrupt.zoom end.zoom\",(function(){w(this,arguments).event(r).end()})).tween(\"zoom\",(function(){var t=this,o=arguments,a=w(t,o).event(r),u=i.apply(t,o),c=null==e?m(u):\"function\"==typeof e?e.apply(t,o):e,f=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),s=t.__zoom,h=\"function\"==typeof n?n.apply(t,o):n,d=l(s.invert(c).concat(f/s.k),h.invert(c).concat(f/h.k));return function(t){if(1===t)t=h;else{var n=d(t),e=f/n[2];t=new ww(e,c[0]-n[0]*e,c[1]-n[1]*e)}a.zoom(null,t)}}))}function w(t,n,e){return!e&&t.__zooming||new M(t,n)}function M(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,n),this.taps=0}function T(t,...n){if(r.apply(this,arguments)){var e=w(this,n).event(t),i=this.__zoom,u=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,a.apply(this,arguments)))),s=ne(t);if(e.wheel)e.mouse[0][0]===s[0]&&e.mouse[0][1]===s[1]||(e.mouse[1]=i.invert(e.mouse[0]=s)),clearTimeout(e.wheel);else{if(i.k===u)return;e.mouse=[s,i.invert(s)],Gi(this),e.start()}Sw(t),e.wheel=setTimeout((function(){e.wheel=null,e.end()}),p),e.zoom(\"mouse\",o(b(_(i,u),e.mouse[0],e.mouse[1]),e.extent,f))}}function A(t,...n){if(!e&&r.apply(this,arguments)){var i=t.currentTarget,a=w(this,n,!0).event(t),u=Zn(t.view).on(\"mousemove.zoom\",(function(t){if(Sw(t),!a.moved){var n=t.clientX-s,e=t.clientY-l;a.moved=n*n+e*e>g}a.event(t).zoom(\"mouse\",o(b(a.that.__zoom,a.mouse[0]=ne(t,i),a.mouse[1]),a.extent,f))}),!0).on(\"mouseup.zoom\",(function(t){u.on(\"mousemove.zoom mouseup.zoom\",null),ue(t.view,a.moved),Sw(t),a.event(t).end()}),!0),c=ne(t,i),s=t.clientX,l=t.clientY;ae(t.view),Aw(t),a.mouse=[c,this.__zoom.invert(c)],Gi(this),a.start()}}function S(t,...n){if(r.apply(this,arguments)){var e=this.__zoom,a=ne(t.changedTouches?t.changedTouches[0]:t,this),u=e.invert(a),c=e.k*(t.shiftKey?.5:2),l=o(b(_(e,c),a,u),i.apply(this,n),f);Sw(t),s>0?Zn(this).transition().duration(s).call(x,l,a,t):Zn(this).call(v.transform,l,a,t)}}function E(e,...i){if(r.apply(this,arguments)){var o,a,u,c,f=e.touches,s=f.length,l=w(this,i,e.changedTouches.length===s).event(e);for(Aw(e),a=0;a<s;++a)c=[c=ne(u=f[a],this),this.__zoom.invert(c),u.identifier],l.touch0?l.touch1||l.touch0[2]===c[2]||(l.touch1=c,l.taps=0):(l.touch0=c,o=!0,l.taps=1+!!t);t&&(t=clearTimeout(t)),o&&(l.taps<2&&(n=c[0],t=setTimeout((function(){t=null}),d)),Gi(this),l.start())}}function N(t,...n){if(this.__zooming){var e,r,i,a,u=w(this,n).event(t),c=t.changedTouches,s=c.length;for(Sw(t),e=0;e<s;++e)i=ne(r=c[e],this),u.touch0&&u.touch0[2]===r.identifier?u.touch0[0]=i:u.touch1&&u.touch1[2]===r.identifier&&(u.touch1[0]=i);if(r=u.that.__zoom,u.touch1){var l=u.touch0[0],h=u.touch0[1],d=u.touch1[0],p=u.touch1[1],g=(g=d[0]-l[0])*g+(g=d[1]-l[1])*g,y=(y=p[0]-h[0])*y+(y=p[1]-h[1])*y;r=_(r,Math.sqrt(g/y)),i=[(l[0]+d[0])/2,(l[1]+d[1])/2],a=[(h[0]+p[0])/2,(h[1]+p[1])/2]}else{if(!u.touch0)return;i=u.touch0[0],a=u.touch0[1]}u.zoom(\"touch\",o(b(r,i,a),u.extent,f))}}function k(t,...r){if(this.__zooming){var i,o,a=w(this,r).event(t),u=t.changedTouches,c=u.length;for(Aw(t),e&&clearTimeout(e),e=setTimeout((function(){e=null}),d),i=0;i<c;++i)o=u[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=ne(o,this),Math.hypot(n[0]-o[0],n[1]-o[1])<y)){var f=Zn(this).on(\"dblclick.zoom\");f&&f.apply(this,arguments)}}}return v.transform=function(t,n,e,r){var i=t.selection?t.selection():t;i.property(\"__zoom\",kw),t!==i?x(t,n,e,r):i.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,\"function\"==typeof n?n.apply(this,arguments):n).end()}))},v.scaleBy=function(t,n,e,r){v.scaleTo(t,(function(){return this.__zoom.k*(\"function\"==typeof n?n.apply(this,arguments):n)}),e,r)},v.scaleTo=function(t,n,e,r){v.transform(t,(function(){var t=i.apply(this,arguments),r=this.__zoom,a=null==e?m(t):\"function\"==typeof e?e.apply(this,arguments):e,u=r.invert(a),c=\"function\"==typeof n?n.apply(this,arguments):n;return o(b(_(r,c),a,u),t,f)}),e,r)},v.translateBy=function(t,n,e,r){v.transform(t,(function(){return o(this.__zoom.translate(\"function\"==typeof n?n.apply(this,arguments):n,\"function\"==typeof e?e.apply(this,arguments):e),i.apply(this,arguments),f)}),null,r)},v.translateTo=function(t,n,e,r,a){v.transform(t,(function(){var t=i.apply(this,arguments),a=this.__zoom,u=null==r?m(t):\"function\"==typeof r?r.apply(this,arguments):r;return o(Mw.translate(u[0],u[1]).scale(a.k).translate(\"function\"==typeof n?-n.apply(this,arguments):-n,\"function\"==typeof e?-e.apply(this,arguments):-e),t,f)}),r,a)},M.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit(\"start\")),this},zoom:function(t,n){return this.mouse&&\"mouse\"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&\"touch\"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&\"touch\"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit(\"zoom\"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit(\"end\")),this},emit:function(t){var n=Zn(this.that).datum();h.call(t,this.that,new xw(t,{sourceEvent:this.sourceEvent,target:v,type:t,transform:this.that.__zoom,dispatch:h}),n)}},v.wheelDelta=function(t){return arguments.length?(a=\"function\"==typeof t?t:mw(+t),v):a},v.filter=function(t){return arguments.length?(r=\"function\"==typeof t?t:mw(!!t),v):r},v.touchable=function(t){return arguments.length?(u=\"function\"==typeof t?t:mw(!!t),v):u},v.extent=function(t){return arguments.length?(i=\"function\"==typeof t?t:mw([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),v):i},v.scaleExtent=function(t){return arguments.length?(c[0]=+t[0],c[1]=+t[1],v):[c[0],c[1]]},v.translateExtent=function(t){return arguments.length?(f[0][0]=+t[0][0],f[1][0]=+t[1][0],f[0][1]=+t[0][1],f[1][1]=+t[1][1],v):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},v.constrain=function(t){return arguments.length?(o=t,v):o},v.duration=function(t){return arguments.length?(s=+t,v):s},v.interpolate=function(t){return arguments.length?(l=t,v):l},v.on=function(){var t=h.on.apply(h,arguments);return t===h?v:t},v.clickDistance=function(t){return arguments.length?(g=(t=+t)*t,v):Math.sqrt(g)},v.tapDistance=function(t){return arguments.length?(y=+t,v):y},v},t.zoomIdentity=Mw,t.zoomTransform=Tw}));\n","(function(){var t,e=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++)if(e in this&&this[e]===t)return e;return-1},n=[].slice,r=function(t,e){return function(){return t.apply(e,arguments)}},a={}.hasOwnProperty;(t=function(t){return\"object\"==typeof exports&&\"object\"==typeof module?t(require(\"jquery\")):\"function\"==typeof define&&define.amd?define([\"jquery\"],t):t(jQuery)})(function(t){var o,i,l,s,u,c,h,d,p,f,m,g,v,b,C,y,w,A,x,S,N;return i=function(t,e,n){var r,a,o,i;for(t+=\"\",a=t.split(\".\"),o=a[0],i=a.length>1?n+a[1]:\"\",r=/(\\d+)(\\d{3})/;r.test(o);)o=o.replace(r,\"$1\"+e+\"$2\");return o+i},m=function(e){var n;return n={digitsAfterDecimal:2,scaler:1,thousandsSep:\",\",decimalSep:\".\",prefix:\"\",suffix:\"\"},e=t.extend({},n,e),function(t){var n;return isNaN(t)||!isFinite(t)?\"\":(n=i((e.scaler*t).toFixed(e.digitsAfterDecimal),e.thousandsSep,e.decimalSep),\"\"+e.prefix+n+e.suffix)}},A=m(),x=m({digitsAfterDecimal:0}),S=m({digitsAfterDecimal:1,scaler:100,suffix:\"%\"}),l={count:function(t){return null==t&&(t=x),function(){return function(e,n,r){return{count:0,push:function(){return this.count++},value:function(){return this.count},format:t}}}},uniques:function(t,n){return null==n&&(n=x),function(r){var a;return a=r[0],function(r,o,i){return{uniq:[],push:function(t){var n;if(n=t[a],e.call(this.uniq,n)<0)return this.uniq.push(t[a])},value:function(){return t(this.uniq)},format:n,numInputs:null!=a?0:1}}}},sum:function(t){return null==t&&(t=A),function(e){var n;return n=e[0],function(e,r,a){return{sum:0,push:function(t){if(!isNaN(parseFloat(t[n])))return this.sum+=parseFloat(t[n])},value:function(){return this.sum},format:t,numInputs:null!=n?0:1}}}},extremes:function(t,e){return null==e&&(e=A),function(n){var r;return r=n[0],function(n,a,o){return{val:null,sorter:h(null!=n?n.sorters:void 0,r),push:function(e){var n,a,o,i;if(i=e[r],\"min\"!==t&&\"max\"!==t||(i=parseFloat(i),isNaN(i)||(this.val=Math[t](i,null!=(n=this.val)?n:i))),\"first\"===t&&this.sorter(i,null!=(a=this.val)?a:i)<=0&&(this.val=i),\"last\"===t&&this.sorter(i,null!=(o=this.val)?o:i)>=0)return this.val=i},value:function(){return this.val},format:function(t){return isNaN(t)?t:e(t)},numInputs:null!=r?0:1}}}},quantile:function(t,e){return null==e&&(e=A),function(n){var r;return r=n[0],function(n,a,o){return{vals:[],push:function(t){var e;if(e=parseFloat(t[r]),!isNaN(e))return this.vals.push(e)},value:function(){var e;return 0===this.vals.length?null:(this.vals.sort(function(t,e){return t-e}),e=(this.vals.length-1)*t,(this.vals[Math.floor(e)]+this.vals[Math.ceil(e)])/2)},format:e,numInputs:null!=r?0:1}}}},runningStat:function(t,e,n){return null==t&&(t=\"mean\"),null==e&&(e=1),null==n&&(n=A),function(r){var a;return a=r[0],function(r,o,i){return{n:0,m:0,s:0,push:function(t){var e,n;if(n=parseFloat(t[a]),!isNaN(n))return this.n+=1,1===this.n?this.m=n:(e=this.m+(n-this.m)/this.n,this.s=this.s+(n-this.m)*(n-e),this.m=e)},value:function(){if(\"mean\"===t)return 0===this.n?NaN:this.m;if(this.n<=e)return 0;switch(t){case\"var\":return this.s/(this.n-e);case\"stdev\":return Math.sqrt(this.s/(this.n-e))}},format:n,numInputs:null!=a?0:1}}}},sumOverSum:function(t){return null==t&&(t=A),function(e){var n,r;return r=e[0],n=e[1],function(e,a,o){return{sumNum:0,sumDenom:0,push:function(t){if(isNaN(parseFloat(t[r]))||(this.sumNum+=parseFloat(t[r])),!isNaN(parseFloat(t[n])))return this.sumDenom+=parseFloat(t[n])},value:function(){return this.sumNum/this.sumDenom},format:t,numInputs:null!=r&&null!=n?0:2}}}},sumOverSumBound80:function(t,e){return null==t&&(t=!0),null==e&&(e=A),function(n){var r,a;return a=n[0],r=n[1],function(n,o,i){return{sumNum:0,sumDenom:0,push:function(t){if(isNaN(parseFloat(t[a]))||(this.sumNum+=parseFloat(t[a])),!isNaN(parseFloat(t[r])))return this.sumDenom+=parseFloat(t[r])},value:function(){var e;return e=t?1:-1,(.821187207574908/this.sumDenom+this.sumNum/this.sumDenom+1.2815515655446004*e*Math.sqrt(.410593603787454/(this.sumDenom*this.sumDenom)+this.sumNum*(1-this.sumNum/this.sumDenom)/(this.sumDenom*this.sumDenom)))/(1+1.642374415149816/this.sumDenom)},format:e,numInputs:null!=a&&null!=r?0:2}}}},fractionOf:function(t,e,r){return null==e&&(e=\"total\"),null==r&&(r=S),function(){var a;return a=1<=arguments.length?n.call(arguments,0):[],function(n,o,i){return{selector:{total:[[],[]],row:[o,[]],col:[[],i]}[e],inner:t.apply(null,a)(n,o,i),push:function(t){return this.inner.push(t)},format:r,value:function(){return this.inner.value()/n.getAggregator.apply(n,this.selector).inner.value()},numInputs:t.apply(null,a)().numInputs}}}}},l.countUnique=function(t){return l.uniques(function(t){return t.length},t)},l.listUnique=function(t){return l.uniques(function(e){return e.sort(f).join(t)},function(t){return t})},l.max=function(t){return l.extremes(\"max\",t)},l.min=function(t){return l.extremes(\"min\",t)},l.first=function(t){return l.extremes(\"first\",t)},l.last=function(t){return l.extremes(\"last\",t)},l.median=function(t){return l.quantile(.5,t)},l.average=function(t){return l.runningStat(\"mean\",1,t)},l[\"var\"]=function(t,e){return l.runningStat(\"var\",t,e)},l.stdev=function(t,e){return l.runningStat(\"stdev\",t,e)},s=function(t){return{Count:t.count(x),\"Count Unique Values\":t.countUnique(x),\"List Unique Values\":t.listUnique(\", \"),Sum:t.sum(A),\"Integer Sum\":t.sum(x),Average:t.average(A),Median:t.median(A),\"Sample Variance\":t[\"var\"](1,A),\"Sample Standard Deviation\":t.stdev(1,A),Minimum:t.min(A),Maximum:t.max(A),First:t.first(A),Last:t.last(A),\"Sum over Sum\":t.sumOverSum(A),\"80% Upper Bound\":t.sumOverSumBound80(!0,A),\"80% Lower Bound\":t.sumOverSumBound80(!1,A),\"Sum as Fraction of Total\":t.fractionOf(t.sum(),\"total\",S),\"Sum as Fraction of Rows\":t.fractionOf(t.sum(),\"row\",S),\"Sum as Fraction of Columns\":t.fractionOf(t.sum(),\"col\",S),\"Count as Fraction of Total\":t.fractionOf(t.count(),\"total\",S),\"Count as Fraction of Rows\":t.fractionOf(t.count(),\"row\",S),\"Count as Fraction of Columns\":t.fractionOf(t.count(),\"col\",S)}}(l),b={Table:function(t,e){return g(t,e)},\"Table Barchart\":function(e,n){return t(g(e,n)).barchart()},Heatmap:function(e,n){return t(g(e,n)).heatmap(\"heatmap\",n)},\"Row Heatmap\":function(e,n){return t(g(e,n)).heatmap(\"rowheatmap\",n)},\"Col Heatmap\":function(e,n){return t(g(e,n)).heatmap(\"colheatmap\",n)}},d={en:{aggregators:s,renderers:b,localeStrings:{renderError:\"An error occurred rendering the PivotTable results.\",computeError:\"An error occurred computing the PivotTable results.\",uiRenderError:\"An error occurred rendering the PivotTable UI.\",selectAll:\"Select All\",selectNone:\"Select None\",tooMany:\"(too many to list)\",filterResults:\"Filter values\",apply:\"Apply\",cancel:\"Cancel\",totals:\"Totals\",vs:\"vs\",by:\"by\"}}},p=[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],u=[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],N=function(t){return(\"0\"+t).substr(-2,2)},c={bin:function(t,e){return function(n){return n[t]-n[t]%e}},dateFormat:function(t,e,n,r,a){var o;return null==n&&(n=!1),null==r&&(r=p),null==a&&(a=u),o=n?\"UTC\":\"\",function(n){var i;return i=new Date(Date.parse(n[t])),isNaN(i)?\"\":e.replace(/%(.)/g,function(t,e){switch(e){case\"y\":return i[\"get\"+o+\"FullYear\"]();case\"m\":return N(i[\"get\"+o+\"Month\"]()+1);case\"n\":return r[i[\"get\"+o+\"Month\"]()];case\"d\":return N(i[\"get\"+o+\"Date\"]());case\"w\":return a[i[\"get\"+o+\"Day\"]()];case\"x\":return i[\"get\"+o+\"Day\"]();case\"H\":return N(i[\"get\"+o+\"Hours\"]());case\"M\":return N(i[\"get\"+o+\"Minutes\"]());case\"S\":return N(i[\"get\"+o+\"Seconds\"]());default:return\"%\"+e}})}}},C=/(\\d+)|(\\D+)/g,v=/\\d/,y=/^0/,f=function(t){return function(t,e){var n,r,a,o,i,l;if(null!=e&&null==t)return-1;if(null!=t&&null==e)return 1;if(\"number\"==typeof t&&isNaN(t))return-1;if(\"number\"==typeof e&&isNaN(e))return 1;if(i=+t,l=+e,i<l)return-1;if(i>l)return 1;if(\"number\"==typeof t&&\"number\"!=typeof e)return-1;if(\"number\"==typeof e&&\"number\"!=typeof t)return 1;if(\"number\"==typeof t&&\"number\"==typeof e)return 0;if(isNaN(l)&&!isNaN(i))return-1;if(isNaN(i)&&!isNaN(l))return 1;if(n=String(t),a=String(e),n===a)return 0;if(!v.test(n)||!v.test(a))return n>a?1:-1;for(n=n.match(C),a=a.match(C);n.length&&a.length;)if(r=n.shift(),o=a.shift(),r!==o)return v.test(r)&&v.test(o)?r.replace(y,\".0\")-o.replace(y,\".0\"):r>o?1:-1;return n.length-a.length}}(this),w=function(t){var e,n,r,a;r={},n={};for(e in t)a=t[e],r[a]=e,\"string\"==typeof a&&(n[a.toLowerCase()]=e);return function(t,e){return null!=r[t]&&null!=r[e]?r[t]-r[e]:null!=r[t]?-1:null!=r[e]?1:null!=n[t]&&null!=n[e]?n[t]-n[e]:null!=n[t]?-1:null!=n[e]?1:f(t,e)}},h=function(e,n){var r;if(null!=e)if(t.isFunction(e)){if(r=e(n),t.isFunction(r))return r}else if(null!=e[n])return e[n];return f},o=function(){function e(t,n){var a,o,i,s,u,c,h,d,p,f;null==n&&(n={}),this.getAggregator=r(this.getAggregator,this),this.getRowKeys=r(this.getRowKeys,this),this.getColKeys=r(this.getColKeys,this),this.sortKeys=r(this.sortKeys,this),this.arrSort=r(this.arrSort,this),this.input=t,this.aggregator=null!=(a=n.aggregator)?a:l.count()(),this.aggregatorName=null!=(o=n.aggregatorName)?o:\"Count\",this.colAttrs=null!=(i=n.cols)?i:[],this.rowAttrs=null!=(s=n.rows)?s:[],this.valAttrs=null!=(u=n.vals)?u:[],this.sorters=null!=(c=n.sorters)?c:{},this.rowOrder=null!=(h=n.rowOrder)?h:\"key_a_to_z\",this.colOrder=null!=(d=n.colOrder)?d:\"key_a_to_z\",this.derivedAttributes=null!=(p=n.derivedAttributes)?p:{},this.filter=null!=(f=n.filter)?f:function(){return!0},this.tree={},this.rowKeys=[],this.colKeys=[],this.rowTotals={},this.colTotals={},this.allTotal=this.aggregator(this,[],[]),this.sorted=!1,e.forEachRecord(this.input,this.derivedAttributes,function(t){return function(e){if(t.filter(e))return t.processRecord(e)}}(this))}return e.forEachRecord=function(e,n,r){var o,i,l,s,u,c,h,d,p,f,m,g;if(o=t.isEmptyObject(n)?r:function(t){var e,a,o;for(e in n)o=n[e],t[e]=null!=(a=o(t))?a:t[e];return r(t)},t.isFunction(e))return e(o);if(t.isArray(e)){if(t.isArray(e[0])){f=[];for(l in e)if(a.call(e,l)&&(i=e[l],l>0)){d={},p=e[0];for(s in p)a.call(p,s)&&(u=p[s],d[u]=i[s]);f.push(o(d))}return f}for(m=[],c=0,h=e.length;c<h;c++)d=e[c],m.push(o(d));return m}if(e instanceof t)return g=[],t(\"thead > tr > th\",e).each(function(e){return g.push(t(this).text())}),t(\"tbody > tr\",e).each(function(e){return d={},t(\"td\",this).each(function(e){return d[g[e]]=t(this).text()}),o(d)});throw new Error(\"unknown input format\")},e.prototype.forEachMatchingRecord=function(t,n){return e.forEachRecord(this.input,this.derivedAttributes,function(e){return function(r){var a,o,i;if(e.filter(r)){for(a in t)if(i=t[a],i!==(null!=(o=r[a])?o:\"null\"))return;return n(r)}}}(this))},e.prototype.arrSort=function(t){var e,n;return n=function(){var n,r,a;for(a=[],n=0,r=t.length;n<r;n++)e=t[n],a.push(h(this.sorters,e));return a}.call(this),function(t,e){var r,o,i;for(o in n)if(a.call(n,o)&&(i=n[o],r=i(t[o],e[o]),0!==r))return r;return 0}},e.prototype.sortKeys=function(){var t;if(!this.sorted){switch(this.sorted=!0,t=function(t){return function(e,n){return t.getAggregator(e,n).value()}}(this),this.rowOrder){case\"value_a_to_z\":this.rowKeys.sort(function(e){return function(e,n){return f(t(e,[]),t(n,[]))}}(this));break;case\"value_z_to_a\":this.rowKeys.sort(function(e){return function(e,n){return-f(t(e,[]),t(n,[]))}}(this));break;default:this.rowKeys.sort(this.arrSort(this.rowAttrs))}switch(this.colOrder){case\"value_a_to_z\":return this.colKeys.sort(function(e){return function(e,n){return f(t([],e),t([],n))}}(this));case\"value_z_to_a\":return this.colKeys.sort(function(e){return function(e,n){return-f(t([],e),t([],n))}}(this));default:return this.colKeys.sort(this.arrSort(this.colAttrs))}}},e.prototype.getColKeys=function(){return this.sortKeys(),this.colKeys},e.prototype.getRowKeys=function(){return this.sortKeys(),this.rowKeys},e.prototype.processRecord=function(t){var e,n,r,a,o,i,l,s,u,c,h,d,p;for(e=[],d=[],s=this.colAttrs,a=0,o=s.length;a<o;a++)p=s[a],e.push(null!=(u=t[p])?u:\"null\");for(c=this.rowAttrs,l=0,i=c.length;l<i;l++)p=c[l],d.push(null!=(h=t[p])?h:\"null\");if(r=d.join(String.fromCharCode(0)),n=e.join(String.fromCharCode(0)),this.allTotal.push(t),0!==d.length&&(this.rowTotals[r]||(this.rowKeys.push(d),this.rowTotals[r]=this.aggregator(this,d,[])),this.rowTotals[r].push(t)),0!==e.length&&(this.colTotals[n]||(this.colKeys.push(e),this.colTotals[n]=this.aggregator(this,[],e)),this.colTotals[n].push(t)),0!==e.length&&0!==d.length)return this.tree[r]||(this.tree[r]={}),this.tree[r][n]||(this.tree[r][n]=this.aggregator(this,d,e)),this.tree[r][n].push(t)},e.prototype.getAggregator=function(t,e){var n,r,a;return a=t.join(String.fromCharCode(0)),r=e.join(String.fromCharCode(0)),n=0===t.length&&0===e.length?this.allTotal:0===t.length?this.colTotals[r]:0===e.length?this.rowTotals[a]:this.tree[a][r],null!=n?n:{value:function(){return null},format:function(){return\"\"}}},e}(),t.pivotUtilities={aggregatorTemplates:l,aggregators:s,renderers:b,derivers:c,locales:d,naturalSort:f,numberFormat:m,sortAs:w,PivotData:o},g=function(e,n){var r,o,i,l,s,u,c,h,d,p,f,m,g,v,b,C,y,w,A,x,S,N,T,k;u={table:{clickCallback:null,rowTotals:!0,colTotals:!0},localeStrings:{totals:\"Totals\"}},n=t.extend(!0,{},u,n),i=e.colAttrs,m=e.rowAttrs,v=e.getRowKeys(),s=e.getColKeys(),n.table.clickCallback&&(c=function(t,r,o){var l,s,u;s={};for(u in i)a.call(i,u)&&(l=i[u],null!=o[u]&&(s[l]=o[u]));for(u in m)a.call(m,u)&&(l=m[u],null!=r[u]&&(s[l]=r[u]));return function(r){return n.table.clickCallback(r,t,s,e)}}),f=document.createElement(\"table\"),f.className=\"pvtTable\",b=function(t,e,n){var r,a,o,i,l,s,u,c;if(0!==e){for(i=!0,c=r=0,l=n;0<=l?r<=l:r>=l;c=0<=l?++r:--r)t[e-1][c]!==t[e][c]&&(i=!1);if(i)return-1}for(a=0;e+a<t.length;){for(u=!1,c=o=0,s=n;0<=s?o<=s:o>=s;c=0<=s?++o:--o)t[e][c]!==t[e+a][c]&&(u=!0);if(u)break;a++}return a},A=document.createElement(\"thead\");for(d in i)if(a.call(i,d)){o=i[d],S=document.createElement(\"tr\"),0===parseInt(d)&&0!==m.length&&(w=document.createElement(\"th\"),w.setAttribute(\"colspan\",m.length),w.setAttribute(\"rowspan\",i.length),S.appendChild(w)),w=document.createElement(\"th\"),w.className=\"pvtAxisLabel\",w.textContent=o,S.appendChild(w);for(h in s)a.call(s,h)&&(l=s[h],k=b(s,parseInt(h),parseInt(d)),k!==-1&&(w=document.createElement(\"th\"),w.className=\"pvtColLabel\",w.textContent=l[d],w.setAttribute(\"colspan\",k),parseInt(d)===i.length-1&&0!==m.length&&w.setAttribute(\"rowspan\",2),S.appendChild(w)));0===parseInt(d)&&n.table.rowTotals&&(w=document.createElement(\"th\"),w.className=\"pvtTotalLabel pvtRowTotalLabel\",w.innerHTML=n.localeStrings.totals,w.setAttribute(\"rowspan\",i.length+(0===m.length?0:1)),S.appendChild(w)),A.appendChild(S)}if(0!==m.length){S=document.createElement(\"tr\");for(h in m)a.call(m,h)&&(p=m[h],w=document.createElement(\"th\"),w.className=\"pvtAxisLabel\",w.textContent=p,S.appendChild(w));w=document.createElement(\"th\"),0===i.length&&(w.className=\"pvtTotalLabel pvtRowTotalLabel\",w.innerHTML=n.localeStrings.totals),S.appendChild(w),A.appendChild(S)}f.appendChild(A),C=document.createElement(\"tbody\");for(h in v)if(a.call(v,h)){g=v[h],S=document.createElement(\"tr\");for(d in g)a.call(g,d)&&(N=g[d],k=b(v,parseInt(h),parseInt(d)),k!==-1&&(w=document.createElement(\"th\"),w.className=\"pvtRowLabel\",w.textContent=N,w.setAttribute(\"rowspan\",k),parseInt(d)===m.length-1&&0!==i.length&&w.setAttribute(\"colspan\",2),S.appendChild(w)));for(d in s)a.call(s,d)&&(l=s[d],r=e.getAggregator(g,l),T=r.value(),y=document.createElement(\"td\"),y.className=\"pvtVal row\"+h+\" col\"+d,y.textContent=r.format(T),y.setAttribute(\"data-value\",T),null!=c&&(y.onclick=c(T,g,l)),S.appendChild(y));(n.table.rowTotals||0===i.length)&&(x=e.getAggregator(g,[]),T=x.value(),y=document.createElement(\"td\"),y.className=\"pvtTotal rowTotal\",y.textContent=x.format(T),y.setAttribute(\"data-value\",T),null!=c&&(y.onclick=c(T,g,[])),y.setAttribute(\"data-for\",\"row\"+h),S.appendChild(y)),C.appendChild(S)}if(n.table.colTotals||0===m.length){S=document.createElement(\"tr\"),(n.table.colTotals||0===m.length)&&(w=document.createElement(\"th\"),w.className=\"pvtTotalLabel pvtColTotalLabel\",w.innerHTML=n.localeStrings.totals,w.setAttribute(\"colspan\",m.length+(0===i.length?0:1)),S.appendChild(w));for(d in s)a.call(s,d)&&(l=s[d],x=e.getAggregator([],l),T=x.value(),y=document.createElement(\"td\"),y.className=\"pvtTotal colTotal\",y.textContent=x.format(T),y.setAttribute(\"data-value\",T),null!=c&&(y.onclick=c(T,[],l)),y.setAttribute(\"data-for\",\"col\"+d),S.appendChild(y));(n.table.rowTotals||0===i.length)&&(x=e.getAggregator([],[]),T=x.value(),y=document.createElement(\"td\"),y.className=\"pvtGrandTotal\",y.textContent=x.format(T),y.setAttribute(\"data-value\",T),null!=c&&(y.onclick=c(T,[],[])),S.appendChild(y)),C.appendChild(S)}return f.appendChild(C),f.setAttribute(\"data-numrows\",v.length),f.setAttribute(\"data-numcols\",s.length),f},t.fn.pivot=function(e,n,r){var a,i,s,u,c,h,p,f;null==r&&(r=\"en\"),null==d[r]&&(r=\"en\"),a={cols:[],rows:[],vals:[],rowOrder:\"key_a_to_z\",colOrder:\"key_a_to_z\",dataClass:o,filter:function(){return!0},aggregator:l.count()(),aggregatorName:\"Count\",sorters:{},derivedAttributes:{},renderer:g},u=t.extend(!0,{},d.en.localeStrings,d[r].localeStrings),s={rendererOptions:{localeStrings:u},localeStrings:u},c=t.extend(!0,{},s,t.extend({},a,n)),p=null;try{h=new c.dataClass(e,c);try{p=c.renderer(h,c.rendererOptions)}catch(m){i=m,\"undefined\"!=typeof console&&null!==console&&console.error(i.stack),p=t(\"<span>\").html(c.localeStrings.renderError)}}catch(m){i=m,\"undefined\"!=typeof console&&null!==console&&console.error(i.stack),p=t(\"<span>\").html(c.localeStrings.computeError)}for(f=this[0];f.hasChildNodes();)f.removeChild(f.lastChild);return this.append(p)},t.fn.pivotUI=function(n,r,i,l){var s,u,c,p,m,g,v,b,C,y,w,A,x,S,N,T,k,O,_,F,D,E,M,R,I,L,U,K,q,z,V,j,H,B,P,J,G,W,$,Q,Y,X,Z,tt,et;null==i&&(i=!1),null==l&&(l=\"en\"),null==d[l]&&(l=\"en\"),b={derivedAttributes:{},aggregators:d[l].aggregators,renderers:d[l].renderers,hiddenAttributes:[],hiddenFromAggregators:[],hiddenFromDragDrop:[],menuLimit:500,cols:[],rows:[],vals:[],rowOrder:\"key_a_to_z\",colOrder:\"key_a_to_z\",dataClass:o,exclusions:{},inclusions:{},unusedAttrsVertical:85,autoSortUnusedAttrs:!1,onRefresh:null,showUI:!0,filter:function(){return!0},sorters:{}},_=t.extend(!0,{},d.en.localeStrings,d[l].localeStrings),O={rendererOptions:{localeStrings:_},localeStrings:_},y=this.data(\"pivotUIOptions\"),M=null==y||i?t.extend(!0,{},O,t.extend({},b,r)):y;try{m={},F=[],L=0,o.forEachRecord(n,M.derivedAttributes,function(t){var e,n,r,o;if(M.filter(t)){F.push(t);for(e in t)a.call(t,e)&&null==m[e]&&(m[e]={},L>0&&(m[e][\"null\"]=L));for(e in m)o=null!=(r=t[e])?r:\"null\",null==(n=m[e])[o]&&(n[o]=0),m[e][o]++;return L++}}),Y=t(\"<table>\",{\"class\":\"pvtUi\"}).attr(\"cellpadding\",5),B=t(\"<td>\").addClass(\"pvtUiCell\"),H=t(\"<select>\").addClass(\"pvtRenderer\").appendTo(B).bind(\"change\",function(){return V()}),U=M.renderers;for(et in U)a.call(U,et)&&t(\"<option>\").val(et).html(et).appendTo(H);if(X=t(\"<td>\").addClass(\"pvtAxisContainer pvtUnused pvtUiCell\"),J=function(){var t;t=[];for(s in m)e.call(M.hiddenAttributes,s)<0&&t.push(s);return t}(),G=function(){var t,n,r;for(r=[],t=0,n=J.length;t<n;t++)g=J[t],e.call(M.hiddenFromAggregators,g)<0&&r.push(g);return r}(),W=function(){var t,n,r;for(r=[],t=0,n=J.length;t<n;t++)g=J[t],e.call(M.hiddenFromDragDrop,g)<0&&r.push(g);return r}(),tt=!1,Z=\"auto\"===M.unusedAttrsVertical?120:parseInt(M.unusedAttrsVertical),!isNaN(Z)){for(p=0,S=0,N=W.length;S<N;S++)s=W[S],p+=s.length;tt=p>Z}M.unusedAttrsVertical===!0||tt?X.addClass(\"pvtVertList\"):X.addClass(\"pvtHorizList\"),w=function(n){var r,a,o,i,l,s,u,c,d,p,f,g,v,b,C,y,w,x,S;if(S=function(){var t;t=[];for(C in m[n])t.push(C);return t}(),c=!1,x=t(\"<div>\").addClass(\"pvtFilterBox\").hide(),x.append(t(\"<h4>\").append(t(\"<span>\").text(n),t(\"<span>\").addClass(\"count\").text(\"(\"+S.length+\")\"))),S.length>M.menuLimit)x.append(t(\"<p>\").html(M.localeStrings.tooMany));else for(S.length>5&&(i=t(\"<p>\").appendTo(x),v=h(M.sorters,n),f=M.localeStrings.filterResults,t(\"<input>\",{type:\"text\"}).appendTo(i).attr({placeholder:f,\"class\":\"pvtSearch\"}).bind(\"keyup\",function(){var n,r,a;return a=t(this).val().toLowerCase().trim(),r=function(t,n){return function(r){var o,i;return o=a.substring(t.length).trim(),0===o.length||(i=Math.sign(v(r.toLowerCase(),o)),e.call(n,i)>=0)}},n=0===a.indexOf(\">=\")?r(\">=\",[1,0]):0===a.indexOf(\"<=\")?r(\"<=\",[-1,0]):0===a.indexOf(\">\")?r(\">\",[1]):0===a.indexOf(\"<\")?r(\"<\",[-1]):0===a.indexOf(\"~\")?function(t){return 0===a.substring(1).trim().length||t.toLowerCase().match(a.substring(1))}:function(t){return t.toLowerCase().indexOf(a)!==-1},x.find(\".pvtCheckContainer p label span.value\").each(function(){return n(t(this).text())?t(this).parent().parent().show():t(this).parent().parent().hide()})}),i.append(t(\"<br>\")),t(\"<button>\",{type:\"button\"}).appendTo(i).html(M.localeStrings.selectAll).bind(\"click\",function(){return x.find(\"input:visible:not(:checked)\").prop(\"checked\",!0).toggleClass(\"changed\"),!1}),t(\"<button>\",{type:\"button\"}).appendTo(i).html(M.localeStrings.selectNone).bind(\"click\",function(){return x.find(\"input:visible:checked\").prop(\"checked\",!1).toggleClass(\"changed\"),!1})),a=t(\"<div>\").addClass(\"pvtCheckContainer\").appendTo(x),g=S.sort(h(M.sorters,n)),p=0,d=g.length;p<d;p++)y=g[p],w=m[n][y],l=t(\"<label>\"),s=!1,M.inclusions[n]?s=e.call(M.inclusions[n],y)<0:M.exclusions[n]&&(s=e.call(M.exclusions[n],y)>=0),c||(c=s),t(\"<input>\").attr(\"type\",\"checkbox\").addClass(\"pvtFilter\").attr(\"checked\",!s).data(\"filter\",[n,y]).appendTo(l).bind(\"change\",function(){return t(this).toggleClass(\"changed\")}),l.append(t(\"<span>\").addClass(\"value\").text(y)),l.append(t(\"<span>\").addClass(\"count\").text(\"(\"+w+\")\")),a.append(t(\"<p>\").append(l));return o=function(){return x.find(\"[type='checkbox']\").length>x.find(\"[type='checkbox']:checked\").length?r.addClass(\"pvtFilteredAttribute\"):r.removeClass(\"pvtFilteredAttribute\"),x.find(\".pvtSearch\").val(\"\"),x.find(\".pvtCheckContainer p\").show(),x.hide()},u=t(\"<p>\").appendTo(x),S.length<=M.menuLimit&&t(\"<button>\",{type:\"button\"}).text(M.localeStrings.apply).appendTo(u).bind(\"click\",function(){return x.find(\".changed\").removeClass(\"changed\").length&&V(),o()}),t(\"<button>\",{type:\"button\"}).text(M.localeStrings.cancel).appendTo(u).bind(\"click\",function(){return x.find(\".changed:checked\").removeClass(\"changed\").prop(\"checked\",!1),x.find(\".changed:not(:checked)\").removeClass(\"changed\").prop(\"checked\",!0),o()}),b=t(\"<span>\").addClass(\"pvtTriangle\").html(\" ▾\").bind(\"click\",function(e){var n,r,a;return r=t(e.currentTarget).position(),n=r.left,a=r.top,x.css({left:n+10,top:a+10}).show()}),r=t(\"<li>\").addClass(\"axis_\"+A).append(t(\"<span>\").addClass(\"pvtAttr\").text(n).data(\"attrName\",n).append(b)),c&&r.addClass(\"pvtFilteredAttribute\"),X.append(r).append(x)};for(A in W)a.call(W,A)&&(c=W[A],w(c));$=t(\"<tr>\").appendTo(Y),u=t(\"<select>\").addClass(\"pvtAggregator\").bind(\"change\",function(){return V()}),K=M.aggregators;for(et in K)a.call(K,et)&&u.append(t(\"<option>\").val(et).html(et));for(R={key_a_to_z:{rowSymbol:\"↕\",colSymbol:\"↔\",next:\"value_a_to_z\"},value_a_to_z:{rowSymbol:\"↓\",colSymbol:\"→\",next:\"value_z_to_a\"},value_z_to_a:{rowSymbol:\"↑\",colSymbol:\"←\",next:\"key_a_to_z\"}},P=t(\"<a>\",{role:\"button\"}).addClass(\"pvtRowOrder\").data(\"order\",M.rowOrder).html(R[M.rowOrder].rowSymbol).bind(\"click\",function(){return t(this).data(\"order\",R[t(this).data(\"order\")].next),t(this).html(R[t(this).data(\"order\")].rowSymbol),V()}),v=t(\"<a>\",{role:\"button\"}).addClass(\"pvtColOrder\").data(\"order\",M.colOrder).html(R[M.colOrder].colSymbol).bind(\"click\",function(){return t(this).data(\"order\",R[t(this).data(\"order\")].next),t(this).html(R[t(this).data(\"order\")].colSymbol),V()}),t(\"<td>\").addClass(\"pvtVals pvtUiCell\").appendTo($).append(u).append(P).append(v).append(t(\"<br>\")),t(\"<td>\").addClass(\"pvtAxisContainer pvtHorizList pvtCols pvtUiCell\").appendTo($),Q=t(\"<tr>\").appendTo(Y),Q.append(t(\"<td>\").addClass(\"pvtAxisContainer pvtRows pvtUiCell\").attr(\"valign\",\"top\")),I=t(\"<td>\").attr(\"valign\",\"top\").addClass(\"pvtRendererArea\").appendTo(Q),M.unusedAttrsVertical===!0||tt?(Y.find(\"tr:nth-child(1)\").prepend(B),Y.find(\"tr:nth-child(2)\").prepend(X)):Y.prepend(t(\"<tr>\").append(B).append(X)),this.html(Y),q=M.cols,D=0,T=q.length;D<T;D++)et=q[D],this.find(\".pvtCols\").append(this.find(\".axis_\"+t.inArray(et,W)));for(z=M.rows,E=0,k=z.length;E<k;E++)et=z[E],this.find(\".pvtRows\").append(this.find(\".axis_\"+t.inArray(et,W)));null!=M.aggregatorName&&this.find(\".pvtAggregator\").val(M.aggregatorName),null!=M.rendererName&&this.find(\".pvtRenderer\").val(M.rendererName),M.showUI||this.find(\".pvtUiCell\").hide(),x=!0,j=function(n){return function(){var r,a,o,i,l,s,h,d,p,m,g,b,C,y;if(m={derivedAttributes:M.derivedAttributes,localeStrings:M.localeStrings,rendererOptions:M.rendererOptions,sorters:M.sorters,cols:[],rows:[],dataClass:M.dataClass},l=null!=(d=M.aggregators[u.val()]([])().numInputs)?d:0,y=[],n.find(\".pvtRows li span.pvtAttr\").each(function(){return m.rows.push(t(this).data(\"attrName\"))}),n.find(\".pvtCols li span.pvtAttr\").each(function(){return m.cols.push(t(this).data(\"attrName\"))}),n.find(\".pvtVals select.pvtAttrDropdown\").each(function(){return 0===l?t(this).remove():(l--,\"\"!==t(this).val()?y.push(t(this).val()):void 0)}),0!==l)for(h=n.find(\".pvtVals\"),et=g=0,p=l;0<=p?g<p:g>p;et=0<=p?++g:--g){for(i=t(\"<select>\").addClass(\"pvtAttrDropdown\").append(t(\"<option>\")).bind(\"change\",function(){return V()}),b=0,o=G.length;b<o;b++)c=G[b],i.append(t(\"<option>\").val(c).text(c));h.append(i)}if(x&&(y=M.vals,A=0,n.find(\".pvtVals select.pvtAttrDropdown\").each(function(){return t(this).val(y[A]),A++}),x=!1),m.aggregatorName=u.val(),m.vals=y,m.aggregator=M.aggregators[u.val()](y),m.renderer=M.renderers[H.val()],m.rowOrder=P.data(\"order\"),m.colOrder=v.data(\"order\"),r={},n.find(\"input.pvtFilter\").not(\":checked\").each(function(){var e;return e=t(this).data(\"filter\"),null!=r[e[0]]?r[e[0]].push(e[1]):r[e[0]]=[e[1]]}),a={},n.find(\"input.pvtFilter:checked\").each(function(){var e;if(e=t(this).data(\"filter\"),null!=r[e[0]])return null!=a[e[0]]?a[e[0]].push(e[1]):a[e[0]]=[e[1]]}),m.filter=function(t){var n,a,o,i;if(!M.filter(t))return!1;for(a in r)if(n=r[a],o=\"\"+(null!=(i=t[a])?i:\"null\"),e.call(n,o)>=0)return!1;return!0},I.pivot(F,m),s=t.extend({},M,{cols:m.cols,rows:m.rows,colOrder:m.colOrder,rowOrder:m.rowOrder,vals:y,exclusions:r,inclusions:a,inclusionsInfo:a,aggregatorName:u.val(),rendererName:H.val()}),n.data(\"pivotUIOptions\",s),M.autoSortUnusedAttrs&&(C=n.find(\"td.pvtUnused.pvtAxisContainer\"),t(C).children(\"li\").sort(function(e,n){return f(t(e).text(),t(n).text())}).appendTo(C)),I.css(\"opacity\",1),null!=M.onRefresh)return M.onRefresh(s)}}(this),V=function(t){return function(){return I.css(\"opacity\",.5),setTimeout(j,10)}}(this),V(),this.find(\".pvtAxisContainer\").sortable({update:function(t,e){if(null==e.sender)return V()},connectWith:this.find(\".pvtAxisContainer\"),items:\"li\",placeholder:\"pvtPlaceholder\"})}catch(nt){C=nt,\"undefined\"!=typeof console&&null!==console&&console.error(C.stack),this.html(M.localeStrings.uiRenderError)}return this},t.fn.heatmap=function(e,n){var r,a,o,i,l,s,u,c,h,d,p;switch(null==e&&(e=\"heatmap\"),c=this.data(\"numrows\"),u=this.data(\"numcols\"),r=null!=n&&null!=(h=n.heatmap)?h.colorScaleGenerator:void 0,null==r&&(r=function(t){var e,n;return n=Math.min.apply(Math,t),e=Math.max.apply(Math,t),function(t){var r;return r=255-Math.round(255*(t-n)/(e-n)),\"rgb(255,\"+r+\",\"+r+\")\"}}),a=function(e){return function(n){var a,o,i;return o=function(r){return e.find(n).each(function(){var e;if(e=t(this).data(\"value\"),null!=e&&isFinite(e))return r(e,t(this))})},i=[],o(function(t){return i.push(t)}),a=r(i),o(function(t,e){return e.css(\"background-color\",a(t))})}}(this),e){case\"heatmap\":a(\".pvtVal\");break;case\"rowheatmap\":for(o=l=0,d=c;0<=d?l<d:l>d;o=0<=d?++l:--l)a(\".pvtVal.row\"+o);break;case\"colheatmap\":for(i=s=0,p=u;0<=p?s<p:s>p;i=0<=p?++s:--s)a(\".pvtVal.col\"+i)}return a(\".pvtTotal.rowTotal\"),a(\".pvtTotal.colTotal\"),this},t.fn.barchart=function(e){var n,r,a,o,i,l;for(i=this.data(\"numrows\"),o=this.data(\"numcols\"),n=function(e){return function(n){var r,a,o,i,l,s;return r=function(r){return e.find(n).each(function(){var e;if(e=t(this).data(\"value\"),null!=e&&isFinite(e))return r(e,t(this))})},s=[],r(function(t){return s.push(t)}),a=Math.max.apply(Math,s),a<0&&(a=0),i=a,o=Math.min.apply(Math,s),o<0&&(i=a-o),l=function(t){return 100*t/(1.4*i)},r(function(e,n){var r,a,i,s;return i=n.text(),s=t(\"<div>\").css({position:\"relative\",height:\"55px\"}),a=\"gray\",r=0,o<0&&(r=l(-o)),e<0&&(r+=l(e),a=\"darkred\",e=-e),s.append(t(\"<div>\").css({position:\"absolute\",bottom:r+\"%\",left:0,right:0,height:l(e)+\"%\",\"background-color\":a})),s.append(t(\"<div>\").text(i).css({position:\"relative\",\"padding-left\":\"5px\",\"padding-right\":\"5px\"})),n.css({padding:0,\"padding-top\":\"5px\",\"text-align\":\"center\"}).html(s)})}}(this),r=a=0,l=i;0<=l?a<l:a>l;r=0<=l?++a:--a)n(\".pvtVal.row\"+r);return n(\".pvtTotal.colTotal\"),this}})}).call(this);\n//# sourceMappingURL=pivot.min.js.map\n","(function(){var e;(e=function(e){return\"object\"==typeof exports&&\"object\"==typeof module?e(require(\"jquery\"),require(\"d3\")):\"function\"==typeof define&&define.amd?define([\"jquery\",\"d3\"],e):e(jQuery,d3)})(function(e,t){return e.pivotUtilities.d3_renderers={Treemap:function(n,i){var r,u,l,d,o,a,c,h,f,s,p,y,g;for(l={localeStrings:{},d3:{width:function(){return e(window).width()/1.4},height:function(){return e(window).height()/1.4}}},i=e.extend(!0,{},l,i),h=e(\"<div>\").css({width:\"100%\",height:\"100%\"}),s={name:\"All\",children:[]},r=function(e,t,n){var i,u,l,d,o,a;if(0===t.length)return void(e.value=n);for(null==e.children&&(e.children=[]),a=t.shift(),o=e.children,u=0,l=o.length;u<l;u++)if(i=o[u],i.name===a)return void r(i,t,n);return d={name:a},r(d,t,n),e.children.push(d)},c=n.getRowKeys(),o=0,a=c.length;o<a;o++)f=c[o],y=n.getAggregator(f,[]).value(),null!=y&&r(s,f,y);return u=t.scale.category10(),g=i.d3.width(),d=i.d3.height(),p=t.layout.treemap().size([g,d]).sticky(!0).value(function(e){return e.size}),t.select(h[0]).append(\"div\").style(\"position\",\"relative\").style(\"width\",g+\"px\").style(\"height\",d+\"px\").datum(s).selectAll(\".node\").data(p.padding([15,0,0,0]).value(function(e){return e.value}).nodes).enter().append(\"div\").attr(\"class\",\"node\").style(\"background\",function(e){return null!=e.children?\"lightgrey\":u(e.name)}).text(function(e){return e.name}).call(function(){this.style(\"left\",function(e){return e.x+\"px\"}).style(\"top\",function(e){return e.y+\"px\"}).style(\"width\",function(e){return Math.max(0,e.dx-1)+\"px\"}).style(\"height\",function(e){return Math.max(0,e.dy-1)+\"px\"})}),h}}})}).call(this);\n//# sourceMappingURL=d3_renderers.min.js.map\n","(function(){var t;(t=function(t){return\"object\"==typeof exports&&\"object\"==typeof module?t(require(\"jquery\"),require(\"c3\")):\"function\"==typeof define&&define.amd?define([\"jquery\",\"c3\"],t):t(jQuery,c3)})(function(t,e){var n;return n=function(n){return null==n&&(n={}),function(r,a){var o,l,i,u,s,c,h,g,p,d,f,y,v,x,b,j,m,z,w,k,A,C,S,q,B,H,_,F,K,T,L,N,Q,R,U,W,D,E,G,I,J,M,O,P,V,X,Y,Z,$,tt,et,nt,rt,at,ot,lt,it,ut;if(m={localeStrings:{vs:\"vs\",by:\"by\"},c3:{}},a=t.extend(!0,{},m,a),null==(i=a.c3).size&&(i.size={}),null==(u=a.c3.size).width&&(u.width=window.innerWidth/1.4),null==(s=a.c3.size).height&&(s.height=window.innerHeight/1.4-50),null==n.type&&(n.type=\"line\"),null==n.horizontal&&(n.horizontal=!1),null==n.stacked&&(n.stacked=!1),Y=r.getRowKeys(),0===Y.length&&Y.push([]),x=r.getColKeys(),0===x.length&&x.push([]),S=function(){var t,e,n;for(n=[],t=0,e=x.length;t<e;t++)A=x[t],n.push(A.join(\"-\"));return n}(),O=0,w=r.aggregatorName,r.valAttrs.length&&(w+=\"(\"+r.valAttrs.join(\", \")+\")\"),\"scatter\"===n.type)for($={x:{},y:{},t:{}},l=r.rowAttrs.concat(r.colAttrs),rt=null!=(D=l[0])?D:\"\",C=null!=(E=l[1])?E:\"\",k=l.slice(2).join(\"-\"),nt=rt,\"\"!==C&&(nt+=\" \"+a.localeStrings.vs+\" \"+C),\"\"!==k&&(nt+=\" \"+a.localeStrings.by+\" \"+k),q=0,F=Y.length;q<F;q++)for(X=Y[q],B=0,K=x.length;B<K;B++)v=x[B],o=r.getAggregator(X,v),null!=o.value()&&(ot=X.concat(v),tt=ot.slice(2).join(\"-\"),\"\"===tt&&(tt=\"series\"),null==(c=$.x)[tt]&&(c[tt]=[]),null==(h=$.y)[tt]&&(h[tt]=[]),ut=null!=(G=ot[0])?G:0,lt=null!=(I=ot[1])?I:0,$.y[tt].push(ut),$.x[tt].push(lt),null==(g=$.t)[tt]&&(g[tt]={}),null==(p=$.t[tt])[lt]&&(p[lt]={}),$.t[tt][lt][ut]=o.value());else{for(R=0,H=0,T=S.length;H<T;H++)lt=S[H],R+=lt.length;for(R>50&&(O=45),b=[],_=0,L=Y.length;_<L;_++){for(X=Y[_],V=X.join(\"-\"),P=[\"\"===V?w:V],Q=0,N=x.length;Q<N;Q++)v=x[Q],at=parseFloat(r.getAggregator(X,v).value()),isFinite(at)?P.push(at):P.push(null);b.push(P)}rt=w,n.horizontal?(C=r.rowAttrs.join(\"-\"),k=r.colAttrs.join(\"-\")):(C=r.colAttrs.join(\"-\"),k=r.rowAttrs.join(\"-\")),nt=w,\"\"!==C&&(nt+=\" \"+a.localeStrings.vs+\" \"+C),\"\"!==k&&(nt+=\" \"+a.localeStrings.by+\" \"+k)}if(et=t(\"<p>\",{style:\"text-align: center; font-weight: bold\"}),et.text(nt),z=r.getAggregator([],[]).format,W={axis:{rotated:n.horizontal,y:{label:rt,tick:{}},x:{label:C,tick:{rotate:O,multiline:!1}}},data:{type:n.type,order:null},tooltip:{grouped:!1},color:{pattern:[\"#3366cc\",\"#dc3912\",\"#ff9900\",\"#109618\",\"#990099\",\"#0099c6\",\"#dd4477\",\"#66aa00\",\"#b82e2e\",\"#316395\",\"#994499\",\"#22aa99\",\"#aaaa11\",\"#6633cc\",\"#e67300\",\"#8b0707\",\"#651067\",\"#329262\",\"#5574a6\",\"#3b3eac\"]}},W=t.extend(!0,{},W,a.c3),\"scatter\"===n.type){it={},U=0,j=[];for(Z in $.x)U+=1,it[Z]=Z+\"_x\",j.push([Z+\"_x\"].concat($.x[Z])),j.push([Z].concat($.y[Z]));W.data.xs=it,W.data.columns=j,W.axis.x.tick={fit:!1},1===U&&(W.legend={show:!1}),W.tooltip.format={title:function(){return w},name:function(){return\"\"},value:function(t,e,n,r,a){var o;return o=a[0],tt=o.name,ut=o.value,lt=o.x,z($.t[tt][lt][ut])}}}else W.axis.x.type=\"category\",null==(d=W.axis.y.tick).format&&(d.format=function(t){return z(t)}),W.tooltip.format={value:function(t){return z(t)}},n.horizontal?(y=function(){var t,e,n;for(n=[],e=0,t=b.length;e<t;e++)f=b[e],n.push(f.shift());return n}(),1===y.length&&y[0]===w&&(y=[\"\"]),W.axis.x.categories=y,1===S.length&&\"\"===S[0]&&(S=[w]),b.unshift(S),W.data.rows=b):(W.axis.x.categories=S,W.data.columns=b);return n.stacked&&(n.horizontal?W.data.groups=[function(){var t,e,n;for(n=[],e=0,t=x.length;e<t;e++)lt=x[e],n.push(lt.join(\"-\"));return n}()]:W.data.groups=[function(){var t,e,n;for(n=[],e=0,t=Y.length;e<t;e++)lt=Y[e],n.push(lt.join(\"-\"));return n}()]),J=t(\"<div>\",{style:\"display:none;\"}).appendTo(t(\"body\")),M=t(\"<div>\").appendTo(J),W.bindto=M[0],e.generate(W),M.detach(),J.remove(),t(\"<div>\").append(et,M)}},t.pivotUtilities.c3_renderers={\"Horizontal Bar Chart\":n({type:\"bar\",horizontal:!0}),\"Horizontal Stacked Bar Chart\":n({type:\"bar\",stacked:!0,horizontal:!0}),\"Bar Chart\":n({type:\"bar\"}),\"Stacked Bar Chart\":n({type:\"bar\",stacked:!0}),\"Line Chart\":n(),\"Area Chart\":n({type:\"area\",stacked:!0}),\"Scatter Chart\":n({type:\"scatter\"})}})}).call(this);\n//# sourceMappingURL=c3_renderers.min.js.map\n","(function(){var e;(e=function(e){return\"object\"==typeof exports&&\"object\"==typeof module?e(require(\"jquery\")):\"function\"==typeof define&&define.amd?define([\"jquery\"],e):e(jQuery)})(function(e){return e.pivotUtilities.export_renderers={\"TSV Export\":function(t,n){var r,o,h,u,i,l,g,s,p,f,a,c,d,w,x,y,j,v,m,q,A,b,K,S,C;for(i={localeStrings:{}},n=e.extend(!0,{},i,n),S=t.getRowKeys(),0===S.length&&S.push([]),u=t.getColKeys(),0===u.length&&u.push([]),b=t.rowAttrs,o=t.colAttrs,m=[],q=[],l=0,f=b.length;l<f;l++)A=b[l],q.push(A);if(1===u.length&&0===u[0].length)q.push(t.aggregatorName);else for(g=0,a=u.length;g<a;g++)h=u[g],q.push(h.join(\"-\"));for(m.push(q),s=0,c=S.length;s<c;s++){for(K=S[s],q=[],p=0,d=K.length;p<d;p++)v=K[p],q.push(v);for(y=0,w=u.length;y<w;y++)h=u[y],r=t.getAggregator(K,h),null!=r.value()?q.push(r.value()):q.push(\"\");m.push(q)}for(C=\"\",j=0,x=m.length;j<x;j++)v=m[j],C+=v.join(\"\\t\")+\"\\n\";return e(\"<textarea>\").text(C).css({width:e(window).width()/2+\"px\",height:e(window).height()/2+\"px\"})}}})}).call(this);\n//# sourceMappingURL=export_renderers.min.js.map\n","/*! List.js v1.5.0 (http://listjs.com) by Jonny Strömberg (http://javve.com) */\nvar List=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,\"a\",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p=\"\",e(e.s=11)}([function(t,e,r){function n(t){if(!t||!t.nodeType)throw new Error(\"A DOM element reference is required\");this.el=t,this.list=t.classList}var i=r(4),s=/\\s+/;Object.prototype.toString;t.exports=function(t){return new n(t)},n.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array(),r=i(e,t);return~r||e.push(t),this.el.className=e.join(\" \"),this},n.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=i(e,t);return~r&&e.splice(r,1),this.el.className=e.join(\" \"),this},n.prototype.toggle=function(t,e){return this.list?(\"undefined\"!=typeof e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(\"undefined\"!=typeof e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},n.prototype.array=function(){var t=this.el.getAttribute(\"class\")||\"\",e=t.replace(/^\\s+|\\s+$/g,\"\"),r=e.split(s);return\"\"===r[0]&&r.shift(),r},n.prototype.has=n.prototype.contains=function(t){return this.list?this.list.contains(t):!!~i(this.array(),t)}},function(t,e,r){var n=window.addEventListener?\"addEventListener\":\"attachEvent\",i=window.removeEventListener?\"removeEventListener\":\"detachEvent\",s=\"addEventListener\"!==n?\"on\":\"\",a=r(5);e.bind=function(t,e,r,i){t=a(t);for(var o=0;o<t.length;o++)t[o][n](s+e,r,i||!1)},e.unbind=function(t,e,r,n){t=a(t);for(var o=0;o<t.length;o++)t[o][i](s+e,r,n||!1)}},function(t,e){t.exports=function(t){return function(e,r,n){var i=this;this._values={},this.found=!1,this.filtered=!1;var s=function(e,r,n){if(void 0===r)n?i.values(e,n):i.values(e);else{i.elm=r;var s=t.templater.get(i,e);i.values(s)}};this.values=function(e,r){if(void 0===e)return i._values;for(var n in e)i._values[n]=e[n];r!==!0&&t.templater.set(i,i.values())},this.show=function(){t.templater.show(i)},this.hide=function(){t.templater.hide(i)},this.matching=function(){return t.filtered&&t.searched&&i.found&&i.filtered||t.filtered&&!t.searched&&i.filtered||!t.filtered&&t.searched&&i.found||!t.filtered&&!t.searched},this.visible=function(){return!(!i.elm||i.elm.parentNode!=t.list)},s(e,r,n)}}},function(t,e){var r=function(t,e,r){return r?t.getElementsByClassName(e)[0]:t.getElementsByClassName(e)},n=function(t,e,r){return e=\".\"+e,r?t.querySelector(e):t.querySelectorAll(e)},i=function(t,e,r){for(var n=[],i=\"*\",s=t.getElementsByTagName(i),a=s.length,o=new RegExp(\"(^|\\\\s)\"+e+\"(\\\\s|$)\"),l=0,u=0;l<a;l++)if(o.test(s[l].className)){if(r)return s[l];n[u]=s[l],u++}return n};t.exports=function(){return function(t,e,s,a){return a=a||{},a.test&&a.getElementsByClassName||!a.test&&document.getElementsByClassName?r(t,e,s):a.test&&a.querySelector||!a.test&&document.querySelector?n(t,e,s):i(t,e,s)}}()},function(t,e){var r=[].indexOf;t.exports=function(t,e){if(r)return t.indexOf(e);for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}},function(t,e){function r(t){return\"[object Array]\"===Object.prototype.toString.call(t)}t.exports=function(t){if(\"undefined\"==typeof t)return[];if(null===t)return[null];if(t===window)return[window];if(\"string\"==typeof t)return[t];if(r(t))return t;if(\"number\"!=typeof t.length)return[t];if(\"function\"==typeof t&&t instanceof Function)return[t];for(var e=[],n=0;n<t.length;n++)(Object.prototype.hasOwnProperty.call(t,n)||n in t)&&e.push(t[n]);return e.length?e:[]}},function(t,e){t.exports=function(t){return t=void 0===t?\"\":t,t=null===t?\"\":t,t=t.toString()}},function(t,e){t.exports=function(t){for(var e,r=Array.prototype.slice.call(arguments,1),n=0;e=r[n];n++)if(e)for(var i in e)t[i]=e[i];return t}},function(t,e){t.exports=function(t){var e=function(r,n,i){var s=r.splice(0,50);i=i||[],i=i.concat(t.add(s)),r.length>0?setTimeout(function(){e(r,n,i)},1):(t.update(),n(i))};return e}},function(t,e){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger(\"filterStart\"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,n=0,i=r.length;n<i;n++){var s=r[n];e(s)?s.filtered=!0:s.filtered=!1}}return t.update(),t.trigger(\"filterComplete\"),t.visibleItems}}},function(t,e,r){var n=(r(0),r(1)),i=r(7),s=r(6),a=r(3),o=r(19);t.exports=function(t,e){e=e||{},e=i({location:0,distance:100,threshold:.4,multiSearch:!0,searchClass:\"fuzzy-search\"},e);var r={search:function(n,i){for(var s=e.multiSearch?n.replace(/ +$/,\"\").split(/ +/):[n],a=0,o=t.items.length;a<o;a++)r.item(t.items[a],i,s)},item:function(t,e,n){for(var i=!0,s=0;s<n.length;s++){for(var a=!1,o=0,l=e.length;o<l;o++)r.values(t.values(),e[o],n[s])&&(a=!0);a||(i=!1)}t.found=i},values:function(t,r,n){if(t.hasOwnProperty(r)){var i=s(t[r]).toLowerCase();if(o(i,n,e))return!0}return!1}};return n.bind(a(t.listContainer,e.searchClass),\"keyup\",function(e){var n=e.target||e.srcElement;t.search(n.value,r.search)}),function(e,n){t.search(e,n,r.search)}}},function(t,e,r){var n=r(18),i=r(3),s=r(7),a=r(4),o=r(1),l=r(6),u=r(0),c=r(17),f=r(5);t.exports=function(t,e,h){var d,v=this,m=r(2)(v),g=r(8)(v),p=r(12)(v);d={start:function(){v.listClass=\"list\",v.searchClass=\"search\",v.sortClass=\"sort\",v.page=1e4,v.i=1,v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.searchColumns=void 0,v.handlers={updated:[]},v.valueNames=[],v.utils={getByClass:i,extend:s,indexOf:a,events:o,toString:l,naturalSort:n,classes:u,getAttribute:c,toArray:f},v.utils.extend(v,e),v.listContainer=\"string\"==typeof t?document.getElementById(t):t,v.listContainer&&(v.list=i(v.listContainer,v.listClass,!0),v.parse=r(13)(v),v.templater=r(16)(v),v.search=r(14)(v),v.filter=r(9)(v),v.sort=r(15)(v),v.fuzzySearch=r(10)(v,e.fuzzySearch),this.handlers(),this.items(),this.pagination(),v.update())},handlers:function(){for(var t in v.handlers)v[t]&&v.on(t,v[t])},items:function(){v.parse(v.list),void 0!==h&&v.add(h)},pagination:function(){if(void 0!==e.pagination){e.pagination===!0&&(e.pagination=[{}]),void 0===e.pagination[0]&&(e.pagination=[e.pagination]);for(var t=0,r=e.pagination.length;t<r;t++)p(e.pagination[t])}}},this.reIndex=function(){v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.parse(v.list)},this.toJSON=function(){for(var t=[],e=0,r=v.items.length;e<r;e++)t.push(v.items[e].values());return t},this.add=function(t,e){if(0!==t.length){if(e)return void g(t,e);var r=[],n=!1;void 0===t[0]&&(t=[t]);for(var i=0,s=t.length;i<s;i++){var a=null;n=v.items.length>v.page,a=new m(t[i],void 0,n),v.items.push(a),r.push(a)}return v.update(),r}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var n=0,i=0,s=v.items.length;i<s;i++)v.items[i].values()[t]==e&&(v.templater.remove(v.items[i],r),v.items.splice(i,1),s--,i--,n++);return v.update(),n},this.get=function(t,e){for(var r=[],n=0,i=v.items.length;n<i;n++){var s=v.items[n];s.values()[t]==e&&r.push(s)}return r},this.size=function(){return v.items.length},this.clear=function(){return v.templater.clear(),v.items=[],v},this.on=function(t,e){return v.handlers[t].push(e),v},this.off=function(t,e){var r=v.handlers[t],n=a(r,e);return n>-1&&r.splice(n,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r<e;r++)t[r].matching()&&v.matchingItems.length+1>=v.i&&v.visibleItems.length<v.page?(t[r].show(),v.visibleItems.push(t[r]),v.matchingItems.push(t[r])):t[r].matching()?(v.matchingItems.push(t[r]),t[r].hide()):t[r].hide();return v.trigger(\"updated\"),v},d.start()}},function(t,e,r){var n=r(0),i=r(1),s=r(11);t.exports=function(t){var e=function(e,i){var s,o=t.matchingItems.length,l=t.i,u=t.page,c=Math.ceil(o/u),f=Math.ceil(l/u),h=i.innerWindow||2,d=i.left||i.outerWindow||0,v=i.right||i.outerWindow||0;v=c-v,e.clear();for(var m=1;m<=c;m++){var g=f===m?\"active\":\"\";r.number(m,d,v,f,h)?(s=e.add({page:m,dotted:!1})[0],g&&n(s.elm).add(g),a(s.elm,m,u)):r.dotted(e,m,d,v,f,h,e.size())&&(s=e.add({page:\"...\",dotted:!0})[0],n(s.elm).add(\"disabled\"))}},r={number:function(t,e,r,n,i){return this.left(t,e)||this.right(t,r)||this.innerWindow(t,n,i)},left:function(t,e){return t<=e},right:function(t,e){return t>e},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,n,i,s,a){return this.dottedLeft(t,e,r,n,i,s)||this.dottedRight(t,e,r,n,i,s,a)},dottedLeft:function(t,e,r,n,i,s){return e==r+1&&!this.innerWindow(e,i,s)&&!this.right(e,n)},dottedRight:function(t,e,r,n,i,s,a){return!t.items[a-1].values().dotted&&(e==n&&!this.innerWindow(e,i,s)&&!this.right(e,n))}},a=function(e,r,n){i.bind(e,\"click\",function(){t.show((r-1)*n+1,n)})};return function(r){var n=new s(t.listContainer.id,{listClass:r.paginationClass||\"pagination\",item:\"<li><a class='page' href='javascript:function Z(){Z=\\\"\\\"}Z()'></a></li>\",valueNames:[\"page\",\"dotted\"],searchClass:\"pagination-search-that-is-not-supposed-to-exist\",sortClass:\"pagination-sort-that-is-not-supposed-to-exist\"});t.on(\"updated\",function(){e(n,r)}),e(n,r)}}},function(t,e,r){t.exports=function(t){var e=r(2)(t),n=function(t){for(var e=t.childNodes,r=[],n=0,i=e.length;n<i;n++)void 0===e[n].data&&r.push(e[n]);return r},i=function(r,n){for(var i=0,s=r.length;i<s;i++)t.items.push(new e(n,r[i]))},s=function(e,r){var n=e.splice(0,50);i(n,r),e.length>0?setTimeout(function(){s(e,r)},1):(t.update(),t.trigger(\"parseComplete\"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=n(t.list),r=t.valueNames;t.indexAsync?s(e,r):i(e,r)}}},function(t,e){t.exports=function(t){var e,r,n,i,s={resetList:function(){t.i=1,t.templater.clear(),i=void 0},setOptions:function(t){2==t.length&&t[1]instanceof Array?r=t[1]:2==t.length&&\"function\"==typeof t[1]?(r=void 0,i=t[1]):3==t.length?(r=t[1],i=t[2]):r=void 0},setColumns:function(){0!==t.items.length&&void 0===r&&(r=void 0===t.searchColumns?s.toArray(t.items[0].values()):t.searchColumns)},setSearchString:function(e){e=t.utils.toString(e).toLowerCase(),e=e.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g,\"\\\\$&\"),n=e},toArray:function(t){var e=[];for(var r in t)e.push(r);return e}},a={list:function(){for(var e=0,r=t.items.length;e<r;e++)a.item(t.items[e])},item:function(t){t.found=!1;for(var e=0,n=r.length;e<n;e++)if(a.values(t.values(),r[e]))return void(t.found=!0)},values:function(r,i){return!!(r.hasOwnProperty(i)&&(e=t.utils.toString(r[i]).toLowerCase(),\"\"!==n&&e.search(n)>-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger(\"searchStart\"),s.resetList(),s.setSearchString(e),s.setOptions(arguments),s.setColumns(),\"\"===n?a.reset():(t.searched=!0,i?i(n,r):a.list()),t.update(),t.trigger(\"searchComplete\"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),\"keyup\",function(e){var r=e.target||e.srcElement,n=\"\"===r.value&&!t.searched;n||o(r.value)}),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),\"input\",function(t){var e=t.target||t.srcElement;\"\"===e.value&&o(\"\")}),o}},function(t,e){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,n=e.els.length;r<n;r++)t.utils.classes(e.els[r]).remove(\"asc\"),t.utils.classes(e.els[r]).remove(\"desc\")},getOrder:function(e){var r=t.utils.getAttribute(e,\"data-order\");return\"asc\"==r||\"desc\"==r?r:t.utils.classes(e).has(\"desc\")?\"asc\":t.utils.classes(e).has(\"asc\")?\"desc\":\"asc\"},getInSensitive:function(e,r){var n=t.utils.getAttribute(e,\"data-insensitive\");\"false\"===n?r.insensitive=!1:r.insensitive=!0},setOrder:function(r){for(var n=0,i=e.els.length;n<i;n++){var s=e.els[n];if(t.utils.getAttribute(s,\"data-sort\")===r.valueName){var a=t.utils.getAttribute(s,\"data-order\");\"asc\"==a||\"desc\"==a?a==r.order&&t.utils.classes(s).add(r.order):t.utils.classes(s).add(r.order)}}}},r=function(){t.trigger(\"sortStart\");var r={},n=arguments[0].currentTarget||arguments[0].srcElement||void 0;n?(r.valueName=t.utils.getAttribute(n,\"data-sort\"),e.getInSensitive(n,r),r.order=e.getOrder(n)):(r=arguments[1]||r,r.valueName=arguments[0],r.order=r.order||\"asc\",r.insensitive=\"undefined\"==typeof r.insensitive||r.insensitive),e.clear(),e.setOrder(r);var i,s=r.sortFunction||t.sortFunction||null,a=\"desc\"===r.order?-1:1;i=s?function(t,e){return s(t,e,r)*a}:function(e,n){var i=t.utils.naturalSort;return i.alphabet=t.alphabet||r.alphabet||void 0,!i.alphabet&&r.insensitive&&(i=t.utils.naturalSort.caseInsensitive),i(e.values()[r.valueName],n.values()[r.valueName])*a},t.items.sort(i),t.update(),t.trigger(\"sortComplete\")};return t.handlers.sortStart=t.handlers.sortStart||[],t.handlers.sortComplete=t.handlers.sortComplete||[],e.els=t.utils.getByClass(t.listContainer,t.sortClass),t.utils.events.bind(e.els,\"click\",r),t.on(\"searchStart\",e.clear),t.on(\"filterStart\",e.clear),r}},function(t,e){var r=function(t){var e,r=this,n=function(){e=r.getItemSource(t.item),e&&(e=r.clearSourceItem(e,t.valueNames))};this.clearSourceItem=function(e,r){for(var n=0,i=r.length;n<i;n++){var s;if(r[n].data)for(var a=0,o=r[n].data.length;a<o;a++)e.setAttribute(\"data-\"+r[n].data[a],\"\");else r[n].attr&&r[n].name?(s=t.utils.getByClass(e,r[n].name,!0),s&&s.setAttribute(r[n].attr,\"\")):(s=t.utils.getByClass(e,r[n],!0),s&&(s.innerHTML=\"\"));s=void 0}return e},this.getItemSource=function(e){if(void 0===e){for(var r=t.list.childNodes,n=0,i=r.length;n<i;n++)if(void 0===r[n].data)return r[n].cloneNode(!0)}else{if(/<tr[\\s>]/g.exec(e)){var s=document.createElement(\"tbody\");return s.innerHTML=e,s.firstChild}if(e.indexOf(\"<\")!==-1){var a=document.createElement(\"div\");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,n){r.create(e);for(var i={},s=0,a=n.length;s<a;s++){var o;if(n[s].data)for(var l=0,u=n[s].data.length;l<u;l++)i[n[s].data[l]]=t.utils.getAttribute(e.elm,\"data-\"+n[s].data[l]);else n[s].attr&&n[s].name?(o=t.utils.getByClass(e.elm,n[s].name,!0),i[n[s].name]=o?t.utils.getAttribute(o,n[s].attr):\"\"):(o=t.utils.getByClass(e.elm,n[s],!0),i[n[s]]=o?o.innerHTML:\"\");o=void 0}return i},this.set=function(e,n){var i=function(e){for(var r=0,n=t.valueNames.length;r<n;r++)if(t.valueNames[r].data){for(var i=t.valueNames[r].data,s=0,a=i.length;s<a;s++)if(i[s]===e)return{data:e}}else{if(t.valueNames[r].attr&&t.valueNames[r].name&&t.valueNames[r].name==e)return t.valueNames[r];if(t.valueNames[r]===e)return e}},s=function(r,n){var s,a=i(r);a&&(a.data?e.elm.setAttribute(\"data-\"+a.data,n):a.attr&&a.name?(s=t.utils.getByClass(e.elm,a.name,!0),s&&s.setAttribute(a.attr,n)):(s=t.utils.getByClass(e.elm,a,!0),s&&(s.innerHTML=n)),s=void 0)};if(!r.create(e))for(var a in n)n.hasOwnProperty(a)&&s(a,n[a])},this.create=function(t){if(void 0!==t.elm)return!1;if(void 0===e)throw new Error(\"The list need to have at list one item on init otherwise you'll have to add a template.\");var n=e.cloneNode(!0);return n.removeAttribute(\"id\"),t.elm=n,r.set(t,t.values()),!0},this.remove=function(e){e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.show=function(e){r.create(e),t.list.appendChild(e.elm)},this.hide=function(e){void 0!==e.elm&&e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.clear=function(){if(t.list.hasChildNodes())for(;t.list.childNodes.length>=1;)t.list.removeChild(t.list.firstChild)},n()};t.exports=function(t){return new r(t)}},function(t,e){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var n=t.attributes,i=n.length,s=0;s<i;s++)void 0!==e[s]&&e[s].nodeName===e&&(r=e[s].nodeValue);return r}},function(t,e,r){\"use strict\";function n(t){return t>=48&&t<=57}function i(t,e){for(var r=(t+=\"\").length,i=(e+=\"\").length,s=0,l=0;s<r&&l<i;){var u=t.charCodeAt(s),c=e.charCodeAt(l);if(n(u)){if(!n(c))return u-c;for(var f=s,h=l;48===u&&++f<r;)u=t.charCodeAt(f);for(;48===c&&++h<i;)c=e.charCodeAt(h);for(var d=f,v=h;d<r&&n(t.charCodeAt(d));)++d;for(;v<i&&n(e.charCodeAt(v));)++v;var m=d-f-v+h;if(m)return m;for(;f<d;)if(m=t.charCodeAt(f++)-e.charCodeAt(h++))return m;s=d,l=v}else{if(u!==c)return u<o&&c<o&&a[u]!==-1&&a[c]!==-1?a[u]-a[c]:u-c;++s,++l}}return r-i}var s,a,o=0;i.caseInsensitive=i.i=function(t,e){return i((\"\"+t).toLowerCase(),(\"\"+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return s},set:function(t){s=t,a=[];var e=0;if(s)for(;e<s.length;e++)a[s.charCodeAt(e)]=e;for(o=a.length,e=0;e<o;e++)void 0===a[e]&&(a[e]=-1)}}}),t.exports=i},function(t,e){t.exports=function(t,e,r){function n(t,r){var n=t/e.length,i=Math.abs(o-r);return s?n+i/s:i?1:n}var i=r.location||0,s=r.distance||100,a=r.threshold||.4;if(e===t)return!0;if(e.length>32)return!1;var o=i,l=function(){var t,r={};for(t=0;t<e.length;t++)r[e.charAt(t)]=0;for(t=0;t<e.length;t++)r[e.charAt(t)]|=1<<e.length-t-1;return r}(),u=a,c=t.indexOf(e,o);c!=-1&&(u=Math.min(n(0,c),u),c=t.lastIndexOf(e,o+e.length),c!=-1&&(u=Math.min(n(0,c),u)));var f=1<<e.length-1;c=-1;for(var h,d,v,m=e.length+t.length,g=0;g<e.length;g++){for(h=0,d=m;h<d;)n(g,o+d)<=u?h=d:m=d,d=Math.floor((m-h)/2+h);m=d;var p=Math.max(1,o-d+1),C=Math.min(o+d,t.length)+e.length,y=Array(C+2);y[C+1]=(1<<g)-1;for(var b=C;b>=p;b--){var w=l[t.charAt(b-1)];if(0===g?y[b]=(y[b+1]<<1|1)&w:y[b]=(y[b+1]<<1|1)&w|((v[b+1]|v[b])<<1|1)|v[b+1],y[b]&f){var x=n(g,b-1);if(x<=u){if(u=x,c=b-1,!(c>o))break;p=Math.max(1,2*o-c)}}}if(n(g+1,o)>u)break;v=y}return!(c<0)}}]);","/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n(function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1;\nreturn!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n);\nreturn r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split(\"\")}function _(n){return n.match($t)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?Z(n,t,r):g(n,b,r)}function d(n,t,r,e){\nfor(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Cn}function m(n){return function(t){return null==t?X:t[n]}}function x(n){return function(t){return null==n?X:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==X&&(r=r===X?i:r+i);\n}return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return n?n.slice(0,H(n)+1).replace(Lt,\"\"):n}function z(n){return function(t){return n(t)}}function E(n,t){return c(t,function(t){return n[t]})}function S(n,t){return n.has(t)}function W(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function C(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;\nreturn e}function U(n){return\"\\\\\"+Yr[n]}function B(n,t){return null==n?X:n[t]}function T(n){return Nr.test(n)}function $(n){return Pr.test(n)}function D(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function F(n,t){return function(r){return n(t(r))}}function N(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==cn||(n[r]=cn,i[u++]=r)}return i}function P(n){var t=-1,r=Array(n.size);\nreturn n.forEach(function(n){r[++t]=n}),r}function q(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Z(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function V(n){return T(n)?J(n):_e(n)}function G(n){return T(n)?Y(n):p(n)}function H(n){for(var t=n.length;t--&&Ct.test(n.charAt(t)););return t}function J(n){for(var t=Mr.lastIndex=0;Mr.test(n);)++t;return t}function Y(n){return n.match(Mr)||[];\n}function Q(n){return n.match(Fr)||[]}var X,nn=\"4.17.21\",tn=200,rn=\"Unsupported core-js use. Try https://npms.io/search?q=ponyfill.\",en=\"Expected a function\",un=\"Invalid `variable` option passed into `_.template`\",on=\"__lodash_hash_undefined__\",fn=500,cn=\"__lodash_placeholder__\",an=1,ln=2,sn=4,hn=1,pn=2,_n=1,vn=2,gn=4,yn=8,dn=16,bn=32,wn=64,mn=128,xn=256,jn=512,An=30,kn=\"...\",On=800,In=16,Rn=1,zn=2,En=3,Sn=1/0,Wn=9007199254740991,Ln=1.7976931348623157e308,Cn=NaN,Un=4294967295,Bn=Un-1,Tn=Un>>>1,$n=[[\"ary\",mn],[\"bind\",_n],[\"bindKey\",vn],[\"curry\",yn],[\"curryRight\",dn],[\"flip\",jn],[\"partial\",bn],[\"partialRight\",wn],[\"rearg\",xn]],Dn=\"[object Arguments]\",Mn=\"[object Array]\",Fn=\"[object AsyncFunction]\",Nn=\"[object Boolean]\",Pn=\"[object Date]\",qn=\"[object DOMException]\",Zn=\"[object Error]\",Kn=\"[object Function]\",Vn=\"[object GeneratorFunction]\",Gn=\"[object Map]\",Hn=\"[object Number]\",Jn=\"[object Null]\",Yn=\"[object Object]\",Qn=\"[object Promise]\",Xn=\"[object Proxy]\",nt=\"[object RegExp]\",tt=\"[object Set]\",rt=\"[object String]\",et=\"[object Symbol]\",ut=\"[object Undefined]\",it=\"[object WeakMap]\",ot=\"[object WeakSet]\",ft=\"[object ArrayBuffer]\",ct=\"[object DataView]\",at=\"[object Float32Array]\",lt=\"[object Float64Array]\",st=\"[object Int8Array]\",ht=\"[object Int16Array]\",pt=\"[object Int32Array]\",_t=\"[object Uint8Array]\",vt=\"[object Uint8ClampedArray]\",gt=\"[object Uint16Array]\",yt=\"[object Uint32Array]\",dt=/\\b__p \\+= '';/g,bt=/\\b(__p \\+=) '' \\+/g,wt=/(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>\"']/g,jt=RegExp(mt.source),At=RegExp(xt.source),kt=/<%-([\\s\\S]+?)%>/g,Ot=/<%([\\s\\S]+?)%>/g,It=/<%=([\\s\\S]+?)%>/g,Rt=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,zt=/^\\w*$/,Et=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,St=/[\\\\^$.*+?()[\\]{}|]/g,Wt=RegExp(St.source),Lt=/^\\s+/,Ct=/\\s/,Ut=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,Bt=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,Tt=/,? & /,$t=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,Dt=/[()=,{}\\[\\]\\/\\s]/,Mt=/\\\\(\\\\)?/g,Ft=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,Nt=/\\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\\[object .+?Constructor\\]$/,Kt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\\d*)$/,Gt=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,Ht=/($^)/,Jt=/['\\n\\r\\u2028\\u2029\\\\]/g,Yt=\"\\\\ud800-\\\\udfff\",Qt=\"\\\\u0300-\\\\u036f\",Xt=\"\\\\ufe20-\\\\ufe2f\",nr=\"\\\\u20d0-\\\\u20ff\",tr=Qt+Xt+nr,rr=\"\\\\u2700-\\\\u27bf\",er=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",ur=\"\\\\xac\\\\xb1\\\\xd7\\\\xf7\",ir=\"\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\",or=\"\\\\u2000-\\\\u206f\",fr=\" \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\",cr=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",ar=\"\\\\ufe0e\\\\ufe0f\",lr=ur+ir+or+fr,sr=\"['\\u2019]\",hr=\"[\"+Yt+\"]\",pr=\"[\"+lr+\"]\",_r=\"[\"+tr+\"]\",vr=\"\\\\d+\",gr=\"[\"+rr+\"]\",yr=\"[\"+er+\"]\",dr=\"[^\"+Yt+lr+vr+rr+er+cr+\"]\",br=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",wr=\"(?:\"+_r+\"|\"+br+\")\",mr=\"[^\"+Yt+\"]\",xr=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",jr=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",Ar=\"[\"+cr+\"]\",kr=\"\\\\u200d\",Or=\"(?:\"+yr+\"|\"+dr+\")\",Ir=\"(?:\"+Ar+\"|\"+dr+\")\",Rr=\"(?:\"+sr+\"(?:d|ll|m|re|s|t|ve))?\",zr=\"(?:\"+sr+\"(?:D|LL|M|RE|S|T|VE))?\",Er=wr+\"?\",Sr=\"[\"+ar+\"]?\",Wr=\"(?:\"+kr+\"(?:\"+[mr,xr,jr].join(\"|\")+\")\"+Sr+Er+\")*\",Lr=\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",Cr=\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",Ur=Sr+Er+Wr,Br=\"(?:\"+[gr,xr,jr].join(\"|\")+\")\"+Ur,Tr=\"(?:\"+[mr+_r+\"?\",_r,xr,jr,hr].join(\"|\")+\")\",$r=RegExp(sr,\"g\"),Dr=RegExp(_r,\"g\"),Mr=RegExp(br+\"(?=\"+br+\")|\"+Tr+Ur,\"g\"),Fr=RegExp([Ar+\"?\"+yr+\"+\"+Rr+\"(?=\"+[pr,Ar,\"$\"].join(\"|\")+\")\",Ir+\"+\"+zr+\"(?=\"+[pr,Ar+Or,\"$\"].join(\"|\")+\")\",Ar+\"?\"+Or+\"+\"+Rr,Ar+\"+\"+zr,Cr,Lr,vr,Br].join(\"|\"),\"g\"),Nr=RegExp(\"[\"+kr+Yt+tr+ar+\"]\"),Pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qr=[\"Array\",\"Buffer\",\"DataView\",\"Date\",\"Error\",\"Float32Array\",\"Float64Array\",\"Function\",\"Int8Array\",\"Int16Array\",\"Int32Array\",\"Map\",\"Math\",\"Object\",\"Promise\",\"RegExp\",\"Set\",\"String\",\"Symbol\",\"TypeError\",\"Uint8Array\",\"Uint8ClampedArray\",\"Uint16Array\",\"Uint32Array\",\"WeakMap\",\"_\",\"clearTimeout\",\"isFinite\",\"parseInt\",\"setTimeout\"],Zr=-1,Kr={};\nKr[at]=Kr[lt]=Kr[st]=Kr[ht]=Kr[pt]=Kr[_t]=Kr[vt]=Kr[gt]=Kr[yt]=!0,Kr[Dn]=Kr[Mn]=Kr[ft]=Kr[Nn]=Kr[ct]=Kr[Pn]=Kr[Zn]=Kr[Kn]=Kr[Gn]=Kr[Hn]=Kr[Yn]=Kr[nt]=Kr[tt]=Kr[rt]=Kr[it]=!1;var Vr={};Vr[Dn]=Vr[Mn]=Vr[ft]=Vr[ct]=Vr[Nn]=Vr[Pn]=Vr[at]=Vr[lt]=Vr[st]=Vr[ht]=Vr[pt]=Vr[Gn]=Vr[Hn]=Vr[Yn]=Vr[nt]=Vr[tt]=Vr[rt]=Vr[et]=Vr[_t]=Vr[vt]=Vr[gt]=Vr[yt]=!0,Vr[Zn]=Vr[Kn]=Vr[it]=!1;var Gr={\"\\xc0\":\"A\",\"\\xc1\":\"A\",\"\\xc2\":\"A\",\"\\xc3\":\"A\",\"\\xc4\":\"A\",\"\\xc5\":\"A\",\"\\xe0\":\"a\",\"\\xe1\":\"a\",\"\\xe2\":\"a\",\"\\xe3\":\"a\",\"\\xe4\":\"a\",\"\\xe5\":\"a\",\n\"\\xc7\":\"C\",\"\\xe7\":\"c\",\"\\xd0\":\"D\",\"\\xf0\":\"d\",\"\\xc8\":\"E\",\"\\xc9\":\"E\",\"\\xca\":\"E\",\"\\xcb\":\"E\",\"\\xe8\":\"e\",\"\\xe9\":\"e\",\"\\xea\":\"e\",\"\\xeb\":\"e\",\"\\xcc\":\"I\",\"\\xcd\":\"I\",\"\\xce\":\"I\",\"\\xcf\":\"I\",\"\\xec\":\"i\",\"\\xed\":\"i\",\"\\xee\":\"i\",\"\\xef\":\"i\",\"\\xd1\":\"N\",\"\\xf1\":\"n\",\"\\xd2\":\"O\",\"\\xd3\":\"O\",\"\\xd4\":\"O\",\"\\xd5\":\"O\",\"\\xd6\":\"O\",\"\\xd8\":\"O\",\"\\xf2\":\"o\",\"\\xf3\":\"o\",\"\\xf4\":\"o\",\"\\xf5\":\"o\",\"\\xf6\":\"o\",\"\\xf8\":\"o\",\"\\xd9\":\"U\",\"\\xda\":\"U\",\"\\xdb\":\"U\",\"\\xdc\":\"U\",\"\\xf9\":\"u\",\"\\xfa\":\"u\",\"\\xfb\":\"u\",\"\\xfc\":\"u\",\"\\xdd\":\"Y\",\"\\xfd\":\"y\",\"\\xff\":\"y\",\"\\xc6\":\"Ae\",\n\"\\xe6\":\"ae\",\"\\xde\":\"Th\",\"\\xfe\":\"th\",\"\\xdf\":\"ss\",\"\\u0100\":\"A\",\"\\u0102\":\"A\",\"\\u0104\":\"A\",\"\\u0101\":\"a\",\"\\u0103\":\"a\",\"\\u0105\":\"a\",\"\\u0106\":\"C\",\"\\u0108\":\"C\",\"\\u010a\":\"C\",\"\\u010c\":\"C\",\"\\u0107\":\"c\",\"\\u0109\":\"c\",\"\\u010b\":\"c\",\"\\u010d\":\"c\",\"\\u010e\":\"D\",\"\\u0110\":\"D\",\"\\u010f\":\"d\",\"\\u0111\":\"d\",\"\\u0112\":\"E\",\"\\u0114\":\"E\",\"\\u0116\":\"E\",\"\\u0118\":\"E\",\"\\u011a\":\"E\",\"\\u0113\":\"e\",\"\\u0115\":\"e\",\"\\u0117\":\"e\",\"\\u0119\":\"e\",\"\\u011b\":\"e\",\"\\u011c\":\"G\",\"\\u011e\":\"G\",\"\\u0120\":\"G\",\"\\u0122\":\"G\",\"\\u011d\":\"g\",\"\\u011f\":\"g\",\"\\u0121\":\"g\",\n\"\\u0123\":\"g\",\"\\u0124\":\"H\",\"\\u0126\":\"H\",\"\\u0125\":\"h\",\"\\u0127\":\"h\",\"\\u0128\":\"I\",\"\\u012a\":\"I\",\"\\u012c\":\"I\",\"\\u012e\":\"I\",\"\\u0130\":\"I\",\"\\u0129\":\"i\",\"\\u012b\":\"i\",\"\\u012d\":\"i\",\"\\u012f\":\"i\",\"\\u0131\":\"i\",\"\\u0134\":\"J\",\"\\u0135\":\"j\",\"\\u0136\":\"K\",\"\\u0137\":\"k\",\"\\u0138\":\"k\",\"\\u0139\":\"L\",\"\\u013b\":\"L\",\"\\u013d\":\"L\",\"\\u013f\":\"L\",\"\\u0141\":\"L\",\"\\u013a\":\"l\",\"\\u013c\":\"l\",\"\\u013e\":\"l\",\"\\u0140\":\"l\",\"\\u0142\":\"l\",\"\\u0143\":\"N\",\"\\u0145\":\"N\",\"\\u0147\":\"N\",\"\\u014a\":\"N\",\"\\u0144\":\"n\",\"\\u0146\":\"n\",\"\\u0148\":\"n\",\"\\u014b\":\"n\",\"\\u014c\":\"O\",\n\"\\u014e\":\"O\",\"\\u0150\":\"O\",\"\\u014d\":\"o\",\"\\u014f\":\"o\",\"\\u0151\":\"o\",\"\\u0154\":\"R\",\"\\u0156\":\"R\",\"\\u0158\":\"R\",\"\\u0155\":\"r\",\"\\u0157\":\"r\",\"\\u0159\":\"r\",\"\\u015a\":\"S\",\"\\u015c\":\"S\",\"\\u015e\":\"S\",\"\\u0160\":\"S\",\"\\u015b\":\"s\",\"\\u015d\":\"s\",\"\\u015f\":\"s\",\"\\u0161\":\"s\",\"\\u0162\":\"T\",\"\\u0164\":\"T\",\"\\u0166\":\"T\",\"\\u0163\":\"t\",\"\\u0165\":\"t\",\"\\u0167\":\"t\",\"\\u0168\":\"U\",\"\\u016a\":\"U\",\"\\u016c\":\"U\",\"\\u016e\":\"U\",\"\\u0170\":\"U\",\"\\u0172\":\"U\",\"\\u0169\":\"u\",\"\\u016b\":\"u\",\"\\u016d\":\"u\",\"\\u016f\":\"u\",\"\\u0171\":\"u\",\"\\u0173\":\"u\",\"\\u0174\":\"W\",\"\\u0175\":\"w\",\n\"\\u0176\":\"Y\",\"\\u0177\":\"y\",\"\\u0178\":\"Y\",\"\\u0179\":\"Z\",\"\\u017b\":\"Z\",\"\\u017d\":\"Z\",\"\\u017a\":\"z\",\"\\u017c\":\"z\",\"\\u017e\":\"z\",\"\\u0132\":\"IJ\",\"\\u0133\":\"ij\",\"\\u0152\":\"Oe\",\"\\u0153\":\"oe\",\"\\u0149\":\"'n\",\"\\u017f\":\"s\"},Hr={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"},Jr={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"',\"'\":\"'\"},Yr={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},Qr=parseFloat,Xr=parseInt,ne=\"object\"==typeof global&&global&&global.Object===Object&&global,te=\"object\"==typeof self&&self&&self.Object===Object&&self,re=ne||te||Function(\"return this\")(),ee=\"object\"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ee&&\"object\"==typeof module&&module&&!module.nodeType&&module,ie=ue&&ue.exports===ee,oe=ie&&ne.process,fe=function(){\ntry{var n=ue&&ue.require&&ue.require(\"util\").types;return n?n:oe&&oe.binding&&oe.binding(\"util\")}catch(n){}}(),ce=fe&&fe.isArrayBuffer,ae=fe&&fe.isDate,le=fe&&fe.isMap,se=fe&&fe.isRegExp,he=fe&&fe.isSet,pe=fe&&fe.isTypedArray,_e=m(\"length\"),ve=x(Gr),ge=x(Hr),ye=x(Jr),de=function p(x){function Z(n){if(cc(n)&&!bh(n)&&!(n instanceof Ct)){if(n instanceof Y)return n;if(bl.call(n,\"__wrapped__\"))return eo(n)}return new Y(n)}function J(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,\nthis.__index__=0,this.__values__=X}function Ct(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Un,this.__views__=[]}function $t(){var n=new Ct(this.__wrapped__);return n.__actions__=Tu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tu(this.__views__),n}function Yt(){if(this.__filtered__){var n=new Ct(this);n.__dir__=-1,\nn.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Qt(){var n=this.__wrapped__.value(),t=this.__dir__,r=bh(n),e=t<0,u=r?n.length:0,i=Oi(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Hl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return wu(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==zn)g=w;else if(!w){if(b==Rn)continue n;break n}}_[h++]=g}return _}function Xt(n){\nvar t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function nr(){this.__data__=is?is(null):{},this.size=0}function tr(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function rr(n){var t=this.__data__;if(is){var r=t[n];return r===on?X:r}return bl.call(t,n)?t[n]:X}function er(n){var t=this.__data__;return is?t[n]!==X:bl.call(t,n)}function ur(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=is&&t===X?on:t,this}function ir(n){\nvar t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function or(){this.__data__=[],this.size=0}function fr(n){var t=this.__data__,r=Wr(t,n);return!(r<0)&&(r==t.length-1?t.pop():Ll.call(t,r,1),--this.size,!0)}function cr(n){var t=this.__data__,r=Wr(t,n);return r<0?X:t[r][1]}function ar(n){return Wr(this.__data__,n)>-1}function lr(n,t){var r=this.__data__,e=Wr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function sr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){\nvar e=n[t];this.set(e[0],e[1])}}function hr(){this.size=0,this.__data__={hash:new Xt,map:new(ts||ir),string:new Xt}}function pr(n){var t=xi(this,n).delete(n);return this.size-=t?1:0,t}function _r(n){return xi(this,n).get(n)}function vr(n){return xi(this,n).has(n)}function gr(n,t){var r=xi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function yr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new sr;++t<r;)this.add(n[t])}function dr(n){return this.__data__.set(n,on),this}function br(n){\nreturn this.__data__.has(n)}function wr(n){this.size=(this.__data__=new ir(n)).size}function mr(){this.__data__=new ir,this.size=0}function xr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function jr(n){return this.__data__.get(n)}function Ar(n){return this.__data__.has(n)}function kr(n,t){var r=this.__data__;if(r instanceof ir){var e=r.__data__;if(!ts||e.length<tn-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new sr(e)}return r.set(n,t),this.size=r.size,this}function Or(n,t){\nvar r=bh(n),e=!r&&dh(n),u=!r&&!e&&mh(n),i=!r&&!e&&!u&&Oh(n),o=r||e||u||i,f=o?O(n.length,hl):[],c=f.length;for(var a in n)!t&&!bl.call(n,a)||o&&(\"length\"==a||u&&(\"offset\"==a||\"parent\"==a)||i&&(\"buffer\"==a||\"byteLength\"==a||\"byteOffset\"==a)||Ci(a,c))||f.push(a);return f}function Ir(n){var t=n.length;return t?n[tu(0,t-1)]:X}function Rr(n,t){return Xi(Tu(n),Mr(t,0,n.length))}function zr(n){return Xi(Tu(n))}function Er(n,t,r){(r===X||Gf(n[t],r))&&(r!==X||t in n)||Br(n,t,r)}function Sr(n,t,r){var e=n[t];\nbl.call(n,t)&&Gf(e,r)&&(r!==X||t in n)||Br(n,t,r)}function Wr(n,t){for(var r=n.length;r--;)if(Gf(n[r][0],t))return r;return-1}function Lr(n,t,r,e){return ys(n,function(n,u,i){t(e,n,r(n),i)}),e}function Cr(n,t){return n&&$u(t,Pc(t),n)}function Ur(n,t){return n&&$u(t,qc(t),n)}function Br(n,t,r){\"__proto__\"==t&&Tl?Tl(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=il(e),i=null==n;++r<e;)u[r]=i?X:Mc(n,t[r]);return u}function Mr(n,t,r){return n===n&&(r!==X&&(n=n<=r?n:r),\nt!==X&&(n=n>=t?n:t)),n}function Fr(n,t,e,u,i,o){var f,c=t&an,a=t&ln,l=t&sn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==X)return f;if(!fc(n))return n;var s=bh(n);if(s){if(f=zi(n),!c)return Tu(n,f)}else{var h=zs(n),p=h==Kn||h==Vn;if(mh(n))return Iu(n,c);if(h==Yn||h==Dn||p&&!i){if(f=a||p?{}:Ei(n),!c)return a?Mu(n,Ur(f,n)):Du(n,Cr(f,n))}else{if(!Vr[h])return i?n:{};f=Si(n,h,c)}}o||(o=new wr);var _=o.get(n);if(_)return _;o.set(n,f),kh(n)?n.forEach(function(r){f.add(Fr(r,t,e,r,n,o))}):jh(n)&&n.forEach(function(r,u){\nf.set(u,Fr(r,t,e,u,n,o))});var v=l?a?di:yi:a?qc:Pc,g=s?X:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),Sr(f,u,Fr(r,t,e,u,n,o))}),f}function Nr(n){var t=Pc(n);return function(r){return Pr(r,n,t)}}function Pr(n,t,r){var e=r.length;if(null==n)return!e;for(n=ll(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===X&&!(u in n)||!i(o))return!1}return!0}function Gr(n,t,r){if(\"function\"!=typeof n)throw new pl(en);return Ws(function(){n.apply(X,r)},t)}function Hr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length;\nif(!l)return s;r&&(t=c(t,z(r))),e?(i=f,a=!1):t.length>=tn&&(i=S,a=!1,t=new yr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Jr(n,t){var r=!0;return ys(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===X?o===o&&!bc(o):r(o,f)))var f=o,c=i}return c}function ne(n,t,r,e){var u=n.length;for(r=kc(r),r<0&&(r=-r>u?0:u+r),\ne=e===X||e>u?u:kc(e),e<0&&(e+=u),e=r>e?0:Oc(e);r<e;)n[r++]=t;return n}function te(n,t){var r=[];return ys(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ee(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Li),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?ee(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ue(n,t){return n&&bs(n,t,Pc)}function oe(n,t){return n&&ws(n,t,Pc)}function fe(n,t){return i(t,function(t){return uc(n[t])})}function _e(n,t){t=ku(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[no(t[r++])];\nreturn r&&r==e?n:X}function de(n,t,r){var e=t(n);return bh(n)?e:a(e,r(n))}function we(n){return null==n?n===X?ut:Jn:Bl&&Bl in ll(n)?ki(n):Ki(n)}function me(n,t){return n>t}function xe(n,t){return null!=n&&bl.call(n,t)}function je(n,t){return null!=n&&t in ll(n)}function Ae(n,t,r){return n>=Hl(t,r)&&n<Gl(t,r)}function ke(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=il(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,z(t))),s=Hl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new yr(a&&p):X}p=n[0];\nvar _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?S(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?S(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Oe(n,t,r,e){return ue(n,function(n,u,i){t(e,r(n),u,i)}),e}function Ie(t,r,e){r=ku(r,t),t=Gi(t,r);var u=null==t?t:t[no(jo(r))];return null==u?X:n(u,t,e)}function Re(n){return cc(n)&&we(n)==Dn}function ze(n){return cc(n)&&we(n)==ft}function Ee(n){return cc(n)&&we(n)==Pn}function Se(n,t,r,e,u){\nreturn n===t||(null==n||null==t||!cc(n)&&!cc(t)?n!==n&&t!==t:We(n,t,r,e,Se,u))}function We(n,t,r,e,u,i){var o=bh(n),f=bh(t),c=o?Mn:zs(n),a=f?Mn:zs(t);c=c==Dn?Yn:c,a=a==Dn?Yn:a;var l=c==Yn,s=a==Yn,h=c==a;if(h&&mh(n)){if(!mh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new wr),o||Oh(n)?pi(n,t,r,e,u,i):_i(n,t,c,r,e,u,i);if(!(r&hn)){var p=l&&bl.call(n,\"__wrapped__\"),_=s&&bl.call(t,\"__wrapped__\");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new wr),u(v,g,r,e,i)}}return!!h&&(i||(i=new wr),vi(n,t,r,e,u,i));\n}function Le(n){return cc(n)&&zs(n)==Gn}function Ce(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ll(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===X&&!(c in n))return!1}else{var s=new wr;if(e)var h=e(a,l,c,n,t,s);if(!(h===X?Se(l,a,hn|pn,e,s):h))return!1}}return!0}function Ue(n){return!(!fc(n)||Di(n))&&(uc(n)?kl:Zt).test(to(n))}function Be(n){return cc(n)&&we(n)==nt}function Te(n){return cc(n)&&zs(n)==tt;\n}function $e(n){return cc(n)&&oc(n.length)&&!!Kr[we(n)]}function De(n){return\"function\"==typeof n?n:null==n?La:\"object\"==typeof n?bh(n)?Ze(n[0],n[1]):qe(n):Fa(n)}function Me(n){if(!Mi(n))return Vl(n);var t=[];for(var r in ll(n))bl.call(n,r)&&\"constructor\"!=r&&t.push(r);return t}function Fe(n){if(!fc(n))return Zi(n);var t=Mi(n),r=[];for(var e in n)(\"constructor\"!=e||!t&&bl.call(n,e))&&r.push(e);return r}function Ne(n,t){return n<t}function Pe(n,t){var r=-1,e=Hf(n)?il(n.length):[];return ys(n,function(n,u,i){\ne[++r]=t(n,u,i)}),e}function qe(n){var t=ji(n);return 1==t.length&&t[0][2]?Ni(t[0][0],t[0][1]):function(r){return r===n||Ce(r,n,t)}}function Ze(n,t){return Bi(n)&&Fi(t)?Ni(no(n),t):function(r){var e=Mc(r,n);return e===X&&e===t?Nc(r,n):Se(t,e,hn|pn)}}function Ke(n,t,r,e,u){n!==t&&bs(t,function(i,o){if(u||(u=new wr),fc(i))Ve(n,t,o,r,Ke,e,u);else{var f=e?e(Ji(n,o),i,o+\"\",n,t,u):X;f===X&&(f=i),Er(n,o,f)}},qc)}function Ve(n,t,r,e,u,i,o){var f=Ji(n,r),c=Ji(t,r),a=o.get(c);if(a)return Er(n,r,a),X;var l=i?i(f,c,r+\"\",n,t,o):X,s=l===X;\nif(s){var h=bh(c),p=!h&&mh(c),_=!h&&!p&&Oh(c);l=c,h||p||_?bh(f)?l=f:Jf(f)?l=Tu(f):p?(s=!1,l=Iu(c,!0)):_?(s=!1,l=Wu(c,!0)):l=[]:gc(c)||dh(c)?(l=f,dh(f)?l=Rc(f):fc(f)&&!uc(f)||(l=Ei(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Er(n,r,l)}function Ge(n,t){var r=n.length;if(r)return t+=t<0?r:0,Ci(t,r)?n[t]:X}function He(n,t,r){t=t.length?c(t,function(n){return bh(n)?function(t){return _e(t,1===n.length?n[0]:n)}:n}):[La];var e=-1;return t=c(t,z(mi())),A(Pe(n,function(n,r,u){return{criteria:c(t,function(t){\nreturn t(n)}),index:++e,value:n}}),function(n,t){return Cu(n,t,r)})}function Je(n,t){return Ye(n,t,function(t,r){return Nc(n,r)})}function Ye(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=_e(n,o);r(f,o)&&fu(i,ku(o,n),f)}return i}function Qe(n){return function(t){return _e(t,n)}}function Xe(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Tu(t)),r&&(f=c(n,z(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Ll.call(f,a,1),Ll.call(n,a,1);return n}function nu(n,t){for(var r=n?t.length:0,e=r-1;r--;){\nvar u=t[r];if(r==e||u!==i){var i=u;Ci(u)?Ll.call(n,u,1):yu(n,u)}}return n}function tu(n,t){return n+Nl(Ql()*(t-n+1))}function ru(n,t,r,e){for(var u=-1,i=Gl(Fl((t-n)/(r||1)),0),o=il(i);i--;)o[e?i:++u]=n,n+=r;return o}function eu(n,t){var r=\"\";if(!n||t<1||t>Wn)return r;do t%2&&(r+=n),t=Nl(t/2),t&&(n+=n);while(t);return r}function uu(n,t){return Ls(Vi(n,t,La),n+\"\")}function iu(n){return Ir(ra(n))}function ou(n,t){var r=ra(n);return Xi(r,Mr(t,0,r.length))}function fu(n,t,r,e){if(!fc(n))return n;t=ku(t,n);\nfor(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=no(t[u]),a=r;if(\"__proto__\"===c||\"constructor\"===c||\"prototype\"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):X,a===X&&(a=fc(l)?l:Ci(t[u+1])?[]:{})}Sr(f,c,a),f=f[c]}return n}function cu(n){return Xi(ra(n))}function au(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=il(u);++e<u;)i[e]=n[e+t];return i}function lu(n,t){var r;return ys(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function su(n,t,r){\nvar e=0,u=null==n?e:n.length;if(\"number\"==typeof t&&t===t&&u<=Tn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!bc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return hu(n,t,La,r)}function hu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=bc(t),a=t===X;u<i;){var l=Nl((u+i)/2),s=r(n[l]),h=s!==X,p=null===s,_=s===s,v=bc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Hl(i,Bn)}function pu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){\nvar o=n[r],f=t?t(o):o;if(!r||!Gf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function _u(n){return\"number\"==typeof n?n:bc(n)?Cn:+n}function vu(n){if(\"string\"==typeof n)return n;if(bh(n))return c(n,vu)+\"\";if(bc(n))return vs?vs.call(n):\"\";var t=n+\"\";return\"0\"==t&&1/n==-Sn?\"-0\":t}function gu(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=tn){var s=t?null:ks(n);if(s)return P(s);c=!1,u=S,l=new yr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n;\nt&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function yu(n,t){return t=ku(t,n),n=Gi(n,t),null==n||delete n[no(jo(t))]}function du(n,t,r,e){return fu(n,t,r(_e(n,t)),e)}function bu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?au(n,e?0:i,e?i+1:u):au(n,e?i+1:0,e?u:i)}function wu(n,t){var r=n;return r instanceof Ct&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mu(n,t,r){var e=n.length;if(e<2)return e?gu(n[0]):[];\nfor(var u=-1,i=il(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Hr(i[u]||o,n[f],t,r));return gu(ee(i,1),t,r)}function xu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:X)}return o}function ju(n){return Jf(n)?n:[]}function Au(n){return\"function\"==typeof n?n:La}function ku(n,t){return bh(n)?n:Bi(n,t)?[n]:Cs(Ec(n))}function Ou(n,t,r){var e=n.length;return r=r===X?e:r,!t&&r>=e?n:au(n,t,r)}function Iu(n,t){if(t)return n.slice();var r=n.length,e=zl?zl(r):new n.constructor(r);\nreturn n.copy(e),e}function Ru(n){var t=new n.constructor(n.byteLength);return new Rl(t).set(new Rl(n)),t}function zu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Eu(n){var t=new n.constructor(n.source,Nt.exec(n));return t.lastIndex=n.lastIndex,t}function Su(n){return _s?ll(_s.call(n)):{}}function Wu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.length)}function Lu(n,t){if(n!==t){var r=n!==X,e=null===n,u=n===n,i=bc(n),o=t!==X,f=null===t,c=t===t,a=bc(t);\nif(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=Lu(u[e],i[e]);if(c){if(e>=f)return c;return c*(\"desc\"==r[e]?-1:1)}}return n.index-t.index}function Uu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Gl(i-o,0),l=il(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l;\n}function Bu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Gl(i-f,0),s=il(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Tu(n,t){var r=-1,e=n.length;for(t||(t=il(e));++r<e;)t[r]=n[r];return t}function $u(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):X;c===X&&(c=n[f]),u?Br(r,f,c):Sr(r,f,c)}return r}function Du(n,t){return $u(n,Is(n),t)}function Mu(n,t){return $u(n,Rs(n),t);\n}function Fu(n,r){return function(e,u){var i=bh(e)?t:Lr,o=r?r():{};return i(e,n,mi(u,2),o)}}function Nu(n){return uu(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:X,o=u>2?r[2]:X;for(i=n.length>3&&\"function\"==typeof i?(u--,i):X,o&&Ui(r[0],r[1],o)&&(i=u<3?X:i,u=1),t=ll(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Pu(n,t){return function(r,e){if(null==r)return r;if(!Hf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ll(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function qu(n){return function(t,r,e){\nfor(var u=-1,i=ll(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Zu(n,t,r){function e(){return(this&&this!==re&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&_n,i=Gu(n);return e}function Ku(n){return function(t){t=Ec(t);var r=T(t)?G(t):X,e=r?r[0]:t.charAt(0),u=r?Ou(r,1).join(\"\"):t.slice(1);return e[n]()+u}}function Vu(n){return function(t){return l(Ra(ca(t).replace($r,\"\")),n,\"\")}}function Gu(n){return function(){var t=arguments;switch(t.length){\ncase 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=gs(n.prototype),e=n.apply(r,t);return fc(e)?e:r}}function Hu(t,r,e){function u(){for(var o=arguments.length,f=il(o),c=o,a=wi(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:N(f,a);\nreturn o-=l.length,o<e?oi(t,r,Qu,u.placeholder,X,f,l,X,X,e-o):n(this&&this!==re&&this instanceof u?i:t,this,f)}var i=Gu(t);return u}function Ju(n){return function(t,r,e){var u=ll(t);if(!Hf(t)){var i=mi(r,3);t=Pc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:X}}function Yu(n){return gi(function(t){var r=t.length,e=r,u=Y.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if(\"function\"!=typeof i)throw new pl(en);if(u&&!o&&\"wrapper\"==bi(i))var o=new Y([],!0)}for(e=o?e:r;++e<r;){\ni=t[e];var f=bi(i),c=\"wrapper\"==f?Os(i):X;o=c&&$i(c[0])&&c[1]==(mn|yn|bn|xn)&&!c[4].length&&1==c[9]?o[bi(c[0])].apply(o,c[3]):1==i.length&&$i(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&bh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Qu(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=il(y),b=y;b--;)d[b]=arguments[b];if(_)var w=wi(l),m=C(d,w);if(e&&(d=Uu(d,e,u,_)),i&&(d=Bu(d,i,o,_)),\ny-=m,_&&y<a){return oi(n,t,Qu,l.placeholder,r,d,N(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Hi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==re&&this instanceof l&&(j=g||Gu(j)),j.apply(x,d)}var s=t&mn,h=t&_n,p=t&vn,_=t&(yn|dn),v=t&jn,g=p?X:Gu(n);return l}function Xu(n,t){return function(r,e){return Oe(r,n,t(e),{})}}function ni(n,t){return function(r,e){var u;if(r===X&&e===X)return t;if(r!==X&&(u=r),e!==X){if(u===X)return e;\"string\"==typeof r||\"string\"==typeof e?(r=vu(r),\ne=vu(e)):(r=_u(r),e=_u(e)),u=n(r,e)}return u}}function ti(t){return gi(function(r){return r=c(r,z(mi())),uu(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ri(n,t){t=t===X?\" \":vu(t);var r=t.length;if(r<2)return r?eu(t,n):t;var e=eu(t,Fl(n/V(t)));return T(t)?Ou(G(e),0,n).join(\"\"):e.slice(0,n)}function ei(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=il(l+c),h=this&&this!==re&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r];\nreturn n(h,o?e:this,s)}var o=r&_n,f=Gu(t);return i}function ui(n){return function(t,r,e){return e&&\"number\"!=typeof e&&Ui(t,r,e)&&(r=e=X),t=Ac(t),r===X?(r=t,t=0):r=Ac(r),e=e===X?t<r?1:-1:Ac(e),ru(t,r,e,n)}}function ii(n){return function(t,r){return\"string\"==typeof t&&\"string\"==typeof r||(t=Ic(t),r=Ic(r)),n(t,r)}}function oi(n,t,r,e,u,i,o,f,c,a){var l=t&yn,s=l?o:X,h=l?X:o,p=l?i:X,_=l?X:i;t|=l?bn:wn,t&=~(l?wn:bn),t&gn||(t&=~(_n|vn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(X,v);return $i(n)&&Ss(g,v),g.placeholder=e,\nYi(g,n,t)}function fi(n){var t=al[n];return function(n,r){if(n=Ic(n),r=null==r?0:Hl(kc(r),292),r&&Zl(n)){var e=(Ec(n)+\"e\").split(\"e\");return e=(Ec(t(e[0]+\"e\"+(+e[1]+r)))+\"e\").split(\"e\"),+(e[0]+\"e\"+(+e[1]-r))}return t(n)}}function ci(n){return function(t){var r=zs(t);return r==Gn?M(t):r==tt?q(t):I(t,n(t))}}function ai(n,t,r,e,u,i,o,f){var c=t&vn;if(!c&&\"function\"!=typeof n)throw new pl(en);var a=e?e.length:0;if(a||(t&=~(bn|wn),e=u=X),o=o===X?o:Gl(kc(o),0),f=f===X?f:kc(f),a-=u?u.length:0,t&wn){var l=e,s=u;\ne=u=X}var h=c?X:Os(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&qi(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===X?c?0:n.length:Gl(p[9]-a,0),!f&&t&(yn|dn)&&(t&=~(yn|dn)),t&&t!=_n)_=t==yn||t==dn?Hu(n,t,f):t!=bn&&t!=(_n|bn)||u.length?Qu.apply(X,p):ei(n,t,r,e);else var _=Zu(n,t,r);return Yi((h?ms:Ss)(_,p),n,t)}function li(n,t,r,e){return n===X||Gf(n,gl[r])&&!bl.call(e,r)?t:n}function si(n,t,r,e,u,i){return fc(n)&&fc(t)&&(i.set(t,n),Ke(n,t,X,si,i),i.delete(t)),n}function hi(n){return gc(n)?X:n}function pi(n,t,r,e,u,i){\nvar o=r&hn,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&pn?new yr:X;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==X){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){if(!S(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function _i(n,t,r,e,u,i,o){switch(r){case ct:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1;\nn=n.buffer,t=t.buffer;case ft:return!(n.byteLength!=t.byteLength||!i(new Rl(n),new Rl(t)));case Nn:case Pn:case Hn:return Gf(+n,+t);case Zn:return n.name==t.name&&n.message==t.message;case nt:case rt:return n==t+\"\";case Gn:var f=M;case tt:var c=e&hn;if(f||(f=P),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=pn,o.set(n,t);var l=pi(f(n),f(t),e,u,i,o);return o.delete(n),l;case et:if(_s)return _s.call(n)==_s.call(t)}return!1}function vi(n,t,r,e,u,i){var o=r&hn,f=yi(n),c=f.length;if(c!=yi(t).length&&!o)return!1;\nfor(var a=c;a--;){var l=f[a];if(!(o?l in t:bl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===X?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_=\"constructor\"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&\"constructor\"in n&&\"constructor\"in t&&!(\"function\"==typeof d&&d instanceof d&&\"function\"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n),\ni.delete(t),p}function gi(n){return Ls(Vi(n,X,_o),n+\"\")}function yi(n){return de(n,Pc,Is)}function di(n){return de(n,qc,Rs)}function bi(n){for(var t=n.name+\"\",r=fs[t],e=bl.call(fs,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function wi(n){return(bl.call(Z,\"placeholder\")?Z:n).placeholder}function mi(){var n=Z.iteratee||Ca;return n=n===Ca?De:n,arguments.length?n(arguments[0],arguments[1]):n}function xi(n,t){var r=n.__data__;return Ti(t)?r[\"string\"==typeof t?\"string\":\"hash\"]:r.map;\n}function ji(n){for(var t=Pc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Fi(u)]}return t}function Ai(n,t){var r=B(n,t);return Ue(r)?r:X}function ki(n){var t=bl.call(n,Bl),r=n[Bl];try{n[Bl]=X;var e=!0}catch(n){}var u=xl.call(n);return e&&(t?n[Bl]=r:delete n[Bl]),u}function Oi(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case\"drop\":n+=o;break;case\"dropRight\":t-=o;break;case\"take\":t=Hl(t,n+o);break;case\"takeRight\":n=Gl(n,t-o)}}return{start:n,end:t}}function Ii(n){var t=n.match(Bt);\nreturn t?t[1].split(Tt):[]}function Ri(n,t,r){t=ku(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=no(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&oc(u)&&Ci(o,u)&&(bh(n)||dh(n)))}function zi(n){var t=n.length,r=new n.constructor(t);return t&&\"string\"==typeof n[0]&&bl.call(n,\"index\")&&(r.index=n.index,r.input=n.input),r}function Ei(n){return\"function\"!=typeof n.constructor||Mi(n)?{}:gs(El(n))}function Si(n,t,r){var e=n.constructor;switch(t){case ft:return Ru(n);\ncase Nn:case Pn:return new e(+n);case ct:return zu(n,r);case at:case lt:case st:case ht:case pt:case _t:case vt:case gt:case yt:return Wu(n,r);case Gn:return new e;case Hn:case rt:return new e(n);case nt:return Eu(n);case tt:return new e;case et:return Su(n)}}function Wi(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?\"& \":\"\")+t[e],t=t.join(r>2?\", \":\" \"),n.replace(Ut,\"{\\n/* [wrapped with \"+t+\"] */\\n\")}function Li(n){return bh(n)||dh(n)||!!(Cl&&n&&n[Cl])}function Ci(n,t){var r=typeof n;\nreturn t=null==t?Wn:t,!!t&&(\"number\"==r||\"symbol\"!=r&&Vt.test(n))&&n>-1&&n%1==0&&n<t}function Ui(n,t,r){if(!fc(r))return!1;var e=typeof t;return!!(\"number\"==e?Hf(r)&&Ci(t,r.length):\"string\"==e&&t in r)&&Gf(r[t],n)}function Bi(n,t){if(bh(n))return!1;var r=typeof n;return!(\"number\"!=r&&\"symbol\"!=r&&\"boolean\"!=r&&null!=n&&!bc(n))||(zt.test(n)||!Rt.test(n)||null!=t&&n in ll(t))}function Ti(n){var t=typeof n;return\"string\"==t||\"number\"==t||\"symbol\"==t||\"boolean\"==t?\"__proto__\"!==n:null===n}function $i(n){\nvar t=bi(n),r=Z[t];if(\"function\"!=typeof r||!(t in Ct.prototype))return!1;if(n===r)return!0;var e=Os(r);return!!e&&n===e[0]}function Di(n){return!!ml&&ml in n}function Mi(n){var t=n&&n.constructor;return n===(\"function\"==typeof t&&t.prototype||gl)}function Fi(n){return n===n&&!fc(n)}function Ni(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==X||n in ll(r)))}}function Pi(n){var t=Cf(n,function(n){return r.size===fn&&r.clear(),n}),r=t.cache;return t}function qi(n,t){var r=n[1],e=t[1],u=r|e,i=u<(_n|vn|mn),o=e==mn&&r==yn||e==mn&&r==xn&&n[7].length<=t[8]||e==(mn|xn)&&t[7].length<=t[8]&&r==yn;\nif(!i&&!o)return n;e&_n&&(n[2]=t[2],u|=r&_n?0:gn);var f=t[3];if(f){var c=n[3];n[3]=c?Uu(c,f,t[4]):f,n[4]=c?N(n[3],cn):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Bu(c,f,t[6]):f,n[6]=c?N(n[5],cn):t[6]),f=t[7],f&&(n[7]=f),e&mn&&(n[8]=null==n[8]?t[8]:Hl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Zi(n){var t=[];if(null!=n)for(var r in ll(n))t.push(r);return t}function Ki(n){return xl.call(n)}function Vi(t,r,e){return r=Gl(r===X?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Gl(u.length-r,0),f=il(o);++i<o;)f[i]=u[r+i];\ni=-1;for(var c=il(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Gi(n,t){return t.length<2?n:_e(n,au(t,0,-1))}function Hi(n,t){for(var r=n.length,e=Hl(t.length,r),u=Tu(n);e--;){var i=t[e];n[e]=Ci(i,r)?u[i]:X}return n}function Ji(n,t){if((\"constructor\"!==t||\"function\"!=typeof n[t])&&\"__proto__\"!=t)return n[t]}function Yi(n,t,r){var e=t+\"\";return Ls(n,Wi(e,ro(Ii(e),r)))}function Qi(n){var t=0,r=0;return function(){var e=Jl(),u=In-(e-r);if(r=e,u>0){if(++t>=On)return arguments[0]}else t=0;\nreturn n.apply(X,arguments)}}function Xi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===X?e:t;++r<t;){var i=tu(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function no(n){if(\"string\"==typeof n||bc(n))return n;var t=n+\"\";return\"0\"==t&&1/n==-Sn?\"-0\":t}function to(n){if(null!=n){try{return dl.call(n)}catch(n){}try{return n+\"\"}catch(n){}}return\"\"}function ro(n,t){return r($n,function(r){var e=\"_.\"+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function eo(n){if(n instanceof Ct)return n.clone();var t=new Y(n.__wrapped__,n.__chain__);\nreturn t.__actions__=Tu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function uo(n,t,r){t=(r?Ui(n,t,r):t===X)?1:Gl(kc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=il(Fl(e/t));u<e;)o[i++]=au(n,u,u+=t);return o}function io(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function oo(){var n=arguments.length;if(!n)return[];for(var t=il(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(bh(r)?Tu(r):[r],ee(t,1));\n}function fo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),au(n,t<0?0:t,e)):[]}function co(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,0,t<0?0:t)):[]}function ao(n,t){return n&&n.length?bu(n,mi(t,3),!0,!0):[]}function lo(n,t){return n&&n.length?bu(n,mi(t,3),!0):[]}function so(n,t,r,e){var u=null==n?0:n.length;return u?(r&&\"number\"!=typeof r&&Ui(n,t,r)&&(r=0,e=u),ne(n,t,r,e)):[]}function ho(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);\nreturn u<0&&(u=Gl(e+u,0)),g(n,mi(t,3),u)}function po(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==X&&(u=kc(r),u=r<0?Gl(e+u,0):Hl(u,e-1)),g(n,mi(t,3),u,!0)}function _o(n){return(null==n?0:n.length)?ee(n,1):[]}function vo(n){return(null==n?0:n.length)?ee(n,Sn):[]}function go(n,t){return(null==n?0:n.length)?(t=t===X?1:kc(t),ee(n,t)):[]}function yo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function bo(n){return n&&n.length?n[0]:X}function wo(n,t,r){\nvar e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);return u<0&&(u=Gl(e+u,0)),y(n,t,u)}function mo(n){return(null==n?0:n.length)?au(n,0,-1):[]}function xo(n,t){return null==n?\"\":Kl.call(n,t)}function jo(n){var t=null==n?0:n.length;return t?n[t-1]:X}function Ao(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==X&&(u=kc(r),u=u<0?Gl(e+u,0):Hl(u,e-1)),t===t?K(n,t,u):g(n,b,u,!0)}function ko(n,t){return n&&n.length?Ge(n,kc(t)):X}function Oo(n,t){return n&&n.length&&t&&t.length?Xe(n,t):n;\n}function Io(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,mi(r,2)):n}function Ro(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,X,r):n}function zo(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=mi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return nu(n,u),r}function Eo(n){return null==n?n:Xl.call(n)}function So(n,t,r){var e=null==n?0:n.length;return e?(r&&\"number\"!=typeof r&&Ui(n,t,r)?(t=0,r=e):(t=null==t?0:kc(t),r=r===X?e:kc(r)),au(n,t,r)):[]}function Wo(n,t){\nreturn su(n,t)}function Lo(n,t,r){return hu(n,t,mi(r,2))}function Co(n,t){var r=null==n?0:n.length;if(r){var e=su(n,t);if(e<r&&Gf(n[e],t))return e}return-1}function Uo(n,t){return su(n,t,!0)}function Bo(n,t,r){return hu(n,t,mi(r,2),!0)}function To(n,t){if(null==n?0:n.length){var r=su(n,t,!0)-1;if(Gf(n[r],t))return r}return-1}function $o(n){return n&&n.length?pu(n):[]}function Do(n,t){return n&&n.length?pu(n,mi(t,2)):[]}function Mo(n){var t=null==n?0:n.length;return t?au(n,1,t):[]}function Fo(n,t,r){\nreturn n&&n.length?(t=r||t===X?1:kc(t),au(n,0,t<0?0:t)):[]}function No(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,t<0?0:t,e)):[]}function Po(n,t){return n&&n.length?bu(n,mi(t,3),!1,!0):[]}function qo(n,t){return n&&n.length?bu(n,mi(t,3)):[]}function Zo(n){return n&&n.length?gu(n):[]}function Ko(n,t){return n&&n.length?gu(n,mi(t,2)):[]}function Vo(n,t){return t=\"function\"==typeof t?t:X,n&&n.length?gu(n,X,t):[]}function Go(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){\nif(Jf(n))return t=Gl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Ho(t,r){if(!t||!t.length)return[];var e=Go(t);return null==r?e:c(e,function(t){return n(r,X,t)})}function Jo(n,t){return xu(n||[],t||[],Sr)}function Yo(n,t){return xu(n||[],t||[],fu)}function Qo(n){var t=Z(n);return t.__chain__=!0,t}function Xo(n,t){return t(n),n}function nf(n,t){return t(n)}function tf(){return Qo(this)}function rf(){return new Y(this.value(),this.__chain__)}function ef(){this.__values__===X&&(this.__values__=jc(this.value()));\nvar n=this.__index__>=this.__values__.length;return{done:n,value:n?X:this.__values__[this.__index__++]}}function uf(){return this}function of(n){for(var t,r=this;r instanceof J;){var e=eo(r);e.__index__=0,e.__values__=X,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function ff(){var n=this.__wrapped__;if(n instanceof Ct){var t=n;return this.__actions__.length&&(t=new Ct(this)),t=t.reverse(),t.__actions__.push({func:nf,args:[Eo],thisArg:X}),new Y(t,this.__chain__)}return this.thru(Eo);\n}function cf(){return wu(this.__wrapped__,this.__actions__)}function af(n,t,r){var e=bh(n)?u:Jr;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function lf(n,t){return(bh(n)?i:te)(n,mi(t,3))}function sf(n,t){return ee(yf(n,t),1)}function hf(n,t){return ee(yf(n,t),Sn)}function pf(n,t,r){return r=r===X?1:kc(r),ee(yf(n,t),r)}function _f(n,t){return(bh(n)?r:ys)(n,mi(t,3))}function vf(n,t){return(bh(n)?e:ds)(n,mi(t,3))}function gf(n,t,r,e){n=Hf(n)?n:ra(n),r=r&&!e?kc(r):0;var u=n.length;return r<0&&(r=Gl(u+r,0)),\ndc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function yf(n,t){return(bh(n)?c:Pe)(n,mi(t,3))}function df(n,t,r,e){return null==n?[]:(bh(t)||(t=null==t?[]:[t]),r=e?X:r,bh(r)||(r=null==r?[]:[r]),He(n,t,r))}function bf(n,t,r){var e=bh(n)?l:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ys)}function wf(n,t,r){var e=bh(n)?s:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ds)}function mf(n,t){return(bh(n)?i:te)(n,Uf(mi(t,3)))}function xf(n){return(bh(n)?Ir:iu)(n)}function jf(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),\n(bh(n)?Rr:ou)(n,t)}function Af(n){return(bh(n)?zr:cu)(n)}function kf(n){if(null==n)return 0;if(Hf(n))return dc(n)?V(n):n.length;var t=zs(n);return t==Gn||t==tt?n.size:Me(n).length}function Of(n,t,r){var e=bh(n)?h:lu;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function If(n,t){if(\"function\"!=typeof t)throw new pl(en);return n=kc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Rf(n,t,r){return t=r?X:t,t=n&&null==t?n.length:t,ai(n,mn,X,X,X,X,t)}function zf(n,t){var r;if(\"function\"!=typeof t)throw new pl(en);\nreturn n=kc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=X),r}}function Ef(n,t,r){t=r?X:t;var e=ai(n,yn,X,X,X,X,X,t);return e.placeholder=Ef.placeholder,e}function Sf(n,t,r){t=r?X:t;var e=ai(n,dn,X,X,X,X,X,t);return e.placeholder=Sf.placeholder,e}function Wf(n,t,r){function e(t){var r=h,e=p;return h=p=X,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Ws(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Hl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===X||r>=t||r<0||w&&e>=_;\n}function f(){var n=fh();return o(n)?c(n):(g=Ws(f,i(n)),X)}function c(n){return g=X,m&&h?e(n):(h=p=X,v)}function a(){g!==X&&As(g),d=0,h=y=p=g=X}function l(){return g===X?v:c(fh())}function s(){var n=fh(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===X)return u(y);if(w)return As(g),g=Ws(f,t),e(y)}return g===X&&(g=Ws(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if(\"function\"!=typeof n)throw new pl(en);return t=Ic(t)||0,fc(r)&&(b=!!r.leading,w=\"maxWait\"in r,_=w?Gl(Ic(r.maxWait)||0,t):_,m=\"trailing\"in r?!!r.trailing:m),\ns.cancel=a,s.flush=l,s}function Lf(n){return ai(n,jn)}function Cf(n,t){if(\"function\"!=typeof n||null!=t&&\"function\"!=typeof t)throw new pl(en);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Cf.Cache||sr),r}function Uf(n){if(\"function\"!=typeof n)throw new pl(en);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:\nreturn!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Bf(n){return zf(2,n)}function Tf(n,t){if(\"function\"!=typeof n)throw new pl(en);return t=t===X?t:kc(t),uu(n,t)}function $f(t,r){if(\"function\"!=typeof t)throw new pl(en);return r=null==r?0:Gl(kc(r),0),uu(function(e){var u=e[r],i=Ou(e,0,r);return u&&a(i,u),n(t,this,i)})}function Df(n,t,r){var e=!0,u=!0;if(\"function\"!=typeof n)throw new pl(en);return fc(r)&&(e=\"leading\"in r?!!r.leading:e,u=\"trailing\"in r?!!r.trailing:u),\nWf(n,t,{leading:e,maxWait:t,trailing:u})}function Mf(n){return Rf(n,1)}function Ff(n,t){return ph(Au(t),n)}function Nf(){if(!arguments.length)return[];var n=arguments[0];return bh(n)?n:[n]}function Pf(n){return Fr(n,sn)}function qf(n,t){return t=\"function\"==typeof t?t:X,Fr(n,sn,t)}function Zf(n){return Fr(n,an|sn)}function Kf(n,t){return t=\"function\"==typeof t?t:X,Fr(n,an|sn,t)}function Vf(n,t){return null==t||Pr(n,t,Pc(t))}function Gf(n,t){return n===t||n!==n&&t!==t}function Hf(n){return null!=n&&oc(n.length)&&!uc(n);\n}function Jf(n){return cc(n)&&Hf(n)}function Yf(n){return n===!0||n===!1||cc(n)&&we(n)==Nn}function Qf(n){return cc(n)&&1===n.nodeType&&!gc(n)}function Xf(n){if(null==n)return!0;if(Hf(n)&&(bh(n)||\"string\"==typeof n||\"function\"==typeof n.splice||mh(n)||Oh(n)||dh(n)))return!n.length;var t=zs(n);if(t==Gn||t==tt)return!n.size;if(Mi(n))return!Me(n).length;for(var r in n)if(bl.call(n,r))return!1;return!0}function nc(n,t){return Se(n,t)}function tc(n,t,r){r=\"function\"==typeof r?r:X;var e=r?r(n,t):X;return e===X?Se(n,t,X,r):!!e;\n}function rc(n){if(!cc(n))return!1;var t=we(n);return t==Zn||t==qn||\"string\"==typeof n.message&&\"string\"==typeof n.name&&!gc(n)}function ec(n){return\"number\"==typeof n&&Zl(n)}function uc(n){if(!fc(n))return!1;var t=we(n);return t==Kn||t==Vn||t==Fn||t==Xn}function ic(n){return\"number\"==typeof n&&n==kc(n)}function oc(n){return\"number\"==typeof n&&n>-1&&n%1==0&&n<=Wn}function fc(n){var t=typeof n;return null!=n&&(\"object\"==t||\"function\"==t)}function cc(n){return null!=n&&\"object\"==typeof n}function ac(n,t){\nreturn n===t||Ce(n,t,ji(t))}function lc(n,t,r){return r=\"function\"==typeof r?r:X,Ce(n,t,ji(t),r)}function sc(n){return vc(n)&&n!=+n}function hc(n){if(Es(n))throw new fl(rn);return Ue(n)}function pc(n){return null===n}function _c(n){return null==n}function vc(n){return\"number\"==typeof n||cc(n)&&we(n)==Hn}function gc(n){if(!cc(n)||we(n)!=Yn)return!1;var t=El(n);if(null===t)return!0;var r=bl.call(t,\"constructor\")&&t.constructor;return\"function\"==typeof r&&r instanceof r&&dl.call(r)==jl}function yc(n){\nreturn ic(n)&&n>=-Wn&&n<=Wn}function dc(n){return\"string\"==typeof n||!bh(n)&&cc(n)&&we(n)==rt}function bc(n){return\"symbol\"==typeof n||cc(n)&&we(n)==et}function wc(n){return n===X}function mc(n){return cc(n)&&zs(n)==it}function xc(n){return cc(n)&&we(n)==ot}function jc(n){if(!n)return[];if(Hf(n))return dc(n)?G(n):Tu(n);if(Ul&&n[Ul])return D(n[Ul]());var t=zs(n);return(t==Gn?M:t==tt?P:ra)(n)}function Ac(n){if(!n)return 0===n?n:0;if(n=Ic(n),n===Sn||n===-Sn){return(n<0?-1:1)*Ln}return n===n?n:0}function kc(n){\nvar t=Ac(n),r=t%1;return t===t?r?t-r:t:0}function Oc(n){return n?Mr(kc(n),0,Un):0}function Ic(n){if(\"number\"==typeof n)return n;if(bc(n))return Cn;if(fc(n)){var t=\"function\"==typeof n.valueOf?n.valueOf():n;n=fc(t)?t+\"\":t}if(\"string\"!=typeof n)return 0===n?n:+n;n=R(n);var r=qt.test(n);return r||Kt.test(n)?Xr(n.slice(2),r?2:8):Pt.test(n)?Cn:+n}function Rc(n){return $u(n,qc(n))}function zc(n){return n?Mr(kc(n),-Wn,Wn):0===n?n:0}function Ec(n){return null==n?\"\":vu(n)}function Sc(n,t){var r=gs(n);return null==t?r:Cr(r,t);\n}function Wc(n,t){return v(n,mi(t,3),ue)}function Lc(n,t){return v(n,mi(t,3),oe)}function Cc(n,t){return null==n?n:bs(n,mi(t,3),qc)}function Uc(n,t){return null==n?n:ws(n,mi(t,3),qc)}function Bc(n,t){return n&&ue(n,mi(t,3))}function Tc(n,t){return n&&oe(n,mi(t,3))}function $c(n){return null==n?[]:fe(n,Pc(n))}function Dc(n){return null==n?[]:fe(n,qc(n))}function Mc(n,t,r){var e=null==n?X:_e(n,t);return e===X?r:e}function Fc(n,t){return null!=n&&Ri(n,t,xe)}function Nc(n,t){return null!=n&&Ri(n,t,je);\n}function Pc(n){return Hf(n)?Or(n):Me(n)}function qc(n){return Hf(n)?Or(n,!0):Fe(n)}function Zc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,t(n,e,u),n)}),r}function Kc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,e,t(n,e,u))}),r}function Vc(n,t){return Gc(n,Uf(mi(t)))}function Gc(n,t){if(null==n)return{};var r=c(di(n),function(n){return[n]});return t=mi(t),Ye(n,r,function(n,r){return t(n,r[0])})}function Hc(n,t,r){t=ku(t,n);var e=-1,u=t.length;for(u||(u=1,n=X);++e<u;){var i=null==n?X:n[no(t[e])];\ni===X&&(e=u,i=r),n=uc(i)?i.call(n):i}return n}function Jc(n,t,r){return null==n?n:fu(n,t,r)}function Yc(n,t,r,e){return e=\"function\"==typeof e?e:X,null==n?n:fu(n,t,r,e)}function Qc(n,t,e){var u=bh(n),i=u||mh(n)||Oh(n);if(t=mi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:fc(n)&&uc(o)?gs(El(n)):{}}return(i?r:ue)(n,function(n,r,u){return t(e,n,r,u)}),e}function Xc(n,t){return null==n||yu(n,t)}function na(n,t,r){return null==n?n:du(n,t,Au(r))}function ta(n,t,r,e){return e=\"function\"==typeof e?e:X,\nnull==n?n:du(n,t,Au(r),e)}function ra(n){return null==n?[]:E(n,Pc(n))}function ea(n){return null==n?[]:E(n,qc(n))}function ua(n,t,r){return r===X&&(r=t,t=X),r!==X&&(r=Ic(r),r=r===r?r:0),t!==X&&(t=Ic(t),t=t===t?t:0),Mr(Ic(n),t,r)}function ia(n,t,r){return t=Ac(t),r===X?(r=t,t=0):r=Ac(r),n=Ic(n),Ae(n,t,r)}function oa(n,t,r){if(r&&\"boolean\"!=typeof r&&Ui(n,t,r)&&(t=r=X),r===X&&(\"boolean\"==typeof t?(r=t,t=X):\"boolean\"==typeof n&&(r=n,n=X)),n===X&&t===X?(n=0,t=1):(n=Ac(n),t===X?(t=n,n=0):t=Ac(t)),n>t){\nvar e=n;n=t,t=e}if(r||n%1||t%1){var u=Ql();return Hl(n+u*(t-n+Qr(\"1e-\"+((u+\"\").length-1))),t)}return tu(n,t)}function fa(n){return Qh(Ec(n).toLowerCase())}function ca(n){return n=Ec(n),n&&n.replace(Gt,ve).replace(Dr,\"\")}function aa(n,t,r){n=Ec(n),t=vu(t);var e=n.length;r=r===X?e:Mr(kc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function la(n){return n=Ec(n),n&&At.test(n)?n.replace(xt,ge):n}function sa(n){return n=Ec(n),n&&Wt.test(n)?n.replace(St,\"\\\\$&\"):n}function ha(n,t,r){n=Ec(n),t=kc(t);\nvar e=t?V(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ri(Nl(u),r)+n+ri(Fl(u),r)}function pa(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?n+ri(t-e,r):n}function _a(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?ri(t-e,r)+n:n}function va(n,t,r){return r||null==t?t=0:t&&(t=+t),Yl(Ec(n).replace(Lt,\"\"),t||0)}function ga(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),eu(Ec(n),t)}function ya(){var n=arguments,t=Ec(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function da(n,t,r){return r&&\"number\"!=typeof r&&Ui(n,t,r)&&(t=r=X),\n(r=r===X?Un:r>>>0)?(n=Ec(n),n&&(\"string\"==typeof t||null!=t&&!Ah(t))&&(t=vu(t),!t&&T(n))?Ou(G(n),0,r):n.split(t,r)):[]}function ba(n,t,r){return n=Ec(n),r=null==r?0:Mr(kc(r),0,n.length),t=vu(t),n.slice(r,r+t.length)==t}function wa(n,t,r){var e=Z.templateSettings;r&&Ui(n,t,r)&&(t=X),n=Ec(n),t=Sh({},t,e,li);var u,i,o=Sh({},t.imports,e.imports,li),f=Pc(o),c=E(o,f),a=0,l=t.interpolate||Ht,s=\"__p += '\",h=sl((t.escape||Ht).source+\"|\"+l.source+\"|\"+(l===It?Ft:Ht).source+\"|\"+(t.evaluate||Ht).source+\"|$\",\"g\"),p=\"//# sourceURL=\"+(bl.call(t,\"sourceURL\")?(t.sourceURL+\"\").replace(/\\s/g,\" \"):\"lodash.templateSources[\"+ ++Zr+\"]\")+\"\\n\";\nn.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Jt,U),r&&(u=!0,s+=\"' +\\n__e(\"+r+\") +\\n'\"),f&&(i=!0,s+=\"';\\n\"+f+\";\\n__p += '\"),e&&(s+=\"' +\\n((__t = (\"+e+\")) == null ? '' : __t) +\\n'\"),a=c+t.length,t}),s+=\"';\\n\";var _=bl.call(t,\"variable\")&&t.variable;if(_){if(Dt.test(_))throw new fl(un)}else s=\"with (obj) {\\n\"+s+\"\\n}\\n\";s=(i?s.replace(dt,\"\"):s).replace(bt,\"$1\").replace(wt,\"$1;\"),s=\"function(\"+(_||\"obj\")+\") {\\n\"+(_?\"\":\"obj || (obj = {});\\n\")+\"var __t, __p = ''\"+(u?\", __e = _.escape\":\"\")+(i?\", __j = Array.prototype.join;\\nfunction print() { __p += __j.call(arguments, '') }\\n\":\";\\n\")+s+\"return __p\\n}\";\nvar v=Xh(function(){return cl(f,p+\"return \"+s).apply(X,c)});if(v.source=s,rc(v))throw v;return v}function ma(n){return Ec(n).toLowerCase()}function xa(n){return Ec(n).toUpperCase()}function ja(n,t,r){if(n=Ec(n),n&&(r||t===X))return R(n);if(!n||!(t=vu(t)))return n;var e=G(n),u=G(t);return Ou(e,W(e,u),L(e,u)+1).join(\"\")}function Aa(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.slice(0,H(n)+1);if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,0,L(e,G(t))+1).join(\"\")}function ka(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.replace(Lt,\"\");\nif(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,W(e,G(t))).join(\"\")}function Oa(n,t){var r=An,e=kn;if(fc(t)){var u=\"separator\"in t?t.separator:u;r=\"length\"in t?kc(t.length):r,e=\"omission\"in t?vu(t.omission):e}n=Ec(n);var i=n.length;if(T(n)){var o=G(n);i=o.length}if(r>=i)return n;var f=r-V(e);if(f<1)return e;var c=o?Ou(o,0,f).join(\"\"):n.slice(0,f);if(u===X)return c+e;if(o&&(f+=c.length-f),Ah(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=sl(u.source,Ec(Nt.exec(u))+\"g\")),u.lastIndex=0;a=u.exec(l);)var s=a.index;\nc=c.slice(0,s===X?f:s)}}else if(n.indexOf(vu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Ia(n){return n=Ec(n),n&&jt.test(n)?n.replace(mt,ye):n}function Ra(n,t,r){return n=Ec(n),t=r?X:t,t===X?$(n)?Q(n):_(n):n.match(t)||[]}function za(t){var r=null==t?0:t.length,e=mi();return t=r?c(t,function(n){if(\"function\"!=typeof n[1])throw new pl(en);return[e(n[0]),n[1]]}):[],uu(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})}function Ea(n){\nreturn Nr(Fr(n,an))}function Sa(n){return function(){return n}}function Wa(n,t){return null==n||n!==n?t:n}function La(n){return n}function Ca(n){return De(\"function\"==typeof n?n:Fr(n,an))}function Ua(n){return qe(Fr(n,an))}function Ba(n,t){return Ze(n,Fr(t,an))}function Ta(n,t,e){var u=Pc(t),i=fe(t,u);null!=e||fc(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=fe(t,Pc(t)));var o=!(fc(e)&&\"chain\"in e&&!e.chain),f=uc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;\nif(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function $a(){return re._===this&&(re._=Al),this}function Da(){}function Ma(n){return n=kc(n),uu(function(t){return Ge(t,n)})}function Fa(n){return Bi(n)?m(no(n)):Qe(n)}function Na(n){return function(t){return null==n?X:_e(n,t)}}function Pa(){return[]}function qa(){return!1}function Za(){return{}}function Ka(){return\"\";\n}function Va(){return!0}function Ga(n,t){if(n=kc(n),n<1||n>Wn)return[];var r=Un,e=Hl(n,Un);t=mi(t),n-=Un;for(var u=O(e,t);++r<n;)t(r);return u}function Ha(n){return bh(n)?c(n,no):bc(n)?[n]:Tu(Cs(Ec(n)))}function Ja(n){var t=++wl;return Ec(n)+t}function Ya(n){return n&&n.length?Yr(n,La,me):X}function Qa(n,t){return n&&n.length?Yr(n,mi(t,2),me):X}function Xa(n){return w(n,La)}function nl(n,t){return w(n,mi(t,2))}function tl(n){return n&&n.length?Yr(n,La,Ne):X}function rl(n,t){return n&&n.length?Yr(n,mi(t,2),Ne):X;\n}function el(n){return n&&n.length?k(n,La):0}function ul(n,t){return n&&n.length?k(n,mi(t,2)):0}x=null==x?re:be.defaults(re.Object(),x,be.pick(re,qr));var il=x.Array,ol=x.Date,fl=x.Error,cl=x.Function,al=x.Math,ll=x.Object,sl=x.RegExp,hl=x.String,pl=x.TypeError,_l=il.prototype,vl=cl.prototype,gl=ll.prototype,yl=x[\"__core-js_shared__\"],dl=vl.toString,bl=gl.hasOwnProperty,wl=0,ml=function(){var n=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||\"\");return n?\"Symbol(src)_1.\"+n:\"\"}(),xl=gl.toString,jl=dl.call(ll),Al=re._,kl=sl(\"^\"+dl.call(bl).replace(St,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),Ol=ie?x.Buffer:X,Il=x.Symbol,Rl=x.Uint8Array,zl=Ol?Ol.allocUnsafe:X,El=F(ll.getPrototypeOf,ll),Sl=ll.create,Wl=gl.propertyIsEnumerable,Ll=_l.splice,Cl=Il?Il.isConcatSpreadable:X,Ul=Il?Il.iterator:X,Bl=Il?Il.toStringTag:X,Tl=function(){\ntry{var n=Ai(ll,\"defineProperty\");return n({},\"\",{}),n}catch(n){}}(),$l=x.clearTimeout!==re.clearTimeout&&x.clearTimeout,Dl=ol&&ol.now!==re.Date.now&&ol.now,Ml=x.setTimeout!==re.setTimeout&&x.setTimeout,Fl=al.ceil,Nl=al.floor,Pl=ll.getOwnPropertySymbols,ql=Ol?Ol.isBuffer:X,Zl=x.isFinite,Kl=_l.join,Vl=F(ll.keys,ll),Gl=al.max,Hl=al.min,Jl=ol.now,Yl=x.parseInt,Ql=al.random,Xl=_l.reverse,ns=Ai(x,\"DataView\"),ts=Ai(x,\"Map\"),rs=Ai(x,\"Promise\"),es=Ai(x,\"Set\"),us=Ai(x,\"WeakMap\"),is=Ai(ll,\"create\"),os=us&&new us,fs={},cs=to(ns),as=to(ts),ls=to(rs),ss=to(es),hs=to(us),ps=Il?Il.prototype:X,_s=ps?ps.valueOf:X,vs=ps?ps.toString:X,gs=function(){\nfunction n(){}return function(t){if(!fc(t))return{};if(Sl)return Sl(t);n.prototype=t;var r=new n;return n.prototype=X,r}}();Z.templateSettings={escape:kt,evaluate:Ot,interpolate:It,variable:\"\",imports:{_:Z}},Z.prototype=J.prototype,Z.prototype.constructor=Z,Y.prototype=gs(J.prototype),Y.prototype.constructor=Y,Ct.prototype=gs(J.prototype),Ct.prototype.constructor=Ct,Xt.prototype.clear=nr,Xt.prototype.delete=tr,Xt.prototype.get=rr,Xt.prototype.has=er,Xt.prototype.set=ur,ir.prototype.clear=or,ir.prototype.delete=fr,\nir.prototype.get=cr,ir.prototype.has=ar,ir.prototype.set=lr,sr.prototype.clear=hr,sr.prototype.delete=pr,sr.prototype.get=_r,sr.prototype.has=vr,sr.prototype.set=gr,yr.prototype.add=yr.prototype.push=dr,yr.prototype.has=br,wr.prototype.clear=mr,wr.prototype.delete=xr,wr.prototype.get=jr,wr.prototype.has=Ar,wr.prototype.set=kr;var ys=Pu(ue),ds=Pu(oe,!0),bs=qu(),ws=qu(!0),ms=os?function(n,t){return os.set(n,t),n}:La,xs=Tl?function(n,t){return Tl(n,\"toString\",{configurable:!0,enumerable:!1,value:Sa(t),\nwritable:!0})}:La,js=uu,As=$l||function(n){return re.clearTimeout(n)},ks=es&&1/P(new es([,-0]))[1]==Sn?function(n){return new es(n)}:Da,Os=os?function(n){return os.get(n)}:Da,Is=Pl?function(n){return null==n?[]:(n=ll(n),i(Pl(n),function(t){return Wl.call(n,t)}))}:Pa,Rs=Pl?function(n){for(var t=[];n;)a(t,Is(n)),n=El(n);return t}:Pa,zs=we;(ns&&zs(new ns(new ArrayBuffer(1)))!=ct||ts&&zs(new ts)!=Gn||rs&&zs(rs.resolve())!=Qn||es&&zs(new es)!=tt||us&&zs(new us)!=it)&&(zs=function(n){var t=we(n),r=t==Yn?n.constructor:X,e=r?to(r):\"\";\nif(e)switch(e){case cs:return ct;case as:return Gn;case ls:return Qn;case ss:return tt;case hs:return it}return t});var Es=yl?uc:qa,Ss=Qi(ms),Ws=Ml||function(n,t){return re.setTimeout(n,t)},Ls=Qi(xs),Cs=Pi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(\"\"),n.replace(Et,function(n,r,e,u){t.push(e?u.replace(Mt,\"$1\"):r||n)}),t}),Us=uu(function(n,t){return Jf(n)?Hr(n,ee(t,1,Jf,!0)):[]}),Bs=uu(function(n,t){var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),mi(r,2)):[]}),Ts=uu(function(n,t){\nvar r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),X,r):[]}),$s=uu(function(n){var t=c(n,ju);return t.length&&t[0]===n[0]?ke(t):[]}),Ds=uu(function(n){var t=jo(n),r=c(n,ju);return t===jo(r)?t=X:r.pop(),r.length&&r[0]===n[0]?ke(r,mi(t,2)):[]}),Ms=uu(function(n){var t=jo(n),r=c(n,ju);return t=\"function\"==typeof t?t:X,t&&r.pop(),r.length&&r[0]===n[0]?ke(r,X,t):[]}),Fs=uu(Oo),Ns=gi(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return nu(n,c(t,function(n){return Ci(n,r)?+n:n}).sort(Lu)),e}),Ps=uu(function(n){\nreturn gu(ee(n,1,Jf,!0))}),qs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),gu(ee(n,1,Jf,!0),mi(t,2))}),Zs=uu(function(n){var t=jo(n);return t=\"function\"==typeof t?t:X,gu(ee(n,1,Jf,!0),X,t)}),Ks=uu(function(n,t){return Jf(n)?Hr(n,t):[]}),Vs=uu(function(n){return mu(i(n,Jf))}),Gs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),mu(i(n,Jf),mi(t,2))}),Hs=uu(function(n){var t=jo(n);return t=\"function\"==typeof t?t:X,mu(i(n,Jf),X,t)}),Js=uu(Go),Ys=uu(function(n){var t=n.length,r=t>1?n[t-1]:X;return r=\"function\"==typeof r?(n.pop(),\nr):X,Ho(n,r)}),Qs=gi(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Ct&&Ci(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:nf,args:[u],thisArg:X}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(X),n})):this.thru(u)}),Xs=Fu(function(n,t,r){bl.call(n,r)?++n[r]:Br(n,r,1)}),nh=Ju(ho),th=Ju(po),rh=Fu(function(n,t,r){bl.call(n,r)?n[r].push(t):Br(n,r,[t])}),eh=uu(function(t,r,e){var u=-1,i=\"function\"==typeof r,o=Hf(t)?il(t.length):[];\nreturn ys(t,function(t){o[++u]=i?n(r,t,e):Ie(t,r,e)}),o}),uh=Fu(function(n,t,r){Br(n,r,t)}),ih=Fu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),oh=uu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ui(n,t[0],t[1])?t=[]:r>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),He(n,ee(t,1),[])}),fh=Dl||function(){return re.Date.now()},ch=uu(function(n,t,r){var e=_n;if(r.length){var u=N(r,wi(ch));e|=bn}return ai(n,e,t,r,u)}),ah=uu(function(n,t,r){var e=_n|vn;if(r.length){var u=N(r,wi(ah));e|=bn;\n}return ai(t,e,n,r,u)}),lh=uu(function(n,t){return Gr(n,1,t)}),sh=uu(function(n,t,r){return Gr(n,Ic(t)||0,r)});Cf.Cache=sr;var hh=js(function(t,r){r=1==r.length&&bh(r[0])?c(r[0],z(mi())):c(ee(r,1),z(mi()));var e=r.length;return uu(function(u){for(var i=-1,o=Hl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),ph=uu(function(n,t){return ai(n,bn,X,t,N(t,wi(ph)))}),_h=uu(function(n,t){return ai(n,wn,X,t,N(t,wi(_h)))}),vh=gi(function(n,t){return ai(n,xn,X,X,X,t)}),gh=ii(me),yh=ii(function(n,t){\nreturn n>=t}),dh=Re(function(){return arguments}())?Re:function(n){return cc(n)&&bl.call(n,\"callee\")&&!Wl.call(n,\"callee\")},bh=il.isArray,wh=ce?z(ce):ze,mh=ql||qa,xh=ae?z(ae):Ee,jh=le?z(le):Le,Ah=se?z(se):Be,kh=he?z(he):Te,Oh=pe?z(pe):$e,Ih=ii(Ne),Rh=ii(function(n,t){return n<=t}),zh=Nu(function(n,t){if(Mi(t)||Hf(t))return $u(t,Pc(t),n),X;for(var r in t)bl.call(t,r)&&Sr(n,r,t[r])}),Eh=Nu(function(n,t){$u(t,qc(t),n)}),Sh=Nu(function(n,t,r,e){$u(t,qc(t),n,e)}),Wh=Nu(function(n,t,r,e){$u(t,Pc(t),n,e);\n}),Lh=gi(Tr),Ch=uu(function(n,t){n=ll(n);var r=-1,e=t.length,u=e>2?t[2]:X;for(u&&Ui(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=qc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===X||Gf(l,gl[a])&&!bl.call(n,a))&&(n[a]=i[a])}return n}),Uh=uu(function(t){return t.push(X,si),n(Mh,X,t)}),Bh=Xu(function(n,t,r){null!=t&&\"function\"!=typeof t.toString&&(t=xl.call(t)),n[t]=r},Sa(La)),Th=Xu(function(n,t,r){null!=t&&\"function\"!=typeof t.toString&&(t=xl.call(t)),bl.call(n,t)?n[t].push(r):n[t]=[r]},mi),$h=uu(Ie),Dh=Nu(function(n,t,r){\nKe(n,t,r)}),Mh=Nu(function(n,t,r,e){Ke(n,t,r,e)}),Fh=gi(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ku(t,n),e||(e=t.length>1),t}),$u(n,di(n),r),e&&(r=Fr(r,an|ln|sn,hi));for(var u=t.length;u--;)yu(r,t[u]);return r}),Nh=gi(function(n,t){return null==n?{}:Je(n,t)}),Ph=ci(Pc),qh=ci(qc),Zh=Vu(function(n,t,r){return t=t.toLowerCase(),n+(r?fa(t):t)}),Kh=Vu(function(n,t,r){return n+(r?\"-\":\"\")+t.toLowerCase()}),Vh=Vu(function(n,t,r){return n+(r?\" \":\"\")+t.toLowerCase()}),Gh=Ku(\"toLowerCase\"),Hh=Vu(function(n,t,r){\nreturn n+(r?\"_\":\"\")+t.toLowerCase()}),Jh=Vu(function(n,t,r){return n+(r?\" \":\"\")+Qh(t)}),Yh=Vu(function(n,t,r){return n+(r?\" \":\"\")+t.toUpperCase()}),Qh=Ku(\"toUpperCase\"),Xh=uu(function(t,r){try{return n(t,X,r)}catch(n){return rc(n)?n:new fl(n)}}),np=gi(function(n,t){return r(t,function(t){t=no(t),Br(n,t,ch(n[t],n))}),n}),tp=Yu(),rp=Yu(!0),ep=uu(function(n,t){return function(r){return Ie(r,n,t)}}),up=uu(function(n,t){return function(r){return Ie(n,r,t)}}),ip=ti(c),op=ti(u),fp=ti(h),cp=ui(),ap=ui(!0),lp=ni(function(n,t){\nreturn n+t},0),sp=fi(\"ceil\"),hp=ni(function(n,t){return n/t},1),pp=fi(\"floor\"),_p=ni(function(n,t){return n*t},1),vp=fi(\"round\"),gp=ni(function(n,t){return n-t},0);return Z.after=If,Z.ary=Rf,Z.assign=zh,Z.assignIn=Eh,Z.assignInWith=Sh,Z.assignWith=Wh,Z.at=Lh,Z.before=zf,Z.bind=ch,Z.bindAll=np,Z.bindKey=ah,Z.castArray=Nf,Z.chain=Qo,Z.chunk=uo,Z.compact=io,Z.concat=oo,Z.cond=za,Z.conforms=Ea,Z.constant=Sa,Z.countBy=Xs,Z.create=Sc,Z.curry=Ef,Z.curryRight=Sf,Z.debounce=Wf,Z.defaults=Ch,Z.defaultsDeep=Uh,\nZ.defer=lh,Z.delay=sh,Z.difference=Us,Z.differenceBy=Bs,Z.differenceWith=Ts,Z.drop=fo,Z.dropRight=co,Z.dropRightWhile=ao,Z.dropWhile=lo,Z.fill=so,Z.filter=lf,Z.flatMap=sf,Z.flatMapDeep=hf,Z.flatMapDepth=pf,Z.flatten=_o,Z.flattenDeep=vo,Z.flattenDepth=go,Z.flip=Lf,Z.flow=tp,Z.flowRight=rp,Z.fromPairs=yo,Z.functions=$c,Z.functionsIn=Dc,Z.groupBy=rh,Z.initial=mo,Z.intersection=$s,Z.intersectionBy=Ds,Z.intersectionWith=Ms,Z.invert=Bh,Z.invertBy=Th,Z.invokeMap=eh,Z.iteratee=Ca,Z.keyBy=uh,Z.keys=Pc,Z.keysIn=qc,\nZ.map=yf,Z.mapKeys=Zc,Z.mapValues=Kc,Z.matches=Ua,Z.matchesProperty=Ba,Z.memoize=Cf,Z.merge=Dh,Z.mergeWith=Mh,Z.method=ep,Z.methodOf=up,Z.mixin=Ta,Z.negate=Uf,Z.nthArg=Ma,Z.omit=Fh,Z.omitBy=Vc,Z.once=Bf,Z.orderBy=df,Z.over=ip,Z.overArgs=hh,Z.overEvery=op,Z.overSome=fp,Z.partial=ph,Z.partialRight=_h,Z.partition=ih,Z.pick=Nh,Z.pickBy=Gc,Z.property=Fa,Z.propertyOf=Na,Z.pull=Fs,Z.pullAll=Oo,Z.pullAllBy=Io,Z.pullAllWith=Ro,Z.pullAt=Ns,Z.range=cp,Z.rangeRight=ap,Z.rearg=vh,Z.reject=mf,Z.remove=zo,Z.rest=Tf,\nZ.reverse=Eo,Z.sampleSize=jf,Z.set=Jc,Z.setWith=Yc,Z.shuffle=Af,Z.slice=So,Z.sortBy=oh,Z.sortedUniq=$o,Z.sortedUniqBy=Do,Z.split=da,Z.spread=$f,Z.tail=Mo,Z.take=Fo,Z.takeRight=No,Z.takeRightWhile=Po,Z.takeWhile=qo,Z.tap=Xo,Z.throttle=Df,Z.thru=nf,Z.toArray=jc,Z.toPairs=Ph,Z.toPairsIn=qh,Z.toPath=Ha,Z.toPlainObject=Rc,Z.transform=Qc,Z.unary=Mf,Z.union=Ps,Z.unionBy=qs,Z.unionWith=Zs,Z.uniq=Zo,Z.uniqBy=Ko,Z.uniqWith=Vo,Z.unset=Xc,Z.unzip=Go,Z.unzipWith=Ho,Z.update=na,Z.updateWith=ta,Z.values=ra,Z.valuesIn=ea,\nZ.without=Ks,Z.words=Ra,Z.wrap=Ff,Z.xor=Vs,Z.xorBy=Gs,Z.xorWith=Hs,Z.zip=Js,Z.zipObject=Jo,Z.zipObjectDeep=Yo,Z.zipWith=Ys,Z.entries=Ph,Z.entriesIn=qh,Z.extend=Eh,Z.extendWith=Sh,Ta(Z,Z),Z.add=lp,Z.attempt=Xh,Z.camelCase=Zh,Z.capitalize=fa,Z.ceil=sp,Z.clamp=ua,Z.clone=Pf,Z.cloneDeep=Zf,Z.cloneDeepWith=Kf,Z.cloneWith=qf,Z.conformsTo=Vf,Z.deburr=ca,Z.defaultTo=Wa,Z.divide=hp,Z.endsWith=aa,Z.eq=Gf,Z.escape=la,Z.escapeRegExp=sa,Z.every=af,Z.find=nh,Z.findIndex=ho,Z.findKey=Wc,Z.findLast=th,Z.findLastIndex=po,\nZ.findLastKey=Lc,Z.floor=pp,Z.forEach=_f,Z.forEachRight=vf,Z.forIn=Cc,Z.forInRight=Uc,Z.forOwn=Bc,Z.forOwnRight=Tc,Z.get=Mc,Z.gt=gh,Z.gte=yh,Z.has=Fc,Z.hasIn=Nc,Z.head=bo,Z.identity=La,Z.includes=gf,Z.indexOf=wo,Z.inRange=ia,Z.invoke=$h,Z.isArguments=dh,Z.isArray=bh,Z.isArrayBuffer=wh,Z.isArrayLike=Hf,Z.isArrayLikeObject=Jf,Z.isBoolean=Yf,Z.isBuffer=mh,Z.isDate=xh,Z.isElement=Qf,Z.isEmpty=Xf,Z.isEqual=nc,Z.isEqualWith=tc,Z.isError=rc,Z.isFinite=ec,Z.isFunction=uc,Z.isInteger=ic,Z.isLength=oc,Z.isMap=jh,\nZ.isMatch=ac,Z.isMatchWith=lc,Z.isNaN=sc,Z.isNative=hc,Z.isNil=_c,Z.isNull=pc,Z.isNumber=vc,Z.isObject=fc,Z.isObjectLike=cc,Z.isPlainObject=gc,Z.isRegExp=Ah,Z.isSafeInteger=yc,Z.isSet=kh,Z.isString=dc,Z.isSymbol=bc,Z.isTypedArray=Oh,Z.isUndefined=wc,Z.isWeakMap=mc,Z.isWeakSet=xc,Z.join=xo,Z.kebabCase=Kh,Z.last=jo,Z.lastIndexOf=Ao,Z.lowerCase=Vh,Z.lowerFirst=Gh,Z.lt=Ih,Z.lte=Rh,Z.max=Ya,Z.maxBy=Qa,Z.mean=Xa,Z.meanBy=nl,Z.min=tl,Z.minBy=rl,Z.stubArray=Pa,Z.stubFalse=qa,Z.stubObject=Za,Z.stubString=Ka,\nZ.stubTrue=Va,Z.multiply=_p,Z.nth=ko,Z.noConflict=$a,Z.noop=Da,Z.now=fh,Z.pad=ha,Z.padEnd=pa,Z.padStart=_a,Z.parseInt=va,Z.random=oa,Z.reduce=bf,Z.reduceRight=wf,Z.repeat=ga,Z.replace=ya,Z.result=Hc,Z.round=vp,Z.runInContext=p,Z.sample=xf,Z.size=kf,Z.snakeCase=Hh,Z.some=Of,Z.sortedIndex=Wo,Z.sortedIndexBy=Lo,Z.sortedIndexOf=Co,Z.sortedLastIndex=Uo,Z.sortedLastIndexBy=Bo,Z.sortedLastIndexOf=To,Z.startCase=Jh,Z.startsWith=ba,Z.subtract=gp,Z.sum=el,Z.sumBy=ul,Z.template=wa,Z.times=Ga,Z.toFinite=Ac,Z.toInteger=kc,\nZ.toLength=Oc,Z.toLower=ma,Z.toNumber=Ic,Z.toSafeInteger=zc,Z.toString=Ec,Z.toUpper=xa,Z.trim=ja,Z.trimEnd=Aa,Z.trimStart=ka,Z.truncate=Oa,Z.unescape=Ia,Z.uniqueId=Ja,Z.upperCase=Yh,Z.upperFirst=Qh,Z.each=_f,Z.eachRight=vf,Z.first=bo,Ta(Z,function(){var n={};return ue(Z,function(t,r){bl.call(Z.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),Z.VERSION=nn,r([\"bind\",\"bindKey\",\"curry\",\"curryRight\",\"partial\",\"partialRight\"],function(n){Z[n].placeholder=Z}),r([\"drop\",\"take\"],function(n,t){Ct.prototype[n]=function(r){\nr=r===X?1:Gl(kc(r),0);var e=this.__filtered__&&!t?new Ct(this):this.clone();return e.__filtered__?e.__takeCount__=Hl(r,e.__takeCount__):e.__views__.push({size:Hl(r,Un),type:n+(e.__dir__<0?\"Right\":\"\")}),e},Ct.prototype[n+\"Right\"]=function(t){return this.reverse()[n](t).reverse()}}),r([\"filter\",\"map\",\"takeWhile\"],function(n,t){var r=t+1,e=r==Rn||r==En;Ct.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:mi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r([\"head\",\"last\"],function(n,t){\nvar r=\"take\"+(t?\"Right\":\"\");Ct.prototype[n]=function(){return this[r](1).value()[0]}}),r([\"initial\",\"tail\"],function(n,t){var r=\"drop\"+(t?\"\":\"Right\");Ct.prototype[n]=function(){return this.__filtered__?new Ct(this):this[r](1)}}),Ct.prototype.compact=function(){return this.filter(La)},Ct.prototype.find=function(n){return this.filter(n).head()},Ct.prototype.findLast=function(n){return this.reverse().find(n)},Ct.prototype.invokeMap=uu(function(n,t){return\"function\"==typeof n?new Ct(this):this.map(function(r){\nreturn Ie(r,n,t)})}),Ct.prototype.reject=function(n){return this.filter(Uf(mi(n)))},Ct.prototype.slice=function(n,t){n=kc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Ct(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==X&&(t=kc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Ct.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ct.prototype.toArray=function(){return this.take(Un)},ue(Ct.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Z[e?\"take\"+(\"last\"==t?\"Right\":\"\"):t],i=e||/^find/.test(t);\nu&&(Z.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ct,c=o[0],l=f||bh(t),s=function(n){var t=u.apply(Z,a([n],o));return e&&h?t[0]:t};l&&r&&\"function\"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Ct(this);var g=n.apply(t,o);return g.__actions__.push({func:nf,args:[s],thisArg:X}),new Y(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r([\"pop\",\"push\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(n){\nvar t=_l[n],r=/^(?:push|sort|unshift)$/.test(n)?\"tap\":\"thru\",e=/^(?:pop|shift)$/.test(n);Z.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(bh(u)?u:[],n)}return this[r](function(r){return t.apply(bh(r)?r:[],n)})}}),ue(Ct.prototype,function(n,t){var r=Z[t];if(r){var e=r.name+\"\";bl.call(fs,e)||(fs[e]=[]),fs[e].push({name:t,func:r})}}),fs[Qu(X,vn).name]=[{name:\"wrapper\",func:X}],Ct.prototype.clone=$t,Ct.prototype.reverse=Yt,Ct.prototype.value=Qt,Z.prototype.at=Qs,\nZ.prototype.chain=tf,Z.prototype.commit=rf,Z.prototype.next=ef,Z.prototype.plant=of,Z.prototype.reverse=ff,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=cf,Z.prototype.first=Z.prototype.head,Ul&&(Z.prototype[Ul]=uf),Z},be=de();\"function\"==typeof define&&\"object\"==typeof define.amd&&define.amd?(re._=be,define(function(){return be})):ue?((ue.exports=be)._=be,ee._=be):re._=be}).call(this);","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){\"use strict\";var H;function _(){return H.apply(null,arguments)}function y(e){return e instanceof Array||\"[object Array]\"===Object.prototype.toString.call(e)}function F(e){return null!=e&&\"[object Object]\"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(c(e,t))return;return 1}function g(e){return void 0===e}function w(e){return\"number\"==typeof e||\"[object Number]\"===Object.prototype.toString.call(e)}function V(e){return e instanceof Date||\"[object Date]\"===Object.prototype.toString.call(e)}function G(e,t){for(var n=[],s=e.length,i=0;i<s;++i)n.push(t(e[i],i));return n}function E(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,\"toString\")&&(e.toString=t.toString),c(t,\"valueOf\")&&(e.valueOf=t.valueOf),e}function l(e,t,n,s){return Wt(e,t,n,s,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function A(e){var t,n,s=e._d&&!isNaN(e._d.getTime());return s&&(t=p(e),n=j.call(t.parsedDateParts,function(e){return null!=e}),s=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict)&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e)?s:(e._isValid=s,e._isValid)}function I(e){var t=l(NaN);return null!=e?E(p(t),e):p(t).userInvalidated=!0,t}var j=Array.prototype.some||function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1},Z=_.momentProperties=[],z=!1;function q(e,t){var n,s,i,r=Z.length;if(g(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),g(t._i)||(e._i=t._i),g(t._f)||(e._f=t._f),g(t._l)||(e._l=t._l),g(t._strict)||(e._strict=t._strict),g(t._tzm)||(e._tzm=t._tzm),g(t._isUTC)||(e._isUTC=t._isUTC),g(t._offset)||(e._offset=t._offset),g(t._pf)||(e._pf=p(t)),g(t._locale)||(e._locale=t._locale),0<r)for(n=0;n<r;n++)g(i=t[s=Z[n]])||(e[s]=i);return e}function $(e){q(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===z&&(z=!0,_.updateOffset(this),z=!1)}function k(e){return e instanceof $||null!=e&&null!=e._isAMomentObject}function B(e){!1===_.suppressDeprecationWarnings&&\"undefined\"!=typeof console&&console.warn&&console.warn(\"Deprecation warning: \"+e)}function e(r,a){var o=!0;return E(function(){if(null!=_.deprecationHandler&&_.deprecationHandler(null,r),o){for(var e,t,n=[],s=arguments.length,i=0;i<s;i++){if(e=\"\",\"object\"==typeof arguments[i]){for(t in e+=\"\\n[\"+i+\"] \",arguments[0])c(arguments[0],t)&&(e+=t+\": \"+arguments[0][t]+\", \");e=e.slice(0,-2)}else e=arguments[i];n.push(e)}B(r+\"\\nArguments: \"+Array.prototype.slice.call(n).join(\"\")+\"\\n\"+(new Error).stack),o=!1}return a.apply(this,arguments)},a)}var J={};function Q(e,t){null!=_.deprecationHandler&&_.deprecationHandler(e,t),J[e]||(B(t),J[e]=!0)}function a(e){return\"undefined\"!=typeof Function&&e instanceof Function||\"[object Function]\"===Object.prototype.toString.call(e)}function X(e,t){var n,s=E({},e);for(n in t)c(t,n)&&(F(e[n])&&F(t[n])?(s[n]={},E(s[n],e[n]),E(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)c(e,n)&&!c(t,n)&&F(e[n])&&(s[n]=E({},s[n]));return s}function K(e){null!=e&&this.set(e)}_.suppressDeprecationWarnings=!1,_.deprecationHandler=null;var ee=Object.keys||function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};function r(e,t,n){var s=\"\"+Math.abs(e);return(0<=e?n?\"+\":\"\":\"-\")+Math.pow(10,Math.max(0,t-s.length)).toString().substr(1)+s}var te=/(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ne=/(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},ie={};function s(e,t,n,s){var i=\"string\"==typeof s?function(){return this[s]()}:s;e&&(ie[e]=i),t&&(ie[t[0]]=function(){return r(i.apply(this,arguments),t[1],t[2])}),n&&(ie[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function re(e,t){return e.isValid()?(t=ae(t,e.localeData()),se[t]=se[t]||function(s){for(var e,i=s.match(te),t=0,r=i.length;t<r;t++)ie[i[t]]?i[t]=ie[i[t]]:i[t]=(e=i[t]).match(/\\[[\\s\\S]/)?e.replace(/^\\[|\\]$/g,\"\"):e.replace(/\\\\/g,\"\");return function(e){for(var t=\"\",n=0;n<r;n++)t+=a(i[n])?i[n].call(e,s):i[n];return t}}(t),se[t](e)):e.localeData().invalidDate()}function ae(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(ne.lastIndex=0;0<=n&&ne.test(e);)e=e.replace(ne,s),ne.lastIndex=0,--n;return e}var oe={D:\"date\",dates:\"date\",date:\"date\",d:\"day\",days:\"day\",day:\"day\",e:\"weekday\",weekdays:\"weekday\",weekday:\"weekday\",E:\"isoWeekday\",isoweekdays:\"isoWeekday\",isoweekday:\"isoWeekday\",DDD:\"dayOfYear\",dayofyears:\"dayOfYear\",dayofyear:\"dayOfYear\",h:\"hour\",hours:\"hour\",hour:\"hour\",ms:\"millisecond\",milliseconds:\"millisecond\",millisecond:\"millisecond\",m:\"minute\",minutes:\"minute\",minute:\"minute\",M:\"month\",months:\"month\",month:\"month\",Q:\"quarter\",quarters:\"quarter\",quarter:\"quarter\",s:\"second\",seconds:\"second\",second:\"second\",gg:\"weekYear\",weekyears:\"weekYear\",weekyear:\"weekYear\",GG:\"isoWeekYear\",isoweekyears:\"isoWeekYear\",isoweekyear:\"isoWeekYear\",w:\"week\",weeks:\"week\",week:\"week\",W:\"isoWeek\",isoweeks:\"isoWeek\",isoweek:\"isoWeek\",y:\"year\",years:\"year\",year:\"year\"};function o(e){return\"string\"==typeof e?oe[e]||oe[e.toLowerCase()]:void 0}function ue(e){var t,n,s={};for(n in e)c(e,n)&&(t=o(n))&&(s[t]=e[n]);return s}var le={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};var de=/\\d/,t=/\\d\\d/,he=/\\d{3}/,ce=/\\d{4}/,fe=/[+-]?\\d{6}/,n=/\\d\\d?/,me=/\\d\\d\\d\\d?/,_e=/\\d\\d\\d\\d\\d\\d?/,ye=/\\d{1,3}/,ge=/\\d{1,4}/,we=/[+-]?\\d{1,6}/,pe=/\\d+/,ke=/[+-]?\\d+/,Me=/Z|[+-]\\d\\d:?\\d\\d/gi,ve=/Z|[+-]\\d\\d(?::?\\d\\d)?/gi,i=/[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,u=/^[1-9]\\d?/,d=/^([1-9]\\d|\\d)/;function h(e,n,s){Ye[e]=a(n)?n:function(e,t){return e&&s?s:n}}function De(e,t){return c(Ye,e)?Ye[e](t._strict,t._locale):new RegExp(f(e.replace(\"\\\\\",\"\").replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function f(e){return e.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\")}function m(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var e=+e,t=0;return t=0!=e&&isFinite(e)?m(e):t}var Ye={},Se={};function v(e,n){var t,s,i=n;for(\"string\"==typeof e&&(e=[e]),w(n)&&(i=function(e,t){t[n]=M(e)}),s=e.length,t=0;t<s;t++)Se[e[t]]=i}function Oe(e,i){v(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}function be(e){return e%4==0&&e%100!=0||e%400==0}var D=0,Y=1,S=2,O=3,b=4,T=5,Te=6,xe=7,Ne=8;function We(e){return be(e)?366:365}s(\"Y\",0,0,function(){var e=this.year();return e<=9999?r(e,4):\"+\"+e}),s(0,[\"YY\",2],0,function(){return this.year()%100}),s(0,[\"YYYY\",4],0,\"year\"),s(0,[\"YYYYY\",5],0,\"year\"),s(0,[\"YYYYYY\",6,!0],0,\"year\"),h(\"Y\",ke),h(\"YY\",n,t),h(\"YYYY\",ge,ce),h(\"YYYYY\",we,fe),h(\"YYYYYY\",we,fe),v([\"YYYYY\",\"YYYYYY\"],D),v(\"YYYY\",function(e,t){t[D]=2===e.length?_.parseTwoDigitYear(e):M(e)}),v(\"YY\",function(e,t){t[D]=_.parseTwoDigitYear(e)}),v(\"Y\",function(e,t){t[D]=parseInt(e,10)}),_.parseTwoDigitYear=function(e){return M(e)+(68<M(e)?1900:2e3)};var x,Pe=Re(\"FullYear\",!0);function Re(t,n){return function(e){return null!=e?(Ue(this,t,e),_.updateOffset(this,n),this):Ce(this,t)}}function Ce(e,t){if(!e.isValid())return NaN;var n=e._d,s=e._isUTC;switch(t){case\"Milliseconds\":return s?n.getUTCMilliseconds():n.getMilliseconds();case\"Seconds\":return s?n.getUTCSeconds():n.getSeconds();case\"Minutes\":return s?n.getUTCMinutes():n.getMinutes();case\"Hours\":return s?n.getUTCHours():n.getHours();case\"Date\":return s?n.getUTCDate():n.getDate();case\"Day\":return s?n.getUTCDay():n.getDay();case\"Month\":return s?n.getUTCMonth():n.getMonth();case\"FullYear\":return s?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ue(e,t,n){var s,i,r;if(e.isValid()&&!isNaN(n)){switch(s=e._d,i=e._isUTC,t){case\"Milliseconds\":return i?s.setUTCMilliseconds(n):s.setMilliseconds(n);case\"Seconds\":return i?s.setUTCSeconds(n):s.setSeconds(n);case\"Minutes\":return i?s.setUTCMinutes(n):s.setMinutes(n);case\"Hours\":return i?s.setUTCHours(n):s.setHours(n);case\"Date\":return i?s.setUTCDate(n):s.setDate(n);case\"FullYear\":break;default:return}t=n,r=e.month(),e=29!==(e=e.date())||1!==r||be(t)?e:28,i?s.setUTCFullYear(t,r,e):s.setFullYear(t,r,e)}}function He(e,t){var n;return isNaN(e)||isNaN(t)?NaN:(n=(t%(n=12)+n)%n,e+=(t-n)/12,1==n?be(e)?29:28:31-n%7%2)}x=Array.prototype.indexOf||function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s(\"M\",[\"MM\",2],\"Mo\",function(){return this.month()+1}),s(\"MMM\",0,0,function(e){return this.localeData().monthsShort(this,e)}),s(\"MMMM\",0,0,function(e){return this.localeData().months(this,e)}),h(\"M\",n,u),h(\"MM\",n,t),h(\"MMM\",function(e,t){return t.monthsShortRegex(e)}),h(\"MMMM\",function(e,t){return t.monthsRegex(e)}),v([\"M\",\"MM\"],function(e,t){t[Y]=M(e)-1}),v([\"MMM\",\"MMMM\"],function(e,t,n,s){s=n._locale.monthsParse(e,s,n._strict);null!=s?t[Y]=s:p(n).invalidMonth=e});var Fe=\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),Le=\"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec\".split(\"_\"),Ve=/D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,Ge=i,Ee=i;function Ae(e,t){if(e.isValid()){if(\"string\"==typeof t)if(/^\\d+$/.test(t))t=M(t);else if(!w(t=e.localeData().monthsParse(t)))return;var n=(n=e.date())<29?n:Math.min(n,He(e.year(),t));e._isUTC?e._d.setUTCMonth(t,n):e._d.setMonth(t,n)}}function Ie(e){return null!=e?(Ae(this,e),_.updateOffset(this,!0),this):Ce(this,\"Month\")}function je(){function e(e,t){return t.length-e.length}for(var t,n,s=[],i=[],r=[],a=0;a<12;a++)n=l([2e3,a]),t=f(this.monthsShort(n,\"\")),n=f(this.months(n,\"\")),s.push(t),i.push(n),r.push(n),r.push(t);s.sort(e),i.sort(e),r.sort(e),this._monthsRegex=new RegExp(\"^(\"+r.join(\"|\")+\")\",\"i\"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp(\"^(\"+i.join(\"|\")+\")\",\"i\"),this._monthsShortStrictRegex=new RegExp(\"^(\"+s.join(\"|\")+\")\",\"i\")}function Ze(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function ze(e){var t;return e<100&&0<=e?((t=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,t)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function qe(e,t,n){n=7+t-n;return n-(7+ze(e,0,n).getUTCDay()-t)%7-1}function $e(e,t,n,s,i){var r,t=1+7*(t-1)+(7+n-s)%7+qe(e,s,i),n=t<=0?We(r=e-1)+t:t>We(e)?(r=e+1,t-We(e)):(r=e,t);return{year:r,dayOfYear:n}}function Be(e,t,n){var s,i,r=qe(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+N(i=e.year()-1,t,n):r>N(e.year(),t,n)?(s=r-N(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function N(e,t,n){var s=qe(e,t,n),t=qe(e+1,t,n);return(We(e)-s+t)/7}s(\"w\",[\"ww\",2],\"wo\",\"week\"),s(\"W\",[\"WW\",2],\"Wo\",\"isoWeek\"),h(\"w\",n,u),h(\"ww\",n,t),h(\"W\",n,u),h(\"WW\",n,t),Oe([\"w\",\"ww\",\"W\",\"WW\"],function(e,t,n,s){t[s.substr(0,1)]=M(e)});function Je(e,t){return e.slice(t,7).concat(e.slice(0,t))}s(\"d\",0,\"do\",\"day\"),s(\"dd\",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s(\"ddd\",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s(\"dddd\",0,0,function(e){return this.localeData().weekdays(this,e)}),s(\"e\",0,0,\"weekday\"),s(\"E\",0,0,\"isoWeekday\"),h(\"d\",n),h(\"e\",n),h(\"E\",n),h(\"dd\",function(e,t){return t.weekdaysMinRegex(e)}),h(\"ddd\",function(e,t){return t.weekdaysShortRegex(e)}),h(\"dddd\",function(e,t){return t.weekdaysRegex(e)}),Oe([\"dd\",\"ddd\",\"dddd\"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:p(n).invalidWeekday=e}),Oe([\"d\",\"e\",\"E\"],function(e,t,n,s){t[s]=M(e)});var Qe=\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),Xe=\"Sun_Mon_Tue_Wed_Thu_Fri_Sat\".split(\"_\"),Ke=\"Su_Mo_Tu_We_Th_Fr_Sa\".split(\"_\"),et=i,tt=i,nt=i;function st(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=f(this.weekdaysMin(s,\"\")),n=f(this.weekdaysShort(s,\"\")),s=f(this.weekdays(s,\"\")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp(\"^(\"+o.join(\"|\")+\")\",\"i\"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp(\"^(\"+a.join(\"|\")+\")\",\"i\"),this._weekdaysShortStrictRegex=new RegExp(\"^(\"+r.join(\"|\")+\")\",\"i\"),this._weekdaysMinStrictRegex=new RegExp(\"^(\"+i.join(\"|\")+\")\",\"i\")}function it(){return this.hours()%12||12}function rt(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}s(\"H\",[\"HH\",2],0,\"hour\"),s(\"h\",[\"hh\",2],0,it),s(\"k\",[\"kk\",2],0,function(){return this.hours()||24}),s(\"hmm\",0,0,function(){return\"\"+it.apply(this)+r(this.minutes(),2)}),s(\"hmmss\",0,0,function(){return\"\"+it.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s(\"Hmm\",0,0,function(){return\"\"+this.hours()+r(this.minutes(),2)}),s(\"Hmmss\",0,0,function(){return\"\"+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),rt(\"a\",!0),rt(\"A\",!1),h(\"a\",at),h(\"A\",at),h(\"H\",n,d),h(\"h\",n,u),h(\"k\",n,u),h(\"HH\",n,t),h(\"hh\",n,t),h(\"kk\",n,t),h(\"hmm\",me),h(\"hmmss\",_e),h(\"Hmm\",me),h(\"Hmmss\",_e),v([\"H\",\"HH\"],O),v([\"k\",\"kk\"],function(e,t,n){e=M(e);t[O]=24===e?0:e}),v([\"a\",\"A\"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),v([\"h\",\"hh\"],function(e,t,n){t[O]=M(e),p(n).bigHour=!0}),v(\"hmm\",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s)),p(n).bigHour=!0}),v(\"hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i)),p(n).bigHour=!0}),v(\"Hmm\",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s))}),v(\"Hmmss\",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i))});i=Re(\"Hours\",!0);var ot,ut={calendar:{sameDay:\"[Today at] LT\",nextDay:\"[Tomorrow at] LT\",nextWeek:\"dddd [at] LT\",lastDay:\"[Yesterday at] LT\",lastWeek:\"[Last] dddd [at] LT\",sameElse:\"L\"},longDateFormat:{LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},invalidDate:\"Invalid date\",ordinal:\"%d\",dayOfMonthOrdinalParse:/\\d{1,2}/,relativeTime:{future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",ss:\"%d seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",w:\"a week\",ww:\"%d weeks\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"},months:Fe,monthsShort:Le,week:{dow:0,doy:6},weekdays:Qe,weekdaysMin:Ke,weekdaysShort:Xe,meridiemParse:/[ap]\\.?m?\\.?/i},W={},lt={};function dt(e){return e&&e.toLowerCase().replace(\"_\",\"-\")}function ht(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=dt(e[r]).split(\"-\")).length,n=(n=dt(e[r+1]))?n.split(\"-\"):null;0<t;){if(s=ct(i.slice(0,t).join(\"-\")))return s;if(n&&n.length>=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s<n;s+=1)if(e[s]!==t[s])return s;return n}(i,n)>=t-1)break;t--}r++}return ot}function ct(t){var e,n;if(void 0===W[t]&&\"undefined\"!=typeof module&&module&&module.exports&&(n=t)&&n.match(\"^[^/\\\\\\\\]*$\"))try{e=ot._abbr,require(\"./locale/\"+t),ft(e)}catch(e){W[t]=null}return W[t]}function ft(e,t){return e&&((t=g(t)?P(e):mt(e,t))?ot=t:\"undefined\"!=typeof console&&console.warn&&console.warn(\"Locale \"+e+\" not found. Did you forget to load it?\")),ot._abbr}function mt(e,t){if(null===t)return delete W[e],null;var n,s=ut;if(t.abbr=e,null!=W[e])Q(\"defineLocaleOverride\",\"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.\"),s=W[e]._config;else if(null!=t.parentLocale)if(null!=W[t.parentLocale])s=W[t.parentLocale]._config;else{if(null==(n=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return W[e]=new K(X(s,t)),lt[e]&<[e].forEach(function(e){mt(e.name,e.config)}),ft(e),W[e]}function P(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return ot;if(!y(e)){if(t=ct(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===p(e).overflow&&(t=t[Y]<0||11<t[Y]?Y:t[S]<1||t[S]>He(t[D],t[Y])?S:t[O]<0||24<t[O]||24===t[O]&&(0!==t[b]||0!==t[T]||0!==t[Te])?O:t[b]<0||59<t[b]?b:t[T]<0||59<t[T]?T:t[Te]<0||999<t[Te]?Te:-1,p(e)._overflowDayOfYear&&(t<D||S<t)&&(t=S),p(e)._overflowWeeks&&-1===t&&(t=xe),p(e)._overflowWeekday&&-1===t&&(t=Ne),p(e).overflow=t),e}var yt=/^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,gt=/^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,wt=/Z|[+-]\\d\\d(?::?\\d\\d)?/,pt=[[\"YYYYYY-MM-DD\",/[+-]\\d{6}-\\d\\d-\\d\\d/],[\"YYYY-MM-DD\",/\\d{4}-\\d\\d-\\d\\d/],[\"GGGG-[W]WW-E\",/\\d{4}-W\\d\\d-\\d/],[\"GGGG-[W]WW\",/\\d{4}-W\\d\\d/,!1],[\"YYYY-DDD\",/\\d{4}-\\d{3}/],[\"YYYY-MM\",/\\d{4}-\\d\\d/,!1],[\"YYYYYYMMDD\",/[+-]\\d{10}/],[\"YYYYMMDD\",/\\d{8}/],[\"GGGG[W]WWE\",/\\d{4}W\\d{3}/],[\"GGGG[W]WW\",/\\d{4}W\\d{2}/,!1],[\"YYYYDDD\",/\\d{7}/],[\"YYYYMM\",/\\d{6}/,!1],[\"YYYY\",/\\d{4}/,!1]],kt=[[\"HH:mm:ss.SSSS\",/\\d\\d:\\d\\d:\\d\\d\\.\\d+/],[\"HH:mm:ss,SSSS\",/\\d\\d:\\d\\d:\\d\\d,\\d+/],[\"HH:mm:ss\",/\\d\\d:\\d\\d:\\d\\d/],[\"HH:mm\",/\\d\\d:\\d\\d/],[\"HHmmss.SSSS\",/\\d\\d\\d\\d\\d\\d\\.\\d+/],[\"HHmmss,SSSS\",/\\d\\d\\d\\d\\d\\d,\\d+/],[\"HHmmss\",/\\d\\d\\d\\d\\d\\d/],[\"HHmm\",/\\d\\d\\d\\d/],[\"HH\",/\\d\\d/]],Mt=/^\\/?Date\\((-?\\d+)/i,vt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,Dt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yt(e){var t,n,s,i,r,a,o=e._i,u=yt.exec(o)||gt.exec(o),o=pt.length,l=kt.length;if(u){for(p(e).iso=!0,t=0,n=o;t<n;t++)if(pt[t][1].exec(u[1])){i=pt[t][0],s=!1!==pt[t][2];break}if(null==i)e._isValid=!1;else{if(u[3]){for(t=0,n=l;t<n;t++)if(kt[t][1].exec(u[3])){r=(u[2]||\" \")+kt[t][0];break}if(null==r)return void(e._isValid=!1)}if(s||null==r){if(u[4]){if(!wt.exec(u[4]))return void(e._isValid=!1);a=\"Z\"}e._f=i+(r||\"\")+(a||\"\"),xt(e)}else e._isValid=!1}}else e._isValid=!1}function St(e,t,n,s,i,r){e=[function(e){e=parseInt(e,10);{if(e<=49)return 2e3+e;if(e<=999)return 1900+e}return e}(e),Le.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&e.push(parseInt(r,10)),e}function Ot(e){var t,n,s=vt.exec(e._i.replace(/\\([^()]*\\)|[\\n\\t]/g,\" \").replace(/(\\s\\s+)/g,\" \").replace(/^\\s\\s*/,\"\").replace(/\\s\\s*$/,\"\"));s?(t=St(s[4],s[3],s[2],s[5],s[6],s[7]),function(e,t,n){if(!e||Xe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay())return 1;p(n).weekdayMismatch=!0,n._isValid=!1}(s[1],t,e)&&(e._a=t,e._tzm=(t=s[8],n=s[9],s=s[10],t?Dt[t]:n?0:60*(((t=parseInt(s,10))-(n=t%100))/100)+n),e._d=ze.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0)):e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function Tt(e){var t,n,s,i,r,a,o,u,l,d,h,c=[];if(!e._d){for(s=e,i=new Date(_.now()),n=s._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()],e._w&&null==e._a[S]&&null==e._a[Y]&&(null!=(i=(s=e)._w).GG||null!=i.W||null!=i.E?(u=1,l=4,r=bt(i.GG,s._a[D],Be(R(),1,4).year),a=bt(i.W,1),((o=bt(i.E,1))<1||7<o)&&(d=!0)):(u=s._locale._week.dow,l=s._locale._week.doy,h=Be(R(),u,l),r=bt(i.gg,s._a[D],h.year),a=bt(i.w,h.week),null!=i.d?((o=i.d)<0||6<o)&&(d=!0):null!=i.e?(o=i.e+u,(i.e<0||6<i.e)&&(d=!0)):o=u),a<1||a>N(r,u,l)?p(s)._overflowWeeks=!0:null!=d?p(s)._overflowWeekday=!0:(h=$e(r,a,o,u,l),s._a[D]=h.year,s._dayOfYear=h.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[D],n[D]),(e._dayOfYear>We(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),d=ze(i,0,e._dayOfYear),e._a[Y]=d.getUTCMonth(),e._a[S]=d.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[O]&&0===e._a[b]&&0===e._a[T]&&0===e._a[Te]&&(e._nextDay=!0,e._a[O]=0),e._d=(e._useUTC?ze:Ze).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[O]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(p(e).weekdayMismatch=!0)}}function xt(e){if(e._f===_.ISO_8601)Yt(e);else if(e._f===_.RFC_2822)Ot(e);else{e._a=[],p(e).empty=!0;for(var t,n,s,i,r,a=\"\"+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],d=l.length,h=0;h<d;h++)n=l[h],(t=(a.match(De(n,e))||[])[0])&&(0<(s=a.substr(0,a.indexOf(t))).length&&p(e).unusedInput.push(s),a=a.slice(a.indexOf(t)+t.length),u+=t.length),ie[n]?(t?p(e).empty=!1:p(e).unusedTokens.push(n),s=n,r=e,null!=(i=t)&&c(Se,s)&&Se[s](i,r._a,r,s)):e._strict&&!t&&p(e).unusedTokens.push(n);p(e).charsLeftOver=o-u,0<a.length&&p(e).unusedInput.push(a),e._a[O]<=12&&!0===p(e).bigHour&&0<e._a[O]&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[O]=function(e,t,n){if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((e=e.isPM(n))&&t<12&&(t+=12),t=e||12!==t?t:0):t}(e._locale,e._a[O],e._meridiem),null!==(o=p(e).era)&&(e._a[D]=e._locale.erasConvertYear(o,e._a[D])),Tt(e),_t(e)}}function Nt(e){var t,n,s,i=e._i,r=e._f;if(e._locale=e._locale||P(e._l),null===i||void 0===r&&\"\"===i)return I({nullInput:!0});if(\"string\"==typeof i&&(e._i=i=e._locale.preparse(i)),k(i))return new $(_t(i));if(V(i))e._d=i;else if(y(r)){var a,o,u,l,d,h,c=e,f=!1,m=c._f.length;if(0===m)p(c).invalidFormat=!0,c._d=new Date(NaN);else{for(l=0;l<m;l++)d=0,h=!1,a=q({},c),null!=c._useUTC&&(a._useUTC=c._useUTC),a._f=c._f[l],xt(a),A(a)&&(h=!0),d=(d+=p(a).charsLeftOver)+10*p(a).unusedTokens.length,p(a).score=d,f?d<u&&(u=d,o=a):(null==u||d<u||h)&&(u=d,o=a,h)&&(f=!0);E(c,o||a)}}else if(r)xt(e);else if(g(r=(i=e)._i))i._d=new Date(_.now());else V(r)?i._d=new Date(r.valueOf()):\"string\"==typeof r?(n=i,null!==(t=Mt.exec(n._i))?n._d=new Date(+t[1]):(Yt(n),!1===n._isValid&&(delete n._isValid,Ot(n),!1===n._isValid)&&(delete n._isValid,n._strict?n._isValid=!1:_.createFromInputFallback(n)))):y(r)?(i._a=G(r.slice(0),function(e){return parseInt(e,10)}),Tt(i)):F(r)?(t=i)._d||(s=void 0===(n=ue(t._i)).day?n.date:n.day,t._a=G([n.year,n.month,s,n.hour,n.minute,n.second,n.millisecond],function(e){return e&&parseInt(e,10)}),Tt(t)):w(r)?i._d=new Date(r):_.createFromInputFallback(i);return A(e)||(e._d=null),e}function Wt(e,t,n,s,i){var r={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(F(e)&&L(e)||y(e)&&0===e.length)&&(e=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=i,r._l=n,r._i=e,r._f=t,r._strict=s,(i=new $(_t(Nt(i=r))))._nextDay&&(i.add(1,\"d\"),i._nextDay=void 0),i}function R(e,t,n,s){return Wt(e,t,n,s,!1)}_.createFromInputFallback=e(\"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.\",function(e){e._d=new Date(e._i+(e._useUTC?\" UTC\":\"\"))}),_.ISO_8601=function(){},_.RFC_2822=function(){};me=e(\"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:I()}),_e=e(\"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/\",function(){var e=R.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:I()});function Pt(e,t){var n,s;if(!(t=1===t.length&&y(t[0])?t[0]:t).length)return R();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Rt=[\"year\",\"quarter\",\"month\",\"week\",\"day\",\"hour\",\"minute\",\"second\",\"millisecond\"];function Ct(e){var e=ue(e),t=e.year||0,n=e.quarter||0,s=e.month||0,i=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,o=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Rt.length;for(t in e)if(c(e,t)&&(-1===x.call(Rt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[Rt[n]]){if(s)return!1;parseFloat(e[Rt[n]])!==M(e[Rt[n]])&&(s=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*o+1e3*a*60*60,this._days=+r+7*i,this._months=+s+3*n+12*t,this._data={},this._locale=P(),this._bubble()}function Ut(e){return e instanceof Ct}function Ht(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){s(e,0,0,function(){var e=this.utcOffset(),t=\"+\";return e<0&&(e=-e,t=\"-\"),t+r(~~(e/60),2)+n+r(~~e%60,2)})}Ft(\"Z\",\":\"),Ft(\"ZZ\",\"\"),h(\"Z\",ve),h(\"ZZ\",ve),v([\"Z\",\"ZZ\"],function(e,t,n){n._useUTC=!0,n._tzm=Vt(ve,e)});var Lt=/([\\+\\-]|\\d\\d)/gi;function Vt(e,t){var t=(t||\"\").match(e);return null===t?null:0===(t=60*(e=((t[t.length-1]||[])+\"\").match(Lt)||[\"-\",0,0])[1]+M(e[2]))?0:\"+\"===e[0]?t:-t}function Gt(e,t){var n;return t._isUTC?(t=t.clone(),n=(k(e)||V(e)?e:R(e)).valueOf()-t.valueOf(),t._d.setTime(t._d.valueOf()+n),_.updateOffset(t,!1),t):R(e).local()}function Et(e){return-Math.round(e._d.getTimezoneOffset())}function At(){return!!this.isValid()&&this._isUTC&&0===this._offset}_.updateOffset=function(){};var It=/^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,jt=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function C(e,t){var n,s=e;return Ut(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:w(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(t=It.exec(e))?(n=\"-\"===t[1]?-1:1,s={y:0,d:M(t[S])*n,h:M(t[O])*n,m:M(t[b])*n,s:M(t[T])*n,ms:M(Ht(1e3*t[Te]))*n}):(t=jt.exec(e))?(n=\"-\"===t[1]?-1:1,s={y:Zt(t[2],n),M:Zt(t[3],n),w:Zt(t[4],n),d:Zt(t[5],n),h:Zt(t[6],n),m:Zt(t[7],n),s:Zt(t[8],n)}):null==s?s={}:\"object\"==typeof s&&(\"from\"in s||\"to\"in s)&&(t=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Gt(t,e),e.isBefore(t)?n=zt(e,t):((n=zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(R(s.from),R(s.to)),(s={}).ms=t.milliseconds,s.M=t.months),n=new Ct(s),Ut(e)&&c(e,\"_locale\")&&(n._locale=e._locale),Ut(e)&&c(e,\"_isValid\")&&(n._isValid=e._isValid),n}function Zt(e,t){e=e&&parseFloat(e.replace(\",\",\".\"));return(isNaN(e)?0:e)*t}function zt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,\"M\").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,\"M\"),n}function qt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(Q(i,\"moment().\"+i+\"(period, number) is deprecated. Please use moment().\"+i+\"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.\"),n=e,e=t,t=n),$t(this,C(e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ht(t._days),t=Ht(t._months);e.isValid()&&(s=null==s||s,t&&Ae(e,Ce(e,\"Month\")+t*n),r&&Ue(e,\"Date\",Ce(e,\"Date\")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s)&&_.updateOffset(e,r||t)}C.fn=Ct.prototype,C.invalid=function(){return C(NaN)};Fe=qt(1,\"add\"),Qe=qt(-1,\"subtract\");function Bt(e){return\"string\"==typeof e||e instanceof String}function Jt(e){return k(e)||V(e)||Bt(e)||w(e)||function(t){var e=y(t),n=!1;e&&(n=0===t.filter(function(e){return!w(e)&&Bt(t)}).length);return e&&n}(e)||function(e){var t,n,s=F(e)&&!L(e),i=!1,r=[\"years\",\"year\",\"y\",\"months\",\"month\",\"M\",\"days\",\"day\",\"d\",\"dates\",\"date\",\"D\",\"hours\",\"hour\",\"h\",\"minutes\",\"minute\",\"m\",\"seconds\",\"second\",\"s\",\"milliseconds\",\"millisecond\",\"ms\"],a=r.length;for(t=0;t<a;t+=1)n=r[t],i=i||c(e,n);return s&&i}(e)||null==e}function Qt(e,t){var n,s;return e.date()<t.date()?-Qt(t,e):-((n=12*(t.year()-e.year())+(t.month()-e.month()))+(t-(s=e.clone().add(n,\"months\"))<0?(t-s)/(s-e.clone().add(n-1,\"months\")):(t-s)/(e.clone().add(1+n,\"months\")-s)))||0}function Xt(e){return void 0===e?this._locale._abbr:(null!=(e=P(e))&&(this._locale=e),this)}_.defaultFormat=\"YYYY-MM-DDTHH:mm:ssZ\",_.defaultFormatUtc=\"YYYY-MM-DDTHH:mm:ss[Z]\";Ke=e(\"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.\",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}var en=126227808e5;function tn(e,t){return(e%t+t)%t}function nn(e,t,n){return e<100&&0<=e?new Date(e+400,t,n)-en:new Date(e,t,n).valueOf()}function sn(e,t,n){return e<100&&0<=e?Date.UTC(e+400,t,n)-en:Date.UTC(e,t,n)}function rn(e,t){return t.erasAbbrRegex(e)}function an(){for(var e,t,n,s=[],i=[],r=[],a=[],o=this.eras(),u=0,l=o.length;u<l;++u)e=f(o[u].name),t=f(o[u].abbr),n=f(o[u].narrow),i.push(e),s.push(t),r.push(n),a.push(e),a.push(t),a.push(n);this._erasRegex=new RegExp(\"^(\"+a.join(\"|\")+\")\",\"i\"),this._erasNameRegex=new RegExp(\"^(\"+i.join(\"|\")+\")\",\"i\"),this._erasAbbrRegex=new RegExp(\"^(\"+s.join(\"|\")+\")\",\"i\"),this._erasNarrowRegex=new RegExp(\"^(\"+r.join(\"|\")+\")\",\"i\")}function on(e,t){s(0,[e,e.length],0,t)}function un(e,t,n,s,i){var r;return null==e?Be(this,s,i).year:(r=N(e,s,i),function(e,t,n,s,i){e=$e(e,t,n,s,i),t=ze(e.year,0,e.dayOfYear);return this.year(t.getUTCFullYear()),this.month(t.getUTCMonth()),this.date(t.getUTCDate()),this}.call(this,e,t=r<t?r:t,n,s,i))}s(\"N\",0,0,\"eraAbbr\"),s(\"NN\",0,0,\"eraAbbr\"),s(\"NNN\",0,0,\"eraAbbr\"),s(\"NNNN\",0,0,\"eraName\"),s(\"NNNNN\",0,0,\"eraNarrow\"),s(\"y\",[\"y\",1],\"yo\",\"eraYear\"),s(\"y\",[\"yy\",2],0,\"eraYear\"),s(\"y\",[\"yyy\",3],0,\"eraYear\"),s(\"y\",[\"yyyy\",4],0,\"eraYear\"),h(\"N\",rn),h(\"NN\",rn),h(\"NNN\",rn),h(\"NNNN\",function(e,t){return t.erasNameRegex(e)}),h(\"NNNNN\",function(e,t){return t.erasNarrowRegex(e)}),v([\"N\",\"NN\",\"NNN\",\"NNNN\",\"NNNNN\"],function(e,t,n,s){s=n._locale.erasParse(e,s,n._strict);s?p(n).era=s:p(n).invalidEra=e}),h(\"y\",pe),h(\"yy\",pe),h(\"yyy\",pe),h(\"yyyy\",pe),h(\"yo\",function(e,t){return t._eraYearOrdinalRegex||pe}),v([\"y\",\"yy\",\"yyy\",\"yyyy\"],D),v([\"yo\"],function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[D]=n._locale.eraYearOrdinalParse(e,i):t[D]=parseInt(e,10)}),s(0,[\"gg\",2],0,function(){return this.weekYear()%100}),s(0,[\"GG\",2],0,function(){return this.isoWeekYear()%100}),on(\"gggg\",\"weekYear\"),on(\"ggggg\",\"weekYear\"),on(\"GGGG\",\"isoWeekYear\"),on(\"GGGGG\",\"isoWeekYear\"),h(\"G\",ke),h(\"g\",ke),h(\"GG\",n,t),h(\"gg\",n,t),h(\"GGGG\",ge,ce),h(\"gggg\",ge,ce),h(\"GGGGG\",we,fe),h(\"ggggg\",we,fe),Oe([\"gggg\",\"ggggg\",\"GGGG\",\"GGGGG\"],function(e,t,n,s){t[s.substr(0,2)]=M(e)}),Oe([\"gg\",\"GG\"],function(e,t,n,s){t[s]=_.parseTwoDigitYear(e)}),s(\"Q\",0,\"Qo\",\"quarter\"),h(\"Q\",de),v(\"Q\",function(e,t){t[Y]=3*(M(e)-1)}),s(\"D\",[\"DD\",2],\"Do\",\"date\"),h(\"D\",n,u),h(\"DD\",n,t),h(\"Do\",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),v([\"D\",\"DD\"],S),v(\"Do\",function(e,t){t[S]=M(e.match(n)[0])});ge=Re(\"Date\",!0);s(\"DDD\",[\"DDDD\",3],\"DDDo\",\"dayOfYear\"),h(\"DDD\",ye),h(\"DDDD\",he),v([\"DDD\",\"DDDD\"],function(e,t,n){n._dayOfYear=M(e)}),s(\"m\",[\"mm\",2],0,\"minute\"),h(\"m\",n,d),h(\"mm\",n,t),v([\"m\",\"mm\"],b);var ln,ce=Re(\"Minutes\",!1),we=(s(\"s\",[\"ss\",2],0,\"second\"),h(\"s\",n,d),h(\"ss\",n,t),v([\"s\",\"ss\"],T),Re(\"Seconds\",!1));for(s(\"S\",0,0,function(){return~~(this.millisecond()/100)}),s(0,[\"SS\",2],0,function(){return~~(this.millisecond()/10)}),s(0,[\"SSS\",3],0,\"millisecond\"),s(0,[\"SSSS\",4],0,function(){return 10*this.millisecond()}),s(0,[\"SSSSS\",5],0,function(){return 100*this.millisecond()}),s(0,[\"SSSSSS\",6],0,function(){return 1e3*this.millisecond()}),s(0,[\"SSSSSSS\",7],0,function(){return 1e4*this.millisecond()}),s(0,[\"SSSSSSSS\",8],0,function(){return 1e5*this.millisecond()}),s(0,[\"SSSSSSSSS\",9],0,function(){return 1e6*this.millisecond()}),h(\"S\",ye,de),h(\"SS\",ye,t),h(\"SSS\",ye,he),ln=\"SSSS\";ln.length<=9;ln+=\"S\")h(ln,pe);function dn(e,t){t[Te]=M(1e3*(\"0.\"+e))}for(ln=\"S\";ln.length<=9;ln+=\"S\")v(ln,dn);fe=Re(\"Milliseconds\",!1),s(\"z\",0,0,\"zoneAbbr\"),s(\"zz\",0,0,\"zoneName\");u=$.prototype;function hn(e){return e}u.add=Fe,u.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):function(e){for(var t=F(e)&&!L(e),n=!1,s=[\"sameDay\",\"nextDay\",\"lastDay\",\"nextWeek\",\"lastWeek\",\"sameElse\"],i=0;i<s.length;i+=1)n=n||c(e,s[i]);return t&&n}(arguments[0])&&(t=arguments[0],e=void 0):t=e=void 0);var e=e||R(),n=Gt(e,this).startOf(\"day\"),n=_.calendarFormat(this,n)||\"sameElse\",t=t&&(a(t[n])?t[n].call(this,e):t[n]);return this.format(t||this.localeData().calendar(n,this,R(e)))},u.clone=function(){return new $(this)},u.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Gt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=o(t)){case\"year\":r=Qt(this,s)/12;break;case\"month\":r=Qt(this,s);break;case\"quarter\":r=Qt(this,s)/3;break;case\"second\":r=(this-s)/1e3;break;case\"minute\":r=(this-s)/6e4;break;case\"hour\":r=(this-s)/36e5;break;case\"day\":r=(this-s-i)/864e5;break;case\"week\":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:m(r)},u.endOf=function(e){var t,n;if(void 0!==(e=o(e))&&\"millisecond\"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case\"year\":t=n(this.year()+1,0,1)-1;break;case\"quarter\":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case\"month\":t=n(this.year(),this.month()+1,1)-1;break;case\"week\":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case\"isoWeek\":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case\"day\":case\"date\":t=n(this.year(),this.month(),this.date()+1)-1;break;case\"hour\":t=this._d.valueOf(),t+=36e5-tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case\"minute\":t=this._d.valueOf(),t+=6e4-tn(t,6e4)-1;break;case\"second\":t=this._d.valueOf(),t+=1e3-tn(t,1e3)-1;break}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.format=function(e){return e=e||(this.isUtc()?_.defaultFormatUtc:_.defaultFormat),e=re(this,e),this.localeData().postformat(e)},u.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.fromNow=function(e){return this.from(R(),e)},u.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||R(e).isValid())?C({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},u.toNow=function(e){return this.to(R(),e)},u.get=function(e){return a(this[e=o(e)])?this[e]():this},u.invalidAt=function(){return p(this).overflow},u.isAfter=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&(\"millisecond\"===(t=o(t)||\"millisecond\")?this.valueOf()>e.valueOf():e.valueOf()<this.clone().startOf(t).valueOf())},u.isBefore=function(e,t){return e=k(e)?e:R(e),!(!this.isValid()||!e.isValid())&&(\"millisecond\"===(t=o(t)||\"millisecond\")?this.valueOf()<e.valueOf():this.clone().endOf(t).valueOf()<e.valueOf())},u.isBetween=function(e,t,n,s){return e=k(e)?e:R(e),t=k(t)?t:R(t),!!(this.isValid()&&e.isValid()&&t.isValid())&&(\"(\"===(s=s||\"()\")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(\")\"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},u.isSame=function(e,t){var e=k(e)?e:R(e);return!(!this.isValid()||!e.isValid())&&(\"millisecond\"===(t=o(t)||\"millisecond\")?this.valueOf()===e.valueOf():(e=e.valueOf(),this.clone().startOf(t).valueOf()<=e&&e<=this.clone().endOf(t).valueOf()))},u.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},u.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},u.isValid=function(){return A(this)},u.lang=Ke,u.locale=Xt,u.localeData=Kt,u.max=_e,u.min=me,u.parsingFlags=function(){return E({},p(this))},u.set=function(e,t){if(\"object\"==typeof e)for(var n=function(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:le[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}(e=ue(e)),s=n.length,i=0;i<s;i++)this[n[i].unit](e[n[i].unit]);else if(a(this[e=o(e)]))return this[e](t);return this},u.startOf=function(e){var t,n;if(void 0!==(e=o(e))&&\"millisecond\"!==e&&this.isValid()){switch(n=this._isUTC?sn:nn,e){case\"year\":t=n(this.year(),0,1);break;case\"quarter\":t=n(this.year(),this.month()-this.month()%3,1);break;case\"month\":t=n(this.year(),this.month(),1);break;case\"week\":t=n(this.year(),this.month(),this.date()-this.weekday());break;case\"isoWeek\":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case\"day\":case\"date\":t=n(this.year(),this.month(),this.date());break;case\"hour\":t=this._d.valueOf(),t-=tn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case\"minute\":t=this._d.valueOf(),t-=tn(t,6e4);break;case\"second\":t=this._d.valueOf(),t-=tn(t,1e3);break}this._d.setTime(t),_.updateOffset(this,!0)}return this},u.subtract=Qe,u.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},u.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},u.toDate=function(){return new Date(this.valueOf())},u.toISOString=function(e){var t;return this.isValid()?(t=(e=!0!==e)?this.clone().utc():this).year()<0||9999<t.year()?re(t,e?\"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ\"):a(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace(\"Z\",re(t,\"Z\")):re(t,e?\"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]\":\"YYYY-MM-DD[T]HH:mm:ss.SSSZ\"):null},u.inspect=function(){var e,t,n;return this.isValid()?(t=\"moment\",e=\"\",this.isLocal()||(t=0===this.utcOffset()?\"moment.utc\":\"moment.parseZone\",e=\"Z\"),t=\"[\"+t+'(\"]',n=0<=this.year()&&this.year()<=9999?\"YYYY\":\"YYYYYY\",this.format(t+n+\"-MM-DD[T]HH:mm:ss.SSS\"+(e+'[\")]'))):\"moment.invalid(/* \"+this._i+\" */)\"},\"undefined\"!=typeof Symbol&&null!=Symbol.for&&(u[Symbol.for(\"nodejs.util.inspect.custom\")]=function(){return\"Moment<\"+this.format()+\">\"}),u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toString=function(){return this.clone().locale(\"en\").format(\"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ\")},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},u.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},u.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf(\"day\").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].name;if(t[n].until<=e&&e<=t[n].since)return t[n].name}return\"\"},u.eraNarrow=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf(\"day\").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].narrow;if(t[n].until<=e&&e<=t[n].since)return t[n].narrow}return\"\"},u.eraAbbr=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;n<s;++n){if(e=this.clone().startOf(\"day\").valueOf(),t[n].since<=e&&e<=t[n].until)return t[n].abbr;if(t[n].until<=e&&e<=t[n].since)return t[n].abbr}return\"\"},u.eraYear=function(){for(var e,t,n=this.localeData().eras(),s=0,i=n.length;s<i;++s)if(e=n[s].since<=n[s].until?1:-1,t=this.clone().startOf(\"day\").valueOf(),n[s].since<=t&&t<=n[s].until||n[s].until<=t&&t<=n[s].since)return(this.year()-_(n[s].since).year())*e+n[s].offset;return this.year()},u.year=Pe,u.isLeapYear=function(){return be(this.year())},u.weekYear=function(e){return un.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},u.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},u.quarter=u.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},u.month=Ie,u.daysInMonth=function(){return He(this.year(),this.month())},u.week=u.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),\"d\")},u.isoWeek=u.isoWeeks=function(e){var t=Be(this,1,4).week;return null==e?t:this.add(7*(e-t),\"d\")},u.weeksInYear=function(){var e=this.localeData()._week;return N(this.year(),e.dow,e.doy)},u.weeksInWeekYear=function(){var e=this.localeData()._week;return N(this.weekYear(),e.dow,e.doy)},u.isoWeeksInYear=function(){return N(this.year(),1,4)},u.isoWeeksInISOWeekYear=function(){return N(this.isoWeekYear(),1,4)},u.date=ge,u.day=u.days=function(e){var t,n,s;return this.isValid()?(t=Ce(this,\"Day\"),null!=e?(n=e,s=this.localeData(),e=\"string\"!=typeof n?n:isNaN(n)?\"number\"==typeof(n=s.weekdaysParse(n))?n:null:parseInt(n,10),this.add(e-t,\"d\")):t):null!=e?this:NaN},u.weekday=function(e){var t;return this.isValid()?(t=(this.day()+7-this.localeData()._week.dow)%7,null==e?t:this.add(e-t,\"d\")):null!=e?this:NaN},u.isoWeekday=function(e){var t,n;return this.isValid()?null!=e?(t=e,n=this.localeData(),n=\"string\"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t,this.day(this.day()%7?n:n-7)):this.day()||7:null!=e?this:NaN},u.dayOfYear=function(e){var t=Math.round((this.clone().startOf(\"day\")-this.clone().startOf(\"year\"))/864e5)+1;return null==e?t:this.add(e-t,\"d\")},u.hour=u.hours=i,u.minute=u.minutes=ce,u.second=u.seconds=we,u.millisecond=u.milliseconds=fe,u.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null==e)return this._isUTC?i:Et(this);if(\"string\"==typeof e){if(null===(e=Vt(ve,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Et(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,\"m\"),i!==e&&(!t||this._changeInProgress?$t(this,C(e-i,\"m\"),1,!1):this._changeInProgress||(this._changeInProgress=!0,_.updateOffset(this,!0),this._changeInProgress=null)),this},u.utc=function(e){return this.utcOffset(0,e)},u.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e)&&this.subtract(Et(this),\"m\"),this},u.parseZone=function(){var e;return null!=this._tzm?this.utcOffset(this._tzm,!1,!0):\"string\"==typeof this._i&&(null!=(e=Vt(Me,this._i))?this.utcOffset(e):this.utcOffset(0,!0)),this},u.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?R(e).utcOffset():0,(this.utcOffset()-e)%60==0)},u.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=At,u.isUTC=At,u.zoneAbbr=function(){return this._isUTC?\"UTC\":\"\"},u.zoneName=function(){return this._isUTC?\"Coordinated Universal Time\":\"\"},u.dates=e(\"dates accessor is deprecated. Use date instead.\",ge),u.months=e(\"months accessor is deprecated. Use month instead\",Ie),u.years=e(\"years accessor is deprecated. Use year instead\",Pe),u.zone=e(\"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/\",function(e,t){return null!=e?(this.utcOffset(e=\"string\"!=typeof e?-e:e,t),this):-this.utcOffset()}),u.isDSTShifted=e(\"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information\",function(){var e,t;return g(this._isDSTShifted)&&(q(e={},this),(e=Nt(e))._a?(t=(e._isUTC?l:R)(e._a),this._isDSTShifted=this.isValid()&&0<function(e,t,n){for(var s=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),r=0,a=0;a<s;a++)(n&&e[a]!==t[a]||!n&&M(e[a])!==M(t[a]))&&r++;return r+i}(e._a,t.toArray())):this._isDSTShifted=!1),this._isDSTShifted});d=K.prototype;function cn(e,t,n,s){var i=P(),s=l().set(s,t);return i[n](s,e)}function fn(e,t,n){if(w(e)&&(t=e,e=void 0),e=e||\"\",null!=t)return cn(e,t,n,\"month\");for(var s=[],i=0;i<12;i++)s[i]=cn(e,i,n,\"month\");return s}function mn(e,t,n,s){t=(\"boolean\"==typeof e?w(t)&&(n=t,t=void 0):(t=e,e=!1,w(n=t)&&(n=t,t=void 0)),t||\"\");var i,r=P(),a=e?r._week.dow:0,o=[];if(null!=n)return cn(t,(n+a)%7,s,\"day\");for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,\"day\");return o}d.calendar=function(e,t,n){return a(e=this._calendar[e]||this._calendar.sameElse)?e.call(t,n):e},d.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(te).map(function(e){return\"MMMM\"===e||\"MM\"===e||\"DD\"===e||\"dddd\"===e?e.slice(1):e}).join(\"\"),this._longDateFormat[e])},d.invalidDate=function(){return this._invalidDate},d.ordinal=function(e){return this._ordinal.replace(\"%d\",e)},d.preparse=hn,d.postformat=hn,d.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return a(i)?i(e,t,n,s):i.replace(/%d/i,e)},d.pastFuture=function(e,t){return a(e=this._relativeTime[0<e?\"future\":\"past\"])?e(t):e.replace(/%s/i,t)},d.set=function(e){var t,n;for(n in e)c(e,n)&&(a(t=e[n])?this[n]=t:this[\"_\"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+\"|\"+/\\d{1,2}/.source)},d.eras=function(e,t){for(var n,s=this._eras||P(\"en\")._eras,i=0,r=s.length;i<r;++i){switch(typeof s[i].since){case\"string\":n=_(s[i].since).startOf(\"day\"),s[i].since=n.valueOf();break}switch(typeof s[i].until){case\"undefined\":s[i].until=1/0;break;case\"string\":n=_(s[i].until).startOf(\"day\").valueOf(),s[i].until=n.valueOf();break}}return s},d.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case\"N\":case\"NN\":case\"NNN\":if(a===e)return u[s];break;case\"NNNN\":if(r===e)return u[s];break;case\"NNNNN\":if(o===e)return u[s];break}else if(0<=[r,a,o].indexOf(e))return u[s]},d.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?_(e.since).year():_(e.since).year()+(t-e.offset)*n},d.erasAbbrRegex=function(e){return c(this,\"_erasAbbrRegex\")||an.call(this),e?this._erasAbbrRegex:this._erasRegex},d.erasNameRegex=function(e){return c(this,\"_erasNameRegex\")||an.call(this),e?this._erasNameRegex:this._erasRegex},d.erasNarrowRegex=function(e){return c(this,\"_erasNarrowRegex\")||an.call(this),e?this._erasNarrowRegex:this._erasRegex},d.months=function(e,t){return e?(y(this._months)?this._months:this._months[(this._months.isFormat||Ve).test(t)?\"format\":\"standalone\"])[e.month()]:y(this._months)?this._months:this._months.standalone},d.monthsShort=function(e,t){return e?(y(this._monthsShort)?this._monthsShort:this._monthsShort[Ve.test(t)?\"format\":\"standalone\"])[e.month()]:y(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},d.monthsParse=function(e,t,n){var s,i;if(this._monthsParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=l([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,\"\").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,\"\").toLocaleLowerCase();return n?\"MMM\"===t?-1!==(i=x.call(this._shortMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))?i:null:\"MMM\"===t?-1!==(i=x.call(this._shortMonthsParse,e))||-1!==(i=x.call(this._longMonthsParse,e))?i:null:-1!==(i=x.call(this._longMonthsParse,e))||-1!==(i=x.call(this._shortMonthsParse,e))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=l([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp(\"^\"+this.months(i,\"\").replace(\".\",\"\")+\"$\",\"i\"),this._shortMonthsParse[s]=new RegExp(\"^\"+this.monthsShort(i,\"\").replace(\".\",\"\")+\"$\",\"i\")),n||this._monthsParse[s]||(i=\"^\"+this.months(i,\"\")+\"|^\"+this.monthsShort(i,\"\"),this._monthsParse[s]=new RegExp(i.replace(\".\",\"\"),\"i\")),n&&\"MMMM\"===t&&this._longMonthsParse[s].test(e))return s;if(n&&\"MMM\"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},d.monthsRegex=function(e){return this._monthsParseExact?(c(this,\"_monthsRegex\")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,\"_monthsRegex\")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},d.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,\"_monthsRegex\")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,\"_monthsShortRegex\")||(this._monthsShortRegex=Ge),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},d.week=function(e){return Be(e,this._week.dow,this._week.doy).week},d.firstDayOfYear=function(){return this._week.doy},d.firstDayOfWeek=function(){return this._week.dow},d.weekdays=function(e,t){return t=y(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?\"format\":\"standalone\"],!0===e?Je(t,this._week.dow):e?t[e.day()]:t},d.weekdaysMin=function(e){return!0===e?Je(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},d.weekdaysShort=function(e){return!0===e?Je(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},d.weekdaysParse=function(e,t,n){var s,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,e=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=l([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,\"\").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,\"\").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,\"\").toLocaleLowerCase();return n?\"dddd\"===t?-1!==(i=x.call(this._weekdaysParse,e))?i:null:\"ddd\"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:\"dddd\"===t?-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:\"ddd\"===t?-1!==(i=x.call(this._shortWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._minWeekdaysParse,e))?i:null:-1!==(i=x.call(this._minWeekdaysParse,e))||-1!==(i=x.call(this._weekdaysParse,e))||-1!==(i=x.call(this._shortWeekdaysParse,e))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=l([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp(\"^\"+this.weekdays(i,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\"),this._shortWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysShort(i,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\"),this._minWeekdaysParse[s]=new RegExp(\"^\"+this.weekdaysMin(i,\"\").replace(\".\",\"\\\\.?\")+\"$\",\"i\")),this._weekdaysParse[s]||(i=\"^\"+this.weekdays(i,\"\")+\"|^\"+this.weekdaysShort(i,\"\")+\"|^\"+this.weekdaysMin(i,\"\"),this._weekdaysParse[s]=new RegExp(i.replace(\".\",\"\"),\"i\")),n&&\"dddd\"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&\"ddd\"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&\"dd\"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},d.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,\"_weekdaysRegex\")||st.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,\"_weekdaysRegex\")||(this._weekdaysRegex=et),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},d.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,\"_weekdaysRegex\")||st.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,\"_weekdaysShortRegex\")||(this._weekdaysShortRegex=tt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},d.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,\"_weekdaysRegex\")||st.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,\"_weekdaysMinRegex\")||(this._weekdaysMinRegex=nt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},d.isPM=function(e){return\"p\"===(e+\"\").toLowerCase().charAt(0)},d.meridiem=function(e,t,n){return 11<e?n?\"pm\":\"PM\":n?\"am\":\"AM\"},ft(\"en\",{eras:[{since:\"0001-01-01\",until:1/0,offset:1,name:\"Anno Domini\",narrow:\"AD\",abbr:\"AD\"},{since:\"0000-12-31\",until:-1/0,offset:1,name:\"Before Christ\",narrow:\"BC\",abbr:\"BC\"}],dayOfMonthOrdinalParse:/\\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===M(e%100/10)?\"th\":1==t?\"st\":2==t?\"nd\":3==t?\"rd\":\"th\")}}),_.lang=e(\"moment.lang is deprecated. Use moment.locale instead.\",ft),_.langData=e(\"moment.langData is deprecated. Use moment.localeData instead.\",P);var _n=Math.abs;function yn(e,t,n,s){t=C(t,n);return e._milliseconds+=s*t._milliseconds,e._days+=s*t._days,e._months+=s*t._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function wn(e){return 4800*e/146097}function pn(e){return 146097*e/4800}function kn(e){return function(){return this.as(e)}}de=kn(\"ms\"),t=kn(\"s\"),ye=kn(\"m\"),he=kn(\"h\"),Fe=kn(\"d\"),_e=kn(\"w\"),me=kn(\"M\"),Qe=kn(\"Q\"),i=kn(\"y\"),ce=de;function Mn(e){return function(){return this.isValid()?this._data[e]:NaN}}var we=Mn(\"milliseconds\"),fe=Mn(\"seconds\"),ge=Mn(\"minutes\"),Pe=Mn(\"hours\"),d=Mn(\"days\"),vn=Mn(\"months\"),Dn=Mn(\"years\");var Yn=Math.round,Sn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function On(e,t,n,s){var i=C(e).abs(),r=Yn(i.as(\"s\")),a=Yn(i.as(\"m\")),o=Yn(i.as(\"h\")),u=Yn(i.as(\"d\")),l=Yn(i.as(\"M\")),d=Yn(i.as(\"w\")),i=Yn(i.as(\"y\")),r=(r<=n.ss?[\"s\",r]:r<n.s&&[\"ss\",r])||(a<=1?[\"m\"]:a<n.m&&[\"mm\",a])||(o<=1?[\"h\"]:o<n.h&&[\"hh\",o])||(u<=1?[\"d\"]:u<n.d&&[\"dd\",u]);return(r=(r=null!=n.w?r||(d<=1?[\"w\"]:d<n.w&&[\"ww\",d]):r)||(l<=1?[\"M\"]:l<n.M&&[\"MM\",l])||(i<=1?[\"y\"]:[\"yy\",i]))[2]=t,r[3]=0<+e,r[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,r)}var bn=Math.abs;function Tn(e){return(0<e)-(e<0)||+e}function xn(){var e,t,n,s,i,r,a,o,u,l,d;return this.isValid()?(e=bn(this._milliseconds)/1e3,t=bn(this._days),n=bn(this._months),(o=this.asSeconds())?(s=m(e/60),i=m(s/60),e%=60,s%=60,r=m(n/12),n%=12,a=e?e.toFixed(3).replace(/\\.?0+$/,\"\"):\"\",u=Tn(this._months)!==Tn(o)?\"-\":\"\",l=Tn(this._days)!==Tn(o)?\"-\":\"\",d=Tn(this._milliseconds)!==Tn(o)?\"-\":\"\",(o<0?\"-\":\"\")+\"P\"+(r?u+r+\"Y\":\"\")+(n?u+n+\"M\":\"\")+(t?l+t+\"D\":\"\")+(i||s||e?\"T\":\"\")+(i?d+i+\"H\":\"\")+(s?d+s+\"M\":\"\")+(e?d+a+\"S\":\"\")):\"P0D\"):this.localeData().invalidDate()}var U=Ct.prototype;return U.isValid=function(){return this._isValid},U.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},U.add=function(e,t){return yn(this,e,t,1)},U.subtract=function(e,t){return yn(this,e,t,-1)},U.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if(\"month\"===(e=o(e))||\"quarter\"===e||\"year\"===e)switch(t=this._days+s/864e5,n=this._months+wn(t),e){case\"month\":return n;case\"quarter\":return n/3;case\"year\":return n/12}else switch(t=this._days+Math.round(pn(this._months)),e){case\"week\":return t/7+s/6048e5;case\"day\":return t+s/864e5;case\"hour\":return 24*t+s/36e5;case\"minute\":return 1440*t+s/6e4;case\"second\":return 86400*t+s/1e3;case\"millisecond\":return Math.floor(864e5*t)+s;default:throw new Error(\"Unknown unit \"+e)}},U.asMilliseconds=de,U.asSeconds=t,U.asMinutes=ye,U.asHours=he,U.asDays=Fe,U.asWeeks=_e,U.asMonths=me,U.asQuarters=Qe,U.asYears=i,U.valueOf=ce,U._bubble=function(){var e=this._milliseconds,t=this._days,n=this._months,s=this._data;return 0<=e&&0<=t&&0<=n||e<=0&&t<=0&&n<=0||(e+=864e5*gn(pn(n)+t),n=t=0),s.milliseconds=e%1e3,e=m(e/1e3),s.seconds=e%60,e=m(e/60),s.minutes=e%60,e=m(e/60),s.hours=e%24,t+=m(e/24),n+=e=m(wn(t)),t-=gn(pn(e)),e=m(n/12),n%=12,s.days=t,s.months=n,s.years=e,this},U.clone=function(){return C(this)},U.get=function(e){return e=o(e),this.isValid()?this[e+\"s\"]():NaN},U.milliseconds=we,U.seconds=fe,U.minutes=ge,U.hours=Pe,U.days=d,U.weeks=function(){return m(this.days()/7)},U.months=vn,U.years=Dn,U.humanize=function(e,t){var n,s;return this.isValid()?(n=!1,s=Sn,\"object\"==typeof e&&(t=e,e=!1),\"boolean\"==typeof e&&(n=e),\"object\"==typeof t&&(s=Object.assign({},Sn,t),null!=t.s)&&null==t.ss&&(s.ss=t.s-1),e=this.localeData(),t=On(this,!n,s,e),n&&(t=e.pastFuture(+this,t)),e.postformat(t)):this.localeData().invalidDate()},U.toISOString=xn,U.toString=xn,U.toJSON=xn,U.locale=Xt,U.localeData=Kt,U.toIsoString=e(\"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)\",xn),U.lang=Ke,s(\"X\",0,0,\"unix\"),s(\"x\",0,0,\"valueOf\"),h(\"x\",ke),h(\"X\",/[+-]?\\d+(\\.\\d{1,3})?/),v(\"X\",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),v(\"x\",function(e,t,n){n._d=new Date(M(e))}),_.version=\"2.30.1\",H=R,_.fn=u,_.min=function(){return Pt(\"isBefore\",[].slice.call(arguments,0))},_.max=function(){return Pt(\"isAfter\",[].slice.call(arguments,0))},_.now=function(){return Date.now?Date.now():+new Date},_.utc=l,_.unix=function(e){return R(1e3*e)},_.months=function(e,t){return fn(e,t,\"months\")},_.isDate=V,_.locale=ft,_.invalid=I,_.duration=C,_.isMoment=k,_.weekdays=function(e,t,n){return mn(e,t,n,\"weekdays\")},_.parseZone=function(){return R.apply(null,arguments).parseZone()},_.localeData=P,_.isDuration=Ut,_.monthsShort=function(e,t){return fn(e,t,\"monthsShort\")},_.weekdaysMin=function(e,t,n){return mn(e,t,n,\"weekdaysMin\")},_.defineLocale=mt,_.updateLocale=function(e,t){var n,s;return null!=t?(s=ut,null!=W[e]&&null!=W[e].parentLocale?W[e].set(X(W[e]._config,t)):(t=X(s=null!=(n=ct(e))?n._config:s,t),null==n&&(t.abbr=e),(s=new K(t)).parentLocale=W[e],W[e]=s),ft(e)):null!=W[e]&&(null!=W[e].parentLocale?(W[e]=W[e].parentLocale,e===ft()&&ft(e)):null!=W[e]&&delete W[e]),W[e]},_.locales=function(){return ee(W)},_.weekdaysShort=function(e,t,n){return mn(e,t,n,\"weekdaysShort\")},_.normalizeUnits=o,_.relativeTimeRounding=function(e){return void 0===e?Yn:\"function\"==typeof e&&(Yn=e,!0)},_.relativeTimeThreshold=function(e,t){return void 0!==Sn[e]&&(void 0===t?Sn[e]:(Sn[e]=t,\"s\"===e&&(Sn.ss=t-1),!0))},_.calendarFormat=function(e,t){return(e=e.diff(t,\"days\",!0))<-6?\"sameElse\":e<-1?\"lastWeek\":e<0?\"lastDay\":e<1?\"sameDay\":e<2?\"nextDay\":e<7?\"nextWeek\":\"sameElse\"},_.prototype=u,_.HTML5_FMT={DATETIME_LOCAL:\"YYYY-MM-DDTHH:mm\",DATETIME_LOCAL_SECONDS:\"YYYY-MM-DDTHH:mm:ss\",DATETIME_LOCAL_MS:\"YYYY-MM-DDTHH:mm:ss.SSS\",DATE:\"YYYY-MM-DD\",TIME:\"HH:mm\",TIME_SECONDS:\"HH:mm:ss\",TIME_MS:\"HH:mm:ss.SSS\",WEEK:\"GGGG-[W]WW\",MONTH:\"YYYY-MM\"},_});\n//# sourceMappingURL=moment.min.js.map","!function(e,t){\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?module.exports=t():e.sortable=t()}(this,function(){\"use strict\";function e(e,t,n){var r=null;return 0===t?e:function(){var a=n||this,o=arguments;clearTimeout(r),r=setTimeout(function(){e.apply(a,o)},t)}}var t,n,r=[],a=[],o=function(e,t,n){return void 0===n?e&&e.h5s&&e.h5s.data&&e.h5s.data[t]:(e.h5s=e.h5s||{},e.h5s.data=e.h5s.data||{},e.h5s.data[t]=n,void 0)},i=function(e){e.h5s&&delete e.h5s.data},s=function(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)},l=function(e,t){if(!t)return Array.prototype.slice.call(e);for(var n=[],r=0;r<e.length;++r)\"string\"==typeof t&&s(e[r],t)&&n.push(e[r]),t.indexOf(e[r])!==-1&&n.push(e[r]);return n},d=function(e,t,n){if(e instanceof Array)for(var r=0;r<e.length;++r)d(e[r],t,n);else e.addEventListener(t,n),e.h5s=e.h5s||{},e.h5s.events=e.h5s.events||{},e.h5s.events[t]=n},c=function(e,t){if(e instanceof Array)for(var n=0;n<e.length;++n)c(e[n],t);else e.h5s&&e.h5s.events&&e.h5s.events[t]&&(e.removeEventListener(t,e.h5s.events[t]),delete e.h5s.events[t])},f=function(e,t,n){if(e instanceof Array)for(var r=0;r<e.length;++r)f(e[r],t,n);else e.setAttribute(t,n)},u=function(e,t){if(e instanceof Array)for(var n=0;n<e.length;++n)u(e[n],t);else e.removeAttribute(t)},p=function(e){var t=e.getClientRects()[0];return{left:t.left+window.scrollX,top:t.top+window.scrollY}},h=function(e){c(e,\"dragstart\"),c(e,\"dragend\"),c(e,\"selectstart\"),c(e,\"dragover\"),c(e,\"dragenter\"),c(e,\"drop\")},g=function(e){c(e,\"dragover\"),c(e,\"dragenter\"),c(e,\"drop\")},m=function(e,t){e.dataTransfer.effectAllowed=\"move\",e.dataTransfer.setData(\"text\",\"arbitrary-content\"),e.dataTransfer.setDragImage&&e.dataTransfer.setDragImage(t.draggedItem,t.x,t.y)},v=function(e,t){return t.x||(t.x=parseInt(e.pageX-p(t.draggedItem).left)),t.y||(t.y=parseInt(e.pageY-p(t.draggedItem).top)),t},y=function(e){return{draggedItem:e}},b=function(e,t){var n=y(t);n=v(e,n),m(e,n)},E=function(e){i(e),u(e,\"aria-dropeffect\")},x=function(e){u(e,\"aria-grabbed\"),u(e,\"draggable\"),u(e,\"role\")},w=function(e,t){return e===t||void 0!==o(e,\"connectWith\")&&o(e,\"connectWith\")===o(t,\"connectWith\")},I=function(e,t){var n,r=[];if(!t)return e;for(var a=0;a<e.length;++a)n=e[a].querySelectorAll(t),r=r.concat(Array.prototype.slice.call(n));return r},C=function(e){var t=o(e,\"opts\")||{},n=l(z(e),t.items),r=I(n,t.handle);g(e),E(e),c(r,\"mousedown\"),h(n),x(n)},A=function(e){var t=o(e,\"opts\"),n=l(z(e),t.items),r=I(n,t.handle);f(e,\"aria-dropeffect\",\"move\"),o(e,\"_disabled\",\"false\"),f(r,\"draggable\",\"true\");var a=(document||window.document).createElement(\"span\");\"function\"!=typeof a.dragDrop||t.disableIEFix||d(r,\"mousedown\",function(){if(n.indexOf(this)!==-1)this.dragDrop();else{for(var e=this.parentElement;n.indexOf(e)===-1;)e=e.parentElement;e.dragDrop()}})},S=function(e){var t=o(e,\"opts\"),n=l(z(e),t.items),r=I(n,t.handle);f(e,\"aria-dropeffect\",\"none\"),o(e,\"_disabled\",\"true\"),f(r,\"draggable\",\"false\"),c(r,\"mousedown\")},D=function(e){var t=o(e,\"opts\"),n=l(z(e),t.items),r=I(n,t.handle);o(e,\"_disabled\",\"false\"),h(n),c(r,\"mousedown\"),g(e)},L=function(e){return e.parentElement?Array.prototype.indexOf.call(e.parentElement.children,e):0},O=function(e){return!!e.parentNode},T=function(e,t){if(\"string\"!=typeof e)return e;var n=document.createElement(t);return n.innerHTML=e,n.firstChild},W=function(e,t){e.parentElement.insertBefore(t,e)},M=function(e,t){e.parentElement.insertBefore(t,e.nextElementSibling)},N=function(e){e.parentNode&&e.parentNode.removeChild(e)},P=function(e,t){var n=document.createEvent(\"Event\");return t&&(n.detail=t),n.initEvent(e,!1,!0),n},_=function(e,t){a.forEach(function(n){w(e,n)&&n.dispatchEvent(t)})},z=function(e){return e.children},Y=function(e){var t=l(z(e),o(e,\"items\"));return t},q=function(i,c){var u=String(c);if(c=function(e){var t={connectWith:!1,placeholder:null,disableIEFix:!1,placeholderClass:\"sortable-placeholder\",draggingClass:\"sortable-dragging\",hoverClass:!1,debounce:0,maxItems:0};for(var n in e)t[n]=e[n];return t}(c),c&&\"function\"==typeof c.getChildren&&(z=c.getChildren),\"string\"==typeof i&&(i=document.querySelectorAll(i)),i instanceof window.Element&&(i=[i]),i=Array.prototype.slice.call(i),/serialize/.test(u)){var h=[];return i.forEach(function(e){h.push({list:e,children:Y(e)})}),h}return i.forEach(function(i){if(/enable|disable|destroy/.test(u))return q[u](i);c=o(i,\"opts\")||c,o(i,\"opts\",c),D(i);var h,g,m,v,y=l(z(i),c.items),E=c.placeholder;if(E||(E=document.createElement(/^ul|ol$/i.test(i.tagName)?\"li\":\"div\")),E=T(E,i.tagName),E.classList.add.apply(E.classList,c.placeholderClass.split(\" \")),!i.getAttribute(\"data-sortable-id\")){var x=a.length;a[x]=i,f(i,\"data-sortable-id\",x),f(y,\"data-item-sortable-id\",x)}if(o(i,\"items\",c.items),r.push(E),c.connectWith&&o(i,\"connectWith\",c.connectWith),A(i),f(y,\"role\",\"option\"),f(y,\"aria-grabbed\",\"false\"),c.hoverClass){var I=\"sortable-over\";\"string\"==typeof c.hoverClass&&(I=c.hoverClass),d(y,\"mouseenter\",function(){this.classList.add(I)}),d(y,\"mouseleave\",function(){this.classList.remove(I)})}c.maxItems&&\"number\"==typeof c.maxItems&&(v=c.maxItems),d(y,\"dragstart\",function(e){e.stopImmediatePropagation(),c.handle&&!s(e.target,c.handle)||\"false\"===this.getAttribute(\"draggable\")||(b(e,this),this.classList.add(c.draggingClass),t=this,f(t,\"aria-grabbed\",\"true\"),h=L(t),n=parseInt(window.getComputedStyle(t).height),g=this.parentElement,m=Y(g),_(i,P(\"sortstart\",{item:t,placeholder:E,startparent:g})))}),d(y,\"dragend\",function(){var e;t&&(t.classList.remove(c.draggingClass),f(t,\"aria-grabbed\",\"false\"),t.style.display=t.oldDisplay,delete t.oldDisplay,r.forEach(N),e=this.parentElement,_(i,P(\"sortstop\",{item:t,startparent:g})),h===L(t)&&g===e||_(i,P(\"sortupdate\",{item:t,index:l(z(e),o(e,\"items\")).indexOf(t),oldindex:y.indexOf(t),elementIndex:L(t),oldElementIndex:h,startparent:g,endparent:e,newEndList:Y(e),newStartList:Y(g),oldStartList:m})),t=null,n=null)}),d([i,E],\"drop\",function(e){var n;w(i,t.parentElement)&&(e.preventDefault(),e.stopPropagation(),n=r.filter(O)[0],M(n,t),t.dispatchEvent(P(\"dragend\")))});var C=e(function(e,a){if(t)if(y.indexOf(e)!==-1){var o=parseInt(window.getComputedStyle(e).height),i=L(E),s=L(e);if(c.forcePlaceholderSize&&(E.style.height=n+\"px\"),o>n){var d=o-n,f=p(e).top;if(i<s&&a<f+d)return;if(i>s&&a>f+o-d)return}void 0===t.oldDisplay&&(t.oldDisplay=t.style.display),\"none\"!==t.style.display&&(t.style.display=\"none\"),i<s?M(e,E):W(e,E),r.filter(function(e){return e!==E}).forEach(N)}else r.indexOf(e)!==-1||l(z(e),c.items).length||(r.forEach(N),e.appendChild(E))},c.debounce),S=function(e){t&&w(i,t.parentElement)&&\"true\"!==o(i,\"_disabled\")&&(v&&l(z(i),o(i,\"items\")).length>=v||(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=\"move\",C(this,e.pageY)))};d(y.concat(i),\"dragover\",S),d(y.concat(i),\"dragenter\",S)}),i};return q.destroy=function(e){C(e)},q.enable=function(e){A(e)},q.disable=function(e){S(e)},q});\n//# sourceMappingURL=html.sortable.min.js.map\n","/*!\n * Chart.js v2.9.4\n * https://www.chartjs.org\n * (c) 2020 Chart.js Contributors\n * Released under the MIT License\n */\n!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e(function(){try{return require(\"moment\")}catch(t){}}()):\"function\"==typeof define&&define.amd?define([\"require\"],(function(t){return e(function(){try{return t(\"moment\")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){\"use strict\";t=t&&t.hasOwnProperty(\"default\")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:\"rgb\"},hsl:{channels:3,labels:\"hsl\"},hsv:{channels:3,labels:\"hsv\"},hwb:{channels:3,labels:\"hwb\"},cmyk:{channels:4,labels:\"cmyk\"},xyz:{channels:3,labels:\"xyz\"},lab:{channels:3,labels:\"lab\"},lch:{channels:3,labels:\"lch\"},hex:{channels:1,labels:[\"hex\"]},keyword:{channels:1,labels:[\"keyword\"]},ansi16:{channels:1,labels:[\"ansi16\"]},ansi256:{channels:1,labels:[\"ansi256\"]},hcg:{channels:3,labels:[\"h\",\"c\",\"g\"]},apple:{channels:3,labels:[\"r16\",\"g16\",\"b16\"]},gray:{channels:1,labels:[\"gray\"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!(\"channels\"in a[r]))throw new Error(\"missing channels property: \"+r);if(!(\"labels\"in a[r]))throw new Error(\"missing channel labels property: \"+r);if(a[r].labels.length!==a[r].channels)throw new Error(\"channel and label counts mismatch: \"+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],\"channels\",{value:o}),Object.defineProperty(a[r],\"labels\",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=e[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d<s&&(s=d,a=l)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return\"000000\".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split(\"\").map((function(t){return t+t})).join(\"\"));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return\"000000\".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function i(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a<i;a++)t[e[a]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;)for(var a=i.pop(),r=Object.keys(n[a]),o=r.length,s=0;s<o;s++){var l=r[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,i.unshift(l))}return e}function a(t,e){return function(n){return e(t(n))}}function r(t,e){for(var i=[e[t].parent,t],r=n[e[t].parent][t],o=e[t].parent;e[o].parent;)i.unshift(e[o].parent),r=a(n[e[o].parent][o],r),o=e[o].parent;return r.conversion=i,r}var o={};Object.keys(n).forEach((function(t){o[t]={},Object.defineProperty(o[t],\"channels\",{value:n[t].channels}),Object.defineProperty(o[t],\"labels\",{value:n[t].labels});var e=function(t){for(var e=i(t),n={},a=Object.keys(e),o=a.length,s=0;s<o;s++){var l=a[s];null!==e[l].parent&&(n[l]=r(l,e))}return n}(t);Object.keys(e).forEach((function(n){var i=e[n];o[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if(\"object\"==typeof n)for(var i=n.length,a=0;a<i;a++)n[a]=Math.round(n[a]);return n};return\"conversion\"in t&&(e.conversion=t.conversion),e}(i),o[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return\"conversion\"in t&&(e.conversion=t.conversion),e}(i)}))}));var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:d,getHsla:h,getRgb:function(t){var e=d(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:c,getAlpha:function(t){var e=d(t);if(e)return e[3];if(e=h(t))return e[3];if(e=c(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return\"#\"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):\"\")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return f(t,e);return\"rgb(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\")\"},rgbaString:f,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return\"rgb(\"+n+\"%, \"+i+\"%, \"+a+\"%)\"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return\"hsl(\"+t[0]+\", \"+t[1]+\"%, \"+t[2]+\"%)\"},hslaString:p,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return\"hwb(\"+t[0]+\", \"+t[1]+\"%, \"+t[2]+\"%\"+(void 0!==e&&1!==e?\", \"+e:\"\")+\")\"},keyword:function(t){return b[t.slice(0,3)]}};function d(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a=\"\";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){a=i[2],i=i[1];for(r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\\w+)/)){if(\"transparent\"==i[1])return[0,0,0,0];if(!(e=l[i[1]]))return}for(r=0;r<e.length;r++)e[r]=m(e[r],0,255);return n=n||0==n?m(n,0,1):1,e[3]=n,e}}function h(t){if(t){var e=t.match(/^hsla?\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function c(t){if(t){var e=t.match(/^hwb\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),\"rgba(\"+t[0]+\", \"+t[1]+\", \"+t[2]+\", \"+e+\")\"}function g(t,e){return\"rgba(\"+Math.round(t[0]/255*100)+\"%, \"+Math.round(t[1]/255*100)+\"%, \"+Math.round(t[2]/255*100)+\"%, \"+(e||t[3]||1)+\")\"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),\"hsla(\"+t[0]+\", \"+t[1]+\"%, \"+t[2]+\"%, \"+e+\")\"}function m(t,e,n){return Math.min(Math.max(e,t),n)}function v(t){var e=t.toString(16).toUpperCase();return e.length<2?\"0\"+e:e}var b={};for(var x in l)b[l[x]]=x;var y=function(t){return t instanceof y?t:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void(\"string\"==typeof t?(e=u.getRgba(t))?this.setValues(\"rgb\",e):(e=u.getHsla(t))?this.setValues(\"hsl\",e):(e=u.getHwb(t))&&this.setValues(\"hwb\",e):\"object\"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues(\"rgb\",e):void 0!==e.l||void 0!==e.lightness?this.setValues(\"hsl\",e):void 0!==e.v||void 0!==e.value?this.setValues(\"hsv\",e):void 0!==e.w||void 0!==e.whiteness?this.setValues(\"hwb\",e):void 0===e.c&&void 0===e.cyan||this.setValues(\"cmyk\",e)))):new y(t);var e};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace(\"rgb\",arguments)},hsl:function(){return this.setSpace(\"hsl\",arguments)},hsv:function(){return this.setSpace(\"hsv\",arguments)},hwb:function(){return this.setSpace(\"hwb\",arguments)},cmyk:function(){return this.setSpace(\"cmyk\",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues(\"alpha\",t),this)},red:function(t){return this.setChannel(\"rgb\",0,t)},green:function(t){return this.setChannel(\"rgb\",1,t)},blue:function(t){return this.setChannel(\"rgb\",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel(\"hsl\",0,t)},saturation:function(t){return this.setChannel(\"hsl\",1,t)},lightness:function(t){return this.setChannel(\"hsl\",2,t)},saturationv:function(t){return this.setChannel(\"hsv\",1,t)},whiteness:function(t){return this.setChannel(\"hwb\",1,t)},blackness:function(t){return this.setChannel(\"hwb\",2,t)},value:function(t){return this.setChannel(\"hsv\",2,t)},cyan:function(t){return this.setChannel(\"cmyk\",0,t)},magenta:function(t){return this.setChannel(\"cmyk\",1,t)},yellow:function(t){return this.setChannel(\"cmyk\",2,t)},black:function(t){return this.setChannel(\"cmyk\",3,t)},hexString:function(){return u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?\"AAA\":e>=4.5?\"AA\":\"\"},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues(\"rgb\",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues(\"hsl\",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues(\"hsl\",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues(\"hsl\",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues(\"hsl\",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues(\"hwb\",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues(\"hwb\",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues(\"rgb\",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues(\"alpha\",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues(\"alpha\",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues(\"hsl\",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],\"[object Array]\"===(e={}.toString.call(t))?a[r]=t.slice(0):\"[object Number]\"===e?a[r]=t:console.error(\"unexpected color value:\",t));return n}},y.prototype.spaces={rgb:[\"red\",\"green\",\"blue\"],hsl:[\"hue\",\"saturation\",\"lightness\"],hsv:[\"hue\",\"saturation\",\"value\"],hwb:[\"hue\",\"whiteness\",\"blackness\"],cmyk:[\"cyan\",\"magenta\",\"yellow\",\"black\"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},y.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,o=this.maxes,l=1;if(this.valid=!0,\"alpha\"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),\"alpha\"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(i);for(var d in r)d!==t&&(a[d]=s[t][d](a[t]));return!0},y.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):(\"number\"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},y.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},\"undefined\"!=typeof window&&(window.Color=y);var _=y;function k(t){return-1===[\"__proto__\",\"prototype\",\"constructor\"].indexOf(t)}var w,M={noop:function(){},uid:(w=0,function(){return w++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return\"[object\"===e.substr(0,7)&&\"Array]\"===e.substr(-6)},isObject:function(t){return null!==t&&\"[object Object]\"===Object.prototype.toString.call(t)},isFinite:function(t){return(\"number\"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return M.valueOrDefault(M.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&\"function\"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(M.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(M.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],r=e[n],a instanceof Array&&r instanceof Array){if(!M.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(M.isArray(t))return t.map(M.clone);if(M.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=M.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){if(k(t)){var a=e[t],r=n[t];M.isObject(a)&&M.isObject(r)?M.merge(a,r,i):e[t]=M.clone(r)}},_mergerIf:function(t,e,n){if(k(t)){var i=e[t],a=n[t];M.isObject(i)&&M.isObject(a)?M.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=M.clone(a))}},merge:function(t,e,n){var i,a,r,o,s,l=M.isArray(e)?e:[e],u=l.length;if(!M.isObject(t))return t;for(i=(n=n||{}).merger||M._merger,a=0;a<u;++a)if(e=l[a],M.isObject(e))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[s],t,e,n);return t},mergeIf:function(t,e){return M.merge(t,e,{merger:M._mergerIf})},extend:Object.assign||function(t){return M.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty(\"constructor\")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=M.inherits,t&&M.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': \"'+n+'\" is deprecated. Please use \"'+i+'\" instead')}},S=M;M.callCallback=M.callback,M.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var C={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-C.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*C.easeInBounce(2*t):.5*C.easeOutBounce(2*t-1)+.5}},P={effects:C};S.easingEffects=C;var A=Math.PI,D=A/180,T=2*A,I=A/2,F=A/4,O=2*A/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-A,-I),t.arc(u,l,o,-I,0),t.arc(u,d,o,0,I),t.arc(s,d,o,I,A)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-I,I),t.arc(s,l,o,I,A+I)):l<d?(t.arc(s,l,o,-A,0),t.arc(s,d,o,0,A)):t.arc(s,l,o,-A,A),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*D;if(e&&\"object\"==typeof e&&(\"[object HTMLImageElement]\"===(o=e.toString())||\"[object HTMLCanvasElement]\"===o))return t.save(),t.translate(i,a),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,a,n,0,T),t.closePath();break;case\"triangle\":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=O,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=O,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),t.closePath();break;case\"rectRounded\":u=n-(d=.516*n),s=Math.cos(h+F)*u,l=Math.sin(h+F)*u,t.arc(i-s,a-l,d,h-A,h-I),t.arc(i+l,a-s,d,h-I,h),t.arc(i+s,a+l,d,h,h+I),t.arc(i-l,a+s,d,h+I,h+A),t.closePath();break;case\"rect\":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=F;case\"rectRot\":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case\"crossRot\":h+=F;case\"cross\":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case\"star\":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=F,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case\"line\":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case\"dash\":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var a=n.steppedLine;if(a){if(\"middle\"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else\"after\"===a&&!i||\"after\"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},R=L;S.clear=L.clear,S.drawRoundedRectangle=function(t){t.beginPath(),L.roundedRect.apply(L,arguments)};var z={_set:function(t,e){return S.merge(this[t]||(this[t]={}),e)}};z._set(\"global\",{defaultColor:\"rgba(0,0,0,0.1)\",defaultFontColor:\"#666\",defaultFontFamily:\"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",defaultFontSize:12,defaultFontStyle:\"normal\",defaultLineHeight:1.2,showLines:!0});var N=z,B=S.valueOrDefault;var E={toLineHeight:function(t,e){var n=(\"\"+t).match(/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/);if(!n||\"normal\"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case\"px\":return t;case\"%\":t/=100}return e*t},toPadding:function(t){var e,n,i,a;return S.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e=N.global,n=B(t.fontSize,e.defaultFontSize),i={family:B(t.fontFamily,e.defaultFontFamily),lineHeight:S.options.toLineHeight(B(t.lineHeight,e.defaultLineHeight),n),size:n,style:B(t.fontStyle,e.defaultFontStyle),weight:null,string:\"\"};return i.string=function(t){return!t||S.isNullOrUndef(t.size)||S.isNullOrUndef(t.family)?null:(t.style?t.style+\" \":\"\")+(t.weight?t.weight+\" \":\"\")+t.size+\"px \"+t.family}(i),i},resolve:function(t,e,n,i){var a,r,o,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&\"function\"==typeof o&&(o=o(e),s=!1),void 0!==n&&S.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},W={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort((function(t,e){return t-e})).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},V=W;S.log10=W.log10;var H=S,j=P,q=R,U=E,Y=V,G={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return\"center\"===t?t:\"right\"===t?\"left\":\"right\"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;\"ltr\"!==e&&\"rtl\"!==e||(i=[(n=t.canvas.style).getPropertyValue(\"direction\"),n.getPropertyPriority(\"direction\")],n.setProperty(\"direction\",e,\"important\"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty(\"direction\",e[0],e[1]))}};H.easing=j,H.canvas=q,H.options=U,H.math=Y,H.rtl=G;var X=function(t){H.extend(this,t),this.initialize.apply(this,arguments)};H.extend(X.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=H.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&\"_\"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)===typeof(l=t[o]))if(\"string\"===d){if((h=_(l)).valid&&(c=_(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(H.isFinite(l)&&H.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(e._view=H.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return H.isNumber(this._model.x)&&H.isNumber(this._model.y)}}),X.extend=H.inherits;var K=X,Z=K.extend({chart:null,currentStep:0,numSteps:60,easing:\"\",render:null,onAnimationProgress:null,onAnimationComplete:null}),$=Z;Object.defineProperty(Z.prototype,\"animationObject\",{get:function(){return this}}),Object.defineProperty(Z.prototype,\"chartInstance\",{get:function(){return this.chart},set:function(t){this.chart=t}}),N._set(\"global\",{animation:{duration:1e3,easing:\"easeOutQuart\",onProgress:H.noop,onComplete:H.noop}});var J={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=H.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=H.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),H.callback(t.render,[e,t],e),H.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(H.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},Q=H.options.resolve,tt=[\"push\",\"pop\",\"shift\",\"splice\",\"unshift\"];function et(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(tt.forEach((function(e){delete t[e]})),delete t._chartjs)}}var nt=function(t,e){this.initialize(t,e)};H.extend(nt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:[\"backgroundColor\",\"borderCapStyle\",\"borderColor\",\"borderDash\",\"borderDashOffset\",\"borderJoinStyle\",\"borderWidth\"],_dataElementOptions:[\"backgroundColor\",\"borderColor\",\"borderWidth\",\"pointStyle\"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&et(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&et(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,\"_chartjs\",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),tt.forEach((function(e){var n=\"onData\"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return H.each(t._chartjs.listeners,(function(t){\"function\"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.resyncElements()},_configure:function(){this._config=H.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){\"_meta\"!==t&&\"data\"!==t&&H._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:H.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),i&&void 0===t?e=this._resolveDatasetElementOptions(i||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,a,r,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,c={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=h.length;n<i;++n)a=h[n],r=e?\"hover\"+a.charAt(0).toUpperCase()+a.slice(1):a,c[a]=Q([u[r],l[r],d[r]],f);return c},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},c=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!i};if(i=i||{},H.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=Q([i[l],d[l],h[l]],g,e,p);else for(o=0,s=(r=Object.keys(c)).length;o<s;++o)f[l=r[o]]=Q([i[l],d[c[l]],d[l],h[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){H.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=H.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=Q([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=Q([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=Q([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(a)).length;t<e;++t)s[n=i[t]]=r[n],r[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),nt.extend=H.inherits;var it=nt,at=2*Math.PI;function rt(t,e){var n=e.startAngle,i=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-r,i+r),e.innerRadius>a?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function ot(t,e,n){var i=\"inner\"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin=\"round\"):(t.lineWidth=e.borderWidth,t.lineJoin=\"bevel\"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+at,rt(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=at,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+at,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+at),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,i),i&&rt(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}N._set(\"global\",{elements:{arc:{backgroundColor:N.global.defaultColor,borderColor:\"#fff\",borderWidth:2,borderAlign:\"center\"}}});var st=K.extend({_type:\"arc\",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=H.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=at;for(;a>s;)a-=at;for(;a<o;)a+=at;var l=a>=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i=\"inner\"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/at)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+at,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%at}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&ot(e,n,a),e.restore()}}),lt=H.valueOrDefault,ut=N.global.defaultColor;N._set(\"global\",{elements:{line:{tension:.4,backgroundColor:ut,borderWidth:3,borderColor:ut,borderCapStyle:\"butt\",borderDash:[],borderDashOffset:0,borderJoinStyle:\"miter\",capBezierPoints:!0,fill:!0}}});var dt=K.extend({_type:\"line\",draw:function(){var t,e,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=N.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=H.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=o;break}h&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=lt(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=lt(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?H.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?r.moveTo(n.x,n.y):H.canvas.lineTo(r,e._view,n),d=t);h&&r.closePath(),r.stroke(),r.restore()}}}),ht=H.valueOrDefault,ct=N.global.defaultColor;function ft(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}N._set(\"global\",{elements:{point:{radius:3,pointStyle:\"circle\",backgroundColor:ct,borderColor:ct,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var gt=K.extend({_type:\"point\",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ft,inXRange:ft,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=N.global,u=l.defaultColor;e.skip||(void 0===t||H.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=ht(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,H.canvas.drawPoint(n,i,r,o,s,a))}}),pt=N.global.defaultColor;function mt(t){return t&&void 0!==t.width}function vt(t){var e,n,i,a,r;return mt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,i=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function bt(t,e,n){return t===e?n:t===n?e:t}function xt(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=bt(e,\"left\",\"right\")):t.base<t.y&&(e=bt(e,\"bottom\",\"top\")),n[e]=!0,n):n}(t);return H.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function yt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&vt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}N._set(\"global\",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:\"bottom\",borderWidth:0}}});var _t=K.extend({_type:\"rectangle\",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=vt(t),n=e.right-e.left,i=e.bottom-e.top,a=xt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill(\"evenodd\"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return yt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return mt(n)?yt(n,t,null):yt(n,null,e)},inXRange:function(t){return yt(this._view,t,null)},inYRange:function(t){return yt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return mt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return mt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),kt={},wt=st,Mt=dt,St=gt,Ct=_t;kt.Arc=wt,kt.Line=Mt,kt.Point=St,kt.Rectangle=Ct;var Pt=H._deprecated,At=H.valueOrDefault;function Dt(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=H.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return H.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}N._set(\"bar\",{hover:{mode:\"label\"},scales:{xAxes:[{type:\"category\",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:\"linear\"}]}}),N._set(\"global\",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Tt=it.extend({dataElementType:kt.Rectangle,_dataElementOptions:[\"backgroundColor\",\"borderColor\",\"borderSkipped\",\"borderWidth\",\"barPercentage\",\"barThickness\",\"categoryPercentage\",\"maxBarThickness\",\"minBarLength\"],initialize:function(){var t,e,n=this;it.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Pt(\"bar chart\",e.barPercentage,\"scales.[x/y]Axes.barPercentage\",\"dataset.barPercentage\"),Pt(\"bar chart\",e.barThickness,\"scales.[x/y]Axes.barThickness\",\"dataset.barThickness\"),Pt(\"bar chart\",e.categoryPercentage,\"scales.[x/y]Axes.categoryPercentage\",\"dataset.categoryPercentage\"),Pt(\"bar chart\",n._getValueScale().options.minBarLength,\"scales.[x/y]Axes.minBarLength\",\"dataset.minBarLength\"),Pt(\"bar chart\",e.maxBarThickness,\"scales.[x/y]Axes.maxBarThickness\",\"dataset.maxBarThickness\")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},H.isArray(r.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var a=this,r=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,e,i),h=a.calculateBarIndexPixels(a.index,e,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._getValueScale(),c=h.isHorizontal(),f=d.data.datasets,g=h._getMatchingVisibleMetas(this._type),p=h._parseValue(f[t].data[e]),m=n.minBarLength,v=h.options.stacked,b=this.getMeta().stack,x=void 0===p.start?0:p.max>=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)<m&&(l=m,s=y>=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a=\"flex\"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),i=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):Dt(e,n,i),r=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(At(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),a=n.length,r=0;for(H.canvas.clipArea(t.ctx,t.chartArea);r<a;++r){var o=e._parseValue(i.data[r]);isNaN(o.min)||isNaN(o.max)||n[r].draw()}H.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=this,e=H.extend({},it.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=At(n.barPercentage,e.barPercentage),e.barThickness=At(n.barThickness,e.barThickness),e.categoryPercentage=At(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=At(n.maxBarThickness,e.maxBarThickness),e.minBarLength=At(i.minBarLength,e.minBarLength),e}}),It=H.valueOrDefault,Ft=H.options.resolve;N._set(\"bubble\",{hover:{mode:\"single\"},scales:{xAxes:[{type:\"linear\",position:\"bottom\",id:\"x-axis-0\"}],yAxes:[{type:\"linear\",position:\"left\",id:\"y-axis-0\"}]},tooltips:{callbacks:{title:function(){return\"\"},label:function(t,e){var n=e.datasets[t.datasetIndex].label||\"\",i=e.datasets[t.datasetIndex].data[t.index];return n+\": (\"+t.xLabel+\", \"+t.yLabel+\", \"+i.r+\")\"}}}});var Ot=it.extend({dataElementType:kt.Point,_dataElementOptions:[\"backgroundColor\",\"borderColor\",\"borderWidth\",\"hoverBackgroundColor\",\"hoverBorderColor\",\"hoverBorderWidth\",\"hoverRadius\",\"hitRadius\",\"pointStyle\",\"rotation\"],update:function(t){var e=this,n=e.getMeta().data;H.each(n,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue(\"object\"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=It(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=It(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=It(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,a=n.getDataset(),r=t.custom||{},o=a.data[e]||{},s=it.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=H.extend({},s)),s.radius=Ft([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Lt=H.valueOrDefault,Rt=Math.PI,zt=2*Rt,Nt=Rt/2;N._set(\"doughnut\",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:\"single\"},legendCallback:function(t){var e,n,i,a=document.createElement(\"ul\"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute(\"class\",t.id+\"-legend\"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement(\"li\"))).appendChild(document.createElement(\"span\")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-Nt,circumference:zt,tooltips:{callbacks:{title:function(){return\"\"},label:function(t,e){var n=e.labels[t.index],i=\": \"+e.datasets[t.datasetIndex].data[t.index];return H.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Bt=it.extend({dataElementType:kt.Arc,linkScales:H.noop,_dataElementOptions:[\"backgroundColor\",\"borderColor\",\"borderWidth\",\"borderAlign\",\"hoverBackgroundColor\",\"hoverBorderColor\",\"hoverBorderWidth\"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,a,r=this,o=r.chart,s=o.chartArea,l=o.options,u=1,d=1,h=0,c=0,f=r.getMeta(),g=f.data,p=l.cutoutPercentage/100||0,m=l.circumference,v=r._getRingWeight(r.index);if(m<zt){var b=l.rotation%zt,x=(b+=b>=Rt?-zt:b<-Rt?zt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=zt,S=b<=Nt&&x>=Nt||x>=zt+Nt,C=b<=-Nt&&x>=-Nt||x>=Rt+Nt,P=b===-Rt||x>=Rt?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i<a;++i)g[i]._options=r._resolveDataElementOptions(g[i],i);for(o.borderWidth=r.getMaxBorderWidth(),e=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(e,n)/2,0),o.innerRadius=Math.max(o.outerRadius*p,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),o.offsetX=h*o.outerRadius,o.offsetY=c*o.outerRadius,f.total=r.calculateTotal(),r.outerRadius=o.outerRadius-o.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-o.radiusLength*v,0),i=0,a=g.length;i<a;++i)r.updateElement(g[i],i,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/zt),g=n&&s.animateScale?0:i.innerRadius,p=n&&s.animateScale?0:i.outerRadius,m=t._options||{};H.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:p,innerRadius:g,label:H.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return H.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?zt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),o=r._resolveDataElementOptions(a,e)):o=a._options,\"inner\"!==o.borderAlign&&(s=o.borderWidth,u=(l=o.hoverBorderWidth)>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Lt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});N._set(\"horizontalBar\",{hover:{mode:\"index\",axis:\"y\"},scales:{xAxes:[{type:\"linear\",position:\"bottom\"}],yAxes:[{type:\"category\",position:\"left\",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:\"left\"}},tooltips:{mode:\"index\",axis:\"y\"}}),N._set(\"global\",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Et=Tt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Wt=H.valueOrDefault,Vt=H.options.resolve,Ht=H.canvas._isPointInArea;function jt(t,e){var n=t&&t.options.ticks||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}function qt(t,e,n){var i=n/2,a=jt(t,i),r=jt(e,i);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function Ut(t){var e,n,i,a;return H.isObject(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a}}N._set(\"line\",{showLines:!0,spanGaps:!1,hover:{mode:\"label\"},scales:{xAxes:[{type:\"category\",id:\"x-axis-0\"}],yAxes:[{type:\"linear\",id:\"y-axis-0\"}]}});var Yt=it.extend({datasetElementType:kt.Line,dataElementType:kt.Point,_datasetElementOptions:[\"backgroundColor\",\"borderCapStyle\",\"borderColor\",\"borderDash\",\"borderDashOffset\",\"borderJoinStyle\",\"borderWidth\",\"cubicInterpolationMode\",\"fill\"],_dataElementOptions:{backgroundColor:\"pointBackgroundColor\",borderColor:\"pointBorderColor\",borderWidth:\"pointBorderWidth\",hitRadius:\"pointHitRadius\",hoverBackgroundColor:\"pointHoverBackgroundColor\",hoverBorderColor:\"pointHoverBorderColor\",hoverBorderWidth:\"pointHoverBorderWidth\",hoverRadius:\"pointHoverRadius\",pointStyle:\"pointStyle\",radius:\"pointRadius\",rotation:\"pointRotation\"},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.options,l=i._config,u=i._showLine=Wt(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r._xScale,c=r._yScale,f=o.dataset._model,g=r._resolveDataElementOptions(t,e);i=h.getPixelForValue(\"object\"==typeof d?d:NaN,e,u),a=n?c.getBasePixel():r.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Wt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},a=e.chart.options,r=a.elements.line,o=it.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Wt(n.spanGaps,a.spanGaps),o.tension=Wt(n.lineTension,r.tension),o.steppedLine=Vt([i.steppedLine,n.steppedLine,r.stepped]),o.clip=Ut(Wt(n.clip,qt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._yScale,c=0,f=0;if(h.options.stacked){for(s=+h.getRightValue(t),u=(l=d._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(r=l[i]).index!==n;++i)a=d.data.datasets[r.index],\"line\"===r.type&&r.yAxisID===h.id&&((o=+h.getRightValue(a.data[e]))<0?f+=o||0:c+=o||0);return s<0?h.getPixelForValue(f+s):h.getPixelForValue(c+s)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),\"monotone\"===o.cubicInterpolationMode)H.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=H.splineCurve(H.previousItem(l,t)._model,n,H.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,Ht(n,s)&&(t>0&&Ht(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Ht(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],a=e.chartArea,r=e.canvas,o=0,s=i.length;for(this._showLine&&(t=n.dataset._model.clip,H.canvas.clipArea(e.ctx,{left:!1===t.left?0:a.left-t.left,right:!1===t.right?r.width:a.right+t.right,top:!1===t.top?0:a.top-t.top,bottom:!1===t.bottom?r.height:a.bottom+t.bottom}),n.dataset.draw(),H.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(a)},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Wt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Wt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Wt(n.hoverBorderWidth,n.borderWidth),e.radius=Wt(n.hoverRadius,n.radius)}}),Gt=H.options.resolve;N._set(\"polarArea\",{scale:{type:\"radialLinear\",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,a=document.createElement(\"ul\"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute(\"class\",t.id+\"-legend\"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement(\"li\"))).appendChild(document.createElement(\"span\")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return\"\"},label:function(t,e){return e.labels[t.index]+\": \"+t.yLabel}}}});var Xt=it.extend({dataElementType:kt.Arc,linkScales:H.noop,_dataElementOptions:[\"backgroundColor\",\"borderColor\",\"borderWidth\",\"borderAlign\",\"hoverBackgroundColor\",\"hoverBorderColor\",\"hoverBorderWidth\"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveDataElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],p=g+(t.hidden?0:i._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};H.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:p,label:H.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return H.each(e.data,(function(e,i){isNaN(t.data[i])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor,a=H.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();if(isNaN(i.data[t])||a.data[t].hidden)return 0;var r={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Gt([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}});N._set(\"pie\",H.clone(N.doughnut)),N._set(\"pie\",{cutoutPercentage:0});var Kt=Bt,Zt=H.valueOrDefault;N._set(\"radar\",{spanGaps:!1,scale:{type:\"radialLinear\"},elements:{line:{fill:\"start\",tension:0}}});var $t=it.extend({datasetElementType:kt.Line,dataElementType:kt.Point,linkScales:H.noop,_datasetElementOptions:[\"backgroundColor\",\"borderWidth\",\"borderColor\",\"borderCapStyle\",\"borderDash\",\"borderDashOffset\",\"borderJoinStyle\",\"fill\"],_dataElementOptions:{backgroundColor:\"pointBackgroundColor\",borderColor:\"pointBorderColor\",borderWidth:\"pointBorderWidth\",hitRadius:\"pointHitRadius\",hoverBackgroundColor:\"pointHoverBackgroundColor\",hoverBorderColor:\"pointHoverBorderColor\",hoverBorderWidth:\"pointHoverBorderWidth\",hoverRadius:\"pointHoverRadius\",pointStyle:\"pointStyle\",radius:\"pointRadius\",rotation:\"pointRotation\"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Zt(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=it.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=Zt(e.spanGaps,n.spanGaps),i.tension=Zt(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter((function(t){return!t._model.skip}))),t=0,e=o.length;t<e;++t)n=o[t]._model,i=H.splineCurve(H.previousItem(o,t,!0)._model,n,H.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Zt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Zt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Zt(n.hoverBorderWidth,n.borderWidth),e.radius=Zt(n.hoverRadius,n.radius)}});N._set(\"scatter\",{hover:{mode:\"single\"},scales:{xAxes:[{id:\"x-axis-1\",type:\"linear\",position:\"bottom\"}],yAxes:[{id:\"y-axis-1\",type:\"linear\",position:\"left\"}]},tooltips:{callbacks:{title:function(){return\"\"},label:function(t){return\"(\"+t.xLabel+\", \"+t.yLabel+\")\"}}}}),N._set(\"global\",{datasets:{scatter:{showLine:!1}}});var Jt={bar:Tt,bubble:Ot,doughnut:Bt,horizontalBar:Et,line:Yt,polarArea:Xt,pie:Kt,radar:$t,scatter:Yt};function Qt(t,e){return t.native?{x:t.x,y:t.y}:H.getRelativePosition(t,e)}function te(t,e){var n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function ee(t,e){var n=[];return te(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function ne(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return te(t,(function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function ie(t){var e=-1!==t.indexOf(\"x\"),n=-1!==t.indexOf(\"y\");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function ae(t,e,n){var i=Qt(e,t);n.axis=n.axis||\"x\";var a=ie(n.axis),r=n.intersect?ee(t,i):ne(t,i,!1,a),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)})),o):[]}var re={modes:{single:function(t,e){var n=Qt(e,t),i=[];return te(t,(function(t){if(t.inRange(n.x,n.y))return i.push(t),i})),i.slice(0,1)},label:ae,index:ae,dataset:function(t,e,n){var i=Qt(e,t);n.axis=n.axis||\"xy\";var a=ie(n.axis),r=n.intersect?ee(t,i):ne(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},\"x-axis\":function(t,e){return ae(t,e,{intersect:!1})},point:function(t,e){return ee(t,Qt(e,t))},nearest:function(t,e,n){var i=Qt(e,t);n.axis=n.axis||\"xy\";var a=ie(n.axis);return ne(t,i,n.intersect,a)},x:function(t,e,n){var i=Qt(e,t),a=[],r=!1;return te(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Qt(e,t),a=[],r=!1;return te(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},oe=H.extend;function se(t,e){return H.where(t,(function(t){return t.pos===e}))}function le(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function ue(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function de(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-ue(o,t,\"left\",\"right\"),a=e.outerHeight-ue(o,t,\"top\",\"bottom\"),i!==t.w||a!==t.h){t.w=i,t.h=a;var l=n.horizontal?[i,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function he(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?[\"left\",\"right\"]:[\"top\",\"bottom\"])}function ce(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;i<a;++i)(o=(r=t[i]).box).update(r.width||e.w,r.height||e.h,he(r.horizontal,e)),de(e,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&ce(u,e,n)||l}function fe(t,e,n){var i,a,r,o,s=n.padding,l=e.x,u=e.y;for(i=0,a=t.length;i<a;++i)o=(r=t[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}N._set(\"global\",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ge,pe={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||\"top\",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=[\"fullWidth\",\"position\",\"weight\"],r=a.length,o=0;o<r;++o)i=a[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=t.options.layout||{},a=H.options.toPadding(i.padding),r=e-a.width,o=n-a.height,s=function(t){var e=function(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],a.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return a}(t),n=le(se(e,\"left\"),!0),i=le(se(e,\"right\")),a=le(se(e,\"top\"),!0),r=le(se(e,\"bottom\"));return{leftAndTop:n.concat(a),rightAndBottom:i.concat(r),chartArea:se(e,\"chartArea\"),vertical:n.concat(i),horizontal:a.concat(r)}}(t.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:o/2}),h=oe({maxPadding:oe({},a),w:r,h:o,x:a.left,y:a.top},a);!function(t,e){var n,i,a;for(n=0,i=t.length;n<i;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),ce(l,h,d),ce(u,h,d)&&ce(l,h,d),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n(\"top\"),t.x+=n(\"left\"),n(\"right\"),n(\"bottom\")}(h),fe(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,fe(s.rightAndBottom,h,d),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},H.each(s.chartArea,(function(e){var n=e.box;oe(n,t.chartArea),n.update(h.w,h.h)}))}}},me=(ge=Object.freeze({__proto__:null,default:\"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}\"}))&&ge.default||ge,ve=\"$chartjs\",be=\"chartjs-size-monitor\",xe=\"chartjs-render-monitor\",ye=\"chartjs-render-animation\",_e=[\"animationstart\",\"webkitAnimationStart\"],ke={touchstart:\"mousedown\",touchmove:\"mousemove\",touchend:\"mouseup\",pointerenter:\"mouseenter\",pointerdown:\"mousedown\",pointermove:\"mousemove\",pointerup:\"mouseup\",pointerleave:\"mouseout\",pointerout:\"mouseout\"};function we(t,e){var n=H.getStyle(t,e),i=n&&n.match(/^(\\d+)(\\.\\d+)?px$/);return i?Number(i[1]):void 0}var Me=!!function(){var t=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){t=!0}});window.addEventListener(\"e\",null,e)}catch(t){}return t}()&&{passive:!0};function Se(t,e,n){t.addEventListener(e,n,Me)}function Ce(t,e,n){t.removeEventListener(e,n,Me)}function Pe(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Ae(t){var e=document.createElement(\"div\");return e.className=t||\"\",e}function De(t,e,n){var i,a,r,o,s=t[ve]||(t[ve]={}),l=s.resizer=function(t){var e=Ae(be),n=Ae(be+\"-expand\"),i=Ae(be+\"-shrink\");n.appendChild(Ae()),i.appendChild(Ae()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Se(n,\"scroll\",a.bind(n,\"expand\")),Se(i,\"scroll\",a.bind(i,\"shrink\")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Pe(\"resize\",n)),i&&i.clientWidth<a&&n.canvas&&e(Pe(\"resize\",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,H.requestAnimFrame.call(window,(function(){r=!1,i.apply(a,o)})))}));!function(t,e){var n=t[ve]||(t[ve]={}),i=n.renderProxy=function(t){t.animationName===ye&&e()};H.each(_e,(function(e){Se(t,e,i)})),n.reflow=!!t.offsetParent,t.classList.add(xe)}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}function Te(t){var e=t[ve]||{},n=e.resizer;delete e.resizer,function(t){var e=t[ve]||{},n=e.renderProxy;n&&(H.each(_e,(function(e){Ce(t,e,n)})),delete e.renderProxy),t.classList.remove(xe)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Ie={disableCSSInjection:!1,_enabled:\"undefined\"!=typeof window&&\"undefined\"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[ve]||(t[ve]={});if(!n.containsStyles){n.containsStyles=!0,e=\"/* Chart.js */\\n\"+e;var i=document.createElement(\"style\");i.setAttribute(\"type\",\"text/css\"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,me)}},acquireContext:function(t,e){\"string\"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext(\"2d\");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute(\"height\"),a=t.getAttribute(\"width\");if(t[ve]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||\"block\",null===a||\"\"===a){var r=we(t,\"width\");void 0!==r&&(t.width=r)}if(null===i||\"\"===i)if(\"\"===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=we(t,\"height\");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[ve]){var n=e[ve].initial;[\"height\",\"width\"].forEach((function(t){var i=n[t];H.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),H.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[ve]}},addEventListener:function(t,e,n){var i=t.canvas;if(\"resize\"!==e){var a=n[ve]||(n[ve]={});Se(i,e,(a.proxies||(a.proxies={}))[t.id+\"_\"+e]=function(e){n(function(t,e){var n=ke[t.type]||t.type,i=H.getRelativePosition(t,e);return Pe(n,e,i.x,i.y,t)}(e,t))})}else De(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if(\"resize\"!==e){var a=((n[ve]||{}).proxies||{})[t.id+\"_\"+e];a&&Ce(i,e,a)}else Te(i)}};H.addEvent=Se,H.removeEvent=Ce;var Fe=Ie._enabled?Ie:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext(\"2d\")||null}},Oe=H.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Fe);N._set(\"global\",{plugins:{}});var Le={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if(\"function\"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=H.clone(N.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}})),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Re={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=H.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?H.merge(Object.create(null),[N.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=H.extend(this.defaults[t],e))},addScalesToLayout:function(t){H.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,pe.addBox(t,e)}))}},ze=H.valueOrDefault,Ne=H.rtl.getRtlAdapter;N._set(\"global\",{tooltips:{enabled:!0,custom:null,mode:\"nearest\",position:\"average\",intersect:!0,backgroundColor:\"rgba(0,0,0,0.8)\",titleFontStyle:\"bold\",titleSpacing:2,titleMarginBottom:6,titleFontColor:\"#fff\",titleAlign:\"left\",bodySpacing:2,bodyFontColor:\"#fff\",bodyAlign:\"left\",footerFontStyle:\"bold\",footerSpacing:2,footerMarginTop:6,footerFontColor:\"#fff\",footerAlign:\"left\",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:\"#fff\",displayColors:!0,borderColor:\"rgba(0,0,0,0)\",borderWidth:0,callbacks:{beforeTitle:H.noop,title:function(t,e){var n=\"\",i=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:H.noop,beforeBody:H.noop,beforeLabel:H.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||\"\";return n&&(n+=\": \"),H.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:H.noop,afterBody:H.noop,beforeFooter:H.noop,footer:H.noop,afterFooter:H.noop}}});var Be={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=H.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function Ee(t,e){return e&&(H.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function We(t){return(\"string\"==typeof t||t instanceof String)&&t.indexOf(\"\\n\")>-1?t.split(\"\\n\"):t}function Ve(t){var e=N.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:ze(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:ze(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:ze(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:ze(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:ze(t.titleFontStyle,e.defaultFontStyle),titleFontSize:ze(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:ze(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:ze(t.footerFontStyle,e.defaultFontStyle),footerFontSize:ze(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function He(t,e){return\"center\"===e?t.x+t.width/2:\"right\"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function je(t){return Ee([],We(t))}var qe=K.extend({initialize:function(){this._model=Ve(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Ee(o,We(i)),o=Ee(o,We(a)),o=Ee(o,We(r))},getBeforeBody:function(){return je(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return H.each(t,(function(t){var r={before:[],lines:[],after:[]};Ee(r.before,We(i.beforeLabel.call(n,t,e))),Ee(r.lines,i.label.call(n,t,e)),Ee(r.after,We(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return je(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Ee(r,We(n)),r=Ee(r,We(i)),r=Ee(r,We(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=Ve(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],k=[];y=Be[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;e<n;++e)w.push((i=p[e],a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,a=i._xScale,r=i._yScale||i._scale,o=i._index,s=i._datasetIndex,l=i._chart.getDatasetMeta(s).controller,u=l._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):\"\",yLabel:r?r.getLabelForIndex(o,s):\"\",label:u?\"\"+u.getLabelForIndex(o,s):\"\",value:d?\"\"+d.getLabelForIndex(o,s):\"\",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));c.filter&&(w=w.filter((function(t){return c.filter(t,m)}))),c.itemSort&&(w=w.sort((function(t,e){return c.itemSort(t,e,m)}))),H.each(w,(function(t){_.push(c.callbacks.labelColor.call(h,t,h._chart)),k.push(c.callbacks.labelTextColor.call(h,t,h._chart))})),g.title=h.getTitle(w,m),g.beforeBody=h.getBeforeBody(w,m),g.body=h.getBody(w,m),g.afterBody=h.getAfterBody(w,m),g.footer=h.getFooter(w,m),g.x=y.x,g.y=y.y,g.caretPadding=c.caretPadding,g.labelColors=_,g.labelTextColors=k,g.dataPoints=w,x=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=H.fontString(u,e._titleFontStyle,e._titleFontFamily),H.each(e.title,f),n.font=H.fontString(d,e._bodyFontStyle,e._bodyFontFamily),H.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,H.each(r,(function(t){H.each(t.before,f),H.each(t.lines,f),H.each(t.after,f)})),c=0,n.font=H.fontString(h,e._footerFontStyle,e._footerFontFamily),H.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,g),b=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,h=o+s,c=l+s;return\"right\"===u?a-=e.width:\"center\"===u&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),\"top\"===d?r+=h:r-=\"bottom\"===d?e.height+h:e.height/2,\"center\"===d?\"left\"===u?a+=h:\"right\"===u&&(a-=h):\"left\"===u?a-=c:\"right\"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d=\"center\",h=\"center\";s.y<e.height?h=\"top\":s.y>l.height-e.height&&(h=\"bottom\");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;\"center\"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?\"top\":\"bottom\"},n(s.x)?(d=\"left\",a(s.x)&&(d=\"center\",h=o(s.y))):i(s.x)&&(d=\"right\",r(s.x)&&(d=\"center\",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if(\"center\"===c)s=g+m/2,\"left\"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if(\"left\"===h?(i=(a=f+d+u)-u,r=a+u):\"right\"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),\"top\"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=Ne(e.rtl,e.x,e.width);for(t.x=He(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline=\"middle\",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=H.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(t.x),t.y+i/2),t.y+=i+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var i,a,r,o,s,l,u,d,h=e.bodyFontSize,c=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,m=0,v=p?He(e,\"left\"):0,b=Ne(e.rtl,e.x,e.width),x=function(e){n.fillText(e,b.x(t.x+m),t.y+h/2),t.y+=h+c},y=b.textAlign(f);for(n.textAlign=f,n.textBaseline=\"middle\",n.font=H.fontString(h,e._bodyFontStyle,e._bodyFontFamily),t.x=He(e,y),n.fillStyle=e.bodyFontColor,H.each(e.beforeBody,x),m=p&&\"right\"!==y?\"center\"===f?h/2+1:h+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],a=e.labelTextColors[s],r=e.labelColors[s],n.fillStyle=a,H.each(i.before,x),l=0,d=(o=i.lines).length;l<d;++l){if(p){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,h),t.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(_,h),t.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),h-2),t.y+1,h-2,h-2),n.fillStyle=a}x(o[l])}H.each(i.after,x)}m=0,H.each(e.afterBody,x),t.y-=c},drawFooter:function(t,e,n){var i,a,r=e.footer,o=r.length;if(o){var s=Ne(e.rtl,e.x,e.width);for(t.x=He(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline=\"middle\",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=H.fontString(i,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(r[a],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),\"top\"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),\"center\"===r&&\"right\"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),\"bottom\"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),\"center\"===r&&\"left\"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,H.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),H.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],\"mouseout\"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!H.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),Ue=Be,Ye=qe;Ye.positioners=Ue;var Ge=H.valueOrDefault;function Xe(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if(\"xAxes\"===t||\"yAxes\"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)o=n[t][a],r=Ge(o.type,\"xAxes\"===t?\"category\":\"linear\"),a>=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?H.merge(e[t][a],[Re.getScaleDefaults(r),o]):H.merge(e[t][a],o)}else H._merger(t,e,n,i)}})}function Ke(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||Object.create(null),r=n[t];\"scales\"===t?e[t]=Xe(a,r):\"scale\"===t?e[t]=H.merge(a,[Re.getScaleDefaults(r.type),r]):H._merger(t,e,n,i)}})}function Ze(t){var e=t.options;H.each(t.scales,(function(e){pe.removeBox(t,e)})),e=Ke(N.global,N[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function $e(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(H.findIndex(t,a)>=0);return i}function Je(t){return\"top\"===t||\"bottom\"===t}function Qe(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}N._set(\"global\",{elements:{},events:[\"mousemove\",\"mouseout\",\"click\",\"touchstart\",\"touchmove\"],hover:{onHover:null,mode:\"nearest\",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var tn=function(t,e){return this.construct(t,e),this};H.extend(tn.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Ke(N.global,N[t.type],t.options||{}),t}(e);var i=Oe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=H.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,tn.instances[n.id]=n,Object.defineProperty(n,\"data\",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error(\"Failed to create chart: can't acquire context from the given item\")},initialize:function(){var t=this;return Le.notify(t,\"beforeInit\"),H.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Le.notify(t,\"afterInit\"),t},clear:function(){return H.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(H.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:H.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+\"px\",i.style.height=o+\"px\",H.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Le.notify(e,\"resize\",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;H.each(e.xAxes,(function(t,n){t.id||(t.id=$e(e.xAxes,\"x-axis-\",n))})),H.each(e.yAxes,(function(t,n){t.id||(t.id=$e(e.yAxes,\"y-axis-\",n))})),n&&(n.id=n.id||\"scale\")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:\"category\",dposition:\"bottom\"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:\"linear\",dposition:\"left\"}})))),e.scale&&i.push({options:e.scale,dtype:\"radialLinear\",isDefault:!0,dposition:\"chartArea\"}),H.each(i,(function(e){var i=e.options,r=i.id,o=Ge(i.type,e.dtype);Je(i.position)!==Je(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Re.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),H.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Re.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],o=n.getDatasetMeta(t),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=Jt[o.type];if(void 0===l)throw new Error('\"'+o.type+'\" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;H.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&\"object\"==typeof t||(t={duration:t,lazy:arguments[1]}),Ze(i),Le._invalidate(i),!1!==Le.notify(i,\"beforeUpdate\")){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&H.each(a,(function(t){t.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Le.notify(i,\"afterUpdate\"),i._layers.sort(Qe(\"z\",\"_idx\")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==Le.notify(t,\"beforeLayout\")&&(pe.update(this,this.width,this.height),t._layers=[],H.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),Le.notify(t,\"afterScaleUpdate\"),Le.notify(t,\"afterLayout\"))},updateDatasets:function(){if(!1!==Le.notify(this,\"beforeDatasetsUpdate\")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Le.notify(this,\"afterDatasetsUpdate\")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Le.notify(this,\"beforeDatasetUpdate\",[n])&&(e.controller._update(),Le.notify(this,\"afterDatasetUpdate\",[n]))},render:function(t){var e=this;t&&\"object\"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ge(t.duration,n&&n.duration),a=t.lazy;if(!1!==Le.notify(e,\"beforeRender\")){var r=function(t){Le.notify(e,\"afterRender\"),H.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new $({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=H.easing.effects[e.easing],i=e.currentStep,a=i/e.numSteps;t.draw(n(a),a,i)},onAnimationProgress:n.onProgress,onAnimationComplete:r});J.addAnimation(e,o,i,a)}else e.draw(),r(new $({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),H.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==Le.notify(i,\"beforeDraw\",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),Le.notify(i,\"afterDraw\",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||i.push(this.getDatasetMeta(e));return i.sort(Qe(\"order\",\"index\")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Le.notify(this,\"beforeDatasetsDraw\",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(e[n],t);Le.notify(this,\"afterDatasetsDraw\",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Le.notify(this,\"beforeDatasetDraw\",[n])&&(t.controller.draw(e),Le.notify(this,\"afterDatasetDraw\",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Le.notify(this,\"beforeTooltipDraw\",[n])&&(e.draw(),Le.notify(this,\"afterTooltipDraw\",[n]))},getElementAtEvent:function(t){return re.modes.single(this,t)},getElementsAtEvent:function(t){return re.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return re.modes[\"x-axis\"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=re.modes[e];return\"function\"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return re.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return\"boolean\"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),H.canvas.clear(n),Oe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Le.notify(n,\"destroy\"),delete tn.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ye({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};H.each(t.options.events,(function(i){Oe.addEventListener(t,i,n),e[i]=n})),t.options.responsive&&(n=function(){t.resize()},Oe.addEventListener(t,\"resize\",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,H.each(e,(function(e,n){Oe.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?\"set\":\"remove\";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+\"HoverStyle\"](i);\"dataset\"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller[\"_\"+o+\"DatasetHoverStyle\"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Le.notify(e,\"beforeEvent\",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Le.notify(e,\"afterEvent\",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],\"mouseout\"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),H.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),\"mouseup\"!==t.type&&\"click\"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!H.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),tn.instances={};var en=tn;tn.Controller=tn,tn.types={},H.configMerge=Ke,H.scaleMerge=Xe;function nn(){throw new Error(\"This method is not implemented: either no adapter can be found or an incomplete integration was provided.\")}function an(t){this.options=t||{}}H.extend(an.prototype,{formats:nn,parse:nn,format:nn,add:nn,diff:nn,startOf:nn,endOf:nn,_create:function(t){return t}}),an.override=function(t){H.extend(an.prototype,t)};var rn={_date:an},on={formatters:{values:function(t){return H.isArray(t)?t:\"\"+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=H.log10(Math.abs(i)),r=\"\";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=H.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r=\"0\";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(H.log10(t)));return 0===t?\"0\":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():\"\"}}},sn=H.isArray,ln=H.isNullOrUndef,un=H.valueOrDefault,dn=H.valueAtIndexOrDefault;function hn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=r<e?i:-i)<s-1e-6||o>l+1e-6)))return o}function cn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[],_=0,k=0;for(a=0;a<v;++a){if(s=n[a].label,l=n[a].major?e.major:e.minor,t.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,c=f=0,ln(s)||sn(s)){if(sn(s))for(r=0,o=s.length;r<o;++r)g=s[r],ln(g)||sn(g)||(c=H.measureText(t,d.data,d.gc,c,g),f+=h)}else c=H.measureText(t,d.data,d.gc,c,s),f=h;b.push(c),x.push(f),y.push(h/2),_=Math.max(c,_),k=Math.max(f,k)}function w(t){return{width:b[t]||0,height:x[t]||0,offset:y[t]||0}}return function(t,e){H.each(t,(function(t){var n,i=t.gc,a=i.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[i[n]];i.splice(0,a)}}))}(i,v),p=b.indexOf(_),m=x.indexOf(k),{first:w(0),last:w(v-1),widest:w(p),highest:w(m)}}function fn(t){return t.drawTicks?t.tickMarkLength:0}function gn(t){var e,n;return t.display?(e=H.options._parseFont(t),n=H.options.toPadding(t.padding),e.lineHeight+n.height):0}function pn(t,e){return H.extend(H.options._parseFont({fontFamily:un(e.fontFamily,t.fontFamily),fontSize:un(e.fontSize,t.fontSize),fontStyle:un(e.fontStyle,t.fontStyle),lineHeight:un(e.lineHeight,t.lineHeight)}),{color:H.options.resolve([e.fontColor,t.fontColor,N.global.defaultFontColor])})}function mn(t){var e=pn(t,t.minor);return{minor:e,major:t.major.enabled?pn(t,t.major):e}}function vn(t){var e,n,i,a=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function bn(t,e,n,i){var a,r,o,s,l=un(n,0),u=Math.min(un(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(a=i-n)/Math.floor(a/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(r=Math.max(l,0);r<u;r++)o=t[r],r===s?(o._index=r,d++,s=Math.round(l+d*e)):delete o.label}N._set(\"scale\",{display:!0,position:\"left\",offset:!1,gridLines:{display:!0,color:\"rgba(0,0,0,0.1)\",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:\"rgba(0,0,0,0.25)\",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:\"\",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:on.formatters.values,minor:{},major:{}}});var xn=K.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){H.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=H.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,r=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;a<r;a+=i)n.push(t[Math.floor(a)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||\"auto\"===u.source)?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){H.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){H.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){H.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){H.callback(this.options.beforeDataLimits,[this])},determineDataLimits:H.noop,afterDataLimits:function(){H.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){H.callback(this.options.beforeBuildTicks,[this])},buildTicks:H.noop,afterBuildTicks:function(t){var e=this;return sn(t)&&t.length?H.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=H.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){H.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){H.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){H.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,a,r,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,c=u.maxRotation,f=h;!s._isVisible()||!u.display||h>=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-fn(l.gridLines)-u.padding-gn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=H.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){H.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){H.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l=\"bottom\"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=fn(o)+gn(r)),u?s&&(e.height=fn(o)+gn(r)):e.height=t.maxHeight,a.display&&s){var d=mn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=H.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){H.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return\"top\"===t||\"bottom\"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ln(t))return NaN;if((\"number\"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=cn(t.ctx,mn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,a;return sn(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),i=t,a=t),{min:i,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?\"[\"+e.start+\", \"+e.end+\"]\":+this.getRightValue(t)},getLabelForIndex:H.noop,getPixelForValue:H.noop,getValueForPixel:H.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)a=t[i],i===o?(a._index=i,o=e[++r*n]):delete a.label}(t,l,u/s),vn(t);if(i=function(t,e,n,i){var a,r,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(o=0,s=(a=H.math._factorize(l)).length-1;o<s;o++)if((r=a[o])>u)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)bn(t,i,l[e],l[e+1]);return a=u>1?(h-d)/(u-1):null,bn(t,i,H.isNullOrUndef(a)?0:d-a,d),bn(t,i,h,H.isNullOrUndef(a)?t.length:h+a),vn(t)}return bn(t,i),vn(t)},_tickSize:function(){var t=this.options.ticks,e=H.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,a=this.options.display;if(\"auto\"!==a)return!!a;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,p,m,v,b=this,x=b.chart,y=b.options,_=y.gridLines,k=y.position,w=_.offsetGridLines,M=b.isHorizontal(),S=b._ticksToDraw,C=S.length+(w?1:0),P=fn(_),A=[],D=_.drawBorder?dn(_.lineWidth,0,0):0,T=D/2,I=H._alignPixel,F=function(t){return I(x,t,D)};for(\"top\"===k?(e=F(b.bottom),s=b.bottom-P,u=e-T,h=F(t.top)+T,f=t.bottom):\"bottom\"===k?(e=F(b.top),h=t.top,f=F(t.bottom)-T,s=e+T,u=b.top+P):\"left\"===k?(e=F(b.right),o=b.right-P,l=e-T,d=F(t.left)+T,c=t.right):(e=F(b.left),d=t.left,c=F(t.right)-T,o=e+T,l=b.left+P),n=0;n<C;++n)i=S[n]||{},ln(i.label)&&n<S.length||(n===b.zeroLineIndex&&y.offset===w?(g=_.zeroLineWidth,p=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=dn(_.lineWidth,n,1),p=dn(_.color,n,\"rgba(0,0,0,0.1)\"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=hn(b,i._index||n,w))&&(r=I(x,a,g),M?o=l=d=c=r:s=u=h=f=r,A.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,width:g,color:p,borderDash:m,borderDashOffset:v})));return A.ticksLength=C,A.borderValue=e,A},_computeLabelItems:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.options,g=f.ticks,p=f.position,m=g.mirror,v=c.isHorizontal(),b=c._ticksToDraw,x=mn(g),y=g.padding,_=fn(f.gridLines),k=-H.toRadians(c.labelRotation),w=[];for(\"top\"===p?(r=c.bottom-_-y,o=k?\"left\":\"center\"):\"bottom\"===p?(r=c.top+_+y,o=k?\"right\":\"center\"):\"left\"===p?(a=c.right-(m?0:_)-y,o=m?\"left\":\"right\"):(a=c.left+(m?0:_)+y,o=m?\"right\":\"left\"),t=0,e=b.length;t<e;++t)i=(n=b[t]).label,ln(i)||(s=c.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?x.major:x.minor).lineHeight,d=sn(i)?i.length:1,v?(a=s,h=\"top\"===p?((k?1:.5)-d)*u:(k?0:.5)*u):(r=s,h=(1-d)*u/2),w.push({x:a,y:r,rotation:k,label:i,font:l,textOffset:h,textAlign:o}));return w},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,a,r,o,s,l=e.ctx,u=e.chart,d=H._alignPixel,h=n.drawBorder?dn(n.lineWidth,0,0):0,c=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=c.length;r<o;++r)i=(s=c[r]).width,a=s.color,i&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,g,p,m,v=h,b=dn(n.lineWidth,c.ticksLength-1,1),x=c.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,p=m=x):(p=d(u,e.top,v)-v/2,m=d(u,e.bottom,b)+b/2,f=g=x),l.lineWidth=h,l.strokeStyle=dn(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,a,r,o,s,l,u=t.ctx,d=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=d.length;e<i;++e){if(o=(r=d[e]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline=\"middle\",u.textAlign=r.textAlign,s=r.label,l=r.textOffset,sn(s))for(n=0,a=s.length;n<a;++n)u.fillText(\"\"+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var a,r,o=un(i.fontColor,N.global.defaultFontColor),s=H.options._parseFont(i),l=H.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(t.isHorizontal())a=t.left+t.width/2,r=\"bottom\"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var c=\"left\"===d;a=c?t.left+u+l.top:t.right-u-l.top,r=t.top+t.height/2,h=c?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(h),e.textAlign=\"center\",e.textBaseline=\"middle\",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)}))}});xn.prototype._draw=xn.prototype.draw;var yn=xn,_n=H.isNullOrUndef,kn=yn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;yn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return _n(e)||_n(n)||(t=o.chart.data.datasets[n].data[e]),_n(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=H.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),wn={position:\"bottom\"};kn._defaults=wn;var Mn=H.noop,Sn=H.isNullOrUndef;var Cn=yn.extend({getRightValue:function(t){return\"string\"==typeof t?+t:yn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=H.sign(t.min),i=H.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Mn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:H.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=H.niceNum((g-f)/u/l)*l;if(p<1e-14&&Sn(d)&&Sn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=H.niceNum(r*p/u/l)*l),s||Sn(c)?n=Math.pow(10,H._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!Sn(d)&&H.almostWhole(d/p,p/1e3)&&(i=d),!Sn(h)&&H.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=H.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Sn(d)?i:d);for(var m=1;m<r;++m)o.push(Math.round((i+m*p)*n)/n);return o.push(Sn(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=H.max(a),t.min=H.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),yn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;yn.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(a-i)/Math.max(n.length-1,1)/2,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),Pn={position:\"left\",ticks:{callback:on.formatters.linear}};function An(t,e,n,i){var a,r,o=t.options,s=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:\"\",n.stack].join(\".\");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,o.stacked,n),l=s.pos,u=s.neg,d=i.length;for(a=0;a<d;++a)r=t._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:r.min<0||r.max<0?u[a]+=r.min:l[a]+=r.max)}function Dn(t,e,n){var i,a,r=n.length;for(i=0;i<r;++i)a=t._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var Tn=Cn.extend({determineDataLimits:function(){var t,e,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<d;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<d;++t)n=o[(e=s[t]).index].data,l?An(a,u,e,n):Dn(a,e,n);H.each(u,(function(t){i=t.pos.concat(t.neg),a.min=Math.min(a.min,H.min(i)),a.max=Math.max(a.max,H.max(i))})),a.min=H.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=H.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=H.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),In=Pn;Tn._defaults=In;var Fn=H.valueOrDefault,On=H.math.log10;var Ln={position:\"left\",ticks:{callback:on.formatters.logarithmic}};function Rn(t,e){return H.isFinite(t)&&t>=0?t:e}var zn=yn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){c=!0;break}if(s.stacked||c){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:\"\",e.stack].join(\".\");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[g]&&(f[g]=[]),a=0,r=(i=u[t].data).length;a<r;a++){var p=f[g];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(p[a]=p[a]||0,p[a]+=n.max)}}H.each(f,(function(t){if(t.length>0){var e=H.min(t),n=H.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(a=0,r=(i=u[t].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=H.isFinite(o.min)?o.min:null,o.max=H.isFinite(o.max)?o.max:null,o.minNotZero=H.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=Rn(e.min,t.min),t.max=Rn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(On(t.min))-1),t.max=Math.pow(10,Math.floor(On(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(On(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(On(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(On(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Rn(e.min),max:Rn(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=Fn(t.min,Math.pow(10,Math.floor(On(e.min)))),o=Math.floor(On(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(On(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(On(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10===++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=Fn(t.max,r);return a.push(u),a}(i,t);t.max=H.max(a),t.min=H.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),yn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(On(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;yn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Fn(t.options.ticks.fontSize,N.global.defaultFontSize)/t._length),t._startValue=On(e),t._valueOffset=n,t._valueRange=(On(t.max)-On(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(On(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Nn=Ln;zn._defaults=Nn;var Bn=H.valueOrDefault,En=H.valueAtIndexOrDefault,Wn=H.options.resolve,Vn={display:!0,animate:!0,position:\"chartArea\",angleLines:{display:!0,color:\"rgba(0,0,0,0.1)\",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:\"rgba(255,255,255,0.75)\",backdropPaddingY:2,backdropPaddingX:2,callback:on.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Hn(t){var e=t.ticks;return e.display&&t.display?Bn(e.fontSize,N.global.defaultFontSize)+2*e.backdropPaddingY:0}function jn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function qn(t){return 0===t||180===t?\"center\":t<180?\"left\":\"right\"}function Un(t,e,n,i){var a,r,o=n.y+i/2;if(H.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function Yn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Gn(t){return H.isNumber(t)?t:0}var Xn=Cn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Hn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;H.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);H.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Hn(this.options))},convertTicksToLabels:function(){var t=this;Cn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=H.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:\"\"}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=H.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,u=t.pointLabels[e],n=H.isArray(u)?{w:H.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=H.toDegrees(h)%360,f=jn(c,i.x,n.w,0,180),g=jn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Gn(a),r=Gn(r),o=Gn(o),s=Gn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(H.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Bn(s.lineWidth,o.lineWidth),u=Bn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Hn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=H.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline=\"middle\";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=En(i.fontColor,s,N.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=H.toDegrees(h);e.textAlign=qn(c),Yn(c,t._pointLabelSizes[s],u),Un(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&H.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=En(e.color,i-1),u=En(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(i,o,e,n))})),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(Wn([s.borderDash,o.borderDash,[]])),a.lineDashOffset=Wn([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=H.options._parseFont(n),s=Bn(n.fontColor,N.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign=\"center\",e.textBaseline=\"middle\",H.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:H.noop}),Kn=Vn;Xn._defaults=Kn;var Zn=H._deprecated,$n=H.options.resolve,Jn=H.valueOrDefault,Qn=Number.MIN_SAFE_INTEGER||-9007199254740991,ti=Number.MAX_SAFE_INTEGER||9007199254740991,ei={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ni=Object.keys(ei);function ii(t,e){return t-e}function ai(t){return H.valueOrDefault(t.time.min,t.ticks.min)}function ri(t){return H.valueOrDefault(t.time.max,t.ticks.max)}function oi(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function si(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return\"function\"==typeof a&&(o=a(o)),H.isFinite(o)||(o=\"string\"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||\"function\"!=typeof r||(o=r(e),H.isFinite(o)||(o=n.parse(o))),o)}function li(t,e){if(H.isNullOrUndef(e))return null;var n=t.options.time,i=si(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function ui(t,e,n,i){var a,r,o,s=ni.length;for(a=ni.indexOf(t);a<s-1;++a)if(o=(r=ei[ni[a]]).steps?r.steps:ti,r.common&&Math.ceil((n-e)/(o*r.size))<=i)return ni[a];return ni[s-1]}function di(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i<s;++i)o[a=e[i]]=i,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){var a,r,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,i))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,o,n):r}var hi=yn.extend({initialize:function(){this.mergeTicksOptions(),yn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new rn._date(e.adapters.date);return Zn(\"time scale\",n.format,\"time.format\",\"time.parser\"),Zn(\"time scale\",n.min,\"time.min\",\"ticks.min\"),Zn(\"time scale\",n.max,\"time.max\",\"ticks.max\"),H.mergeIf(n.displayFormats,i.formats()),yn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),yn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||\"day\",c=ti,f=Qn,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)m.push(li(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,H.isObject(a[0]))for(p[t]=[],e=0,i=a.length;e<i;++e)r=li(s,a[e]),g.push(r),p[t][e]=r;else p[t]=m.slice(0),o||(g=g.concat(m),o=!0);else p[t]=[];m.length&&(c=Math.min(c,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=n>1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}(g).sort(ii):g.sort(ii),c=Math.min(c,g[0]),f=Math.max(f,g[g.length-1])),c=li(s,ai(d))||c,f=li(s,ri(d))||f,c=c===ti?+u.startOf(Date.now(),h):c,f=f===Qn?+u.endOf(Date.now(),h)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],h=i.getLabelCapacity(a),c=s.source,f=o.distribution;for(u=\"data\"===c||\"auto\"===c&&\"series\"===f?u.data:\"labels\"===c?u.labels:function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||ui(s.minUnit,e,n,i),u=$n([s.stepSize,s.unitStepSize,1]),d=\"week\"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+r.startOf(h,\"isoWeek\",d)),h=+r.startOf(h,d?\"day\":l),r.diff(n,e,l)>1e5*u)throw e+\" and \"+n+\" are too far apart with stepSize of \"+u+\" \"+l;for(a=h;a<n;a=+r.add(a,u,l))c.push(a);return a!==n&&\"ticks\"!==o.bounds||c.push(a),c}(i,a,r,h),\"ticks\"===o.bounds&&u.length&&(a=u[0],r=u[u.length-1]),a=li(i,ai(o))||a,r=li(i,ri(o))||r,t=0,e=u.length;t<e;++t)(n=u[t])>=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?ui(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ni.length-1;r>=ni.indexOf(n);r--)if(o=ni[r],ei[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ni[n?ni.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&\"year\"!==i._unit?function(t){for(var e=ni.indexOf(t)+1,n=ni.length;e<n;++e)if(ei[ni[e]].common)return ni[e]}(i._unit):void 0,i._table=function(t,e,n,i){if(\"linear\"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],o=d[a-1],s=d[a],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(i._timestamps.data,a,r,f),i._offsets=function(t,e,n,i,a){var r,o,s=0,l=0;return a.offset&&e.length&&(r=oi(t,\"time\",e[0],\"pos\"),s=1===e.length?1-r:(oi(t,\"time\",e[1],\"pos\")-r)/2,o=oi(t,\"time\",e[e.length-1],\"pos\"),l=1===e.length?o:(o-oi(t,\"time\",e[e.length-2],\"pos\"))/2),{start:s,end:l,factor:1/(s+1+l)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),di(i,d,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:\"\",s=a.datasets[e].data[t];return H.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(si(n,o),r.tooltipFormat):\"string\"==typeof o?o:i.format(si(n,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var a=this._adapter,r=this.options,o=r.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],h=r.ticks,c=l&&u&&d&&d.major,f=a.format(t,i||(c?u:s)),g=c?h.major:h.minor,p=$n([g.callback,g.userCallback,h.callback,h.userCallback]);return p?p(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=oi(this._table,\"time\",t,\"pos\");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=li(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=oi(this._table,\"pos\",n,\"time\");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=H.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),r=Math.sin(i),o=Jn(e.fontSize,N.global.defaultFontSize);return{w:n*a+o*r,h:n*r+o*a}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=e.tickFormatFunction(t,0,di(e,[t],e._majorUnit),a),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),ci={position:\"bottom\",distribution:\"linear\",bounds:\"data\",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:\"millisecond\",displayFormats:{}},ticks:{autoSkip:!1,source:\"auto\",major:{enabled:!1}}};hi._defaults=ci;var fi={category:kn,linear:Tn,logarithmic:zn,radialLinear:Xn,time:hi},gi={datetime:\"MMM D, YYYY, h:mm:ss a\",millisecond:\"h:mm:ss.SSS a\",second:\"h:mm:ss a\",minute:\"h:mm a\",hour:\"hA\",day:\"MMM D\",week:\"ll\",month:\"MMM YYYY\",quarter:\"[Q]Q - YYYY\",year:\"YYYY\"};rn._date.override(\"function\"==typeof t?{_id:\"moment\",formats:function(){return gi},parse:function(e,n){return\"string\"==typeof e&&\"string\"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),\"isoWeek\"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),N._set(\"global\",{plugins:{filler:{propagate:!0}}});var pi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return H.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function mi(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return\"origin\";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return\"-\"!==r[0]&&\"+\"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case\"bottom\":return\"start\";case\"top\":return\"end\";case\"zero\":return\"origin\";case\"origin\":case\"start\":case\"end\":return r;default:return!1}}function vi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a<l;++a)r=\"start\"===u||\"end\"===u?o.getPointPositionForValue(a,\"start\"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(r.cx=i.x,r.cy=i.y,r.angle=o.getIndexAngle(a)-Math.PI/2),d.push(r);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if(\"start\"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:\"end\"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(H.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function bi(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function xi(t){var e=t.fill,n=\"dataset\";return!1===e?null:(isFinite(e)||(n=\"boundary\"),pi[n](t))}function yi(t){return t&&!t.skip}function _i(t,e,n,i,a){var r,o,s,l;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)H.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)H.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function ki(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=yi(u),c=yi(d),r&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(b=m.push(u),x=v.push(d)):b&&x&&(p?(h&&m.push(u),c&&v.push(d)):(_i(t,m,v,b,x),b=x=0,m=[],v=[]));_i(t,m,v,b,x),t.closePath(),t.fillStyle=a,t.fill()}var wi={id:\"filler\",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof kt.Line&&(r={visible:t.isDatasetVisible(i),fill:mi(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=bi(l,i,s),r.boundary=vi(r),r.mapper=xi(r))},beforeDatasetsDraw:function(t){var e,n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||N.global.defaultColor,o&&s&&r.length&&(H.canvas.clipArea(u,t.chartArea),ki(u,r,o,a,s,i._loop),H.canvas.unclipArea(u)))}},Mi=H.rtl.getRtlAdapter,Si=H.noop,Ci=H.valueOrDefault;function Pi(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}N._set(\"global\",{legend:{display:!0,position:\"top\",align:\"center\",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement(\"ul\"),r=t.data.datasets;for(a.setAttribute(\"class\",t.id+\"-legend\"),e=0,n=r.length;e<n;e++)(i=a.appendChild(document.createElement(\"li\"))).appendChild(document.createElement(\"span\")).style.backgroundColor=r[e].backgroundColor,r[e].label&&i.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var Ai=K.extend({initialize:function(t){H.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:Si,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Si,beforeSetDimensions:Si,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Si,beforeBuildLabels:Si,buildLabels:function(){var t=this,e=t.options.labels||{},n=H.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:Si,beforeFit:Si,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=H.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign=\"left\",a.textBaseline=\"middle\",H.each(t.legendItems,(function(t,e){var i=Pi(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;H.each(t.legendItems,(function(t,e){var i=Pi(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Si,isHorizontal:function(){return\"top\"===this.options.position||\"bottom\"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=N.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=Mi(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Ci(n.fontColor,i.defaultFontColor),g=H.options._parseFont(n),p=g.size;c.textAlign=h.textAlign(\"left\"),c.textBaseline=\"middle\",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Pi(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case\"start\":return n.padding;case\"end\":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},H.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;H.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Ci(i.lineWidth,r.borderWidth);if(c.fillStyle=Ci(i.fillStyle,a),c.lineCap=Ci(i.lineCap,r.borderCapStyle),c.lineDashOffset=Ci(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Ci(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Ci(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Ci(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;H.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y})),H.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a=\"mouseup\"===t.type?\"click\":t.type;if(\"mousemove\"===a){if(!i.onHover&&!i.onLeave)return}else{if(\"click\"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),\"click\"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Di(t,e){var n=new Ai({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.legend=n}var Ti={id:\"legend\",_element:Ai,beforeInit:function(t){var e=t.options.legend;e&&Di(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(H.mergeIf(e,N.global.legend),n?(pe.configure(t,n,e),n.options=e):Di(t,e)):n&&(pe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Ii=H.noop;N._set(\"global\",{title:{display:!1,fontStyle:\"bold\",fullWidth:!0,padding:10,position:\"top\",text:\"\",weight:2e3}});var Fi=K.extend({initialize:function(t){H.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Ii,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Ii,beforeSetDimensions:Ii,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Ii,beforeBuildLabels:Ii,buildLabels:Ii,afterBuildLabels:Ii,beforeFit:Ii,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(H.isArray(n.text)?n.text.length:1)*H.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Ii,isHorizontal:function(){var t=this.options.position;return\"top\"===t||\"bottom\"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=H.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=H.valueOrDefault(n.fontColor,N.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a=\"left\"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*(\"left\"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign=\"center\",e.textBaseline=\"middle\";var g=n.text;if(H.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,i),p+=s;else e.fillText(g,0,0,i);e.restore()}}});function Oi(t,e){var n=new Fi({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.titleBlock=n}var Li={},Ri=wi,zi=Ti,Ni={id:\"title\",_element:Fi,beforeInit:function(t){var e=t.options.title;e&&Oi(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(H.mergeIf(e,N.global.title),n?(pe.configure(t,n,e),n.options=e):Oi(t,e)):n&&(pe.removeBox(t,n),delete t.titleBlock)}};for(var Bi in Li.filler=Ri,Li.legend=zi,Li.title=Ni,en.helpers=H,function(){function t(t,e,n){var i;return\"string\"==typeof t?(i=parseInt(t,10),-1!==t.indexOf(\"%\")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return null!=t&&\"none\"!==t}function n(n,i,a){var r=document.defaultView,o=H._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):\"none\"}H.where=function(t,e){if(H.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return H.each(t,(function(t){e(t)&&n.push(t)})),n},H.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},H.findNextWhere=function(t,e,n){H.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},H.findPreviousWhere=function(t,e,n){H.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},H.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},H.almostEquals=function(t,e,n){return Math.abs(t-e)<n},H.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},H.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},H.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},H.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},H.toRadians=function(t){return t*(Math.PI/180)},H.toDegrees=function(t){return t*(180/Math.PI)},H._decimalPlaces=function(t){if(H.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},H.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},H.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},H.aliasPixel=function(t){return t%2==0?0:.5},H._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},H.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},H.EPSILON=Number.EPSILON||1e-14,H.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)i=d[e],a=d[e+1],i.model.skip||a.model.skip||(H.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(n=e>0?d[e-1]:null,a=e<h-1?d[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(u=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.mK))},H.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},H.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},H.niceNum=function(t,e){var n=Math.floor(H.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},H.requestAnimFrame=\"undefined\"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},H.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(H.getStyle(r,\"padding-left\")),u=parseFloat(H.getStyle(r,\"padding-top\")),d=parseFloat(H.getStyle(r,\"padding-right\")),h=parseFloat(H.getStyle(r,\"padding-bottom\")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},H.getConstraintWidth=function(t){return n(t,\"max-width\",\"clientWidth\")},H.getConstraintHeight=function(t){return n(t,\"max-height\",\"clientHeight\")},H._calculatePadding=function(t,e,n){return(e=H.getStyle(t,e)).indexOf(\"%\")>-1?n*parseInt(e,10)/100:parseInt(e,10)},H._getParentNode=function(t){var e=t.parentNode;return e&&\"[object ShadowRoot]\"===e.toString()&&(e=e.host),e},H.getMaximumWidth=function(t){var e=H._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-H._calculatePadding(e,\"padding-left\",n)-H._calculatePadding(e,\"padding-right\",n),a=H.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},H.getMaximumHeight=function(t){var e=H._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-H._calculatePadding(e,\"padding-top\",n)-H._calculatePadding(e,\"padding-bottom\",n),a=H.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},H.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},H.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||\"undefined\"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+\"px\",i.style.width=r+\"px\")}},H.fontString=function(t,e,n){return e+\" \"+t+\"px \"+n},H.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;o<c;o++)if(null!=(u=n[o])&&!0!==H.isArray(u))h=H.measureText(t,a,r,h,u);else if(H.isArray(u))for(s=0,l=u.length;s<l;s++)null==(d=u[s])||H.isArray(d)||(h=H.measureText(t,a,r,h,d));var f=r.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[r[o]];r.splice(0,f)}return h},H.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),i},H.numberOfLabelLines=function(t){var e=1;return H.each(t,(function(t){H.isArray(t)&&t.length>e&&(e=t.length)})),e},H.color=_?function(t){return t instanceof CanvasGradient&&(t=N.global.defaultColor),_(t)}:function(t){return console.error(\"Color.js not found!\"),t},H.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:H.color(t).saturate(.5).darken(.1).rgbString()}}(),en._adapters=rn,en.Animation=$,en.animationService=J,en.controllers=Jt,en.DatasetController=it,en.defaults=N,en.Element=K,en.elements=kt,en.Interaction=re,en.layouts=pe,en.platform=Oe,en.plugins=Le,en.Scale=yn,en.scaleService=Re,en.Ticks=on,en.Tooltip=Ye,en.helpers.each(fi,(function(t,e){en.scaleService.registerScaleType(e,t,t._defaults)})),Li)Li.hasOwnProperty(Bi)&&en.plugins.register(Li[Bi]);en.platform.initialize();var Ei=en;return\"undefined\"!=typeof window&&(window.Chart=en),en.Chart=en,en.Legend=Li.legend._element,en.Title=Li.title._element,en.pluginService=en.plugins,en.PluginBase=en.Element.extend({}),en.canvasHelpers=en.helpers.canvas,en.layoutService=en.layouts,en.LinearScaleBase=Cn,en.helpers.each([\"Bar\",\"Bubble\",\"Doughnut\",\"Line\",\"PolarArea\",\"Radar\",\"Scatter\"],(function(t){en[t]=function(e,n){return new en(e,en.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Ei}));\n","/*! =======================================================\n VERSION 10.6.2 \n========================================================= */\n\"use strict\";var _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&\"function\"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?\"symbol\":typeof a},windowIsDefined=\"object\"===(\"undefined\"==typeof window?\"undefined\":_typeof(window));!function(a){if(\"function\"==typeof define&&define.amd)define([\"jquery\"],a);else if(\"object\"===(\"undefined\"==typeof module?\"undefined\":_typeof(module))&&module.exports){var b;try{b=require(\"jquery\")}catch(c){b=null}module.exports=a(b)}else window&&(window.Slider=a(window.jQuery))}(function(a){var b=\"slider\",c=\"bootstrapSlider\";windowIsDefined&&!window.console&&(window.console={}),windowIsDefined&&!window.console.log&&(window.console.log=function(){}),windowIsDefined&&!window.console.warn&&(window.console.warn=function(){});var d;return function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if(\"string\"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&\"_\"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l&&l!==k)return l}else f(\"no such method '\"+e+\"' for \"+b+\" instance\");else f(\"cannot call methods on \"+b+\" prior to initialization; attempted to call '\"+e+\"'\")}return this}var m=this.map(function(){var d=a.data(this,b);return d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d)),a(this)});return 1===m.length?m[0]:m}}if(a){var f=\"undefined\"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;c(a)}(a),function(a){function e(b,c){function d(a,b){var c=\"data-slider-\"+b.replace(/_/g,\"-\"),d=a.getAttribute(c);try{return JSON.parse(d)}catch(e){return d}}this._state={value:null,enabled:null,offset:null,size:null,percentage:null,inDrag:!1,over:!1,tickIndex:null},this.ticksCallbackMap={},this.handleCallbackMap={},\"string\"==typeof b?this.element=document.querySelector(b):b instanceof HTMLElement&&(this.element=b),c=c?c:{};for(var e=Object.keys(this.defaultOptions),f=c.hasOwnProperty(\"min\"),g=c.hasOwnProperty(\"max\"),i=0;i<e.length;i++){var j=e[i],k=c[j];k=\"undefined\"!=typeof k?k:d(this.element,j),k=null!==k?k:this.defaultOptions[j],this.options||(this.options={}),this.options[j]=k}if(this.ticksAreValid=Array.isArray(this.options.ticks)&&this.options.ticks.length>0,this.ticksAreValid||(this.options.lock_to_ticks=!1),\"auto\"===this.options.rtl){var l=window.getComputedStyle(this.element);null!=l?this.options.rtl=\"rtl\"===l.direction:this.options.rtl=\"rtl\"===this.element.style.direction}\"vertical\"!==this.options.orientation||\"top\"!==this.options.tooltip_position&&\"bottom\"!==this.options.tooltip_position?\"horizontal\"!==this.options.orientation||\"left\"!==this.options.tooltip_position&&\"right\"!==this.options.tooltip_position||(this.options.tooltip_position=\"top\"):this.options.rtl?this.options.tooltip_position=\"left\":this.options.tooltip_position=\"right\";var m,n,o,p,q,r=this.element.style.width,s=!1,t=this.element.parentNode;if(this.sliderElem)s=!0;else{this.sliderElem=document.createElement(\"div\"),this.sliderElem.className=\"slider\";var u=document.createElement(\"div\");u.className=\"slider-track\",n=document.createElement(\"div\"),n.className=\"slider-track-low\",m=document.createElement(\"div\"),m.className=\"slider-selection\",o=document.createElement(\"div\"),o.className=\"slider-track-high\",p=document.createElement(\"div\"),p.className=\"slider-handle min-slider-handle\",p.setAttribute(\"role\",\"slider\"),p.setAttribute(\"aria-valuemin\",this.options.min),p.setAttribute(\"aria-valuemax\",this.options.max),q=document.createElement(\"div\"),q.className=\"slider-handle max-slider-handle\",q.setAttribute(\"role\",\"slider\"),q.setAttribute(\"aria-valuemin\",this.options.min),q.setAttribute(\"aria-valuemax\",this.options.max),u.appendChild(n),u.appendChild(m),u.appendChild(o),this.rangeHighlightElements=[];var v=this.options.rangeHighlights;if(Array.isArray(v)&&v.length>0)for(var w=0;w<v.length;w++){var x=document.createElement(\"div\"),y=v[w][\"class\"]||\"\";x.className=\"slider-rangeHighlight slider-selection \"+y,this.rangeHighlightElements.push(x),u.appendChild(x)}var z=Array.isArray(this.options.labelledby);if(z&&this.options.labelledby[0]&&p.setAttribute(\"aria-labelledby\",this.options.labelledby[0]),z&&this.options.labelledby[1]&&q.setAttribute(\"aria-labelledby\",this.options.labelledby[1]),!z&&this.options.labelledby&&(p.setAttribute(\"aria-labelledby\",this.options.labelledby),q.setAttribute(\"aria-labelledby\",this.options.labelledby)),this.ticks=[],Array.isArray(this.options.ticks)&&this.options.ticks.length>0){for(this.ticksContainer=document.createElement(\"div\"),this.ticksContainer.className=\"slider-tick-container\",i=0;i<this.options.ticks.length;i++){var A=document.createElement(\"div\");if(A.className=\"slider-tick\",this.options.ticks_tooltip){var B=this._addTickListener(),C=B.addMouseEnter(this,A,i),D=B.addMouseLeave(this,A);this.ticksCallbackMap[i]={mouseEnter:C,mouseLeave:D}}this.ticks.push(A),this.ticksContainer.appendChild(A)}m.className+=\" tick-slider-selection\"}if(this.tickLabels=[],Array.isArray(this.options.ticks_labels)&&this.options.ticks_labels.length>0)for(this.tickLabelContainer=document.createElement(\"div\"),this.tickLabelContainer.className=\"slider-tick-label-container\",i=0;i<this.options.ticks_labels.length;i++){var E=document.createElement(\"div\"),F=0===this.options.ticks_positions.length,G=this.options.reversed&&F?this.options.ticks_labels.length-(i+1):i;E.className=\"slider-tick-label\",E.innerHTML=this.options.ticks_labels[G],this.tickLabels.push(E),this.tickLabelContainer.appendChild(E)}var H=function(a){var b=document.createElement(\"div\");b.className=\"tooltip-arrow\";var c=document.createElement(\"div\");c.className=\"tooltip-inner\",a.appendChild(b),a.appendChild(c)},I=document.createElement(\"div\");I.className=\"tooltip tooltip-main\",I.setAttribute(\"role\",\"presentation\"),H(I);var J=document.createElement(\"div\");J.className=\"tooltip tooltip-min\",J.setAttribute(\"role\",\"presentation\"),H(J);var K=document.createElement(\"div\");K.className=\"tooltip tooltip-max\",K.setAttribute(\"role\",\"presentation\"),H(K),this.sliderElem.appendChild(u),this.sliderElem.appendChild(I),this.sliderElem.appendChild(J),this.sliderElem.appendChild(K),this.tickLabelContainer&&this.sliderElem.appendChild(this.tickLabelContainer),this.ticksContainer&&this.sliderElem.appendChild(this.ticksContainer),this.sliderElem.appendChild(p),this.sliderElem.appendChild(q),t.insertBefore(this.sliderElem,this.element),this.element.style.display=\"none\"}if(a&&(this.$element=a(this.element),this.$sliderElem=a(this.sliderElem)),this.eventToCallbackMap={},this.sliderElem.id=this.options.id,this.touchCapable=\"ontouchstart\"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,this.touchX=0,this.touchY=0,this.tooltip=this.sliderElem.querySelector(\".tooltip-main\"),this.tooltipInner=this.tooltip.querySelector(\".tooltip-inner\"),this.tooltip_min=this.sliderElem.querySelector(\".tooltip-min\"),this.tooltipInner_min=this.tooltip_min.querySelector(\".tooltip-inner\"),this.tooltip_max=this.sliderElem.querySelector(\".tooltip-max\"),this.tooltipInner_max=this.tooltip_max.querySelector(\".tooltip-inner\"),h[this.options.scale]&&(this.options.scale=h[this.options.scale]),s===!0&&(this._removeClass(this.sliderElem,\"slider-horizontal\"),this._removeClass(this.sliderElem,\"slider-vertical\"),this._removeClass(this.sliderElem,\"slider-rtl\"),this._removeClass(this.tooltip,\"hide\"),this._removeClass(this.tooltip_min,\"hide\"),this._removeClass(this.tooltip_max,\"hide\"),[\"left\",\"right\",\"top\",\"width\",\"height\"].forEach(function(a){this._removeProperty(this.trackLow,a),this._removeProperty(this.trackSelection,a),this._removeProperty(this.trackHigh,a)},this),[this.handle1,this.handle2].forEach(function(a){this._removeProperty(a,\"left\"),this._removeProperty(a,\"right\"),this._removeProperty(a,\"top\")},this),[this.tooltip,this.tooltip_min,this.tooltip_max].forEach(function(a){this._removeProperty(a,\"left\"),this._removeProperty(a,\"right\"),this._removeProperty(a,\"top\"),this._removeClass(a,\"right\"),this._removeClass(a,\"left\"),this._removeClass(a,\"top\")},this)),\"vertical\"===this.options.orientation?(this._addClass(this.sliderElem,\"slider-vertical\"),this.stylePos=\"top\",this.mousePos=\"pageY\",this.sizePos=\"offsetHeight\"):(this._addClass(this.sliderElem,\"slider-horizontal\"),this.sliderElem.style.width=r,this.options.orientation=\"horizontal\",this.options.rtl?this.stylePos=\"right\":this.stylePos=\"left\",this.mousePos=\"clientX\",this.sizePos=\"offsetWidth\"),this.options.rtl&&this._addClass(this.sliderElem,\"slider-rtl\"),this._setTooltipPosition(),Array.isArray(this.options.ticks)&&this.options.ticks.length>0&&(g||(this.options.max=Math.max.apply(Math,this.options.ticks)),f||(this.options.min=Math.min.apply(Math,this.options.ticks))),Array.isArray(this.options.value)?(this.options.range=!0,this._state.value=this.options.value):this.options.range?this._state.value=[this.options.value,this.options.max]:this._state.value=this.options.value,this.trackLow=n||this.trackLow,this.trackSelection=m||this.trackSelection,this.trackHigh=o||this.trackHigh,\"none\"===this.options.selection?(this._addClass(this.trackLow,\"hide\"),this._addClass(this.trackSelection,\"hide\"),this._addClass(this.trackHigh,\"hide\")):(\"after\"===this.options.selection||\"before\"===this.options.selection)&&(this._removeClass(this.trackLow,\"hide\"),this._removeClass(this.trackSelection,\"hide\"),this._removeClass(this.trackHigh,\"hide\")),this.handle1=p||this.handle1,this.handle2=q||this.handle2,s===!0)for(this._removeClass(this.handle1,\"round triangle\"),this._removeClass(this.handle2,\"round triangle hide\"),i=0;i<this.ticks.length;i++)this._removeClass(this.ticks[i],\"round triangle hide\");var L=[\"round\",\"triangle\",\"custom\"],M=-1!==L.indexOf(this.options.handle);if(M)for(this._addClass(this.handle1,this.options.handle),this._addClass(this.handle2,this.options.handle),i=0;i<this.ticks.length;i++)this._addClass(this.ticks[i],this.options.handle);if(this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this.setValue(this._state.value),this.handle1Keydown=this._keydown.bind(this,0),this.handle1.addEventListener(\"keydown\",this.handle1Keydown,!1),this.handle2Keydown=this._keydown.bind(this,1),this.handle2.addEventListener(\"keydown\",this.handle2Keydown,!1),this.mousedown=this._mousedown.bind(this),this.touchstart=this._touchstart.bind(this),this.touchmove=this._touchmove.bind(this),this.touchCapable&&(this.sliderElem.addEventListener(\"touchstart\",this.touchstart,!1),this.sliderElem.addEventListener(\"touchmove\",this.touchmove,!1)),this.sliderElem.addEventListener(\"mousedown\",this.mousedown,!1),this.resize=this._resize.bind(this),window.addEventListener(\"resize\",this.resize,!1),\"hide\"===this.options.tooltip)this._addClass(this.tooltip,\"hide\"),this._addClass(this.tooltip_min,\"hide\"),this._addClass(this.tooltip_max,\"hide\");else if(\"always\"===this.options.tooltip)this._showTooltip(),this._alwaysShowTooltip=!0;else{if(this.showTooltip=this._showTooltip.bind(this),this.hideTooltip=this._hideTooltip.bind(this),this.options.ticks_tooltip){var N=this._addTickListener(),O=N.addMouseEnter(this,this.handle1),P=N.addMouseLeave(this,this.handle1);this.handleCallbackMap.handle1={mouseEnter:O,mouseLeave:P},O=N.addMouseEnter(this,this.handle2),P=N.addMouseLeave(this,this.handle2),this.handleCallbackMap.handle2={mouseEnter:O,mouseLeave:P}}else this.sliderElem.addEventListener(\"mouseenter\",this.showTooltip,!1),this.sliderElem.addEventListener(\"mouseleave\",this.hideTooltip,!1),this.touchCapable&&(this.sliderElem.addEventListener(\"touchstart\",this.showTooltip,!1),this.sliderElem.addEventListener(\"touchmove\",this.showTooltip,!1),this.sliderElem.addEventListener(\"touchend\",this.hideTooltip,!1));this.handle1.addEventListener(\"focus\",this.showTooltip,!1),this.handle1.addEventListener(\"blur\",this.hideTooltip,!1),this.handle2.addEventListener(\"focus\",this.showTooltip,!1),this.handle2.addEventListener(\"blur\",this.hideTooltip,!1),this.touchCapable&&(this.handle1.addEventListener(\"touchstart\",this.showTooltip,!1),this.handle1.addEventListener(\"touchmove\",this.showTooltip,!1),this.handle1.addEventListener(\"touchend\",this.hideTooltip,!1),this.handle2.addEventListener(\"touchstart\",this.showTooltip,!1),this.handle2.addEventListener(\"touchmove\",this.showTooltip,!1),this.handle2.addEventListener(\"touchend\",this.hideTooltip,!1))}this.options.enabled?this.enable():this.disable()}var f=void 0,g={formatInvalidInputErrorMsg:function(a){return\"Invalid input value '\"+a+\"' passed in\"},callingContextNotSliderInstance:\"Calling context element does not have instance of Slider bound to it. Check your code to make sure the JQuery object returned from the call to the slider() initializer is calling the method\"},h={linear:{getValue:function(a,b){return a<b.min?b.min:a>b.max?b.max:a},toValue:function(a){var b=a/100*(this.options.max-this.options.min),c=!0;if(this.options.ticks_positions.length>0){for(var d,e,f,g=0,i=1;i<this.options.ticks_positions.length;i++)if(a<=this.options.ticks_positions[i]){d=this.options.ticks[i-1],f=this.options.ticks_positions[i-1],e=this.options.ticks[i],g=this.options.ticks_positions[i];break}var j=(a-f)/(g-f);b=d+j*(e-d),c=!1}var k=c?this.options.min:0,l=k+Math.round(b/this.options.step)*this.options.step;return h.linear.getValue(l,this.options)},toPercentage:function(a){if(this.options.max===this.options.min)return 0;if(this.options.ticks_positions.length>0){for(var b,c,d,e=0,f=0;f<this.options.ticks.length;f++)if(a<=this.options.ticks[f]){b=f>0?this.options.ticks[f-1]:0,d=f>0?this.options.ticks_positions[f-1]:0,c=this.options.ticks[f],e=this.options.ticks_positions[f];break}if(f>0){var g=(a-b)/(c-b);return d+g*(e-d)}}return 100*(a-this.options.min)/(this.options.max-this.options.min)}},logarithmic:{toValue:function(a){var b=1-this.options.min,c=Math.log(this.options.min+b),d=Math.log(this.options.max+b),e=Math.exp(c+(d-c)*a/100)-b;return Math.round(e)===d?d:(e=this.options.min+Math.round((e-this.options.min)/this.options.step)*this.options.step,h.linear.getValue(e,this.options))},toPercentage:function(a){if(this.options.max===this.options.min)return 0;var b=1-this.options.min,c=Math.log(this.options.max+b),d=Math.log(this.options.min+b),e=Math.log(a+b);return 100*(e-d)/(c-d)}}};d=function(a,b){return e.call(this,a,b),this},d.prototype={_init:function(){},constructor:d,defaultOptions:{id:\"\",min:0,max:10,step:1,precision:0,orientation:\"horizontal\",value:5,range:!1,selection:\"before\",tooltip:\"show\",tooltip_split:!1,lock_to_ticks:!1,handle:\"round\",reversed:!1,rtl:\"auto\",enabled:!0,formatter:function(a){return Array.isArray(a)?a[0]+\" : \"+a[1]:a},natural_arrow_keys:!1,ticks:[],ticks_positions:[],ticks_labels:[],ticks_snap_bounds:0,ticks_tooltip:!1,scale:\"linear\",focus:!1,tooltip_position:null,labelledby:null,rangeHighlights:[]},getElement:function(){return this.sliderElem},getValue:function(){return this.options.range?this._state.value:this._state.value[0]},setValue:function(a,b,c){a||(a=0);var d=this.getValue();this._state.value=this._validateInputValue(a);var e=this._applyPrecision.bind(this);this.options.range?(this._state.value[0]=e(this._state.value[0]),this._state.value[1]=e(this._state.value[1]),this.ticksAreValid&&this.options.lock_to_ticks&&(this._state.value[0]=this.options.ticks[this._getClosestTickIndex(this._state.value[0])],this._state.value[1]=this.options.ticks[this._getClosestTickIndex(this._state.value[1])]),this._state.value[0]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[0])),this._state.value[1]=Math.max(this.options.min,Math.min(this.options.max,this._state.value[1]))):(this._state.value=e(this._state.value),this.ticksAreValid&&this.options.lock_to_ticks&&(this._state.value=this.options.ticks[this._getClosestTickIndex(this._state.value)]),this._state.value=[Math.max(this.options.min,Math.min(this.options.max,this._state.value))],this._addClass(this.handle2,\"hide\"),\"after\"===this.options.selection?this._state.value[1]=this.options.max:this._state.value[1]=this.options.min),this._setTickIndex(),this.options.max>this.options.min?this._state.percentage=[this._toPercentage(this._state.value[0]),this._toPercentage(this._state.value[1]),100*this.options.step/(this.options.max-this.options.min)]:this._state.percentage=[0,0,100],this._layout();var f=this.options.range?this._state.value:this._state.value[0];this._setDataVal(f),b===!0&&this._trigger(\"slide\",f);var g=!1;return g=Array.isArray(f)?d[0]!==f[0]||d[1]!==f[1]:d!==f,g&&c===!0&&this._trigger(\"change\",{oldValue:d,newValue:f}),this},destroy:function(){this._removeSliderEventHandlers(),this.sliderElem.parentNode.removeChild(this.sliderElem),this.element.style.display=\"\",this._cleanUpEventCallbacksMap(),this.element.removeAttribute(\"data\"),a&&(this._unbindJQueryEventHandlers(),f===b&&this.$element.removeData(f),this.$element.removeData(c))},disable:function(){return this._state.enabled=!1,this.handle1.removeAttribute(\"tabindex\"),this.handle2.removeAttribute(\"tabindex\"),this._addClass(this.sliderElem,\"slider-disabled\"),this._trigger(\"slideDisabled\"),this},enable:function(){return this._state.enabled=!0,this.handle1.setAttribute(\"tabindex\",0),this.handle2.setAttribute(\"tabindex\",0),this._removeClass(this.sliderElem,\"slider-disabled\"),this._trigger(\"slideEnabled\"),this},toggle:function(){return this._state.enabled?this.disable():this.enable(),this},isEnabled:function(){return this._state.enabled},on:function(a,b){return this._bindNonQueryEventHandler(a,b),this},off:function(b,c){a?(this.$element.off(b,c),this.$sliderElem.off(b,c)):this._unbindNonQueryEventHandler(b,c)},getAttribute:function(a){return a?this.options[a]:this.options},setAttribute:function(a,b){return this.options[a]=b,this},refresh:function(d){var g=this.getValue();return this._removeSliderEventHandlers(),e.call(this,this.element,this.options),d&&d.useCurrentValue===!0&&this.setValue(g),a&&(f===b?(a.data(this.element,b,this),a.data(this.element,c,this)):a.data(this.element,c,this)),this},relayout:function(){return this._resize(),this},_removeTooltipListener:function(a,b){this.handle1.removeEventListener(a,b,!1),this.handle2.removeEventListener(a,b,!1)},_removeSliderEventHandlers:function(){if(this.handle1.removeEventListener(\"keydown\",this.handle1Keydown,!1),this.handle2.removeEventListener(\"keydown\",this.handle2Keydown,!1),this.options.ticks_tooltip){for(var a=this.ticksContainer.getElementsByClassName(\"slider-tick\"),b=0;b<a.length;b++)a[b].removeEventListener(\"mouseenter\",this.ticksCallbackMap[b].mouseEnter,!1),a[b].removeEventListener(\"mouseleave\",this.ticksCallbackMap[b].mouseLeave,!1);this.handleCallbackMap.handle1&&this.handleCallbackMap.handle2&&(this.handle1.removeEventListener(\"mouseenter\",this.handleCallbackMap.handle1.mouseEnter,!1),this.handle2.removeEventListener(\"mouseenter\",this.handleCallbackMap.handle2.mouseEnter,!1),this.handle1.removeEventListener(\"mouseleave\",this.handleCallbackMap.handle1.mouseLeave,!1),this.handle2.removeEventListener(\"mouseleave\",this.handleCallbackMap.handle2.mouseLeave,!1))}this.handleCallbackMap=null,this.ticksCallbackMap=null,this.showTooltip&&this._removeTooltipListener(\"focus\",this.showTooltip),this.hideTooltip&&this._removeTooltipListener(\"blur\",this.hideTooltip),this.showTooltip&&this.sliderElem.removeEventListener(\"mouseenter\",this.showTooltip,!1),this.hideTooltip&&this.sliderElem.removeEventListener(\"mouseleave\",this.hideTooltip,!1),this.sliderElem.removeEventListener(\"mousedown\",this.mousedown,!1),this.touchCapable&&(this.showTooltip&&(this.handle1.removeEventListener(\"touchstart\",this.showTooltip,!1),this.handle1.removeEventListener(\"touchmove\",this.showTooltip,!1),this.handle2.removeEventListener(\"touchstart\",this.showTooltip,!1),this.handle2.removeEventListener(\"touchmove\",this.showTooltip,!1)),this.hideTooltip&&(this.handle1.removeEventListener(\"touchend\",this.hideTooltip,!1),this.handle2.removeEventListener(\"touchend\",this.hideTooltip,!1)),this.showTooltip&&(this.sliderElem.removeEventListener(\"touchstart\",this.showTooltip,!1),this.sliderElem.removeEventListener(\"touchmove\",this.showTooltip,!1)),this.hideTooltip&&this.sliderElem.removeEventListener(\"touchend\",this.hideTooltip,!1),this.sliderElem.removeEventListener(\"touchstart\",this.touchstart,!1),this.sliderElem.removeEventListener(\"touchmove\",this.touchmove,!1)),window.removeEventListener(\"resize\",this.resize,!1)},_bindNonQueryEventHandler:function(a,b){void 0===this.eventToCallbackMap[a]&&(this.eventToCallbackMap[a]=[]),this.eventToCallbackMap[a].push(b)},_unbindNonQueryEventHandler:function(a,b){var c=this.eventToCallbackMap[a];if(void 0!==c)for(var d=0;d<c.length;d++)if(c[d]===b){c.splice(d,1);break}},_cleanUpEventCallbacksMap:function(){for(var a=Object.keys(this.eventToCallbackMap),b=0;b<a.length;b++){var c=a[b];delete this.eventToCallbackMap[c]}},_showTooltip:function(){this.options.tooltip_split===!1?(this._addClass(this.tooltip,\"in\"),this.tooltip_min.style.display=\"none\",this.tooltip_max.style.display=\"none\"):(this._addClass(this.tooltip_min,\"in\"),this._addClass(this.tooltip_max,\"in\"),this.tooltip.style.display=\"none\"),this._state.over=!0},_hideTooltip:function(){this._state.inDrag===!1&&this._alwaysShowTooltip!==!0&&(this._removeClass(this.tooltip,\"in\"),this._removeClass(this.tooltip_min,\"in\"),this._removeClass(this.tooltip_max,\"in\")),this._state.over=!1},_setToolTipOnMouseOver:function(a){function b(a,b){return b?[100-a.percentage[0],c.options.range?100-a.percentage[1]:a.percentage[1]]:[a.percentage[0],a.percentage[1]]}var c=this,d=this.options.formatter(a?a.value[0]:this._state.value[0]),e=a?b(a,this.options.reversed):b(this._state,this.options.reversed);this._setText(this.tooltipInner,d),this.tooltip.style[this.stylePos]=e[0]+\"%\"},_copyState:function(){return{value:[this._state.value[0],this._state.value[1]],enabled:this._state.enabled,offset:this._state.offset,size:this._state.size,percentage:[this._state.percentage[0],this._state.percentage[1],this._state.percentage[2]],inDrag:this._state.inDrag,over:this._state.over,dragged:this._state.dragged,keyCtrl:this._state.keyCtrl}},_addTickListener:function(){return{addMouseEnter:function(a,b,c){var d=function(){var d=a._copyState(),e=b===a.handle1?d.value[0]:d.value[1],f=void 0;void 0!==c?(e=a.options.ticks[c],f=a.options.ticks_positions.length>0&&a.options.ticks_positions[c]||a._toPercentage(a.options.ticks[c])):f=a._toPercentage(e),d.value[0]=e,d.percentage[0]=f,a._setToolTipOnMouseOver(d),a._showTooltip()};return b.addEventListener(\"mouseenter\",d,!1),d},addMouseLeave:function(a,b){var c=function(){a._hideTooltip()};return b.addEventListener(\"mouseleave\",c,!1),c}}},_layout:function(){var a,b;if(a=this.options.reversed?[100-this._state.percentage[0],this.options.range?100-this._state.percentage[1]:this._state.percentage[1]]:[this._state.percentage[0],this._state.percentage[1]],this.handle1.style[this.stylePos]=a[0]+\"%\",this.handle1.setAttribute(\"aria-valuenow\",this._state.value[0]),b=this.options.formatter(this._state.value[0]),isNaN(b)?this.handle1.setAttribute(\"aria-valuetext\",b):this.handle1.removeAttribute(\"aria-valuetext\"),this.handle2.style[this.stylePos]=a[1]+\"%\",this.handle2.setAttribute(\"aria-valuenow\",this._state.value[1]),b=this.options.formatter(this._state.value[1]),isNaN(b)?this.handle2.setAttribute(\"aria-valuetext\",b):this.handle2.removeAttribute(\"aria-valuetext\"),this.rangeHighlightElements.length>0&&Array.isArray(this.options.rangeHighlights)&&this.options.rangeHighlights.length>0)for(var c=0;c<this.options.rangeHighlights.length;c++){var d=this._toPercentage(this.options.rangeHighlights[c].start),e=this._toPercentage(this.options.rangeHighlights[c].end);if(this.options.reversed){var f=100-e;e=100-d,d=f}var g=this._createHighlightRange(d,e);g?\"vertical\"===this.options.orientation?(this.rangeHighlightElements[c].style.top=g.start+\"%\",this.rangeHighlightElements[c].style.height=g.size+\"%\"):(this.options.rtl?this.rangeHighlightElements[c].style.right=g.start+\"%\":this.rangeHighlightElements[c].style.left=g.start+\"%\",this.rangeHighlightElements[c].style.width=g.size+\"%\"):this.rangeHighlightElements[c].style.display=\"none\"}if(Array.isArray(this.options.ticks)&&this.options.ticks.length>0){var h,i=\"vertical\"===this.options.orientation?\"height\":\"width\";h=\"vertical\"===this.options.orientation?\"marginTop\":this.options.rtl?\"marginRight\":\"marginLeft\";var j=this._state.size/(this.options.ticks.length-1);if(this.tickLabelContainer){var k=0;if(0===this.options.ticks_positions.length)\"vertical\"!==this.options.orientation&&(this.tickLabelContainer.style[h]=-j/2+\"px\"),k=this.tickLabelContainer.offsetHeight;else for(l=0;l<this.tickLabelContainer.childNodes.length;l++)this.tickLabelContainer.childNodes[l].offsetHeight>k&&(k=this.tickLabelContainer.childNodes[l].offsetHeight);\"horizontal\"===this.options.orientation&&(this.sliderElem.style.marginBottom=k+\"px\")}for(var l=0;l<this.options.ticks.length;l++){var m=this.options.ticks_positions[l]||this._toPercentage(this.options.ticks[l]);this.options.reversed&&(m=100-m),this.ticks[l].style[this.stylePos]=m+\"%\",this._removeClass(this.ticks[l],\"in-selection\"),this.options.range?m>=a[0]&&m<=a[1]&&this._addClass(this.ticks[l],\"in-selection\"):\"after\"===this.options.selection&&m>=a[0]?this._addClass(this.ticks[l],\"in-selection\"):\"before\"===this.options.selection&&m<=a[0]&&this._addClass(this.ticks[l],\"in-selection\"),this.tickLabels[l]&&(this.tickLabels[l].style[i]=j+\"px\",\"vertical\"!==this.options.orientation&&void 0!==this.options.ticks_positions[l]?(this.tickLabels[l].style.position=\"absolute\",this.tickLabels[l].style[this.stylePos]=m+\"%\",this.tickLabels[l].style[h]=-j/2+\"px\"):\"vertical\"===this.options.orientation&&(this.options.rtl?this.tickLabels[l].style.marginRight=this.sliderElem.offsetWidth+\"px\":this.tickLabels[l].style.marginLeft=this.sliderElem.offsetWidth+\"px\",this.tickLabelContainer.style[h]=this.sliderElem.offsetWidth/2*-1+\"px\"),this._removeClass(this.tickLabels[l],\"label-in-selection label-is-selection\"),this.options.range?m>=a[0]&&m<=a[1]&&(this._addClass(this.tickLabels[l],\"label-in-selection\"),(m===a[0]||a[1])&&this._addClass(this.tickLabels[l],\"label-is-selection\")):(\"after\"===this.options.selection&&m>=a[0]?this._addClass(this.tickLabels[l],\"label-in-selection\"):\"before\"===this.options.selection&&m<=a[0]&&this._addClass(this.tickLabels[l],\"label-in-selection\"),m===a[0]&&this._addClass(this.tickLabels[l],\"label-is-selection\")))}}var n;if(this.options.range){n=this.options.formatter(this._state.value),this._setText(this.tooltipInner,n),this.tooltip.style[this.stylePos]=(a[1]+a[0])/2+\"%\";var o=this.options.formatter(this._state.value[0]);this._setText(this.tooltipInner_min,o);var p=this.options.formatter(this._state.value[1]);this._setText(this.tooltipInner_max,p),this.tooltip_min.style[this.stylePos]=a[0]+\"%\",this.tooltip_max.style[this.stylePos]=a[1]+\"%\"}else n=this.options.formatter(this._state.value[0]),this._setText(this.tooltipInner,n),this.tooltip.style[this.stylePos]=a[0]+\"%\";if(\"vertical\"===this.options.orientation)this.trackLow.style.top=\"0\",this.trackLow.style.height=Math.min(a[0],a[1])+\"%\",this.trackSelection.style.top=Math.min(a[0],a[1])+\"%\",this.trackSelection.style.height=Math.abs(a[0]-a[1])+\"%\",this.trackHigh.style.bottom=\"0\",this.trackHigh.style.height=100-Math.min(a[0],a[1])-Math.abs(a[0]-a[1])+\"%\";else{\"right\"===this.stylePos?this.trackLow.style.right=\"0\":this.trackLow.style.left=\"0\",this.trackLow.style.width=Math.min(a[0],a[1])+\"%\",\"right\"===this.stylePos?this.trackSelection.style.right=Math.min(a[0],a[1])+\"%\":this.trackSelection.style.left=Math.min(a[0],a[1])+\"%\",this.trackSelection.style.width=Math.abs(a[0]-a[1])+\"%\",\"right\"===this.stylePos?this.trackHigh.style.left=\"0\":this.trackHigh.style.right=\"0\",this.trackHigh.style.width=100-Math.min(a[0],a[1])-Math.abs(a[0]-a[1])+\"%\";var q=this.tooltip_min.getBoundingClientRect(),r=this.tooltip_max.getBoundingClientRect();\"bottom\"===this.options.tooltip_position?q.right>r.left?(this._removeClass(this.tooltip_max,\"bottom\"),this._addClass(this.tooltip_max,\"top\"),this.tooltip_max.style.top=\"\",this.tooltip_max.style.bottom=\"22px\"):(this._removeClass(this.tooltip_max,\"top\"),this._addClass(this.tooltip_max,\"bottom\"),this.tooltip_max.style.top=this.tooltip_min.style.top,this.tooltip_max.style.bottom=\"\"):q.right>r.left?(this._removeClass(this.tooltip_max,\"top\"),this._addClass(this.tooltip_max,\"bottom\"),this.tooltip_max.style.top=\"18px\"):(this._removeClass(this.tooltip_max,\"bottom\"),this._addClass(this.tooltip_max,\"top\"),this.tooltip_max.style.top=this.tooltip_min.style.top)}},_createHighlightRange:function(a,b){return this._isHighlightRange(a,b)?a>b?{start:b,size:a-b}:{start:a,size:b-a}:null},_isHighlightRange:function(a,b){return a>=0&&100>=a&&b>=0&&100>=b?!0:!1},_resize:function(a){this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos],this._layout()},_removeProperty:function(a,b){a.style.removeProperty?a.style.removeProperty(b):a.style.removeAttribute(b)},_mousedown:function(a){if(!this._state.enabled)return!1;a.preventDefault&&a.preventDefault(),this._state.offset=this._offset(this.sliderElem),this._state.size=this.sliderElem[this.sizePos];var b=this._getPercentage(a);if(this.options.range){var c=Math.abs(this._state.percentage[0]-b),d=Math.abs(this._state.percentage[1]-b);this._state.dragged=d>c?0:1,this._adjustPercentageForRangeSliders(b)}else this._state.dragged=0;this._state.percentage[this._state.dragged]=b,this.touchCapable&&(document.removeEventListener(\"touchmove\",this.mousemove,!1),document.removeEventListener(\"touchend\",this.mouseup,!1)),this.mousemove&&document.removeEventListener(\"mousemove\",this.mousemove,!1),this.mouseup&&document.removeEventListener(\"mouseup\",this.mouseup,!1),this.mousemove=this._mousemove.bind(this),this.mouseup=this._mouseup.bind(this),this.touchCapable&&(document.addEventListener(\"touchmove\",this.mousemove,!1),document.addEventListener(\"touchend\",this.mouseup,!1)),document.addEventListener(\"mousemove\",this.mousemove,!1),document.addEventListener(\"mouseup\",this.mouseup,!1),this._state.inDrag=!0;var e=this._calculateValue();return this._trigger(\"slideStart\",e),this.setValue(e,!1,!0),a.returnValue=!1,this.options.focus&&this._triggerFocusOnHandle(this._state.dragged),!0},_touchstart:function(a){this._mousedown(a)},_triggerFocusOnHandle:function(a){0===a&&this.handle1.focus(),1===a&&this.handle2.focus()},_keydown:function(a,b){if(!this._state.enabled)return!1;var c;switch(b.keyCode){case 37:case 40:c=-1;break;case 39:case 38:c=1}if(c){if(this.options.natural_arrow_keys){var d=\"horizontal\"===this.options.orientation,e=\"vertical\"===this.options.orientation,f=this.options.rtl,g=this.options.reversed;d?f?g||(c=-c):g&&(c=-c):e&&(g||(c=-c))}var h;if(this.ticksAreValid&&this.options.lock_to_ticks){var i=void 0;i=this.options.ticks.indexOf(this._state.value[a]),-1===i&&(i=0,window.console.warn(\"(lock_to_ticks) _keydown: index should not be -1\")),i+=c,i=Math.max(0,Math.min(this.options.ticks.length-1,i)),h=this.options.ticks[i]}else h=this._state.value[a]+c*this.options.step;var j=this._toPercentage(h);if(this._state.keyCtrl=a,this.options.range){this._adjustPercentageForRangeSliders(j);var k=this._state.keyCtrl?this._state.value[0]:h,l=this._state.keyCtrl?h:this._state.value[1];h=[Math.max(this.options.min,Math.min(this.options.max,k)),Math.max(this.options.min,Math.min(this.options.max,l))]}else h=Math.max(this.options.min,Math.min(this.options.max,h));return this._trigger(\"slideStart\",h),this.setValue(h,!0,!0),this._trigger(\"slideStop\",h),this._pauseEvent(b),delete this._state.keyCtrl,!1}},_pauseEvent:function(a){a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,a.returnValue=!1},_mousemove:function(a){if(!this._state.enabled)return!1;\nvar b=this._getPercentage(a);this._adjustPercentageForRangeSliders(b),this._state.percentage[this._state.dragged]=b;var c=this._calculateValue(!0);return this.setValue(c,!0,!0),!1},_touchmove:function(a){void 0!==a.changedTouches&&a.preventDefault&&a.preventDefault()},_adjustPercentageForRangeSliders:function(a){if(this.options.range){var b=this._getNumDigitsAfterDecimalPlace(a);b=b?b-1:0;var c=this._applyToFixedAndParseFloat(a,b);0===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[1],b)<c?(this._state.percentage[0]=this._state.percentage[1],this._state.dragged=1):1===this._state.dragged&&this._applyToFixedAndParseFloat(this._state.percentage[0],b)>c?(this._state.percentage[1]=this._state.percentage[0],this._state.dragged=0):0===this._state.keyCtrl&&this._toPercentage(this._state.value[1])<a?(this._state.percentage[0]=this._state.percentage[1],this._state.keyCtrl=1,this.handle2.focus()):1===this._state.keyCtrl&&this._toPercentage(this._state.value[0])>a&&(this._state.percentage[1]=this._state.percentage[0],this._state.keyCtrl=0,this.handle1.focus())}},_mouseup:function(a){if(!this._state.enabled)return!1;var b=this._getPercentage(a);this._adjustPercentageForRangeSliders(b),this._state.percentage[this._state.dragged]=b,this.touchCapable&&(document.removeEventListener(\"touchmove\",this.mousemove,!1),document.removeEventListener(\"touchend\",this.mouseup,!1)),document.removeEventListener(\"mousemove\",this.mousemove,!1),document.removeEventListener(\"mouseup\",this.mouseup,!1),this._state.inDrag=!1,this._state.over===!1&&this._hideTooltip();var c=this._calculateValue(!0);return this.setValue(c,!1,!0),this._trigger(\"slideStop\",c),this._state.dragged=null,!1},_setValues:function(a,b){var c=0===a?0:100;this._state.percentage[a]!==c&&(b.data[a]=this._toValue(this._state.percentage[a]),b.data[a]=this._applyPrecision(b.data[a]))},_calculateValue:function(a){var b={};return this.options.range?(b.data=[this.options.min,this.options.max],this._setValues(0,b),this._setValues(1,b),a&&(b.data[0]=this._snapToClosestTick(b.data[0]),b.data[1]=this._snapToClosestTick(b.data[1]))):(b.data=this._toValue(this._state.percentage[0]),b.data=parseFloat(b.data),b.data=this._applyPrecision(b.data),a&&(b.data=this._snapToClosestTick(b.data))),b.data},_snapToClosestTick:function(a){for(var b=[a,1/0],c=0;c<this.options.ticks.length;c++){var d=Math.abs(this.options.ticks[c]-a);d<=b[1]&&(b=[this.options.ticks[c],d])}return b[1]<=this.options.ticks_snap_bounds?b[0]:a},_applyPrecision:function(a){var b=this.options.precision||this._getNumDigitsAfterDecimalPlace(this.options.step);return this._applyToFixedAndParseFloat(a,b)},_getNumDigitsAfterDecimalPlace:function(a){var b=(\"\"+a).match(/(?:\\.(\\d+))?(?:[eE]([+-]?\\d+))?$/);return b?Math.max(0,(b[1]?b[1].length:0)-(b[2]?+b[2]:0)):0},_applyToFixedAndParseFloat:function(a,b){var c=a.toFixed(b);return parseFloat(c)},_getPercentage:function(a){!this.touchCapable||\"touchstart\"!==a.type&&\"touchmove\"!==a.type&&\"touchend\"!==a.type||(a=a.changedTouches[0]);var b=a[this.mousePos],c=this._state.offset[this.stylePos],d=b-c;\"right\"===this.stylePos&&(d=-d);var e=d/this._state.size*100;return e=Math.round(e/this._state.percentage[2])*this._state.percentage[2],this.options.reversed&&(e=100-e),Math.max(0,Math.min(100,e))},_validateInputValue:function(a){if(isNaN(+a)){if(Array.isArray(a))return this._validateArray(a),a;throw new Error(g.formatInvalidInputErrorMsg(a))}return+a},_validateArray:function(a){for(var b=0;b<a.length;b++){var c=a[b];if(\"number\"!=typeof c)throw new Error(g.formatInvalidInputErrorMsg(c))}},_setDataVal:function(a){this.element.setAttribute(\"data-value\",a),this.element.setAttribute(\"value\",a),this.element.value=a},_trigger:function(b,c){c=c||0===c?c:void 0;var d=this.eventToCallbackMap[b];if(d&&d.length)for(var e=0;e<d.length;e++){var f=d[e];f(c)}a&&this._triggerJQueryEvent(b,c)},_triggerJQueryEvent:function(a,b){var c={type:a,value:b};this.$element.trigger(c),this.$sliderElem.trigger(c)},_unbindJQueryEventHandlers:function(){this.$element.off(),this.$sliderElem.off()},_setText:function(a,b){\"undefined\"!=typeof a.textContent?a.textContent=b:\"undefined\"!=typeof a.innerText&&(a.innerText=b)},_removeClass:function(a,b){for(var c=b.split(\" \"),d=a.className,e=0;e<c.length;e++){var f=c[e],g=new RegExp(\"(?:\\\\s|^)\"+f+\"(?:\\\\s|$)\");d=d.replace(g,\" \")}a.className=d.trim()},_addClass:function(a,b){for(var c=b.split(\" \"),d=a.className,e=0;e<c.length;e++){var f=c[e],g=new RegExp(\"(?:\\\\s|^)\"+f+\"(?:\\\\s|$)\"),h=g.test(d);h||(d+=\" \"+f)}a.className=d.trim()},_offsetLeft:function(a){return a.getBoundingClientRect().left},_offsetRight:function(a){return a.getBoundingClientRect().right},_offsetTop:function(a){for(var b=a.offsetTop;(a=a.offsetParent)&&!isNaN(a.offsetTop);)b+=a.offsetTop,\"BODY\"!==a.tagName&&(b-=a.scrollTop);return b},_offset:function(a){return{left:this._offsetLeft(a),right:this._offsetRight(a),top:this._offsetTop(a)}},_css:function(b,c,d){if(a)a.style(b,c,d);else{var e=c.replace(/^-ms-/,\"ms-\").replace(/-([\\da-z])/gi,function(a,b){return b.toUpperCase()});b.style[e]=d}},_toValue:function(a){return this.options.scale.toValue.apply(this,[a])},_toPercentage:function(a){return this.options.scale.toPercentage.apply(this,[a])},_setTooltipPosition:function(){var a=[this.tooltip,this.tooltip_min,this.tooltip_max];if(\"vertical\"===this.options.orientation){var b;b=this.options.tooltip_position?this.options.tooltip_position:this.options.rtl?\"left\":\"right\";var c=\"left\"===b?\"right\":\"left\";a.forEach(function(a){this._addClass(a,b),a.style[c]=\"100%\"}.bind(this))}else\"bottom\"===this.options.tooltip_position?a.forEach(function(a){this._addClass(a,\"bottom\"),a.style.top=\"22px\"}.bind(this)):a.forEach(function(a){this._addClass(a,\"top\"),a.style.top=-this.tooltip.outerHeight-14+\"px\"}.bind(this))},_getClosestTickIndex:function(a){for(var b=Math.abs(a-this.options.ticks[0]),c=0,d=0;d<this.options.ticks.length;++d){var e=Math.abs(a-this.options.ticks[d]);b>e&&(b=e,c=d)}return c},_setTickIndex:function(){this.ticksAreValid&&(this._state.tickIndex=[this.options.ticks.indexOf(this._state.value[0]),this.options.ticks.indexOf(this._state.value[1])])}},a&&a.fn&&(a.fn.slider?(windowIsDefined&&window.console.warn(\"bootstrap-slider.js - WARNING: $.fn.slider namespace is already bound. Use the $.fn.bootstrapSlider namespace instead.\"),f=c):(a.bridget(b,d),f=b),a.bridget(c,d),a(function(){a(\"input[data-provide=slider]\")[f]()}))}(a),d});","!function(t){\"use strict\";var a=t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype,l=t.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),u=l&&t.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),c=t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,b=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,r=(l||c)&&t.atob&&t.ArrayBuffer&&t.Uint8Array&&function(t){var e,o,n,a,r,i=t.match(b);if(!i)throw new Error(\"invalid data URI\");for(e=i[2]?i[1]:\"text/plain\"+(i[3]||\";charset=US-ASCII\"),n=!!i[4],i=t.slice(i[0].length),o=(n?atob:decodeURIComponent)(i),n=new ArrayBuffer(o.length),a=new Uint8Array(n),r=0;r<o.length;r+=1)a[r]=o.charCodeAt(r);return l?new Blob([u?a:n],{type:e}):((i=new c).append(n),i.getBlob(e))};t.HTMLCanvasElement&&!a.toBlob&&(a.mozGetAsFile?a.toBlob=function(t,e,o){var n=this;setTimeout(function(){o&&a.toDataURL&&r?t(r(n.toDataURL(e,o))):t(n.mozGetAsFile(\"blob\",e))})}:a.toDataURL&&r&&(a.msToBlob?a.toBlob=function(t,e,o){var n=this;setTimeout(function(){(e&&\"image/png\"!==e||o)&&a.toDataURL&&r?t(r(n.toDataURL(e,o))):t(n.msToBlob(e))})}:a.toBlob=function(t,e,o){var n=this;setTimeout(function(){t(r(n.toDataURL(e,o)))})})),\"function\"==typeof define&&define.amd?define(function(){return r}):\"object\"==typeof module&&module.exports?module.exports=r:t.dataURLtoBlob=r}(window);\n//# sourceMappingURL=canvas-to-blob.min.js.map","/*!\n * Signature Pad v2.3.2\n * https://github.com/szimek/signature_pad\n *\n * Copyright 2017 Szymon Nowak\n * Released under the MIT license\n *\n * The main idea and some parts of the code (e.g. drawing variable width Bézier curve) are taken from:\n * http://corner.squareup.com/2012/07/smoother-signatures.html\n *\n * Implementation of interpolation using cubic Bézier curves is taken from:\n * http://benknowscode.wordpress.com/2012/09/14/path-interpolation-using-cubic-bezier-and-control-point-estimation-in-javascript\n *\n * Algorithm for approximated length of a Bézier curve is taken from:\n * http://www.lemoda.net/maths/bezier-length/index.html\n *\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.SignaturePad = factory());\n}(this, (function () { 'use strict';\n\nfunction Point(x, y, time) {\n this.x = x;\n this.y = y;\n this.time = time || new Date().getTime();\n}\n\nPoint.prototype.velocityFrom = function (start) {\n return this.time !== start.time ? this.distanceTo(start) / (this.time - start.time) : 1;\n};\n\nPoint.prototype.distanceTo = function (start) {\n return Math.sqrt(Math.pow(this.x - start.x, 2) + Math.pow(this.y - start.y, 2));\n};\n\nPoint.prototype.equals = function (other) {\n return this.x === other.x && this.y === other.y && this.time === other.time;\n};\n\nfunction Bezier(startPoint, control1, control2, endPoint) {\n this.startPoint = startPoint;\n this.control1 = control1;\n this.control2 = control2;\n this.endPoint = endPoint;\n}\n\n// Returns approximated length.\nBezier.prototype.length = function () {\n var steps = 10;\n var length = 0;\n var px = void 0;\n var py = void 0;\n\n for (var i = 0; i <= steps; i += 1) {\n var t = i / steps;\n var cx = this._point(t, this.startPoint.x, this.control1.x, this.control2.x, this.endPoint.x);\n var cy = this._point(t, this.startPoint.y, this.control1.y, this.control2.y, this.endPoint.y);\n if (i > 0) {\n var xdiff = cx - px;\n var ydiff = cy - py;\n length += Math.sqrt(xdiff * xdiff + ydiff * ydiff);\n }\n px = cx;\n py = cy;\n }\n\n return length;\n};\n\n/* eslint-disable no-multi-spaces, space-in-parens */\nBezier.prototype._point = function (t, start, c1, c2, end) {\n return start * (1.0 - t) * (1.0 - t) * (1.0 - t) + 3.0 * c1 * (1.0 - t) * (1.0 - t) * t + 3.0 * c2 * (1.0 - t) * t * t + end * t * t * t;\n};\n\n/* eslint-disable */\n\n// http://stackoverflow.com/a/27078401/815507\nfunction throttle(func, wait, options) {\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function later() {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function () {\n var now = Date.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n}\n\nfunction SignaturePad(canvas, options) {\n var self = this;\n var opts = options || {};\n\n this.velocityFilterWeight = opts.velocityFilterWeight || 0.7;\n this.minWidth = opts.minWidth || 0.5;\n this.maxWidth = opts.maxWidth || 2.5;\n this.throttle = 'throttle' in opts ? opts.throttle : 16; // in miliseconds\n this.minDistance = 'minDistance' in opts ? opts.minDistance : 5;\n\n if (this.throttle) {\n this._strokeMoveUpdate = throttle(SignaturePad.prototype._strokeUpdate, this.throttle);\n } else {\n this._strokeMoveUpdate = SignaturePad.prototype._strokeUpdate;\n }\n\n this.dotSize = opts.dotSize || function () {\n return (this.minWidth + this.maxWidth) / 2;\n };\n this.penColor = opts.penColor || 'black';\n this.backgroundColor = opts.backgroundColor || 'rgba(0,0,0,0)';\n this.onBegin = opts.onBegin;\n this.onEnd = opts.onEnd;\n\n this._canvas = canvas;\n this._ctx = canvas.getContext('2d');\n this.clear();\n\n // We need add these inline so they are available to unbind while still having\n // access to 'self' we could use _.bind but it's not worth adding a dependency.\n this._handleMouseDown = function (event) {\n if (event.which === 1) {\n self._mouseButtonDown = true;\n self._strokeBegin(event);\n }\n };\n\n this._handleMouseMove = function (event) {\n if (self._mouseButtonDown) {\n self._strokeMoveUpdate(event);\n }\n };\n\n this._handleMouseUp = function (event) {\n if (event.which === 1 && self._mouseButtonDown) {\n self._mouseButtonDown = false;\n self._strokeEnd(event);\n }\n };\n\n this._handleTouchStart = function (event) {\n if (event.targetTouches.length === 1) {\n var touch = event.changedTouches[0];\n self._strokeBegin(touch);\n }\n };\n\n this._handleTouchMove = function (event) {\n // Prevent scrolling.\n event.preventDefault();\n\n var touch = event.targetTouches[0];\n self._strokeMoveUpdate(touch);\n };\n\n this._handleTouchEnd = function (event) {\n var wasCanvasTouched = event.target === self._canvas;\n if (wasCanvasTouched) {\n event.preventDefault();\n self._strokeEnd(event);\n }\n };\n\n // Enable mouse and touch event handlers\n this.on();\n}\n\n// Public methods\nSignaturePad.prototype.clear = function () {\n var ctx = this._ctx;\n var canvas = this._canvas;\n\n ctx.fillStyle = this.backgroundColor;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n this._data = [];\n this._reset();\n this._isEmpty = true;\n};\n\nSignaturePad.prototype.fromDataURL = function (dataUrl) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var image = new Image();\n var ratio = options.ratio || window.devicePixelRatio || 1;\n var width = options.width || this._canvas.width / ratio;\n var height = options.height || this._canvas.height / ratio;\n\n this._reset();\n image.src = dataUrl;\n image.onload = function () {\n _this._ctx.drawImage(image, 0, 0, width, height);\n };\n this._isEmpty = false;\n};\n\nSignaturePad.prototype.toDataURL = function (type) {\n var _canvas;\n\n switch (type) {\n case 'image/svg+xml':\n return this._toSVG();\n default:\n for (var _len = arguments.length, options = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n options[_key - 1] = arguments[_key];\n }\n\n return (_canvas = this._canvas).toDataURL.apply(_canvas, [type].concat(options));\n }\n};\n\nSignaturePad.prototype.on = function () {\n this._handleMouseEvents();\n this._handleTouchEvents();\n};\n\nSignaturePad.prototype.off = function () {\n this._canvas.removeEventListener('mousedown', this._handleMouseDown);\n this._canvas.removeEventListener('mousemove', this._handleMouseMove);\n document.removeEventListener('mouseup', this._handleMouseUp);\n\n this._canvas.removeEventListener('touchstart', this._handleTouchStart);\n this._canvas.removeEventListener('touchmove', this._handleTouchMove);\n this._canvas.removeEventListener('touchend', this._handleTouchEnd);\n};\n\nSignaturePad.prototype.isEmpty = function () {\n return this._isEmpty;\n};\n\n// Private methods\nSignaturePad.prototype._strokeBegin = function (event) {\n this._data.push([]);\n this._reset();\n this._strokeUpdate(event);\n\n if (typeof this.onBegin === 'function') {\n this.onBegin(event);\n }\n};\n\nSignaturePad.prototype._strokeUpdate = function (event) {\n var x = event.clientX;\n var y = event.clientY;\n\n var point = this._createPoint(x, y);\n var lastPointGroup = this._data[this._data.length - 1];\n var lastPoint = lastPointGroup && lastPointGroup[lastPointGroup.length - 1];\n var isLastPointTooClose = lastPoint && point.distanceTo(lastPoint) < this.minDistance;\n\n // Skip this point if it's too close to the previous one\n if (!(lastPoint && isLastPointTooClose)) {\n var _addPoint = this._addPoint(point),\n curve = _addPoint.curve,\n widths = _addPoint.widths;\n\n if (curve && widths) {\n this._drawCurve(curve, widths.start, widths.end);\n }\n\n this._data[this._data.length - 1].push({\n x: point.x,\n y: point.y,\n time: point.time,\n color: this.penColor\n });\n }\n};\n\nSignaturePad.prototype._strokeEnd = function (event) {\n var canDrawCurve = this.points.length > 2;\n var point = this.points[0]; // Point instance\n\n if (!canDrawCurve && point) {\n this._drawDot(point);\n }\n\n if (point) {\n var lastPointGroup = this._data[this._data.length - 1];\n var lastPoint = lastPointGroup[lastPointGroup.length - 1]; // plain object\n\n // When drawing a dot, there's only one point in a group, so without this check\n // such group would end up with exactly the same 2 points.\n if (!point.equals(lastPoint)) {\n lastPointGroup.push({\n x: point.x,\n y: point.y,\n time: point.time,\n color: this.penColor\n });\n }\n }\n\n if (typeof this.onEnd === 'function') {\n this.onEnd(event);\n }\n};\n\nSignaturePad.prototype._handleMouseEvents = function () {\n this._mouseButtonDown = false;\n\n this._canvas.addEventListener('mousedown', this._handleMouseDown);\n this._canvas.addEventListener('mousemove', this._handleMouseMove);\n document.addEventListener('mouseup', this._handleMouseUp);\n};\n\nSignaturePad.prototype._handleTouchEvents = function () {\n // Pass touch events to canvas element on mobile IE11 and Edge.\n this._canvas.style.msTouchAction = 'none';\n this._canvas.style.touchAction = 'none';\n\n this._canvas.addEventListener('touchstart', this._handleTouchStart);\n this._canvas.addEventListener('touchmove', this._handleTouchMove);\n this._canvas.addEventListener('touchend', this._handleTouchEnd);\n};\n\nSignaturePad.prototype._reset = function () {\n this.points = [];\n this._lastVelocity = 0;\n this._lastWidth = (this.minWidth + this.maxWidth) / 2;\n this._ctx.fillStyle = this.penColor;\n};\n\nSignaturePad.prototype._createPoint = function (x, y, time) {\n var rect = this._canvas.getBoundingClientRect();\n\n return new Point(x - rect.left, y - rect.top, time || new Date().getTime());\n};\n\nSignaturePad.prototype._addPoint = function (point) {\n var points = this.points;\n var tmp = void 0;\n\n points.push(point);\n\n if (points.length > 2) {\n // To reduce the initial lag make it work with 3 points\n // by copying the first point to the beginning.\n if (points.length === 3) points.unshift(points[0]);\n\n tmp = this._calculateCurveControlPoints(points[0], points[1], points[2]);\n var c2 = tmp.c2;\n tmp = this._calculateCurveControlPoints(points[1], points[2], points[3]);\n var c3 = tmp.c1;\n var curve = new Bezier(points[1], c2, c3, points[2]);\n var widths = this._calculateCurveWidths(curve);\n\n // Remove the first element from the list,\n // so that we always have no more than 4 points in points array.\n points.shift();\n\n return { curve: curve, widths: widths };\n }\n\n return {};\n};\n\nSignaturePad.prototype._calculateCurveControlPoints = function (s1, s2, s3) {\n var dx1 = s1.x - s2.x;\n var dy1 = s1.y - s2.y;\n var dx2 = s2.x - s3.x;\n var dy2 = s2.y - s3.y;\n\n var m1 = { x: (s1.x + s2.x) / 2.0, y: (s1.y + s2.y) / 2.0 };\n var m2 = { x: (s2.x + s3.x) / 2.0, y: (s2.y + s3.y) / 2.0 };\n\n var l1 = Math.sqrt(dx1 * dx1 + dy1 * dy1);\n var l2 = Math.sqrt(dx2 * dx2 + dy2 * dy2);\n\n var dxm = m1.x - m2.x;\n var dym = m1.y - m2.y;\n\n var k = l2 / (l1 + l2);\n var cm = { x: m2.x + dxm * k, y: m2.y + dym * k };\n\n var tx = s2.x - cm.x;\n var ty = s2.y - cm.y;\n\n return {\n c1: new Point(m1.x + tx, m1.y + ty),\n c2: new Point(m2.x + tx, m2.y + ty)\n };\n};\n\nSignaturePad.prototype._calculateCurveWidths = function (curve) {\n var startPoint = curve.startPoint;\n var endPoint = curve.endPoint;\n var widths = { start: null, end: null };\n\n var velocity = this.velocityFilterWeight * endPoint.velocityFrom(startPoint) + (1 - this.velocityFilterWeight) * this._lastVelocity;\n\n var newWidth = this._strokeWidth(velocity);\n\n widths.start = this._lastWidth;\n widths.end = newWidth;\n\n this._lastVelocity = velocity;\n this._lastWidth = newWidth;\n\n return widths;\n};\n\nSignaturePad.prototype._strokeWidth = function (velocity) {\n return Math.max(this.maxWidth / (velocity + 1), this.minWidth);\n};\n\nSignaturePad.prototype._drawPoint = function (x, y, size) {\n var ctx = this._ctx;\n\n ctx.moveTo(x, y);\n ctx.arc(x, y, size, 0, 2 * Math.PI, false);\n this._isEmpty = false;\n};\n\nSignaturePad.prototype._drawCurve = function (curve, startWidth, endWidth) {\n var ctx = this._ctx;\n var widthDelta = endWidth - startWidth;\n var drawSteps = Math.floor(curve.length());\n\n ctx.beginPath();\n\n for (var i = 0; i < drawSteps; i += 1) {\n // Calculate the Bezier (x, y) coordinate for this step.\n var t = i / drawSteps;\n var tt = t * t;\n var ttt = tt * t;\n var u = 1 - t;\n var uu = u * u;\n var uuu = uu * u;\n\n var x = uuu * curve.startPoint.x;\n x += 3 * uu * t * curve.control1.x;\n x += 3 * u * tt * curve.control2.x;\n x += ttt * curve.endPoint.x;\n\n var y = uuu * curve.startPoint.y;\n y += 3 * uu * t * curve.control1.y;\n y += 3 * u * tt * curve.control2.y;\n y += ttt * curve.endPoint.y;\n\n var width = startWidth + ttt * widthDelta;\n this._drawPoint(x, y, width);\n }\n\n ctx.closePath();\n ctx.fill();\n};\n\nSignaturePad.prototype._drawDot = function (point) {\n var ctx = this._ctx;\n var width = typeof this.dotSize === 'function' ? this.dotSize() : this.dotSize;\n\n ctx.beginPath();\n this._drawPoint(point.x, point.y, width);\n ctx.closePath();\n ctx.fill();\n};\n\nSignaturePad.prototype._fromData = function (pointGroups, drawCurve, drawDot) {\n for (var i = 0; i < pointGroups.length; i += 1) {\n var group = pointGroups[i];\n\n if (group.length > 1) {\n for (var j = 0; j < group.length; j += 1) {\n var rawPoint = group[j];\n var point = new Point(rawPoint.x, rawPoint.y, rawPoint.time);\n var color = rawPoint.color;\n\n if (j === 0) {\n // First point in a group. Nothing to draw yet.\n\n // All points in the group have the same color, so it's enough to set\n // penColor just at the beginning.\n this.penColor = color;\n this._reset();\n\n this._addPoint(point);\n } else if (j !== group.length - 1) {\n // Middle point in a group.\n var _addPoint2 = this._addPoint(point),\n curve = _addPoint2.curve,\n widths = _addPoint2.widths;\n\n if (curve && widths) {\n drawCurve(curve, widths, color);\n }\n } else {\n // Last point in a group. Do nothing.\n }\n }\n } else {\n this._reset();\n var _rawPoint = group[0];\n drawDot(_rawPoint);\n }\n }\n};\n\nSignaturePad.prototype._toSVG = function () {\n var _this2 = this;\n\n var pointGroups = this._data;\n var canvas = this._canvas;\n var ratio = Math.max(window.devicePixelRatio || 1, 1);\n var minX = 0;\n var minY = 0;\n var maxX = canvas.width / ratio;\n var maxY = canvas.height / ratio;\n var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n svg.setAttributeNS(null, 'width', canvas.width);\n svg.setAttributeNS(null, 'height', canvas.height);\n\n this._fromData(pointGroups, function (curve, widths, color) {\n var path = document.createElement('path');\n\n // Need to check curve for NaN values, these pop up when drawing\n // lines on the canvas that are not continuous. E.g. Sharp corners\n // or stopping mid-stroke and than continuing without lifting mouse.\n if (!isNaN(curve.control1.x) && !isNaN(curve.control1.y) && !isNaN(curve.control2.x) && !isNaN(curve.control2.y)) {\n var attr = 'M ' + curve.startPoint.x.toFixed(3) + ',' + curve.startPoint.y.toFixed(3) + ' ' + ('C ' + curve.control1.x.toFixed(3) + ',' + curve.control1.y.toFixed(3) + ' ') + (curve.control2.x.toFixed(3) + ',' + curve.control2.y.toFixed(3) + ' ') + (curve.endPoint.x.toFixed(3) + ',' + curve.endPoint.y.toFixed(3));\n\n path.setAttribute('d', attr);\n path.setAttribute('stroke-width', (widths.end * 2.25).toFixed(3));\n path.setAttribute('stroke', color);\n path.setAttribute('fill', 'none');\n path.setAttribute('stroke-linecap', 'round');\n\n svg.appendChild(path);\n }\n }, function (rawPoint) {\n var circle = document.createElement('circle');\n var dotSize = typeof _this2.dotSize === 'function' ? _this2.dotSize() : _this2.dotSize;\n circle.setAttribute('r', dotSize);\n circle.setAttribute('cx', rawPoint.x);\n circle.setAttribute('cy', rawPoint.y);\n circle.setAttribute('fill', rawPoint.color);\n\n svg.appendChild(circle);\n });\n\n var prefix = 'data:image/svg+xml;base64,';\n var header = '<svg' + ' xmlns=\"http://www.w3.org/2000/svg\"' + ' xmlns:xlink=\"http://www.w3.org/1999/xlink\"' + (' viewBox=\"' + minX + ' ' + minY + ' ' + maxX + ' ' + maxY + '\"') + (' width=\"' + maxX + '\"') + (' height=\"' + maxY + '\"') + '>';\n var body = svg.innerHTML;\n\n // IE hack for missing innerHTML property on SVGElement\n if (body === undefined) {\n var dummy = document.createElement('dummy');\n var nodes = svg.childNodes;\n dummy.innerHTML = '';\n\n for (var i = 0; i < nodes.length; i += 1) {\n dummy.appendChild(nodes[i].cloneNode(true));\n }\n\n body = dummy.innerHTML;\n }\n\n var footer = '</svg>';\n var data = header + body + footer;\n\n return prefix + btoa(data);\n};\n\nSignaturePad.prototype.fromData = function (pointGroups) {\n var _this3 = this;\n\n this.clear();\n\n this._fromData(pointGroups, function (curve, widths) {\n return _this3._drawCurve(curve, widths.start, widths.end);\n }, function (rawPoint) {\n return _this3._drawDot(rawPoint);\n });\n\n this._data = pointGroups;\n};\n\nSignaturePad.prototype.toData = function () {\n return this._data;\n};\n\nreturn SignaturePad;\n\n})));\n","\"use strict\";!function(a,b){\"object\"==typeof exports?module.exports=b():\"function\"==typeof define&&define.amd?define([\"jquery\",\"googlemaps!\"],b):a.GMaps=b()}(this,function(){var a=function(a,b){var c;if(a===b)return a;for(c in b)void 0!==b[c]&&(a[c]=b[c]);return a},b=function(a,b){var c,d=Array.prototype.slice.call(arguments,2),e=[],f=a.length;if(Array.prototype.map&&a.map===Array.prototype.map)e=Array.prototype.map.call(a,function(a){var c=d.slice(0);return c.splice(0,0,a),b.apply(this,c)});else for(c=0;c<f;c++)callback_params=d,callback_params.splice(0,0,a[c]),e.push(b.apply(this,callback_params));return e},c=function(a){var b,c=[];for(b=0;b<a.length;b++)c=c.concat(a[b]);return c},d=function(a,b){var c=a[0],d=a[1];return b&&(c=a[1],d=a[0]),new google.maps.LatLng(c,d)},f=function(a,b){var c;for(c=0;c<a.length;c++)a[c]instanceof google.maps.LatLng||(a[c].length>0&&\"object\"==typeof a[c][0]?a[c]=f(a[c],b):a[c]=d(a[c],b));return a},g=function(a,b){var c=a.replace(\".\",\"\");return\"jQuery\"in this&&b?$(\".\"+c,b)[0]:document.getElementsByClassName(c)[0]},h=function(a,b){var a=a.replace(\"#\",\"\");return\"jQuery\"in window&&b?$(\"#\"+a,b)[0]:document.getElementById(a)},i=function(a){var b=0,c=0;if(a.getBoundingClientRect){var d=a.getBoundingClientRect(),e=-(window.scrollX?window.scrollX:window.pageXOffset),f=-(window.scrollY?window.scrollY:window.pageYOffset);return[d.left-e,d.top-f]}if(a.offsetParent)do b+=a.offsetLeft,c+=a.offsetTop;while(a=a.offsetParent);return[b,c]},j=function(b){var c=document,d=function(b){if(\"object\"!=typeof window.google||!window.google.maps)return\"object\"==typeof window.console&&window.console.error&&console.error(\"Google Maps API is required. Please register the following JavaScript library https://maps.googleapis.com/maps/api/js.\"),function(){};if(!this)return new d(b);b.zoom=b.zoom||15,b.mapType=b.mapType||\"roadmap\";var e,f=function(a,b){return void 0===a?b:a},j=this,k=[\"bounds_changed\",\"center_changed\",\"click\",\"dblclick\",\"drag\",\"dragend\",\"dragstart\",\"idle\",\"maptypeid_changed\",\"projection_changed\",\"resize\",\"tilesloaded\",\"zoom_changed\"],l=[\"mousemove\",\"mouseout\",\"mouseover\"],m=[\"el\",\"lat\",\"lng\",\"mapType\",\"width\",\"height\",\"markerClusterer\",\"enableNewStyle\"],n=b.el||b.div,o=b.markerClusterer,p=google.maps.MapTypeId[b.mapType.toUpperCase()],q=new google.maps.LatLng(b.lat,b.lng),r=f(b.zoomControl,!0),s=b.zoomControlOpt||{style:\"DEFAULT\",position:\"TOP_LEFT\"},t=s.style||\"DEFAULT\",u=s.position||\"TOP_LEFT\",v=f(b.panControl,!0),w=f(b.mapTypeControl,!0),x=f(b.scaleControl,!0),y=f(b.streetViewControl,!0),z=f(z,!0),A={},B={zoom:this.zoom,center:q,mapTypeId:p},C={panControl:v,zoomControl:r,zoomControlOptions:{style:google.maps.ZoomControlStyle[t],position:google.maps.ControlPosition[u]},mapTypeControl:w,scaleControl:x,streetViewControl:y,overviewMapControl:z};if(\"string\"==typeof b.el||\"string\"==typeof b.div?n.indexOf(\"#\")>-1?this.el=h(n,b.context):this.el=g.apply(this,[n,b.context]):this.el=n,void 0===this.el||null===this.el)throw\"No element defined.\";for(window.context_menu=window.context_menu||{},window.context_menu[j.el.id]={},this.controls=[],this.overlays=[],this.layers=[],this.singleLayers={},this.markers=[],this.polylines=[],this.routes=[],this.polygons=[],this.infoWindow=null,this.overlay_el=null,this.zoom=b.zoom,this.registered_events={},this.el.style.width=b.width||this.el.scrollWidth||this.el.offsetWidth,this.el.style.height=b.height||this.el.scrollHeight||this.el.offsetHeight,google.maps.visualRefresh=b.enableNewStyle,e=0;e<m.length;e++)delete b[m[e]];for(1!=b.disableDefaultUI&&(B=a(B,C)),A=a(B,b),e=0;e<k.length;e++)delete A[k[e]];for(e=0;e<l.length;e++)delete A[l[e]];this.map=new google.maps.Map(this.el,A),o&&(this.markerClusterer=o.apply(this,[this.map]));var D=function(a,b){var c=\"\",d=window.context_menu[j.el.id][a];for(var e in d)if(d.hasOwnProperty(e)){var f=d[e];c+='<li><a id=\"'+a+\"_\"+e+'\" href=\"#\">'+f.title+\"</a></li>\"}if(h(\"gmaps_context_menu\")){var g=h(\"gmaps_context_menu\");g.innerHTML=c;var e,k=g.getElementsByTagName(\"a\"),l=k.length;for(e=0;e<l;e++){var m=k[e],n=function(c){c.preventDefault(),d[this.id.replace(a+\"_\",\"\")].action.apply(j,[b]),j.hideContextMenu()};google.maps.event.clearListeners(m,\"click\"),google.maps.event.addDomListenerOnce(m,\"click\",n,!1)}var o=i.apply(this,[j.el]),p=o[0]+b.pixel.x-15,q=o[1]+b.pixel.y-15;g.style.left=p+\"px\",g.style.top=q+\"px\"}};this.buildContextMenu=function(a,b){if(\"marker\"===a){b.pixel={};var c=new google.maps.OverlayView;c.setMap(j.map),c.draw=function(){var d=c.getProjection(),e=b.marker.getPosition();b.pixel=d.fromLatLngToContainerPixel(e),D(a,b)}}else D(a,b);var d=h(\"gmaps_context_menu\");setTimeout(function(){d.style.display=\"block\"},0)},this.setContextMenu=function(a){window.context_menu[j.el.id][a.control]={};var b,d=c.createElement(\"ul\");for(b in a.options)if(a.options.hasOwnProperty(b)){var e=a.options[b];window.context_menu[j.el.id][a.control][e.name]={title:e.title,action:e.action}}d.id=\"gmaps_context_menu\",d.style.display=\"none\",d.style.position=\"absolute\",d.style.minWidth=\"100px\",d.style.background=\"white\",d.style.listStyle=\"none\",d.style.padding=\"8px\",d.style.boxShadow=\"2px 2px 6px #ccc\",h(\"gmaps_context_menu\")||c.body.appendChild(d);var f=h(\"gmaps_context_menu\");google.maps.event.addDomListener(f,\"mouseout\",function(a){a.relatedTarget&&this.contains(a.relatedTarget)||window.setTimeout(function(){f.style.display=\"none\"},400)},!1)},this.hideContextMenu=function(){var a=h(\"gmaps_context_menu\");a&&(a.style.display=\"none\")};var E=function(a,c){google.maps.event.addListener(a,c,function(a){void 0==a&&(a=this),b[c].apply(this,[a]),j.hideContextMenu()})};google.maps.event.addListener(this.map,\"zoom_changed\",this.hideContextMenu);for(var F=0;F<k.length;F++){var G=k[F];G in b&&E(this.map,G)}for(var F=0;F<l.length;F++){var G=l[F];G in b&&E(this.map,G)}google.maps.event.addListener(this.map,\"rightclick\",function(a){b.rightclick&&b.rightclick.apply(this,[a]),void 0!=window.context_menu[j.el.id].map&&j.buildContextMenu(\"map\",a)}),this.refresh=function(){google.maps.event.trigger(this.map,\"resize\")},this.fitZoom=function(){var a,b=[],c=this.markers.length;for(a=0;a<c;a++)\"boolean\"==typeof this.markers[a].visible&&this.markers[a].visible&&b.push(this.markers[a].getPosition());this.fitLatLngBounds(b)},this.fitLatLngBounds=function(a){var b,c=a.length,d=new google.maps.LatLngBounds;for(b=0;b<c;b++)d.extend(a[b]);this.map.fitBounds(d)},this.setCenter=function(a,b,c){this.map.panTo(new google.maps.LatLng(a,b)),c&&c()},this.getElement=function(){return this.el},this.zoomIn=function(a){a=a||1,this.zoom=this.map.getZoom()+a,this.map.setZoom(this.zoom)},this.zoomOut=function(a){a=a||1,this.zoom=this.map.getZoom()-a,this.map.setZoom(this.zoom)};var H,I=[];for(H in this.map)\"function\"!=typeof this.map[H]||this[H]||I.push(H);for(e=0;e<I.length;e++)!function(a,b,c){a[c]=function(){return b[c].apply(b,arguments)}}(this,this.map,I[e])};return d}(this);j.prototype.createControl=function(a){var b=document.createElement(\"div\");b.style.cursor=\"pointer\",a.disableDefaultStyles!==!0&&(b.style.fontFamily=\"Roboto, Arial, sans-serif\",b.style.fontSize=\"11px\",b.style.boxShadow=\"rgba(0, 0, 0, 0.298039) 0px 1px 4px -1px\");for(var c in a.style)b.style[c]=a.style[c];a.id&&(b.id=a.id),a.title&&(b.title=a.title),a.classes&&(b.className=a.classes),a.content&&(\"string\"==typeof a.content?b.innerHTML=a.content:a.content instanceof HTMLElement&&b.appendChild(a.content)),a.position&&(b.position=google.maps.ControlPosition[a.position.toUpperCase()]);for(var d in a.events)!function(b,c){google.maps.event.addDomListener(b,c,function(){a.events[c].apply(this,[this])})}(b,d);return b.index=1,b},j.prototype.addControl=function(a){var b=this.createControl(a);return this.controls.push(b),this.map.controls[b.position].push(b),b},j.prototype.removeControl=function(a){var b,c=null;for(b=0;b<this.controls.length;b++)this.controls[b]==a&&(c=this.controls[b].position,this.controls.splice(b,1));if(c)for(b=0;b<this.map.controls.length;b++){var d=this.map.controls[a.position];if(d.getAt(b)==a){d.removeAt(b);break}}return a},j.prototype.createMarker=function(b){if(void 0==b.lat&&void 0==b.lng&&void 0==b.position)throw\"No latitude or longitude defined.\";var c=this,d=b.details,e=b.fences,f=b.outside,g={position:new google.maps.LatLng(b.lat,b.lng),map:null},h=a(g,b);delete h.lat,delete h.lng,delete h.fences,delete h.outside;var i=new google.maps.Marker(h);if(i.fences=e,b.infoWindow){i.infoWindow=new google.maps.InfoWindow(b.infoWindow);for(var j=[\"closeclick\",\"content_changed\",\"domready\",\"position_changed\",\"zindex_changed\"],k=0;k<j.length;k++)!function(a,c){b.infoWindow[c]&&google.maps.event.addListener(a,c,function(a){b.infoWindow[c].apply(this,[a])})}(i.infoWindow,j[k])}for(var l=[\"animation_changed\",\"clickable_changed\",\"cursor_changed\",\"draggable_changed\",\"flat_changed\",\"icon_changed\",\"position_changed\",\"shadow_changed\",\"shape_changed\",\"title_changed\",\"visible_changed\",\"zindex_changed\"],m=[\"dblclick\",\"drag\",\"dragend\",\"dragstart\",\"mousedown\",\"mouseout\",\"mouseover\",\"mouseup\"],k=0;k<l.length;k++)!function(a,c){b[c]&&google.maps.event.addListener(a,c,function(){b[c].apply(this,[this])})}(i,l[k]);for(var k=0;k<m.length;k++)!function(a,c,d){b[d]&&google.maps.event.addListener(c,d,function(c){c.pixel||(c.pixel=a.getProjection().fromLatLngToPoint(c.latLng)),b[d].apply(this,[c])})}(this.map,i,m[k]);return google.maps.event.addListener(i,\"click\",function(){this.details=d,b.click&&b.click.apply(this,[this]),i.infoWindow&&(c.hideInfoWindows(),i.infoWindow.open(c.map,i))}),google.maps.event.addListener(i,\"rightclick\",function(a){a.marker=this,b.rightclick&&b.rightclick.apply(this,[a]),void 0!=window.context_menu[c.el.id].marker&&c.buildContextMenu(\"marker\",a)}),i.fences&&google.maps.event.addListener(i,\"dragend\",function(){c.checkMarkerGeofence(i,function(a,b){f(a,b)})}),i},j.prototype.addMarker=function(a){var b;if(a.hasOwnProperty(\"gm_accessors_\"))b=a;else{if(!(a.hasOwnProperty(\"lat\")&&a.hasOwnProperty(\"lng\")||a.position))throw\"No latitude or longitude defined.\";b=this.createMarker(a)}return b.setMap(this.map),this.markerClusterer&&this.markerClusterer.addMarker(b),this.markers.push(b),j.fire(\"marker_added\",b,this),b},j.prototype.addMarkers=function(a){for(var b,c=0;b=a[c];c++)this.addMarker(b);return this.markers},j.prototype.hideInfoWindows=function(){for(var a,b=0;a=this.markers[b];b++)a.infoWindow&&a.infoWindow.close()},j.prototype.removeMarker=function(a){for(var b=0;b<this.markers.length;b++)if(this.markers[b]===a){this.markers[b].setMap(null),this.markers.splice(b,1),this.markerClusterer&&this.markerClusterer.removeMarker(a),j.fire(\"marker_removed\",a,this);break}return a},j.prototype.removeMarkers=function(a){var b=[];if(void 0===a){for(var c=0;c<this.markers.length;c++){var d=this.markers[c];d.setMap(null),j.fire(\"marker_removed\",d,this)}this.markerClusterer&&this.markerClusterer.clearMarkers&&this.markerClusterer.clearMarkers(),this.markers=b}else{for(var c=0;c<a.length;c++){var e=this.markers.indexOf(a[c]);if(e>-1){var d=this.markers[e];d.setMap(null),this.markerClusterer&&this.markerClusterer.removeMarker(d),j.fire(\"marker_removed\",d,this)}}for(var c=0;c<this.markers.length;c++){var d=this.markers[c];null!=d.getMap()&&b.push(d)}this.markers=b}},j.prototype.drawOverlay=function(a){var b=new google.maps.OverlayView,c=!0;return b.setMap(this.map),null!=a.auto_show&&(c=a.auto_show),b.onAdd=function(){var c=document.createElement(\"div\");c.style.borderStyle=\"none\",c.style.borderWidth=\"0px\",c.style.position=\"absolute\",c.style.zIndex=100,c.innerHTML=a.content,b.el=c,a.layer||(a.layer=\"overlayLayer\");var d=this.getPanes(),e=d[a.layer],f=[\"contextmenu\",\"DOMMouseScroll\",\"dblclick\",\"mousedown\"];e.appendChild(c);for(var g=0;g<f.length;g++)!function(a,b){google.maps.event.addDomListener(a,b,function(a){navigator.userAgent.toLowerCase().indexOf(\"msie\")!=-1&&document.all?(a.cancelBubble=!0,a.returnValue=!1):a.stopPropagation()})}(c,f[g]);a.click&&(d.overlayMouseTarget.appendChild(b.el),google.maps.event.addDomListener(b.el,\"click\",function(){a.click.apply(b,[b])})),google.maps.event.trigger(this,\"ready\")},b.draw=function(){var d=this.getProjection(),e=d.fromLatLngToDivPixel(new google.maps.LatLng(a.lat,a.lng));a.horizontalOffset=a.horizontalOffset||0,a.verticalOffset=a.verticalOffset||0;var f=b.el,g=f.children[0],h=g.clientHeight,i=g.clientWidth;switch(a.verticalAlign){case\"top\":f.style.top=e.y-h+a.verticalOffset+\"px\";break;default:case\"middle\":f.style.top=e.y-h/2+a.verticalOffset+\"px\";break;case\"bottom\":f.style.top=e.y+a.verticalOffset+\"px\"}switch(a.horizontalAlign){case\"left\":f.style.left=e.x-i+a.horizontalOffset+\"px\";break;default:case\"center\":f.style.left=e.x-i/2+a.horizontalOffset+\"px\";break;case\"right\":f.style.left=e.x+a.horizontalOffset+\"px\"}f.style.display=c?\"block\":\"none\",c||a.show.apply(this,[f])},b.onRemove=function(){var c=b.el;a.remove?a.remove.apply(this,[c]):(b.el.parentNode.removeChild(b.el),b.el=null)},this.overlays.push(b),b},j.prototype.removeOverlay=function(a){for(var b=0;b<this.overlays.length;b++)if(this.overlays[b]===a){this.overlays[b].setMap(null),this.overlays.splice(b,1);break}},j.prototype.removeOverlays=function(){for(var a,b=0;a=this.overlays[b];b++)a.setMap(null);this.overlays=[]},j.prototype.drawPolyline=function(a){var b=[],c=a.path;if(c.length)if(void 0===c[0][0])b=c;else for(var d,e=0;d=c[e];e++)b.push(new google.maps.LatLng(d[0],d[1]));var f={map:this.map,path:b,strokeColor:a.strokeColor,strokeOpacity:a.strokeOpacity,strokeWeight:a.strokeWeight,geodesic:a.geodesic,clickable:!0,editable:!1,visible:!0};a.hasOwnProperty(\"clickable\")&&(f.clickable=a.clickable),a.hasOwnProperty(\"editable\")&&(f.editable=a.editable),a.hasOwnProperty(\"icons\")&&(f.icons=a.icons),a.hasOwnProperty(\"zIndex\")&&(f.zIndex=a.zIndex);for(var g=new google.maps.Polyline(f),h=[\"click\",\"dblclick\",\"mousedown\",\"mousemove\",\"mouseout\",\"mouseover\",\"mouseup\",\"rightclick\"],i=0;i<h.length;i++)!function(b,c){a[c]&&google.maps.event.addListener(b,c,function(b){a[c].apply(this,[b])})}(g,h[i]);return this.polylines.push(g),j.fire(\"polyline_added\",g,this),g},j.prototype.removePolyline=function(a){for(var b=0;b<this.polylines.length;b++)if(this.polylines[b]===a){this.polylines[b].setMap(null),this.polylines.splice(b,1),j.fire(\"polyline_removed\",a,this);break}},j.prototype.removePolylines=function(){for(var a,b=0;a=this.polylines[b];b++)a.setMap(null);this.polylines=[]},j.prototype.drawCircle=function(b){b=a({map:this.map,center:new google.maps.LatLng(b.lat,b.lng)},b),delete b.lat,delete b.lng;for(var c=new google.maps.Circle(b),d=[\"click\",\"dblclick\",\"mousedown\",\"mousemove\",\"mouseout\",\"mouseover\",\"mouseup\",\"rightclick\"],e=0;e<d.length;e++)!function(a,c){b[c]&&google.maps.event.addListener(a,c,function(a){b[c].apply(this,[a])})}(c,d[e]);return this.polygons.push(c),c},j.prototype.drawRectangle=function(b){b=a({map:this.map},b);var c=new google.maps.LatLngBounds(new google.maps.LatLng(b.bounds[0][0],b.bounds[0][1]),new google.maps.LatLng(b.bounds[1][0],b.bounds[1][1]));b.bounds=c;for(var d=new google.maps.Rectangle(b),e=[\"click\",\"dblclick\",\"mousedown\",\"mousemove\",\"mouseout\",\"mouseover\",\"mouseup\",\"rightclick\"],f=0;f<e.length;f++)!function(a,c){b[c]&&google.maps.event.addListener(a,c,function(a){b[c].apply(this,[a])})}(d,e[f]);return this.polygons.push(d),d},j.prototype.drawPolygon=function(d){var e=!1;d.hasOwnProperty(\"useGeoJSON\")&&(e=d.useGeoJSON),delete d.useGeoJSON,d=a({map:this.map},d),0==e&&(d.paths=[d.paths.slice(0)]),d.paths.length>0&&d.paths[0].length>0&&(d.paths=c(b(d.paths,f,e)));for(var g=new google.maps.Polygon(d),h=[\"click\",\"dblclick\",\"mousedown\",\"mousemove\",\"mouseout\",\"mouseover\",\"mouseup\",\"rightclick\"],i=0;i<h.length;i++)!function(a,b){d[b]&&google.maps.event.addListener(a,b,function(a){d[b].apply(this,[a])})}(g,h[i]);return this.polygons.push(g),j.fire(\"polygon_added\",g,this),g},j.prototype.removePolygon=function(a){for(var b=0;b<this.polygons.length;b++)if(this.polygons[b]===a){this.polygons[b].setMap(null),this.polygons.splice(b,1),j.fire(\"polygon_removed\",a,this);break}},j.prototype.removePolygons=function(){for(var a,b=0;a=this.polygons[b];b++)a.setMap(null);this.polygons=[]},j.prototype.getFromFusionTables=function(a){var b=a.events;delete a.events;var c=a,d=new google.maps.FusionTablesLayer(c);for(var e in b)!function(a,c){google.maps.event.addListener(a,c,function(a){b[c].apply(this,[a])})}(d,e);return this.layers.push(d),d},j.prototype.loadFromFusionTables=function(a){var b=this.getFromFusionTables(a);return b.setMap(this.map),b},j.prototype.getFromKML=function(a){var b=a.url,c=a.events;delete a.url,delete a.events;var d=a,e=new google.maps.KmlLayer(b,d);for(var f in c)!function(a,b){google.maps.event.addListener(a,b,function(a){c[b].apply(this,[a])})}(e,f);return this.layers.push(e),e},j.prototype.loadFromKML=function(a){var b=this.getFromKML(a);return b.setMap(this.map),b},j.prototype.addLayer=function(a,b){b=b||{};var c;switch(a){case\"weather\":this.singleLayers.weather=c=new google.maps.weather.WeatherLayer;break;case\"clouds\":this.singleLayers.clouds=c=new google.maps.weather.CloudLayer;break;case\"traffic\":this.singleLayers.traffic=c=new google.maps.TrafficLayer;break;case\"transit\":this.singleLayers.transit=c=new google.maps.TransitLayer;break;case\"bicycling\":this.singleLayers.bicycling=c=new google.maps.BicyclingLayer;break;case\"panoramio\":this.singleLayers.panoramio=c=new google.maps.panoramio.PanoramioLayer,c.setTag(b.filter),delete b.filter,b.click&&google.maps.event.addListener(c,\"click\",function(a){b.click(a),delete b.click});break;case\"places\":if(this.singleLayers.places=c=new google.maps.places.PlacesService(this.map),b.search||b.nearbySearch||b.radarSearch){var d={bounds:b.bounds||null,keyword:b.keyword||null,location:b.location||null,name:b.name||null,radius:b.radius||null,rankBy:b.rankBy||null,types:b.types||null};b.radarSearch&&c.radarSearch(d,b.radarSearch),b.search&&c.search(d,b.search),b.nearbySearch&&c.nearbySearch(d,b.nearbySearch)}if(b.textSearch){var e={bounds:b.bounds||null,location:b.location||null,query:b.query||null,radius:b.radius||null};c.textSearch(e,b.textSearch)}}if(void 0!==c)return\"function\"==typeof c.setOptions&&c.setOptions(b),\"function\"==typeof c.setMap&&c.setMap(this.map),c},j.prototype.removeLayer=function(a){if(\"string\"==typeof a&&void 0!==this.singleLayers[a])this.singleLayers[a].setMap(null),delete this.singleLayers[a];else for(var b=0;b<this.layers.length;b++)if(this.layers[b]===a){this.layers[b].setMap(null),this.layers.splice(b,1);break}};var k,l;return j.prototype.getRoutes=function(b){switch(b.travelMode){case\"bicycling\":k=google.maps.TravelMode.BICYCLING;break;case\"transit\":k=google.maps.TravelMode.TRANSIT;break;case\"driving\":k=google.maps.TravelMode.DRIVING;break;default:k=google.maps.TravelMode.WALKING}l=\"imperial\"===b.unitSystem?google.maps.UnitSystem.IMPERIAL:google.maps.UnitSystem.METRIC;var c={avoidHighways:!1,avoidTolls:!1,optimizeWaypoints:!1,waypoints:[]},d=a(c,b);d.origin=/string/.test(typeof b.origin)?b.origin:new google.maps.LatLng(b.origin[0],b.origin[1]),d.destination=/string/.test(typeof b.destination)?b.destination:new google.maps.LatLng(b.destination[0],b.destination[1]),d.travelMode=k,d.unitSystem=l,delete d.callback,delete d.error;var e=[];(new google.maps.DirectionsService).route(d,function(a,c){if(c===google.maps.DirectionsStatus.OK){for(var d in a.routes)a.routes.hasOwnProperty(d)&&e.push(a.routes[d]);b.callback&&b.callback(e,a,c)}else b.error&&b.error(a,c)})},j.prototype.removeRoutes=function(){this.routes.length=0},j.prototype.getElevations=function(d){d=a({locations:[],path:!1,samples:256},d),d.locations.length>0&&d.locations[0].length>0&&(d.locations=c(b([d.locations],f,!1)));var e=d.callback;delete d.callback;var g=new google.maps.ElevationService;if(d.path){var h={path:d.locations,samples:d.samples};g.getElevationAlongPath(h,function(a,b){e&&\"function\"==typeof e&&e(a,b)})}else delete d.path,delete d.samples,g.getElevationForLocations(d,function(a,b){e&&\"function\"==typeof e&&e(a,b)})},j.prototype.cleanRoute=j.prototype.removePolylines,j.prototype.renderRoute=function(b,c){var d,e=\"string\"==typeof c.panel?document.getElementById(c.panel.replace(\"#\",\"\")):c.panel;c.panel=e,c=a({map:this.map},c),d=new google.maps.DirectionsRenderer(c),this.getRoutes({origin:b.origin,destination:b.destination,travelMode:b.travelMode,waypoints:b.waypoints,unitSystem:b.unitSystem,error:b.error,avoidHighways:b.avoidHighways,avoidTolls:b.avoidTolls,optimizeWaypoints:b.optimizeWaypoints,callback:function(a,b,c){c===google.maps.DirectionsStatus.OK&&d.setDirections(b)}})},j.prototype.drawRoute=function(a){var b=this;this.getRoutes({origin:a.origin,destination:a.destination,travelMode:a.travelMode,waypoints:a.waypoints,unitSystem:a.unitSystem,error:a.error,avoidHighways:a.avoidHighways,avoidTolls:a.avoidTolls,optimizeWaypoints:a.optimizeWaypoints,callback:function(c){if(c.length>0){var d={path:c[c.length-1].overview_path,strokeColor:a.strokeColor,strokeOpacity:a.strokeOpacity,strokeWeight:a.strokeWeight};a.hasOwnProperty(\"icons\")&&(d.icons=a.icons),b.drawPolyline(d),a.callback&&a.callback(c[c.length-1])}}})},j.prototype.travelRoute=function(a){if(a.origin&&a.destination)this.getRoutes({origin:a.origin,destination:a.destination,travelMode:a.travelMode,waypoints:a.waypoints,unitSystem:a.unitSystem,error:a.error,callback:function(b){if(b.length>0&&a.start&&a.start(b[b.length-1]),b.length>0&&a.step){var c=b[b.length-1];if(c.legs.length>0)for(var d,e=c.legs[0].steps,f=0;d=e[f];f++)d.step_number=f,a.step(d,c.legs[0].steps.length-1)}b.length>0&&a.end&&a.end(b[b.length-1])}});else if(a.route&&a.route.legs.length>0)for(var b,c=a.route.legs[0].steps,d=0;b=c[d];d++)b.step_number=d,a.step(b)},j.prototype.drawSteppedRoute=function(a){var b=this;if(a.origin&&a.destination)this.getRoutes({origin:a.origin,destination:a.destination,travelMode:a.travelMode,waypoints:a.waypoints,error:a.error,callback:function(c){if(c.length>0&&a.start&&a.start(c[c.length-1]),c.length>0&&a.step){var d=c[c.length-1];if(d.legs.length>0)for(var e,f=d.legs[0].steps,g=0;e=f[g];g++){e.step_number=g;var h={path:e.path,strokeColor:a.strokeColor,strokeOpacity:a.strokeOpacity,strokeWeight:a.strokeWeight};a.hasOwnProperty(\"icons\")&&(h.icons=a.icons),b.drawPolyline(h),a.step(e,d.legs[0].steps.length-1)}}c.length>0&&a.end&&a.end(c[c.length-1])}});else if(a.route&&a.route.legs.length>0)for(var c,d=a.route.legs[0].steps,e=0;c=d[e];e++){c.step_number=e;var f={path:c.path,strokeColor:a.strokeColor,strokeOpacity:a.strokeOpacity,strokeWeight:a.strokeWeight};a.hasOwnProperty(\"icons\")&&(f.icons=a.icons),b.drawPolyline(f),a.step(c)}},j.Route=function(a){this.origin=a.origin,this.destination=a.destination,this.waypoints=a.waypoints,this.map=a.map,this.route=a.route,this.step_count=0,this.steps=this.route.legs[0].steps,this.steps_length=this.steps.length;var b={path:new google.maps.MVCArray,strokeColor:a.strokeColor,strokeOpacity:a.strokeOpacity,strokeWeight:a.strokeWeight};a.hasOwnProperty(\"icons\")&&(b.icons=a.icons),this.polyline=this.map.drawPolyline(b).getPath()},j.Route.prototype.getRoute=function(a){var b=this;this.map.getRoutes({origin:this.origin,destination:this.destination,travelMode:a.travelMode,waypoints:this.waypoints||[],error:a.error,callback:function(){b.route=e[0],a.callback&&a.callback.call(b)}})},j.Route.prototype.back=function(){if(this.step_count>0){this.step_count--;var a=this.route.legs[0].steps[this.step_count].path;for(var b in a)a.hasOwnProperty(b)&&this.polyline.pop()}},j.Route.prototype.forward=function(){if(this.step_count<this.steps_length){var a=this.route.legs[0].steps[this.step_count].path;for(var b in a)a.hasOwnProperty(b)&&this.polyline.push(a[b]);this.step_count++}},j.prototype.checkGeofence=function(a,b,c){return c.containsLatLng(new google.maps.LatLng(a,b))},j.prototype.checkMarkerGeofence=function(a,b){if(a.fences)for(var c,d=0;c=a.fences[d];d++){var e=a.getPosition();this.checkGeofence(e.lat(),e.lng(),c)||b(a,c)}},j.prototype.toImage=function(a){var a=a||{},b={};if(b.size=a.size||[this.el.clientWidth,this.el.clientHeight],b.lat=this.getCenter().lat(),b.lng=this.getCenter().lng(),this.markers.length>0){b.markers=[];for(var c=0;c<this.markers.length;c++)b.markers.push({lat:this.markers[c].getPosition().lat(),lng:this.markers[c].getPosition().lng()})}if(this.polylines.length>0){var d=this.polylines[0];b.polyline={},b.polyline.path=google.maps.geometry.encoding.encodePath(d.getPath()),b.polyline.strokeColor=d.strokeColor,b.polyline.strokeOpacity=d.strokeOpacity,b.polyline.strokeWeight=d.strokeWeight}return j.staticMapURL(b)},j.staticMapURL=function(a){function b(a,b){if(\"#\"===a[0]&&(a=a.replace(\"#\",\"0x\"),b)){if(b=parseFloat(b),0===(b=Math.min(1,Math.max(b,0))))return\"0x00000000\";b=(255*b).toString(16),1===b.length&&(b+=b),a=a.slice(0,8)+b}return a}var c,d=[],e=(\"file:\"===location.protocol?\"http:\":location.protocol)+\"//maps.googleapis.com/maps/api/staticmap\";a.url&&(e=a.url,delete a.url),e+=\"?\";var f=a.markers;delete a.markers,!f&&a.marker&&(f=[a.marker],delete a.marker);var g=a.styles;delete a.styles;var h=a.polyline;if(delete a.polyline,a.center)d.push(\"center=\"+a.center),delete a.center;else if(a.address)d.push(\"center=\"+a.address),delete a.address;else if(a.lat)d.push([\"center=\",a.lat,\",\",a.lng].join(\"\")),delete a.lat,delete a.lng;else if(a.visible){var i=encodeURI(a.visible.join(\"|\"));d.push(\"visible=\"+i)}var j=a.size;j?(j.join&&(j=j.join(\"x\")),delete a.size):j=\"630x300\",d.push(\"size=\"+j),a.zoom||a.zoom===!1||(a.zoom=15);var k=!a.hasOwnProperty(\"sensor\")||!!a.sensor;delete a.sensor,d.push(\"sensor=\"+k);for(var l in a)a.hasOwnProperty(l)&&d.push(l+\"=\"+a[l]);if(f)for(var m,n,o=0;c=f[o];o++){m=[],c.size&&\"normal\"!==c.size?(m.push(\"size:\"+c.size),delete c.size):c.icon&&(m.push(\"icon:\"+encodeURI(c.icon)),delete c.icon),c.color&&(m.push(\"color:\"+c.color.replace(\"#\",\"0x\")),delete c.color),c.label&&(m.push(\"label:\"+c.label[0].toUpperCase()),delete c.label),n=c.address?c.address:c.lat+\",\"+c.lng,delete c.address,delete c.lat,delete c.lng;for(var l in c)c.hasOwnProperty(l)&&m.push(l+\":\"+c[l]);m.length||0===o?(m.push(n),m=m.join(\"|\"),d.push(\"markers=\"+encodeURI(m))):(m=d.pop()+encodeURI(\"|\"+n),d.push(m))}if(g)for(var o=0;o<g.length;o++){var p=[];g[o].featureType&&p.push(\"feature:\"+g[o].featureType.toLowerCase()),g[o].elementType&&p.push(\"element:\"+g[o].elementType.toLowerCase());for(var q=0;q<g[o].stylers.length;q++)for(var r in g[o].stylers[q]){var s=g[o].stylers[q][r];\"hue\"!=r&&\"color\"!=r||(s=\"0x\"+s.substring(1)),p.push(r+\":\"+s)}var t=p.join(\"|\");\"\"!=t&&d.push(\"style=\"+t)}if(h){if(c=h,h=[],c.strokeWeight&&h.push(\"weight:\"+parseInt(c.strokeWeight,10)),c.strokeColor){var u=b(c.strokeColor,c.strokeOpacity);h.push(\"color:\"+u)}if(c.fillColor){var v=b(c.fillColor,c.fillOpacity);h.push(\"fillcolor:\"+v)}var w=c.path;if(w.join)for(var x,q=0;x=w[q];q++)h.push(x.join(\",\"));else h.push(\"enc:\"+w);h=h.join(\"|\"),d.push(\"path=\"+encodeURI(h))}var y=window.devicePixelRatio||1;return d.push(\"scale=\"+y),d=d.join(\"&\"),e+d},j.prototype.addMapType=function(a,b){if(!b.hasOwnProperty(\"getTileUrl\")||\"function\"!=typeof b.getTileUrl)throw\"'getTileUrl' function required.\";b.tileSize=b.tileSize||new google.maps.Size(256,256);var c=new google.maps.ImageMapType(b);this.map.mapTypes.set(a,c)},j.prototype.addOverlayMapType=function(a){if(!a.hasOwnProperty(\"getTile\")||\"function\"!=typeof a.getTile)throw\"'getTile' function required.\";var b=a.index;delete a.index,this.map.overlayMapTypes.insertAt(b,a)},j.prototype.removeOverlayMapType=function(a){this.map.overlayMapTypes.removeAt(a)},j.prototype.addStyle=function(a){var b=new google.maps.StyledMapType(a.styles,{name:a.styledMapName});this.map.mapTypes.set(a.mapTypeId,b)},j.prototype.setStyle=function(a){this.map.setMapTypeId(a)},j.prototype.createPanorama=function(a){return a.hasOwnProperty(\"lat\")&&a.hasOwnProperty(\"lng\")||(a.lat=this.getCenter().lat(),a.lng=this.getCenter().lng()),this.panorama=j.createPanorama(a),this.map.setStreetView(this.panorama),this.panorama},j.createPanorama=function(b){var c=h(b.el,b.context);b.position=new google.maps.LatLng(b.lat,b.lng),delete b.el,delete b.context,delete b.lat,delete b.lng;for(var d=[\"closeclick\",\"links_changed\",\"pano_changed\",\"position_changed\",\"pov_changed\",\"resize\",\"visible_changed\"],e=a({visible:!0},b),f=0;f<d.length;f++)delete e[d[f]];for(var g=new google.maps.StreetViewPanorama(c,e),f=0;f<d.length;f++)!function(a,c){b[c]&&google.maps.event.addListener(a,c,function(){b[c].apply(this)})}(g,d[f]);return g},j.prototype.on=function(a,b){return j.on(a,this,b)},j.prototype.off=function(a){j.off(a,this)},j.prototype.once=function(a,b){return j.once(a,this,b)},j.custom_events=[\"marker_added\",\"marker_removed\",\"polyline_added\",\"polyline_removed\",\"polygon_added\",\"polygon_removed\",\"geolocated\",\"geolocation_failed\"],j.on=function(a,b,c){if(j.custom_events.indexOf(a)==-1)return b instanceof j&&(b=b.map),google.maps.event.addListener(b,a,c);var d={handler:c,eventName:a};return b.registered_events[a]=b.registered_events[a]||[],b.registered_events[a].push(d),d},j.off=function(a,b){j.custom_events.indexOf(a)==-1?(b instanceof j&&(b=b.map),google.maps.event.clearListeners(b,a)):b.registered_events[a]=[]},j.once=function(a,b,c){if(j.custom_events.indexOf(a)==-1)return b instanceof j&&(b=b.map),google.maps.event.addListenerOnce(b,a,c)},j.fire=function(a,b,c){if(j.custom_events.indexOf(a)==-1)google.maps.event.trigger(b,a,Array.prototype.slice.apply(arguments).slice(2));else if(a in c.registered_events)for(var d=c.registered_events[a],e=0;e<d.length;e++)!function(a,b,c){a.apply(b,[c])}(d[e].handler,c,b)},j.geolocate=function(a){var b=a.always||a.complete;navigator.geolocation?navigator.geolocation.getCurrentPosition(function(c){a.success(c),b&&b()},function(c){a.error(c),b&&b()},a.options):(a.not_supported(),b&&b())},j.geocode=function(a){this.geocoder=new google.maps.Geocoder;var b=a.callback;a.hasOwnProperty(\"lat\")&&a.hasOwnProperty(\"lng\")&&(a.latLng=new google.maps.LatLng(a.lat,a.lng)),delete a.lat,delete a.lng,delete a.callback,this.geocoder.geocode(a,function(a,c){b(a,c)})},\"object\"==typeof window.google&&window.google.maps&&(google.maps.Polygon.prototype.getBounds||(google.maps.Polygon.prototype.getBounds=function(a){for(var b,c=new google.maps.LatLngBounds,d=this.getPaths(),e=0;e<d.getLength();e++){b=d.getAt(e);for(var f=0;f<b.getLength();f++)c.extend(b.getAt(f))}return c}),google.maps.Polygon.prototype.containsLatLng||(google.maps.Polygon.prototype.containsLatLng=function(a){var b=this.getBounds();if(null!==b&&!b.contains(a))return!1;for(var c=!1,d=this.getPaths().getLength(),e=0;e<d;e++)for(var f=this.getPaths().getAt(e),g=f.getLength(),h=g-1,i=0;i<g;i++){var j=f.getAt(i),k=f.getAt(h);(j.lng()<a.lng()&&k.lng()>=a.lng()||k.lng()<a.lng()&&j.lng()>=a.lng())&&j.lat()+(a.lng()-j.lng())/(k.lng()-j.lng())*(k.lat()-j.lat())<a.lat()&&(c=!c),h=i}return c}),google.maps.Circle.prototype.containsLatLng||(google.maps.Circle.prototype.containsLatLng=function(a){return!google.maps.geometry||google.maps.geometry.spherical.computeDistanceBetween(this.getCenter(),a)<=this.getRadius()}),google.maps.Rectangle.prototype.containsLatLng=function(a){return this.getBounds().contains(a)},google.maps.LatLngBounds.prototype.containsLatLng=function(a){return this.contains(a)},google.maps.Marker.prototype.setFences=function(a){this.fences=a},google.maps.Marker.prototype.addFence=function(a){this.fences.push(a)},google.maps.Marker.prototype.getId=function(){return this.__gm_id}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);e<c;e++)if(e in b&&b[e]===a)return e;return-1}),j});\n//# sourceMappingURL=gmaps.min.js.map","/*!\n * FullCalendar v3.10.5\n * Docs & License: https://fullcalendar.io/\n * (c) 2019 Adam Shaw\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"moment\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"moment\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FullCalendar\"] = factory(require(\"moment\"), require(\"jquery\"));\n\telse\n\t\troot[\"FullCalendar\"] = factory(root[\"moment\"], root[\"jQuery\"]);\n})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_0__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 256);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ }),\n/* 1 */,\n/* 2 */\n/***/ (function(module, exports) {\n\n/*\r\nderived from:\r\nhttps://github.com/Microsoft/tslib/blob/v1.6.0/tslib.js\r\n\nonly include the helpers we need, to keep down filesize\r\n*/\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b)\r\n if (b.hasOwnProperty(p))\r\n d[p] = b[p]; };\r\nexports.__extends = function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n};\r\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar moment = __webpack_require__(0);\r\nvar $ = __webpack_require__(3);\r\n/* FullCalendar-specific DOM Utilities\r\n----------------------------------------------------------------------------------------------------------------------*/\r\n// Given the scrollbar widths of some other container, create borders/margins on rowEls in order to match the left\r\n// and right space that was offset by the scrollbars. A 1-pixel border first, then margin beyond that.\r\nfunction compensateScroll(rowEls, scrollbarWidths) {\r\n if (scrollbarWidths.left) {\r\n rowEls.css({\r\n 'border-left-width': 1,\r\n 'margin-left': scrollbarWidths.left - 1\r\n });\r\n }\r\n if (scrollbarWidths.right) {\r\n rowEls.css({\r\n 'border-right-width': 1,\r\n 'margin-right': scrollbarWidths.right - 1\r\n });\r\n }\r\n}\r\nexports.compensateScroll = compensateScroll;\r\n// Undoes compensateScroll and restores all borders/margins\r\nfunction uncompensateScroll(rowEls) {\r\n rowEls.css({\r\n 'margin-left': '',\r\n 'margin-right': '',\r\n 'border-left-width': '',\r\n 'border-right-width': ''\r\n });\r\n}\r\nexports.uncompensateScroll = uncompensateScroll;\r\n// Make the mouse cursor express that an event is not allowed in the current area\r\nfunction disableCursor() {\r\n $('body').addClass('fc-not-allowed');\r\n}\r\nexports.disableCursor = disableCursor;\r\n// Returns the mouse cursor to its original look\r\nfunction enableCursor() {\r\n $('body').removeClass('fc-not-allowed');\r\n}\r\nexports.enableCursor = enableCursor;\r\n// Given a total available height to fill, have `els` (essentially child rows) expand to accomodate.\r\n// By default, all elements that are shorter than the recommended height are expanded uniformly, not considering\r\n// any other els that are already too tall. if `shouldRedistribute` is on, it considers these tall rows and\r\n// reduces the available height.\r\nfunction distributeHeight(els, availableHeight, shouldRedistribute) {\r\n // *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,\r\n // and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.\r\n var minOffset1 = Math.floor(availableHeight / els.length); // for non-last element\r\n var minOffset2 = Math.floor(availableHeight - minOffset1 * (els.length - 1)); // for last element *FLOORING NOTE*\r\n var flexEls = []; // elements that are allowed to expand. array of DOM nodes\r\n var flexOffsets = []; // amount of vertical space it takes up\r\n var flexHeights = []; // actual css height\r\n var usedHeight = 0;\r\n undistributeHeight(els); // give all elements their natural height\r\n // find elements that are below the recommended height (expandable).\r\n // important to query for heights in a single first pass (to avoid reflow oscillation).\r\n els.each(function (i, el) {\r\n var minOffset = i === els.length - 1 ? minOffset2 : minOffset1;\r\n var naturalOffset = $(el).outerHeight(true);\r\n if (naturalOffset < minOffset) {\r\n flexEls.push(el);\r\n flexOffsets.push(naturalOffset);\r\n flexHeights.push($(el).height());\r\n }\r\n else {\r\n // this element stretches past recommended height (non-expandable). mark the space as occupied.\r\n usedHeight += naturalOffset;\r\n }\r\n });\r\n // readjust the recommended height to only consider the height available to non-maxed-out rows.\r\n if (shouldRedistribute) {\r\n availableHeight -= usedHeight;\r\n minOffset1 = Math.floor(availableHeight / flexEls.length);\r\n minOffset2 = Math.floor(availableHeight - minOffset1 * (flexEls.length - 1)); // *FLOORING NOTE*\r\n }\r\n // assign heights to all expandable elements\r\n $(flexEls).each(function (i, el) {\r\n var minOffset = i === flexEls.length - 1 ? minOffset2 : minOffset1;\r\n var naturalOffset = flexOffsets[i];\r\n var naturalHeight = flexHeights[i];\r\n var newHeight = minOffset - (naturalOffset - naturalHeight); // subtract the margin/padding\r\n if (naturalOffset < minOffset) { // we check this again because redistribution might have changed things\r\n $(el).height(newHeight);\r\n }\r\n });\r\n}\r\nexports.distributeHeight = distributeHeight;\r\n// Undoes distrubuteHeight, restoring all els to their natural height\r\nfunction undistributeHeight(els) {\r\n els.height('');\r\n}\r\nexports.undistributeHeight = undistributeHeight;\r\n// Given `els`, a jQuery set of <td> cells, find the cell with the largest natural width and set the widths of all the\r\n// cells to be that width.\r\n// PREREQUISITE: if you want a cell to take up width, it needs to have a single inner element w/ display:inline\r\nfunction matchCellWidths(els) {\r\n var maxInnerWidth = 0;\r\n els.find('> *').each(function (i, innerEl) {\r\n var innerWidth = $(innerEl).outerWidth();\r\n if (innerWidth > maxInnerWidth) {\r\n maxInnerWidth = innerWidth;\r\n }\r\n });\r\n maxInnerWidth++; // sometimes not accurate of width the text needs to stay on one line. insurance\r\n els.width(maxInnerWidth);\r\n return maxInnerWidth;\r\n}\r\nexports.matchCellWidths = matchCellWidths;\r\n// Given one element that resides inside another,\r\n// Subtracts the height of the inner element from the outer element.\r\nfunction subtractInnerElHeight(outerEl, innerEl) {\r\n var both = outerEl.add(innerEl);\r\n var diff;\r\n // effin' IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked\r\n both.css({\r\n position: 'relative',\r\n left: -1 // ensure reflow in case the el was already relative. negative is less likely to cause new scroll\r\n });\r\n diff = outerEl.outerHeight() - innerEl.outerHeight(); // grab the dimensions\r\n both.css({ position: '', left: '' }); // undo hack\r\n return diff;\r\n}\r\nexports.subtractInnerElHeight = subtractInnerElHeight;\r\n/* Element Geom Utilities\r\n----------------------------------------------------------------------------------------------------------------------*/\r\n// borrowed from https://github.com/jquery/jquery-ui/blob/1.11.0/ui/core.js#L51\r\nfunction getScrollParent(el) {\r\n var position = el.css('position');\r\n var scrollParent = el.parents().filter(function () {\r\n var parent = $(this);\r\n return (/(auto|scroll)/).test(parent.css('overflow') + parent.css('overflow-y') + parent.css('overflow-x'));\r\n }).eq(0);\r\n return position === 'fixed' || !scrollParent.length ? $(el[0].ownerDocument || document) : scrollParent;\r\n}\r\nexports.getScrollParent = getScrollParent;\r\n// Queries the outer bounding area of a jQuery element.\r\n// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).\r\n// Origin is optional.\r\nfunction getOuterRect(el, origin) {\r\n var offset = el.offset();\r\n var left = offset.left - (origin ? origin.left : 0);\r\n var top = offset.top - (origin ? origin.top : 0);\r\n return {\r\n left: left,\r\n right: left + el.outerWidth(),\r\n top: top,\r\n bottom: top + el.outerHeight()\r\n };\r\n}\r\nexports.getOuterRect = getOuterRect;\r\n// Queries the area within the margin/border/scrollbars of a jQuery element. Does not go within the padding.\r\n// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).\r\n// Origin is optional.\r\n// WARNING: given element can't have borders\r\n// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.\r\nfunction getClientRect(el, origin) {\r\n var offset = el.offset();\r\n var scrollbarWidths = getScrollbarWidths(el);\r\n var left = offset.left + getCssFloat(el, 'border-left-width') + scrollbarWidths.left - (origin ? origin.left : 0);\r\n var top = offset.top + getCssFloat(el, 'border-top-width') + scrollbarWidths.top - (origin ? origin.top : 0);\r\n return {\r\n left: left,\r\n right: left + el[0].clientWidth,\r\n top: top,\r\n bottom: top + el[0].clientHeight // clientHeight includes padding but NOT scrollbars\r\n };\r\n}\r\nexports.getClientRect = getClientRect;\r\n// Queries the area within the margin/border/padding of a jQuery element. Assumed not to have scrollbars.\r\n// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).\r\n// Origin is optional.\r\nfunction getContentRect(el, origin) {\r\n var offset = el.offset(); // just outside of border, margin not included\r\n var left = offset.left + getCssFloat(el, 'border-left-width') + getCssFloat(el, 'padding-left') -\r\n (origin ? origin.left : 0);\r\n var top = offset.top + getCssFloat(el, 'border-top-width') + getCssFloat(el, 'padding-top') -\r\n (origin ? origin.top : 0);\r\n return {\r\n left: left,\r\n right: left + el.width(),\r\n top: top,\r\n bottom: top + el.height()\r\n };\r\n}\r\nexports.getContentRect = getContentRect;\r\n// Returns the computed left/right/top/bottom scrollbar widths for the given jQuery element.\r\n// WARNING: given element can't have borders (which will cause offsetWidth/offsetHeight to be larger).\r\n// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.\r\nfunction getScrollbarWidths(el) {\r\n var leftRightWidth = el[0].offsetWidth - el[0].clientWidth;\r\n var bottomWidth = el[0].offsetHeight - el[0].clientHeight;\r\n var widths;\r\n leftRightWidth = sanitizeScrollbarWidth(leftRightWidth);\r\n bottomWidth = sanitizeScrollbarWidth(bottomWidth);\r\n widths = { left: 0, right: 0, top: 0, bottom: bottomWidth };\r\n if (getIsLeftRtlScrollbars() && el.css('direction') === 'rtl') { // is the scrollbar on the left side?\r\n widths.left = leftRightWidth;\r\n }\r\n else {\r\n widths.right = leftRightWidth;\r\n }\r\n return widths;\r\n}\r\nexports.getScrollbarWidths = getScrollbarWidths;\r\n// The scrollbar width computations in getScrollbarWidths are sometimes flawed when it comes to\r\n// retina displays, rounding, and IE11. Massage them into a usable value.\r\nfunction sanitizeScrollbarWidth(width) {\r\n width = Math.max(0, width); // no negatives\r\n width = Math.round(width);\r\n return width;\r\n}\r\n// Logic for determining if, when the element is right-to-left, the scrollbar appears on the left side\r\nvar _isLeftRtlScrollbars = null;\r\nfunction getIsLeftRtlScrollbars() {\r\n if (_isLeftRtlScrollbars === null) {\r\n _isLeftRtlScrollbars = computeIsLeftRtlScrollbars();\r\n }\r\n return _isLeftRtlScrollbars;\r\n}\r\nfunction computeIsLeftRtlScrollbars() {\r\n var el = $('<div><div></div></div>')\r\n .css({\r\n position: 'absolute',\r\n top: -1000,\r\n left: 0,\r\n border: 0,\r\n padding: 0,\r\n overflow: 'scroll',\r\n direction: 'rtl'\r\n })\r\n .appendTo('body');\r\n var innerEl = el.children();\r\n var res = innerEl.offset().left > el.offset().left; // is the inner div shifted to accommodate a left scrollbar?\r\n el.remove();\r\n return res;\r\n}\r\n// Retrieves a jQuery element's computed CSS value as a floating-point number.\r\n// If the queried value is non-numeric (ex: IE can return \"medium\" for border width), will just return zero.\r\nfunction getCssFloat(el, prop) {\r\n return parseFloat(el.css(prop)) || 0;\r\n}\r\n/* Mouse / Touch Utilities\r\n----------------------------------------------------------------------------------------------------------------------*/\r\n// Returns a boolean whether this was a left mouse click and no ctrl key (which means right click on Mac)\r\nfunction isPrimaryMouseButton(ev) {\r\n return ev.which === 1 && !ev.ctrlKey;\r\n}\r\nexports.isPrimaryMouseButton = isPrimaryMouseButton;\r\nfunction getEvX(ev) {\r\n var touches = ev.originalEvent.touches;\r\n // on mobile FF, pageX for touch events is present, but incorrect,\r\n // so, look at touch coordinates first.\r\n if (touches && touches.length) {\r\n return touches[0].pageX;\r\n }\r\n return ev.pageX;\r\n}\r\nexports.getEvX = getEvX;\r\nfunction getEvY(ev) {\r\n var touches = ev.originalEvent.touches;\r\n // on mobile FF, pageX for touch events is present, but incorrect,\r\n // so, look at touch coordinates first.\r\n if (touches && touches.length) {\r\n return touches[0].pageY;\r\n }\r\n return ev.pageY;\r\n}\r\nexports.getEvY = getEvY;\r\nfunction getEvIsTouch(ev) {\r\n return /^touch/.test(ev.type);\r\n}\r\nexports.getEvIsTouch = getEvIsTouch;\r\nfunction preventSelection(el) {\r\n el.addClass('fc-unselectable')\r\n .on('selectstart', preventDefault);\r\n}\r\nexports.preventSelection = preventSelection;\r\nfunction allowSelection(el) {\r\n el.removeClass('fc-unselectable')\r\n .off('selectstart', preventDefault);\r\n}\r\nexports.allowSelection = allowSelection;\r\n// Stops a mouse/touch event from doing it's native browser action\r\nfunction preventDefault(ev) {\r\n ev.preventDefault();\r\n}\r\nexports.preventDefault = preventDefault;\r\n/* General Geometry Utils\r\n----------------------------------------------------------------------------------------------------------------------*/\r\n// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false\r\nfunction intersectRects(rect1, rect2) {\r\n var res = {\r\n left: Math.max(rect1.left, rect2.left),\r\n right: Math.min(rect1.right, rect2.right),\r\n top: Math.max(rect1.top, rect2.top),\r\n bottom: Math.min(rect1.bottom, rect2.bottom)\r\n };\r\n if (res.left < res.right && res.top < res.bottom) {\r\n return res;\r\n }\r\n return false;\r\n}\r\nexports.intersectRects = intersectRects;\r\n// Returns a new point that will have been moved to reside within the given rectangle\r\nfunction constrainPoint(point, rect) {\r\n return {\r\n left: Math.min(Math.max(point.left, rect.left), rect.right),\r\n top: Math.min(Math.max(point.top, rect.top), rect.bottom)\r\n };\r\n}\r\nexports.constrainPoint = constrainPoint;\r\n// Returns a point that is the center of the given rectangle\r\nfunction getRectCenter(rect) {\r\n return {\r\n left: (rect.left + rect.right) / 2,\r\n top: (rect.top + rect.bottom) / 2\r\n };\r\n}\r\nexports.getRectCenter = getRectCenter;\r\n// Subtracts point2's coordinates from point1's coordinates, returning a delta\r\nfunction diffPoints(point1, point2) {\r\n return {\r\n left: point1.left - point2.left,\r\n top: point1.top - point2.top\r\n };\r\n}\r\nexports.diffPoints = diffPoints;\r\n/* Object Ordering by Field\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nfunction parseFieldSpecs(input) {\r\n var specs = [];\r\n var tokens = [];\r\n var i;\r\n var token;\r\n if (typeof input === 'string') {\r\n tokens = input.split(/\\s*,\\s*/);\r\n }\r\n else if (typeof input === 'function') {\r\n tokens = [input];\r\n }\r\n else if ($.isArray(input)) {\r\n tokens = input;\r\n }\r\n for (i = 0; i < tokens.length; i++) {\r\n token = tokens[i];\r\n if (typeof token === 'string') {\r\n specs.push(token.charAt(0) === '-' ?\r\n { field: token.substring(1), order: -1 } :\r\n { field: token, order: 1 });\r\n }\r\n else if (typeof token === 'function') {\r\n specs.push({ func: token });\r\n }\r\n }\r\n return specs;\r\n}\r\nexports.parseFieldSpecs = parseFieldSpecs;\r\nfunction compareByFieldSpecs(obj1, obj2, fieldSpecs, obj1fallback, obj2fallback) {\r\n var i;\r\n var cmp;\r\n for (i = 0; i < fieldSpecs.length; i++) {\r\n cmp = compareByFieldSpec(obj1, obj2, fieldSpecs[i], obj1fallback, obj2fallback);\r\n if (cmp) {\r\n return cmp;\r\n }\r\n }\r\n return 0;\r\n}\r\nexports.compareByFieldSpecs = compareByFieldSpecs;\r\nfunction compareByFieldSpec(obj1, obj2, fieldSpec, obj1fallback, obj2fallback) {\r\n if (fieldSpec.func) {\r\n return fieldSpec.func(obj1, obj2);\r\n }\r\n var val1 = obj1[fieldSpec.field];\r\n var val2 = obj2[fieldSpec.field];\r\n if (val1 == null && obj1fallback) {\r\n val1 = obj1fallback[fieldSpec.field];\r\n }\r\n if (val2 == null && obj2fallback) {\r\n val2 = obj2fallback[fieldSpec.field];\r\n }\r\n return flexibleCompare(val1, val2) * (fieldSpec.order || 1);\r\n}\r\nexports.compareByFieldSpec = compareByFieldSpec;\r\nfunction flexibleCompare(a, b) {\r\n if (!a && !b) {\r\n return 0;\r\n }\r\n if (b == null) {\r\n return -1;\r\n }\r\n if (a == null) {\r\n return 1;\r\n }\r\n if ($.type(a) === 'string' || $.type(b) === 'string') {\r\n return String(a).localeCompare(String(b));\r\n }\r\n return a - b;\r\n}\r\nexports.flexibleCompare = flexibleCompare;\r\n/* Date Utilities\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nexports.dayIDs = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'];\r\nexports.unitsDesc = ['year', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; // descending\r\n// Diffs the two moments into a Duration where full-days are recorded first, then the remaining time.\r\n// Moments will have their timezones normalized.\r\nfunction diffDayTime(a, b) {\r\n return moment.duration({\r\n days: a.clone().stripTime().diff(b.clone().stripTime(), 'days'),\r\n ms: a.time() - b.time() // time-of-day from day start. disregards timezone\r\n });\r\n}\r\nexports.diffDayTime = diffDayTime;\r\n// Diffs the two moments via their start-of-day (regardless of timezone). Produces whole-day durations.\r\nfunction diffDay(a, b) {\r\n return moment.duration({\r\n days: a.clone().stripTime().diff(b.clone().stripTime(), 'days')\r\n });\r\n}\r\nexports.diffDay = diffDay;\r\n// Diffs two moments, producing a duration, made of a whole-unit-increment of the given unit. Uses rounding.\r\nfunction diffByUnit(a, b, unit) {\r\n return moment.duration(Math.round(a.diff(b, unit, true)), // returnFloat=true\r\n unit);\r\n}\r\nexports.diffByUnit = diffByUnit;\r\n// Computes the unit name of the largest whole-unit period of time.\r\n// For example, 48 hours will be \"days\" whereas 49 hours will be \"hours\".\r\n// Accepts start/end, a range object, or an original duration object.\r\nfunction computeGreatestUnit(start, end) {\r\n var i;\r\n var unit;\r\n var val;\r\n for (i = 0; i < exports.unitsDesc.length; i++) {\r\n unit = exports.unitsDesc[i];\r\n val = computeRangeAs(unit, start, end);\r\n if (val >= 1 && isInt(val)) {\r\n break;\r\n }\r\n }\r\n return unit; // will be \"milliseconds\" if nothing else matches\r\n}\r\nexports.computeGreatestUnit = computeGreatestUnit;\r\n// like computeGreatestUnit, but has special abilities to interpret the source input for clues\r\nfunction computeDurationGreatestUnit(duration, durationInput) {\r\n var unit = computeGreatestUnit(duration);\r\n // prevent days:7 from being interpreted as a week\r\n if (unit === 'week' && typeof durationInput === 'object' && durationInput.days) {\r\n unit = 'day';\r\n }\r\n return unit;\r\n}\r\nexports.computeDurationGreatestUnit = computeDurationGreatestUnit;\r\n// Computes the number of units (like \"hours\") in the given range.\r\n// Range can be a {start,end} object, separate start/end args, or a Duration.\r\n// Results are based on Moment's .as() and .diff() methods, so results can depend on internal handling\r\n// of month-diffing logic (which tends to vary from version to version).\r\nfunction computeRangeAs(unit, start, end) {\r\n if (end != null) { // given start, end\r\n return end.diff(start, unit, true);\r\n }\r\n else if (moment.isDuration(start)) { // given duration\r\n return start.as(unit);\r\n }\r\n else { // given { start, end } range object\r\n return start.end.diff(start.start, unit, true);\r\n }\r\n}\r\n// Intelligently divides a range (specified by a start/end params) by a duration\r\nfunction divideRangeByDuration(start, end, dur) {\r\n var months;\r\n if (durationHasTime(dur)) {\r\n return (end - start) / dur;\r\n }\r\n months = dur.asMonths();\r\n if (Math.abs(months) >= 1 && isInt(months)) {\r\n return end.diff(start, 'months', true) / months;\r\n }\r\n return end.diff(start, 'days', true) / dur.asDays();\r\n}\r\nexports.divideRangeByDuration = divideRangeByDuration;\r\n// Intelligently divides one duration by another\r\nfunction divideDurationByDuration(dur1, dur2) {\r\n var months1;\r\n var months2;\r\n if (durationHasTime(dur1) || durationHasTime(dur2)) {\r\n return dur1 / dur2;\r\n }\r\n months1 = dur1.asMonths();\r\n months2 = dur2.asMonths();\r\n if (Math.abs(months1) >= 1 && isInt(months1) &&\r\n Math.abs(months2) >= 1 && isInt(months2)) {\r\n return months1 / months2;\r\n }\r\n return dur1.asDays() / dur2.asDays();\r\n}\r\nexports.divideDurationByDuration = divideDurationByDuration;\r\n// Intelligently multiplies a duration by a number\r\nfunction multiplyDuration(dur, n) {\r\n var months;\r\n if (durationHasTime(dur)) {\r\n return moment.duration(dur * n);\r\n }\r\n months = dur.asMonths();\r\n if (Math.abs(months) >= 1 && isInt(months)) {\r\n return moment.duration({ months: months * n });\r\n }\r\n return moment.duration({ days: dur.asDays() * n });\r\n}\r\nexports.multiplyDuration = multiplyDuration;\r\n// Returns a boolean about whether the given duration has any time parts (hours/minutes/seconds/ms)\r\nfunction durationHasTime(dur) {\r\n return Boolean(dur.hours() || dur.minutes() || dur.seconds() || dur.milliseconds());\r\n}\r\nexports.durationHasTime = durationHasTime;\r\nfunction isNativeDate(input) {\r\n return Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date;\r\n}\r\nexports.isNativeDate = isNativeDate;\r\n// Returns a boolean about whether the given input is a time string, like \"06:40:00\" or \"06:00\"\r\nfunction isTimeString(str) {\r\n return typeof str === 'string' &&\r\n /^\\d+\\:\\d+(?:\\:\\d+\\.?(?:\\d{3})?)?$/.test(str);\r\n}\r\nexports.isTimeString = isTimeString;\r\n/* Logging and Debug\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nfunction log() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var console = window.console;\r\n if (console && console.log) {\r\n return console.log.apply(console, args);\r\n }\r\n}\r\nexports.log = log;\r\nfunction warn() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var console = window.console;\r\n if (console && console.warn) {\r\n return console.warn.apply(console, args);\r\n }\r\n else {\r\n return log.apply(null, args);\r\n }\r\n}\r\nexports.warn = warn;\r\n/* General Utilities\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nvar hasOwnPropMethod = {}.hasOwnProperty;\r\n// Merges an array of objects into a single object.\r\n// The second argument allows for an array of property names who's object values will be merged together.\r\nfunction mergeProps(propObjs, complexProps) {\r\n var dest = {};\r\n var i;\r\n var name;\r\n var complexObjs;\r\n var j;\r\n var val;\r\n var props;\r\n if (complexProps) {\r\n for (i = 0; i < complexProps.length; i++) {\r\n name = complexProps[i];\r\n complexObjs = [];\r\n // collect the trailing object values, stopping when a non-object is discovered\r\n for (j = propObjs.length - 1; j >= 0; j--) {\r\n val = propObjs[j][name];\r\n if (typeof val === 'object') {\r\n complexObjs.unshift(val);\r\n }\r\n else if (val !== undefined) {\r\n dest[name] = val; // if there were no objects, this value will be used\r\n break;\r\n }\r\n }\r\n // if the trailing values were objects, use the merged value\r\n if (complexObjs.length) {\r\n dest[name] = mergeProps(complexObjs);\r\n }\r\n }\r\n }\r\n // copy values into the destination, going from last to first\r\n for (i = propObjs.length - 1; i >= 0; i--) {\r\n props = propObjs[i];\r\n for (name in props) {\r\n if (!(name in dest)) { // if already assigned by previous props or complex props, don't reassign\r\n dest[name] = props[name];\r\n }\r\n }\r\n }\r\n return dest;\r\n}\r\nexports.mergeProps = mergeProps;\r\nfunction copyOwnProps(src, dest) {\r\n for (var name_1 in src) {\r\n if (hasOwnProp(src, name_1)) {\r\n dest[name_1] = src[name_1];\r\n }\r\n }\r\n}\r\nexports.copyOwnProps = copyOwnProps;\r\nfunction hasOwnProp(obj, name) {\r\n return hasOwnPropMethod.call(obj, name);\r\n}\r\nexports.hasOwnProp = hasOwnProp;\r\nfunction applyAll(functions, thisObj, args) {\r\n if ($.isFunction(functions)) {\r\n functions = [functions];\r\n }\r\n if (functions) {\r\n var i = void 0;\r\n var ret = void 0;\r\n for (i = 0; i < functions.length; i++) {\r\n ret = functions[i].apply(thisObj, args) || ret;\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.applyAll = applyAll;\r\nfunction removeMatching(array, testFunc) {\r\n var removeCnt = 0;\r\n var i = 0;\r\n while (i < array.length) {\r\n if (testFunc(array[i])) { // truthy value means *remove*\r\n array.splice(i, 1);\r\n removeCnt++;\r\n }\r\n else {\r\n i++;\r\n }\r\n }\r\n return removeCnt;\r\n}\r\nexports.removeMatching = removeMatching;\r\nfunction removeExact(array, exactVal) {\r\n var removeCnt = 0;\r\n var i = 0;\r\n while (i < array.length) {\r\n if (array[i] === exactVal) {\r\n array.splice(i, 1);\r\n removeCnt++;\r\n }\r\n else {\r\n i++;\r\n }\r\n }\r\n return removeCnt;\r\n}\r\nexports.removeExact = removeExact;\r\nfunction isArraysEqual(a0, a1) {\r\n var len = a0.length;\r\n var i;\r\n if (len == null || len !== a1.length) { // not array? or not same length?\r\n return false;\r\n }\r\n for (i = 0; i < len; i++) {\r\n if (a0[i] !== a1[i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nexports.isArraysEqual = isArraysEqual;\r\nfunction firstDefined() {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n for (var i = 0; i < args.length; i++) {\r\n if (args[i] !== undefined) {\r\n return args[i];\r\n }\r\n }\r\n}\r\nexports.firstDefined = firstDefined;\r\nfunction htmlEscape(s) {\r\n return (s + '').replace(/&/g, '&')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>')\r\n .replace(/'/g, ''')\r\n .replace(/\"/g, '"')\r\n .replace(/\\n/g, '<br>');\r\n}\r\nexports.htmlEscape = htmlEscape;\r\nfunction stripHtmlEntities(text) {\r\n return text.replace(/&.*?;/g, '');\r\n}\r\nexports.stripHtmlEntities = stripHtmlEntities;\r\n// Given a hash of CSS properties, returns a string of CSS.\r\n// Uses property names as-is (no camel-case conversion). Will not make statements for null/undefined values.\r\nfunction cssToStr(cssProps) {\r\n var statements = [];\r\n $.each(cssProps, function (name, val) {\r\n if (val != null) {\r\n statements.push(name + ':' + val);\r\n }\r\n });\r\n return statements.join(';');\r\n}\r\nexports.cssToStr = cssToStr;\r\n// Given an object hash of HTML attribute names to values,\r\n// generates a string that can be injected between < > in HTML\r\nfunction attrsToStr(attrs) {\r\n var parts = [];\r\n $.each(attrs, function (name, val) {\r\n if (val != null) {\r\n parts.push(name + '=\"' + htmlEscape(val) + '\"');\r\n }\r\n });\r\n return parts.join(' ');\r\n}\r\nexports.attrsToStr = attrsToStr;\r\nfunction capitaliseFirstLetter(str) {\r\n return str.charAt(0).toUpperCase() + str.slice(1);\r\n}\r\nexports.capitaliseFirstLetter = capitaliseFirstLetter;\r\nfunction compareNumbers(a, b) {\r\n return a - b;\r\n}\r\nexports.compareNumbers = compareNumbers;\r\nfunction isInt(n) {\r\n return n % 1 === 0;\r\n}\r\nexports.isInt = isInt;\r\n// Returns a method bound to the given object context.\r\n// Just like one of the jQuery.proxy signatures, but without the undesired behavior of treating the same method with\r\n// different contexts as identical when binding/unbinding events.\r\nfunction proxy(obj, methodName) {\r\n var method = obj[methodName];\r\n return function () {\r\n return method.apply(obj, arguments);\r\n };\r\n}\r\nexports.proxy = proxy;\r\n// Returns a function, that, as long as it continues to be invoked, will not\r\n// be triggered. The function will be called after it stops being called for\r\n// N milliseconds. If `immediate` is passed, trigger the function on the\r\n// leading edge, instead of the trailing.\r\n// https://github.com/jashkenas/underscore/blob/1.6.0/underscore.js#L714\r\nfunction debounce(func, wait, immediate) {\r\n if (immediate === void 0) { immediate = false; }\r\n var timeout;\r\n var args;\r\n var context;\r\n var timestamp;\r\n var result;\r\n var later = function () {\r\n var last = +new Date() - timestamp;\r\n if (last < wait) {\r\n timeout = setTimeout(later, wait - last);\r\n }\r\n else {\r\n timeout = null;\r\n if (!immediate) {\r\n result = func.apply(context, args);\r\n context = args = null;\r\n }\r\n }\r\n };\r\n return function () {\r\n context = this;\r\n args = arguments;\r\n timestamp = +new Date();\r\n var callNow = immediate && !timeout;\r\n if (!timeout) {\r\n timeout = setTimeout(later, wait);\r\n }\r\n if (callNow) {\r\n result = func.apply(context, args);\r\n context = args = null;\r\n }\r\n return result;\r\n };\r\n}\r\nexports.debounce = debounce;\r\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar moment = __webpack_require__(0);\r\nvar moment_ext_1 = __webpack_require__(11);\r\nvar UnzonedRange = /** @class */ (function () {\r\n function UnzonedRange(startInput, endInput) {\r\n // TODO: move these into footprint.\r\n // Especially, doesn't make sense for null startMs/endMs.\r\n this.isStart = true;\r\n this.isEnd = true;\r\n if (moment.isMoment(startInput)) {\r\n startInput = startInput.clone().stripZone();\r\n }\r\n if (moment.isMoment(endInput)) {\r\n endInput = endInput.clone().stripZone();\r\n }\r\n if (startInput) {\r\n this.startMs = startInput.valueOf();\r\n }\r\n if (endInput) {\r\n this.endMs = endInput.valueOf();\r\n }\r\n }\r\n /*\r\n SIDEEFFECT: will mutate eventRanges.\r\n Will return a new array result.\r\n Only works for non-open-ended ranges.\r\n */\r\n UnzonedRange.invertRanges = function (ranges, constraintRange) {\r\n var invertedRanges = [];\r\n var startMs = constraintRange.startMs; // the end of the previous range. the start of the new range\r\n var i;\r\n var dateRange;\r\n // ranges need to be in order. required for our date-walking algorithm\r\n ranges.sort(compareUnzonedRanges);\r\n for (i = 0; i < ranges.length; i++) {\r\n dateRange = ranges[i];\r\n // add the span of time before the event (if there is any)\r\n if (dateRange.startMs > startMs) { // compare millisecond time (skip any ambig logic)\r\n invertedRanges.push(new UnzonedRange(startMs, dateRange.startMs));\r\n }\r\n if (dateRange.endMs > startMs) {\r\n startMs = dateRange.endMs;\r\n }\r\n }\r\n // add the span of time after the last event (if there is any)\r\n if (startMs < constraintRange.endMs) { // compare millisecond time (skip any ambig logic)\r\n invertedRanges.push(new UnzonedRange(startMs, constraintRange.endMs));\r\n }\r\n return invertedRanges;\r\n };\r\n UnzonedRange.prototype.intersect = function (otherRange) {\r\n var startMs = this.startMs;\r\n var endMs = this.endMs;\r\n var newRange = null;\r\n if (otherRange.startMs != null) {\r\n if (startMs == null) {\r\n startMs = otherRange.startMs;\r\n }\r\n else {\r\n startMs = Math.max(startMs, otherRange.startMs);\r\n }\r\n }\r\n if (otherRange.endMs != null) {\r\n if (endMs == null) {\r\n endMs = otherRange.endMs;\r\n }\r\n else {\r\n endMs = Math.min(endMs, otherRange.endMs);\r\n }\r\n }\r\n if (startMs == null || endMs == null || startMs < endMs) {\r\n newRange = new UnzonedRange(startMs, endMs);\r\n newRange.isStart = this.isStart && startMs === this.startMs;\r\n newRange.isEnd = this.isEnd && endMs === this.endMs;\r\n }\r\n return newRange;\r\n };\r\n UnzonedRange.prototype.intersectsWith = function (otherRange) {\r\n return (this.endMs == null || otherRange.startMs == null || this.endMs > otherRange.startMs) &&\r\n (this.startMs == null || otherRange.endMs == null || this.startMs < otherRange.endMs);\r\n };\r\n UnzonedRange.prototype.containsRange = function (innerRange) {\r\n return (this.startMs == null || (innerRange.startMs != null && innerRange.startMs >= this.startMs)) &&\r\n (this.endMs == null || (innerRange.endMs != null && innerRange.endMs <= this.endMs));\r\n };\r\n // `date` can be a moment, a Date, or a millisecond time.\r\n UnzonedRange.prototype.containsDate = function (date) {\r\n var ms = date.valueOf();\r\n return (this.startMs == null || ms >= this.startMs) &&\r\n (this.endMs == null || ms < this.endMs);\r\n };\r\n // If the given date is not within the given range, move it inside.\r\n // (If it's past the end, make it one millisecond before the end).\r\n // `date` can be a moment, a Date, or a millisecond time.\r\n // Returns a MS-time.\r\n UnzonedRange.prototype.constrainDate = function (date) {\r\n var ms = date.valueOf();\r\n if (this.startMs != null && ms < this.startMs) {\r\n ms = this.startMs;\r\n }\r\n if (this.endMs != null && ms >= this.endMs) {\r\n ms = this.endMs - 1;\r\n }\r\n return ms;\r\n };\r\n UnzonedRange.prototype.equals = function (otherRange) {\r\n return this.startMs === otherRange.startMs && this.endMs === otherRange.endMs;\r\n };\r\n UnzonedRange.prototype.clone = function () {\r\n var range = new UnzonedRange(this.startMs, this.endMs);\r\n range.isStart = this.isStart;\r\n range.isEnd = this.isEnd;\r\n return range;\r\n };\r\n // Returns an ambig-zoned moment from startMs.\r\n // BEWARE: returned moment is not localized.\r\n // Formatting and start-of-week will be default.\r\n UnzonedRange.prototype.getStart = function () {\r\n if (this.startMs != null) {\r\n return moment_ext_1.default.utc(this.startMs).stripZone();\r\n }\r\n return null;\r\n };\r\n // Returns an ambig-zoned moment from startMs.\r\n // BEWARE: returned moment is not localized.\r\n // Formatting and start-of-week will be default.\r\n UnzonedRange.prototype.getEnd = function () {\r\n if (this.endMs != null) {\r\n return moment_ext_1.default.utc(this.endMs).stripZone();\r\n }\r\n return null;\r\n };\r\n UnzonedRange.prototype.as = function (unit) {\r\n return moment.utc(this.endMs).diff(moment.utc(this.startMs), unit, true);\r\n };\r\n return UnzonedRange;\r\n}());\r\nexports.default = UnzonedRange;\r\n/*\r\nOnly works for non-open-ended ranges.\r\n*/\r\nfunction compareUnzonedRanges(range1, range2) {\r\n return range1.startMs - range2.startMs; // earlier ranges go first\r\n}\r\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar ParsableModelMixin_1 = __webpack_require__(52);\r\nvar Class_1 = __webpack_require__(35);\r\nvar EventDefParser_1 = __webpack_require__(36);\r\nvar EventSource = /** @class */ (function (_super) {\r\n tslib_1.__extends(EventSource, _super);\r\n // can we do away with calendar? at least for the abstract?\r\n // useful for buildEventDef\r\n function EventSource(calendar) {\r\n var _this = _super.call(this) || this;\r\n _this.calendar = calendar;\r\n _this.className = [];\r\n _this.uid = String(EventSource.uuid++);\r\n return _this;\r\n }\r\n /*\r\n rawInput can be any data type!\r\n */\r\n EventSource.parse = function (rawInput, calendar) {\r\n var source = new this(calendar);\r\n if (typeof rawInput === 'object') {\r\n if (source.applyProps(rawInput)) {\r\n return source;\r\n }\r\n }\r\n return false;\r\n };\r\n EventSource.normalizeId = function (id) {\r\n if (id) {\r\n return String(id);\r\n }\r\n return null;\r\n };\r\n EventSource.prototype.fetch = function (start, end, timezone) {\r\n // subclasses must implement. must return a promise.\r\n };\r\n EventSource.prototype.removeEventDefsById = function (eventDefId) {\r\n // optional for subclasses to implement\r\n };\r\n EventSource.prototype.removeAllEventDefs = function () {\r\n // optional for subclasses to implement\r\n };\r\n /*\r\n For compairing/matching\r\n */\r\n EventSource.prototype.getPrimitive = function (otherSource) {\r\n // subclasses must implement\r\n };\r\n EventSource.prototype.parseEventDefs = function (rawEventDefs) {\r\n var i;\r\n var eventDef;\r\n var eventDefs = [];\r\n for (i = 0; i < rawEventDefs.length; i++) {\r\n eventDef = this.parseEventDef(rawEventDefs[i]);\r\n if (eventDef) {\r\n eventDefs.push(eventDef);\r\n }\r\n }\r\n return eventDefs;\r\n };\r\n EventSource.prototype.parseEventDef = function (rawInput) {\r\n var calendarTransform = this.calendar.opt('eventDataTransform');\r\n var sourceTransform = this.eventDataTransform;\r\n if (calendarTransform) {\r\n rawInput = calendarTransform(rawInput, this.calendar);\r\n }\r\n if (sourceTransform) {\r\n rawInput = sourceTransform(rawInput, this.calendar);\r\n }\r\n return EventDefParser_1.default.parse(rawInput, this);\r\n };\r\n EventSource.prototype.applyManualStandardProps = function (rawProps) {\r\n if (rawProps.id != null) {\r\n this.id = EventSource.normalizeId(rawProps.id);\r\n }\r\n // TODO: converge with EventDef\r\n if ($.isArray(rawProps.className)) {\r\n this.className = rawProps.className;\r\n }\r\n else if (typeof rawProps.className === 'string') {\r\n this.className = rawProps.className.split(/\\s+/);\r\n }\r\n return true;\r\n };\r\n EventSource.uuid = 0;\r\n EventSource.defineStandardProps = ParsableModelMixin_1.default.defineStandardProps;\r\n EventSource.copyVerbatimStandardProps = ParsableModelMixin_1.default.copyVerbatimStandardProps;\r\n return EventSource;\r\n}(Class_1.default));\r\nexports.default = EventSource;\r\nParsableModelMixin_1.default.mixInto(EventSource);\r\n// Parsing\r\n// ---------------------------------------------------------------------------------------------------------------------\r\nEventSource.defineStandardProps({\r\n // manually process...\r\n id: false,\r\n className: false,\r\n // automatically transfer...\r\n color: true,\r\n backgroundColor: true,\r\n borderColor: true,\r\n textColor: true,\r\n editable: true,\r\n startEditable: true,\r\n durationEditable: true,\r\n rendering: true,\r\n overlap: true,\r\n constraint: true,\r\n allDayDefault: true,\r\n eventDataTransform: true\r\n});\r\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*\r\nUtility methods for easily listening to events on another object,\r\nand more importantly, easily unlistening from them.\r\n\nUSAGE:\r\n import { default as ListenerMixin, ListenerInterface } from './ListenerMixin'\r\nin class:\r\n listenTo: ListenerInterface['listenTo']\r\n stopListeningTo: ListenerInterface['stopListeningTo']\r\nafter class:\r\n ListenerMixin.mixInto(TheClass)\r\n*/\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar Mixin_1 = __webpack_require__(15);\r\nvar guid = 0;\r\nvar ListenerMixin = /** @class */ (function (_super) {\r\n tslib_1.__extends(ListenerMixin, _super);\r\n function ListenerMixin() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /*\r\n Given an `other` object that has on/off methods, bind the given `callback` to an event by the given name.\r\n The `callback` will be called with the `this` context of the object that .listenTo is being called on.\r\n Can be called:\r\n .listenTo(other, eventName, callback)\r\n OR\r\n .listenTo(other, {\r\n eventName1: callback1,\r\n eventName2: callback2\r\n })\r\n */\r\n ListenerMixin.prototype.listenTo = function (other, arg, callback) {\r\n if (typeof arg === 'object') { // given dictionary of callbacks\r\n for (var eventName in arg) {\r\n if (arg.hasOwnProperty(eventName)) {\r\n this.listenTo(other, eventName, arg[eventName]);\r\n }\r\n }\r\n }\r\n else if (typeof arg === 'string') {\r\n other.on(arg + '.' + this.getListenerNamespace(), // use event namespacing to identify this object\r\n $.proxy(callback, this) // always use `this` context\r\n // the usually-undesired jQuery guid behavior doesn't matter,\r\n // because we always unbind via namespace\r\n );\r\n }\r\n };\r\n /*\r\n Causes the current object to stop listening to events on the `other` object.\r\n `eventName` is optional. If omitted, will stop listening to ALL events on `other`.\r\n */\r\n ListenerMixin.prototype.stopListeningTo = function (other, eventName) {\r\n other.off((eventName || '') + '.' + this.getListenerNamespace());\r\n };\r\n /*\r\n Returns a string, unique to this object, to be used for event namespacing\r\n */\r\n ListenerMixin.prototype.getListenerNamespace = function () {\r\n if (this.listenerId == null) {\r\n this.listenerId = guid++;\r\n }\r\n return '_listener' + this.listenerId;\r\n };\r\n return ListenerMixin;\r\n}(Mixin_1.default));\r\nexports.default = ListenerMixin;\r\n\n\n/***/ }),\n/* 8 */,\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar EventDef_1 = __webpack_require__(37);\r\nvar EventInstance_1 = __webpack_require__(53);\r\nvar EventDateProfile_1 = __webpack_require__(16);\r\nvar SingleEventDef = /** @class */ (function (_super) {\r\n tslib_1.__extends(SingleEventDef, _super);\r\n function SingleEventDef() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /*\r\n Will receive start/end params, but will be ignored.\r\n */\r\n SingleEventDef.prototype.buildInstances = function () {\r\n return [this.buildInstance()];\r\n };\r\n SingleEventDef.prototype.buildInstance = function () {\r\n return new EventInstance_1.default(this, // definition\r\n this.dateProfile);\r\n };\r\n SingleEventDef.prototype.isAllDay = function () {\r\n return this.dateProfile.isAllDay();\r\n };\r\n SingleEventDef.prototype.clone = function () {\r\n var def = _super.prototype.clone.call(this);\r\n def.dateProfile = this.dateProfile;\r\n return def;\r\n };\r\n SingleEventDef.prototype.rezone = function () {\r\n var calendar = this.source.calendar;\r\n var dateProfile = this.dateProfile;\r\n this.dateProfile = new EventDateProfile_1.default(calendar.moment(dateProfile.start), dateProfile.end ? calendar.moment(dateProfile.end) : null, calendar);\r\n };\r\n /*\r\n NOTE: if super-method fails, should still attempt to apply\r\n */\r\n SingleEventDef.prototype.applyManualStandardProps = function (rawProps) {\r\n var superSuccess = _super.prototype.applyManualStandardProps.call(this, rawProps);\r\n var dateProfile = EventDateProfile_1.default.parse(rawProps, this.source); // returns null on failure\r\n if (dateProfile) {\r\n this.dateProfile = dateProfile;\r\n // make sure `date` shows up in the legacy event objects as-is\r\n if (rawProps.date != null) {\r\n this.miscProps.date = rawProps.date;\r\n }\r\n return superSuccess;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n return SingleEventDef;\r\n}(EventDef_1.default));\r\nexports.default = SingleEventDef;\r\n// Parsing\r\n// ---------------------------------------------------------------------------------------------------------------------\r\nSingleEventDef.defineStandardProps({\r\n start: false,\r\n date: false,\r\n end: false,\r\n allDay: false\r\n});\r\n\n\n/***/ }),\n/* 10 */,\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar moment = __webpack_require__(0);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar ambigDateOfMonthRegex = /^\\s*\\d{4}-\\d\\d$/;\r\nvar ambigTimeOrZoneRegex = /^\\s*\\d{4}-(?:(\\d\\d-\\d\\d)|(W\\d\\d$)|(W\\d\\d-\\d)|(\\d\\d\\d))((T| )(\\d\\d(:\\d\\d(:\\d\\d(\\.\\d+)?)?)?)?)?$/;\r\nvar newMomentProto = moment.fn; // where we will attach our new methods\r\nexports.newMomentProto = newMomentProto;\r\nvar oldMomentProto = $.extend({}, newMomentProto); // copy of original moment methods\r\nexports.oldMomentProto = oldMomentProto;\r\n// tell momentjs to transfer these properties upon clone\r\nvar momentProperties = moment.momentProperties;\r\nmomentProperties.push('_fullCalendar');\r\nmomentProperties.push('_ambigTime');\r\nmomentProperties.push('_ambigZone');\r\n/*\r\nCall this if you want Moment's original format method to be used\r\n*/\r\nfunction oldMomentFormat(mom, formatStr) {\r\n return oldMomentProto.format.call(mom, formatStr); // oldMomentProto defined in moment-ext.js\r\n}\r\nexports.oldMomentFormat = oldMomentFormat;\r\n// Creating\r\n// -------------------------------------------------------------------------------------------------\r\n// Creates a new moment, similar to the vanilla moment(...) constructor, but with\r\n// extra features (ambiguous time, enhanced formatting). When given an existing moment,\r\n// it will function as a clone (and retain the zone of the moment). Anything else will\r\n// result in a moment in the local zone.\r\nvar momentExt = function () {\r\n return makeMoment(arguments);\r\n};\r\nexports.default = momentExt;\r\n// Sames as momentExt, but forces the resulting moment to be in the UTC timezone.\r\nmomentExt.utc = function () {\r\n var mom = makeMoment(arguments, true);\r\n // Force it into UTC because makeMoment doesn't guarantee it\r\n // (if given a pre-existing moment for example)\r\n if (mom.hasTime()) { // don't give ambiguously-timed moments a UTC zone\r\n mom.utc();\r\n }\r\n return mom;\r\n};\r\n// Same as momentExt, but when given an ISO8601 string, the timezone offset is preserved.\r\n// ISO8601 strings with no timezone offset will become ambiguously zoned.\r\nmomentExt.parseZone = function () {\r\n return makeMoment(arguments, true, true);\r\n};\r\n// Builds an enhanced moment from args. When given an existing moment, it clones. When given a\r\n// native Date, or called with no arguments (the current time), the resulting moment will be local.\r\n// Anything else needs to be \"parsed\" (a string or an array), and will be affected by:\r\n// parseAsUTC - if there is no zone information, should we parse the input in UTC?\r\n// parseZone - if there is zone information, should we force the zone of the moment?\r\nfunction makeMoment(args, parseAsUTC, parseZone) {\r\n if (parseAsUTC === void 0) { parseAsUTC = false; }\r\n if (parseZone === void 0) { parseZone = false; }\r\n var input = args[0];\r\n var isSingleString = args.length === 1 && typeof input === 'string';\r\n var isAmbigTime;\r\n var isAmbigZone;\r\n var ambigMatch;\r\n var mom;\r\n if (moment.isMoment(input) || util_1.isNativeDate(input) || input === undefined) {\r\n mom = moment.apply(null, args);\r\n }\r\n else { // \"parsing\" is required\r\n isAmbigTime = false;\r\n isAmbigZone = false;\r\n if (isSingleString) {\r\n if (ambigDateOfMonthRegex.test(input)) {\r\n // accept strings like '2014-05', but convert to the first of the month\r\n input += '-01';\r\n args = [input]; // for when we pass it on to moment's constructor\r\n isAmbigTime = true;\r\n isAmbigZone = true;\r\n }\r\n else if ((ambigMatch = ambigTimeOrZoneRegex.exec(input))) {\r\n isAmbigTime = !ambigMatch[5]; // no time part?\r\n isAmbigZone = true;\r\n }\r\n }\r\n else if ($.isArray(input)) {\r\n // arrays have no timezone information, so assume ambiguous zone\r\n isAmbigZone = true;\r\n }\r\n // otherwise, probably a string with a format\r\n if (parseAsUTC || isAmbigTime) {\r\n mom = moment.utc.apply(moment, args);\r\n }\r\n else {\r\n mom = moment.apply(null, args);\r\n }\r\n if (isAmbigTime) {\r\n mom._ambigTime = true;\r\n mom._ambigZone = true; // ambiguous time always means ambiguous zone\r\n }\r\n else if (parseZone) { // let's record the inputted zone somehow\r\n if (isAmbigZone) {\r\n mom._ambigZone = true;\r\n }\r\n else if (isSingleString) {\r\n mom.utcOffset(input); // if not a valid zone, will assign UTC\r\n }\r\n }\r\n }\r\n mom._fullCalendar = true; // flag for extended functionality\r\n return mom;\r\n}\r\n// Week Number\r\n// -------------------------------------------------------------------------------------------------\r\n// Returns the week number, considering the locale's custom week number calcuation\r\n// `weeks` is an alias for `week`\r\nnewMomentProto.week = newMomentProto.weeks = function (input) {\r\n var weekCalc = this._locale._fullCalendar_weekCalc;\r\n if (input == null && typeof weekCalc === 'function') { // custom function only works for getter\r\n return weekCalc(this);\r\n }\r\n else if (weekCalc === 'ISO') {\r\n return oldMomentProto.isoWeek.apply(this, arguments); // ISO getter/setter\r\n }\r\n return oldMomentProto.week.apply(this, arguments); // local getter/setter\r\n};\r\n// Time-of-day\r\n// -------------------------------------------------------------------------------------------------\r\n// GETTER\r\n// Returns a Duration with the hours/minutes/seconds/ms values of the moment.\r\n// If the moment has an ambiguous time, a duration of 00:00 will be returned.\r\n//\r\n// SETTER\r\n// You can supply a Duration, a Moment, or a Duration-like argument.\r\n// When setting the time, and the moment has an ambiguous time, it then becomes unambiguous.\r\nnewMomentProto.time = function (time) {\r\n // Fallback to the original method (if there is one) if this moment wasn't created via FullCalendar.\r\n // `time` is a generic enough method name where this precaution is necessary to avoid collisions w/ other plugins.\r\n if (!this._fullCalendar) {\r\n return oldMomentProto.time.apply(this, arguments);\r\n }\r\n if (time == null) { // getter\r\n return moment.duration({\r\n hours: this.hours(),\r\n minutes: this.minutes(),\r\n seconds: this.seconds(),\r\n milliseconds: this.milliseconds()\r\n });\r\n }\r\n else { // setter\r\n this._ambigTime = false; // mark that the moment now has a time\r\n if (!moment.isDuration(time) && !moment.isMoment(time)) {\r\n time = moment.duration(time);\r\n }\r\n // The day value should cause overflow (so 24 hours becomes 00:00:00 of next day).\r\n // Only for Duration times, not Moment times.\r\n var dayHours = 0;\r\n if (moment.isDuration(time)) {\r\n dayHours = Math.floor(time.asDays()) * 24;\r\n }\r\n // We need to set the individual fields.\r\n // Can't use startOf('day') then add duration. In case of DST at start of day.\r\n return this.hours(dayHours + time.hours())\r\n .minutes(time.minutes())\r\n .seconds(time.seconds())\r\n .milliseconds(time.milliseconds());\r\n }\r\n};\r\n// Converts the moment to UTC, stripping out its time-of-day and timezone offset,\r\n// but preserving its YMD. A moment with a stripped time will display no time\r\n// nor timezone offset when .format() is called.\r\nnewMomentProto.stripTime = function () {\r\n if (!this._ambigTime) {\r\n this.utc(true); // keepLocalTime=true (for keeping *date* value)\r\n // set time to zero\r\n this.set({\r\n hours: 0,\r\n minutes: 0,\r\n seconds: 0,\r\n ms: 0\r\n });\r\n // Mark the time as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(),\r\n // which clears all ambig flags.\r\n this._ambigTime = true;\r\n this._ambigZone = true; // if ambiguous time, also ambiguous timezone offset\r\n }\r\n return this; // for chaining\r\n};\r\n// Returns if the moment has a non-ambiguous time (boolean)\r\nnewMomentProto.hasTime = function () {\r\n return !this._ambigTime;\r\n};\r\n// Timezone\r\n// -------------------------------------------------------------------------------------------------\r\n// Converts the moment to UTC, stripping out its timezone offset, but preserving its\r\n// YMD and time-of-day. A moment with a stripped timezone offset will display no\r\n// timezone offset when .format() is called.\r\nnewMomentProto.stripZone = function () {\r\n var wasAmbigTime;\r\n if (!this._ambigZone) {\r\n wasAmbigTime = this._ambigTime;\r\n this.utc(true); // keepLocalTime=true (for keeping date and time values)\r\n // the above call to .utc()/.utcOffset() unfortunately might clear the ambig flags, so restore\r\n this._ambigTime = wasAmbigTime || false;\r\n // Mark the zone as ambiguous. This needs to happen after the .utc() call, which might call .utcOffset(),\r\n // which clears the ambig flags.\r\n this._ambigZone = true;\r\n }\r\n return this; // for chaining\r\n};\r\n// Returns of the moment has a non-ambiguous timezone offset (boolean)\r\nnewMomentProto.hasZone = function () {\r\n return !this._ambigZone;\r\n};\r\n// implicitly marks a zone\r\nnewMomentProto.local = function (keepLocalTime) {\r\n // for when converting from ambiguously-zoned to local,\r\n // keep the time values when converting from UTC -> local\r\n oldMomentProto.local.call(this, this._ambigZone || keepLocalTime);\r\n // ensure non-ambiguous\r\n // this probably already happened via local() -> utcOffset(), but don't rely on Moment's internals\r\n this._ambigTime = false;\r\n this._ambigZone = false;\r\n return this; // for chaining\r\n};\r\n// implicitly marks a zone\r\nnewMomentProto.utc = function (keepLocalTime) {\r\n oldMomentProto.utc.call(this, keepLocalTime);\r\n // ensure non-ambiguous\r\n // this probably already happened via utc() -> utcOffset(), but don't rely on Moment's internals\r\n this._ambigTime = false;\r\n this._ambigZone = false;\r\n return this;\r\n};\r\n// implicitly marks a zone (will probably get called upon .utc() and .local())\r\nnewMomentProto.utcOffset = function (tzo) {\r\n if (tzo != null) { // setter\r\n // these assignments needs to happen before the original zone method is called.\r\n // I forget why, something to do with a browser crash.\r\n this._ambigTime = false;\r\n this._ambigZone = false;\r\n }\r\n return oldMomentProto.utcOffset.apply(this, arguments);\r\n};\r\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/*\r\nMeant to be immutable\r\n*/\r\nvar ComponentFootprint = /** @class */ (function () {\r\n function ComponentFootprint(unzonedRange, isAllDay) {\r\n this.isAllDay = false; // component can choose to ignore this\r\n this.unzonedRange = unzonedRange;\r\n this.isAllDay = isAllDay;\r\n }\r\n /*\r\n Only works for non-open-ended ranges.\r\n */\r\n ComponentFootprint.prototype.toLegacy = function (calendar) {\r\n return {\r\n start: calendar.msToMoment(this.unzonedRange.startMs, this.isAllDay),\r\n end: calendar.msToMoment(this.unzonedRange.endMs, this.isAllDay)\r\n };\r\n };\r\n return ComponentFootprint;\r\n}());\r\nexports.default = ComponentFootprint;\r\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*\r\nUSAGE:\r\n import { default as EmitterMixin, EmitterInterface } from './EmitterMixin'\r\nin class:\r\n on: EmitterInterface['on']\r\n one: EmitterInterface['one']\r\n off: EmitterInterface['off']\r\n trigger: EmitterInterface['trigger']\r\n triggerWith: EmitterInterface['triggerWith']\r\n hasHandlers: EmitterInterface['hasHandlers']\r\nafter class:\r\n EmitterMixin.mixInto(TheClass)\r\n*/\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar Mixin_1 = __webpack_require__(15);\r\nvar EmitterMixin = /** @class */ (function (_super) {\r\n tslib_1.__extends(EmitterMixin, _super);\r\n function EmitterMixin() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // jQuery-ification via $(this) allows a non-DOM object to have\r\n // the same event handling capabilities (including namespaces).\r\n EmitterMixin.prototype.on = function (types, handler) {\r\n $(this).on(types, this._prepareIntercept(handler));\r\n return this; // for chaining\r\n };\r\n EmitterMixin.prototype.one = function (types, handler) {\r\n $(this).one(types, this._prepareIntercept(handler));\r\n return this; // for chaining\r\n };\r\n EmitterMixin.prototype._prepareIntercept = function (handler) {\r\n // handlers are always called with an \"event\" object as their first param.\r\n // sneak the `this` context and arguments into the extra parameter object\r\n // and forward them on to the original handler.\r\n var intercept = function (ev, extra) {\r\n return handler.apply(extra.context || this, extra.args || []);\r\n };\r\n // mimick jQuery's internal \"proxy\" system (risky, I know)\r\n // causing all functions with the same .guid to appear to be the same.\r\n // https://github.com/jquery/jquery/blob/2.2.4/src/core.js#L448\r\n // this is needed for calling .off with the original non-intercept handler.\r\n if (!handler.guid) {\r\n handler.guid = $.guid++;\r\n }\r\n intercept.guid = handler.guid;\r\n return intercept;\r\n };\r\n EmitterMixin.prototype.off = function (types, handler) {\r\n $(this).off(types, handler);\r\n return this; // for chaining\r\n };\r\n EmitterMixin.prototype.trigger = function (types) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n // pass in \"extra\" info to the intercept\r\n $(this).triggerHandler(types, { args: args });\r\n return this; // for chaining\r\n };\r\n EmitterMixin.prototype.triggerWith = function (types, context, args) {\r\n // `triggerHandler` is less reliant on the DOM compared to `trigger`.\r\n // pass in \"extra\" info to the intercept.\r\n $(this).triggerHandler(types, { context: context, args: args });\r\n return this; // for chaining\r\n };\r\n EmitterMixin.prototype.hasHandlers = function (type) {\r\n var hash = $._data(this, 'events'); // http://blog.jquery.com/2012/08/09/jquery-1-8-released/\r\n return hash && hash[type] && hash[type].length > 0;\r\n };\r\n return EmitterMixin;\r\n}(Mixin_1.default));\r\nexports.default = EmitterMixin;\r\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar Interaction = /** @class */ (function () {\r\n function Interaction(component) {\r\n this.view = component._getView();\r\n this.component = component;\r\n }\r\n Interaction.prototype.opt = function (name) {\r\n return this.view.opt(name);\r\n };\r\n Interaction.prototype.end = function () {\r\n // subclasses can implement\r\n };\r\n return Interaction;\r\n}());\r\nexports.default = Interaction;\r\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar Mixin = /** @class */ (function () {\r\n function Mixin() {\r\n }\r\n Mixin.mixInto = function (destClass) {\r\n var _this = this;\r\n Object.getOwnPropertyNames(this.prototype).forEach(function (name) {\r\n if (!destClass.prototype[name]) { // if destination class doesn't already define it\r\n destClass.prototype[name] = _this.prototype[name];\r\n }\r\n });\r\n };\r\n /*\r\n will override existing methods\r\n TODO: remove! not used anymore\r\n */\r\n Mixin.mixOver = function (destClass) {\r\n var _this = this;\r\n Object.getOwnPropertyNames(this.prototype).forEach(function (name) {\r\n destClass.prototype[name] = _this.prototype[name];\r\n });\r\n };\r\n return Mixin;\r\n}());\r\nexports.default = Mixin;\r\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\n/*\r\nMeant to be immutable\r\n*/\r\nvar EventDateProfile = /** @class */ (function () {\r\n function EventDateProfile(start, end, calendar) {\r\n this.start = start;\r\n this.end = end || null;\r\n this.unzonedRange = this.buildUnzonedRange(calendar);\r\n }\r\n /*\r\n Needs an EventSource object\r\n */\r\n EventDateProfile.parse = function (rawProps, source) {\r\n var startInput = rawProps.start || rawProps.date;\r\n var endInput = rawProps.end;\r\n if (!startInput) {\r\n return false;\r\n }\r\n var calendar = source.calendar;\r\n var start = calendar.moment(startInput);\r\n var end = endInput ? calendar.moment(endInput) : null;\r\n var forcedAllDay = rawProps.allDay;\r\n var forceEventDuration = calendar.opt('forceEventDuration');\r\n if (!start.isValid()) {\r\n return false;\r\n }\r\n if (forcedAllDay == null) {\r\n forcedAllDay = source.allDayDefault;\r\n if (forcedAllDay == null) {\r\n forcedAllDay = calendar.opt('allDayDefault');\r\n }\r\n }\r\n if (forcedAllDay === true) {\r\n start.stripTime();\r\n if (end) {\r\n end.stripTime();\r\n }\r\n }\r\n else if (forcedAllDay === false) {\r\n if (!start.hasTime()) {\r\n start.time(0);\r\n }\r\n if (end && !end.hasTime()) {\r\n end.time(0);\r\n }\r\n }\r\n if (end && (!end.isValid() || !end.isAfter(start))) {\r\n end = null;\r\n }\r\n if (!end && forceEventDuration) {\r\n end = calendar.getDefaultEventEnd(!start.hasTime(), start);\r\n }\r\n return new EventDateProfile(start, end, calendar);\r\n };\r\n EventDateProfile.isStandardProp = function (propName) {\r\n return propName === 'start' || propName === 'date' || propName === 'end' || propName === 'allDay';\r\n };\r\n EventDateProfile.prototype.isAllDay = function () {\r\n return !(this.start.hasTime() || (this.end && this.end.hasTime()));\r\n };\r\n /*\r\n Needs a Calendar object\r\n */\r\n EventDateProfile.prototype.buildUnzonedRange = function (calendar) {\r\n var startMs = this.start.clone().stripZone().valueOf();\r\n var endMs = this.getEnd(calendar).stripZone().valueOf();\r\n return new UnzonedRange_1.default(startMs, endMs);\r\n };\r\n /*\r\n Needs a Calendar object\r\n */\r\n EventDateProfile.prototype.getEnd = function (calendar) {\r\n return this.end ?\r\n this.end.clone() :\r\n // derive the end from the start and allDay. compute allDay if necessary\r\n calendar.getDefaultEventEnd(this.isAllDay(), this.start);\r\n };\r\n return EventDateProfile;\r\n}());\r\nexports.default = EventDateProfile;\r\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar util_1 = __webpack_require__(4);\r\nvar DragListener_1 = __webpack_require__(59);\r\n/* Tracks mouse movements over a component and raises events about which hit the mouse is over.\r\n------------------------------------------------------------------------------------------------------------------------\r\noptions:\r\n- subjectEl\r\n- subjectCenter\r\n*/\r\nvar HitDragListener = /** @class */ (function (_super) {\r\n tslib_1.__extends(HitDragListener, _super);\r\n function HitDragListener(component, options) {\r\n var _this = _super.call(this, options) || this;\r\n _this.component = component;\r\n return _this;\r\n }\r\n // Called when drag listening starts (but a real drag has not necessarily began).\r\n // ev might be undefined if dragging was started manually.\r\n HitDragListener.prototype.handleInteractionStart = function (ev) {\r\n var subjectEl = this.subjectEl;\r\n var subjectRect;\r\n var origPoint;\r\n var point;\r\n this.component.hitsNeeded();\r\n this.computeScrollBounds(); // for autoscroll\r\n if (ev) {\r\n origPoint = { left: util_1.getEvX(ev), top: util_1.getEvY(ev) };\r\n point = origPoint;\r\n // constrain the point to bounds of the element being dragged\r\n if (subjectEl) {\r\n subjectRect = util_1.getOuterRect(subjectEl); // used for centering as well\r\n point = util_1.constrainPoint(point, subjectRect);\r\n }\r\n this.origHit = this.queryHit(point.left, point.top);\r\n // treat the center of the subject as the collision point?\r\n if (subjectEl && this.options.subjectCenter) {\r\n // only consider the area the subject overlaps the hit. best for large subjects.\r\n // TODO: skip this if hit didn't supply left/right/top/bottom\r\n if (this.origHit) {\r\n subjectRect = util_1.intersectRects(this.origHit, subjectRect) ||\r\n subjectRect; // in case there is no intersection\r\n }\r\n point = util_1.getRectCenter(subjectRect);\r\n }\r\n this.coordAdjust = util_1.diffPoints(point, origPoint); // point - origPoint\r\n }\r\n else {\r\n this.origHit = null;\r\n this.coordAdjust = null;\r\n }\r\n // call the super-method. do it after origHit has been computed\r\n _super.prototype.handleInteractionStart.call(this, ev);\r\n };\r\n // Called when the actual drag has started\r\n HitDragListener.prototype.handleDragStart = function (ev) {\r\n var hit;\r\n _super.prototype.handleDragStart.call(this, ev);\r\n // might be different from this.origHit if the min-distance is large\r\n hit = this.queryHit(util_1.getEvX(ev), util_1.getEvY(ev));\r\n // report the initial hit the mouse is over\r\n // especially important if no min-distance and drag starts immediately\r\n if (hit) {\r\n this.handleHitOver(hit);\r\n }\r\n };\r\n // Called when the drag moves\r\n HitDragListener.prototype.handleDrag = function (dx, dy, ev) {\r\n var hit;\r\n _super.prototype.handleDrag.call(this, dx, dy, ev);\r\n hit = this.queryHit(util_1.getEvX(ev), util_1.getEvY(ev));\r\n if (!isHitsEqual(hit, this.hit)) { // a different hit than before?\r\n if (this.hit) {\r\n this.handleHitOut();\r\n }\r\n if (hit) {\r\n this.handleHitOver(hit);\r\n }\r\n }\r\n };\r\n // Called when dragging has been stopped\r\n HitDragListener.prototype.handleDragEnd = function (ev) {\r\n this.handleHitDone();\r\n _super.prototype.handleDragEnd.call(this, ev);\r\n };\r\n // Called when a the mouse has just moved over a new hit\r\n HitDragListener.prototype.handleHitOver = function (hit) {\r\n var isOrig = isHitsEqual(hit, this.origHit);\r\n this.hit = hit;\r\n this.trigger('hitOver', this.hit, isOrig, this.origHit);\r\n };\r\n // Called when the mouse has just moved out of a hit\r\n HitDragListener.prototype.handleHitOut = function () {\r\n if (this.hit) {\r\n this.trigger('hitOut', this.hit);\r\n this.handleHitDone();\r\n this.hit = null;\r\n }\r\n };\r\n // Called after a hitOut. Also called before a dragStop\r\n HitDragListener.prototype.handleHitDone = function () {\r\n if (this.hit) {\r\n this.trigger('hitDone', this.hit);\r\n }\r\n };\r\n // Called when the interaction ends, whether there was a real drag or not\r\n HitDragListener.prototype.handleInteractionEnd = function (ev, isCancelled) {\r\n _super.prototype.handleInteractionEnd.call(this, ev, isCancelled);\r\n this.origHit = null;\r\n this.hit = null;\r\n this.component.hitsNotNeeded();\r\n };\r\n // Called when scrolling has stopped, whether through auto scroll, or the user scrolling\r\n HitDragListener.prototype.handleScrollEnd = function () {\r\n _super.prototype.handleScrollEnd.call(this);\r\n // hits' absolute positions will be in new places after a user's scroll.\r\n // HACK for recomputing.\r\n if (this.isDragging) {\r\n this.component.releaseHits();\r\n this.component.prepareHits();\r\n }\r\n };\r\n // Gets the hit underneath the coordinates for the given mouse event\r\n HitDragListener.prototype.queryHit = function (left, top) {\r\n if (this.coordAdjust) {\r\n left += this.coordAdjust.left;\r\n top += this.coordAdjust.top;\r\n }\r\n return this.component.queryHit(left, top);\r\n };\r\n return HitDragListener;\r\n}(DragListener_1.default));\r\nexports.default = HitDragListener;\r\n// Returns `true` if the hits are identically equal. `false` otherwise. Must be from the same component.\r\n// Two null values will be considered equal, as two \"out of the component\" states are the same.\r\nfunction isHitsEqual(hit0, hit1) {\r\n if (!hit0 && !hit1) {\r\n return true;\r\n }\r\n if (hit0 && hit1) {\r\n return hit0.component === hit1.component &&\r\n isHitPropsWithin(hit0, hit1) &&\r\n isHitPropsWithin(hit1, hit0); // ensures all props are identical\r\n }\r\n return false;\r\n}\r\n// Returns true if all of subHit's non-standard properties are within superHit\r\nfunction isHitPropsWithin(subHit, superHit) {\r\n for (var propName in subHit) {\r\n if (!/^(component|left|right|top|bottom)$/.test(propName)) {\r\n if (subHit[propName] !== superHit[propName]) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.version = '3.10.5';\r\n// When introducing internal API incompatibilities (where fullcalendar plugins would break),\r\n// the minor version of the calendar should be upped (ex: 2.7.2 -> 2.8.0)\r\n// and the below integer should be incremented.\r\nexports.internalApiVersion = 12;\r\nvar util_1 = __webpack_require__(4);\r\nexports.applyAll = util_1.applyAll;\r\nexports.debounce = util_1.debounce;\r\nexports.isInt = util_1.isInt;\r\nexports.htmlEscape = util_1.htmlEscape;\r\nexports.cssToStr = util_1.cssToStr;\r\nexports.proxy = util_1.proxy;\r\nexports.capitaliseFirstLetter = util_1.capitaliseFirstLetter;\r\nexports.getOuterRect = util_1.getOuterRect;\r\nexports.getClientRect = util_1.getClientRect;\r\nexports.getContentRect = util_1.getContentRect;\r\nexports.getScrollbarWidths = util_1.getScrollbarWidths;\r\nexports.preventDefault = util_1.preventDefault;\r\nexports.parseFieldSpecs = util_1.parseFieldSpecs;\r\nexports.compareByFieldSpecs = util_1.compareByFieldSpecs;\r\nexports.compareByFieldSpec = util_1.compareByFieldSpec;\r\nexports.flexibleCompare = util_1.flexibleCompare;\r\nexports.computeGreatestUnit = util_1.computeGreatestUnit;\r\nexports.divideRangeByDuration = util_1.divideRangeByDuration;\r\nexports.divideDurationByDuration = util_1.divideDurationByDuration;\r\nexports.multiplyDuration = util_1.multiplyDuration;\r\nexports.durationHasTime = util_1.durationHasTime;\r\nexports.log = util_1.log;\r\nexports.warn = util_1.warn;\r\nexports.removeExact = util_1.removeExact;\r\nexports.intersectRects = util_1.intersectRects;\r\nexports.allowSelection = util_1.allowSelection;\r\nexports.attrsToStr = util_1.attrsToStr;\r\nexports.compareNumbers = util_1.compareNumbers;\r\nexports.compensateScroll = util_1.compensateScroll;\r\nexports.computeDurationGreatestUnit = util_1.computeDurationGreatestUnit;\r\nexports.constrainPoint = util_1.constrainPoint;\r\nexports.copyOwnProps = util_1.copyOwnProps;\r\nexports.diffByUnit = util_1.diffByUnit;\r\nexports.diffDay = util_1.diffDay;\r\nexports.diffDayTime = util_1.diffDayTime;\r\nexports.diffPoints = util_1.diffPoints;\r\nexports.disableCursor = util_1.disableCursor;\r\nexports.distributeHeight = util_1.distributeHeight;\r\nexports.enableCursor = util_1.enableCursor;\r\nexports.firstDefined = util_1.firstDefined;\r\nexports.getEvIsTouch = util_1.getEvIsTouch;\r\nexports.getEvX = util_1.getEvX;\r\nexports.getEvY = util_1.getEvY;\r\nexports.getRectCenter = util_1.getRectCenter;\r\nexports.getScrollParent = util_1.getScrollParent;\r\nexports.hasOwnProp = util_1.hasOwnProp;\r\nexports.isArraysEqual = util_1.isArraysEqual;\r\nexports.isNativeDate = util_1.isNativeDate;\r\nexports.isPrimaryMouseButton = util_1.isPrimaryMouseButton;\r\nexports.isTimeString = util_1.isTimeString;\r\nexports.matchCellWidths = util_1.matchCellWidths;\r\nexports.mergeProps = util_1.mergeProps;\r\nexports.preventSelection = util_1.preventSelection;\r\nexports.removeMatching = util_1.removeMatching;\r\nexports.stripHtmlEntities = util_1.stripHtmlEntities;\r\nexports.subtractInnerElHeight = util_1.subtractInnerElHeight;\r\nexports.uncompensateScroll = util_1.uncompensateScroll;\r\nexports.undistributeHeight = util_1.undistributeHeight;\r\nexports.dayIDs = util_1.dayIDs;\r\nexports.unitsDesc = util_1.unitsDesc;\r\nvar date_formatting_1 = __webpack_require__(49);\r\nexports.formatDate = date_formatting_1.formatDate;\r\nexports.formatRange = date_formatting_1.formatRange;\r\nexports.queryMostGranularFormatUnit = date_formatting_1.queryMostGranularFormatUnit;\r\nvar locale_1 = __webpack_require__(32);\r\nexports.datepickerLocale = locale_1.datepickerLocale;\r\nexports.locale = locale_1.locale;\r\nexports.getMomentLocaleData = locale_1.getMomentLocaleData;\r\nexports.populateInstanceComputableOptions = locale_1.populateInstanceComputableOptions;\r\nvar util_2 = __webpack_require__(19);\r\nexports.eventDefsToEventInstances = util_2.eventDefsToEventInstances;\r\nexports.eventFootprintToComponentFootprint = util_2.eventFootprintToComponentFootprint;\r\nexports.eventInstanceToEventRange = util_2.eventInstanceToEventRange;\r\nexports.eventInstanceToUnzonedRange = util_2.eventInstanceToUnzonedRange;\r\nexports.eventRangeToEventFootprint = util_2.eventRangeToEventFootprint;\r\nvar moment_ext_1 = __webpack_require__(11);\r\nexports.moment = moment_ext_1.default;\r\nvar EmitterMixin_1 = __webpack_require__(13);\r\nexports.EmitterMixin = EmitterMixin_1.default;\r\nvar ListenerMixin_1 = __webpack_require__(7);\r\nexports.ListenerMixin = ListenerMixin_1.default;\r\nvar Model_1 = __webpack_require__(51);\r\nexports.Model = Model_1.default;\r\nvar Constraints_1 = __webpack_require__(217);\r\nexports.Constraints = Constraints_1.default;\r\nvar DateProfileGenerator_1 = __webpack_require__(55);\r\nexports.DateProfileGenerator = DateProfileGenerator_1.default;\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nexports.UnzonedRange = UnzonedRange_1.default;\r\nvar ComponentFootprint_1 = __webpack_require__(12);\r\nexports.ComponentFootprint = ComponentFootprint_1.default;\r\nvar BusinessHourGenerator_1 = __webpack_require__(218);\r\nexports.BusinessHourGenerator = BusinessHourGenerator_1.default;\r\nvar EventPeriod_1 = __webpack_require__(219);\r\nexports.EventPeriod = EventPeriod_1.default;\r\nvar EventManager_1 = __webpack_require__(220);\r\nexports.EventManager = EventManager_1.default;\r\nvar EventDef_1 = __webpack_require__(37);\r\nexports.EventDef = EventDef_1.default;\r\nvar EventDefMutation_1 = __webpack_require__(39);\r\nexports.EventDefMutation = EventDefMutation_1.default;\r\nvar EventDefParser_1 = __webpack_require__(36);\r\nexports.EventDefParser = EventDefParser_1.default;\r\nvar EventInstance_1 = __webpack_require__(53);\r\nexports.EventInstance = EventInstance_1.default;\r\nvar EventRange_1 = __webpack_require__(50);\r\nexports.EventRange = EventRange_1.default;\r\nvar RecurringEventDef_1 = __webpack_require__(54);\r\nexports.RecurringEventDef = RecurringEventDef_1.default;\r\nvar SingleEventDef_1 = __webpack_require__(9);\r\nexports.SingleEventDef = SingleEventDef_1.default;\r\nvar EventDefDateMutation_1 = __webpack_require__(40);\r\nexports.EventDefDateMutation = EventDefDateMutation_1.default;\r\nvar EventDateProfile_1 = __webpack_require__(16);\r\nexports.EventDateProfile = EventDateProfile_1.default;\r\nvar EventSourceParser_1 = __webpack_require__(38);\r\nexports.EventSourceParser = EventSourceParser_1.default;\r\nvar EventSource_1 = __webpack_require__(6);\r\nexports.EventSource = EventSource_1.default;\r\nvar ThemeRegistry_1 = __webpack_require__(57);\r\nexports.defineThemeSystem = ThemeRegistry_1.defineThemeSystem;\r\nexports.getThemeSystemClass = ThemeRegistry_1.getThemeSystemClass;\r\nvar EventInstanceGroup_1 = __webpack_require__(20);\r\nexports.EventInstanceGroup = EventInstanceGroup_1.default;\r\nvar ArrayEventSource_1 = __webpack_require__(56);\r\nexports.ArrayEventSource = ArrayEventSource_1.default;\r\nvar FuncEventSource_1 = __webpack_require__(223);\r\nexports.FuncEventSource = FuncEventSource_1.default;\r\nvar JsonFeedEventSource_1 = __webpack_require__(224);\r\nexports.JsonFeedEventSource = JsonFeedEventSource_1.default;\r\nvar EventFootprint_1 = __webpack_require__(34);\r\nexports.EventFootprint = EventFootprint_1.default;\r\nvar Class_1 = __webpack_require__(35);\r\nexports.Class = Class_1.default;\r\nvar Mixin_1 = __webpack_require__(15);\r\nexports.Mixin = Mixin_1.default;\r\nvar CoordCache_1 = __webpack_require__(58);\r\nexports.CoordCache = CoordCache_1.default;\r\nvar Iterator_1 = __webpack_require__(225);\r\nexports.Iterator = Iterator_1.default;\r\nvar DragListener_1 = __webpack_require__(59);\r\nexports.DragListener = DragListener_1.default;\r\nvar HitDragListener_1 = __webpack_require__(17);\r\nexports.HitDragListener = HitDragListener_1.default;\r\nvar MouseFollower_1 = __webpack_require__(226);\r\nexports.MouseFollower = MouseFollower_1.default;\r\nvar ParsableModelMixin_1 = __webpack_require__(52);\r\nexports.ParsableModelMixin = ParsableModelMixin_1.default;\r\nvar Popover_1 = __webpack_require__(227);\r\nexports.Popover = Popover_1.default;\r\nvar Promise_1 = __webpack_require__(21);\r\nexports.Promise = Promise_1.default;\r\nvar TaskQueue_1 = __webpack_require__(228);\r\nexports.TaskQueue = TaskQueue_1.default;\r\nvar RenderQueue_1 = __webpack_require__(229);\r\nexports.RenderQueue = RenderQueue_1.default;\r\nvar Scroller_1 = __webpack_require__(41);\r\nexports.Scroller = Scroller_1.default;\r\nvar Theme_1 = __webpack_require__(22);\r\nexports.Theme = Theme_1.default;\r\nvar Component_1 = __webpack_require__(230);\r\nexports.Component = Component_1.default;\r\nvar DateComponent_1 = __webpack_require__(231);\r\nexports.DateComponent = DateComponent_1.default;\r\nvar InteractiveDateComponent_1 = __webpack_require__(42);\r\nexports.InteractiveDateComponent = InteractiveDateComponent_1.default;\r\nvar Calendar_1 = __webpack_require__(232);\r\nexports.Calendar = Calendar_1.default;\r\nvar View_1 = __webpack_require__(43);\r\nexports.View = View_1.default;\r\nvar ViewRegistry_1 = __webpack_require__(24);\r\nexports.defineView = ViewRegistry_1.defineView;\r\nexports.getViewConfig = ViewRegistry_1.getViewConfig;\r\nvar DayTableMixin_1 = __webpack_require__(60);\r\nexports.DayTableMixin = DayTableMixin_1.default;\r\nvar BusinessHourRenderer_1 = __webpack_require__(61);\r\nexports.BusinessHourRenderer = BusinessHourRenderer_1.default;\r\nvar EventRenderer_1 = __webpack_require__(44);\r\nexports.EventRenderer = EventRenderer_1.default;\r\nvar FillRenderer_1 = __webpack_require__(62);\r\nexports.FillRenderer = FillRenderer_1.default;\r\nvar HelperRenderer_1 = __webpack_require__(63);\r\nexports.HelperRenderer = HelperRenderer_1.default;\r\nvar ExternalDropping_1 = __webpack_require__(233);\r\nexports.ExternalDropping = ExternalDropping_1.default;\r\nvar EventResizing_1 = __webpack_require__(234);\r\nexports.EventResizing = EventResizing_1.default;\r\nvar EventPointing_1 = __webpack_require__(64);\r\nexports.EventPointing = EventPointing_1.default;\r\nvar EventDragging_1 = __webpack_require__(235);\r\nexports.EventDragging = EventDragging_1.default;\r\nvar DateSelecting_1 = __webpack_require__(236);\r\nexports.DateSelecting = DateSelecting_1.default;\r\nvar DateClicking_1 = __webpack_require__(237);\r\nexports.DateClicking = DateClicking_1.default;\r\nvar Interaction_1 = __webpack_require__(14);\r\nexports.Interaction = Interaction_1.default;\r\nvar StandardInteractionsMixin_1 = __webpack_require__(65);\r\nexports.StandardInteractionsMixin = StandardInteractionsMixin_1.default;\r\nvar AgendaView_1 = __webpack_require__(238);\r\nexports.AgendaView = AgendaView_1.default;\r\nvar TimeGrid_1 = __webpack_require__(239);\r\nexports.TimeGrid = TimeGrid_1.default;\r\nvar TimeGridEventRenderer_1 = __webpack_require__(240);\r\nexports.TimeGridEventRenderer = TimeGridEventRenderer_1.default;\r\nvar TimeGridFillRenderer_1 = __webpack_require__(242);\r\nexports.TimeGridFillRenderer = TimeGridFillRenderer_1.default;\r\nvar TimeGridHelperRenderer_1 = __webpack_require__(241);\r\nexports.TimeGridHelperRenderer = TimeGridHelperRenderer_1.default;\r\nvar DayGrid_1 = __webpack_require__(66);\r\nexports.DayGrid = DayGrid_1.default;\r\nvar DayGridEventRenderer_1 = __webpack_require__(243);\r\nexports.DayGridEventRenderer = DayGridEventRenderer_1.default;\r\nvar DayGridFillRenderer_1 = __webpack_require__(245);\r\nexports.DayGridFillRenderer = DayGridFillRenderer_1.default;\r\nvar DayGridHelperRenderer_1 = __webpack_require__(244);\r\nexports.DayGridHelperRenderer = DayGridHelperRenderer_1.default;\r\nvar BasicView_1 = __webpack_require__(67);\r\nexports.BasicView = BasicView_1.default;\r\nvar BasicViewDateProfileGenerator_1 = __webpack_require__(68);\r\nexports.BasicViewDateProfileGenerator = BasicViewDateProfileGenerator_1.default;\r\nvar MonthView_1 = __webpack_require__(246);\r\nexports.MonthView = MonthView_1.default;\r\nvar MonthViewDateProfileGenerator_1 = __webpack_require__(247);\r\nexports.MonthViewDateProfileGenerator = MonthViewDateProfileGenerator_1.default;\r\nvar ListView_1 = __webpack_require__(248);\r\nexports.ListView = ListView_1.default;\r\nvar ListEventPointing_1 = __webpack_require__(250);\r\nexports.ListEventPointing = ListEventPointing_1.default;\r\nvar ListEventRenderer_1 = __webpack_require__(249);\r\nexports.ListEventRenderer = ListEventRenderer_1.default;\r\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar EventRange_1 = __webpack_require__(50);\r\nvar EventFootprint_1 = __webpack_require__(34);\r\nvar ComponentFootprint_1 = __webpack_require__(12);\r\nfunction eventDefsToEventInstances(eventDefs, unzonedRange) {\r\n var eventInstances = [];\r\n var i;\r\n for (i = 0; i < eventDefs.length; i++) {\r\n eventInstances.push.apply(eventInstances, // append\r\n eventDefs[i].buildInstances(unzonedRange));\r\n }\r\n return eventInstances;\r\n}\r\nexports.eventDefsToEventInstances = eventDefsToEventInstances;\r\nfunction eventInstanceToEventRange(eventInstance) {\r\n return new EventRange_1.default(eventInstance.dateProfile.unzonedRange, eventInstance.def, eventInstance);\r\n}\r\nexports.eventInstanceToEventRange = eventInstanceToEventRange;\r\nfunction eventRangeToEventFootprint(eventRange) {\r\n return new EventFootprint_1.default(new ComponentFootprint_1.default(eventRange.unzonedRange, eventRange.eventDef.isAllDay()), eventRange.eventDef, eventRange.eventInstance // might not exist\r\n );\r\n}\r\nexports.eventRangeToEventFootprint = eventRangeToEventFootprint;\r\nfunction eventInstanceToUnzonedRange(eventInstance) {\r\n return eventInstance.dateProfile.unzonedRange;\r\n}\r\nexports.eventInstanceToUnzonedRange = eventInstanceToUnzonedRange;\r\nfunction eventFootprintToComponentFootprint(eventFootprint) {\r\n return eventFootprint.componentFootprint;\r\n}\r\nexports.eventFootprintToComponentFootprint = eventFootprintToComponentFootprint;\r\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar util_1 = __webpack_require__(19);\r\nvar EventRange_1 = __webpack_require__(50);\r\n/*\r\nIt's expected that there will be at least one EventInstance,\r\nOR that an explicitEventDef is assigned.\r\n*/\r\nvar EventInstanceGroup = /** @class */ (function () {\r\n function EventInstanceGroup(eventInstances) {\r\n this.eventInstances = eventInstances || [];\r\n }\r\n EventInstanceGroup.prototype.getAllEventRanges = function (constraintRange) {\r\n if (constraintRange) {\r\n return this.sliceNormalRenderRanges(constraintRange);\r\n }\r\n else {\r\n return this.eventInstances.map(util_1.eventInstanceToEventRange);\r\n }\r\n };\r\n EventInstanceGroup.prototype.sliceRenderRanges = function (constraintRange) {\r\n if (this.isInverse()) {\r\n return this.sliceInverseRenderRanges(constraintRange);\r\n }\r\n else {\r\n return this.sliceNormalRenderRanges(constraintRange);\r\n }\r\n };\r\n EventInstanceGroup.prototype.sliceNormalRenderRanges = function (constraintRange) {\r\n var eventInstances = this.eventInstances;\r\n var i;\r\n var eventInstance;\r\n var slicedRange;\r\n var slicedEventRanges = [];\r\n for (i = 0; i < eventInstances.length; i++) {\r\n eventInstance = eventInstances[i];\r\n slicedRange = eventInstance.dateProfile.unzonedRange.intersect(constraintRange);\r\n if (slicedRange) {\r\n slicedEventRanges.push(new EventRange_1.default(slicedRange, eventInstance.def, eventInstance));\r\n }\r\n }\r\n return slicedEventRanges;\r\n };\r\n EventInstanceGroup.prototype.sliceInverseRenderRanges = function (constraintRange) {\r\n var unzonedRanges = this.eventInstances.map(util_1.eventInstanceToUnzonedRange);\r\n var ownerDef = this.getEventDef();\r\n unzonedRanges = UnzonedRange_1.default.invertRanges(unzonedRanges, constraintRange);\r\n return unzonedRanges.map(function (unzonedRange) {\r\n return new EventRange_1.default(unzonedRange, ownerDef); // don't give an EventInstance\r\n });\r\n };\r\n EventInstanceGroup.prototype.isInverse = function () {\r\n return this.getEventDef().hasInverseRendering();\r\n };\r\n EventInstanceGroup.prototype.getEventDef = function () {\r\n return this.explicitEventDef || this.eventInstances[0].def;\r\n };\r\n return EventInstanceGroup;\r\n}());\r\nexports.default = EventInstanceGroup;\r\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar PromiseStub = {\r\n construct: function (executor) {\r\n var deferred = $.Deferred();\r\n var promise = deferred.promise();\r\n if (typeof executor === 'function') {\r\n executor(function (val) {\r\n deferred.resolve(val);\r\n attachImmediatelyResolvingThen(promise, val);\r\n }, function () {\r\n deferred.reject();\r\n attachImmediatelyRejectingThen(promise);\r\n });\r\n }\r\n return promise;\r\n },\r\n resolve: function (val) {\r\n var deferred = $.Deferred().resolve(val);\r\n var promise = deferred.promise();\r\n attachImmediatelyResolvingThen(promise, val);\r\n return promise;\r\n },\r\n reject: function () {\r\n var deferred = $.Deferred().reject();\r\n var promise = deferred.promise();\r\n attachImmediatelyRejectingThen(promise);\r\n return promise;\r\n }\r\n};\r\nexports.default = PromiseStub;\r\nfunction attachImmediatelyResolvingThen(promise, val) {\r\n promise.then = function (onResolve) {\r\n if (typeof onResolve === 'function') {\r\n return PromiseStub.resolve(onResolve(val));\r\n }\r\n return promise;\r\n };\r\n}\r\nfunction attachImmediatelyRejectingThen(promise) {\r\n promise.then = function (onResolve, onReject) {\r\n if (typeof onReject === 'function') {\r\n onReject();\r\n }\r\n return promise;\r\n };\r\n}\r\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar Theme = /** @class */ (function () {\r\n function Theme(optionsManager) {\r\n this.optionsManager = optionsManager;\r\n this.processIconOverride();\r\n }\r\n Theme.prototype.processIconOverride = function () {\r\n if (this.iconOverrideOption) {\r\n this.setIconOverride(this.optionsManager.get(this.iconOverrideOption));\r\n }\r\n };\r\n Theme.prototype.setIconOverride = function (iconOverrideHash) {\r\n var iconClassesCopy;\r\n var buttonName;\r\n if ($.isPlainObject(iconOverrideHash)) {\r\n iconClassesCopy = $.extend({}, this.iconClasses);\r\n for (buttonName in iconOverrideHash) {\r\n iconClassesCopy[buttonName] = this.applyIconOverridePrefix(iconOverrideHash[buttonName]);\r\n }\r\n this.iconClasses = iconClassesCopy;\r\n }\r\n else if (iconOverrideHash === false) {\r\n this.iconClasses = {};\r\n }\r\n };\r\n Theme.prototype.applyIconOverridePrefix = function (className) {\r\n var prefix = this.iconOverridePrefix;\r\n if (prefix && className.indexOf(prefix) !== 0) { // if not already present\r\n className = prefix + className;\r\n }\r\n return className;\r\n };\r\n Theme.prototype.getClass = function (key) {\r\n return this.classes[key] || '';\r\n };\r\n Theme.prototype.getIconClass = function (buttonName) {\r\n var className = this.iconClasses[buttonName];\r\n if (className) {\r\n return this.baseIconClass + ' ' + className;\r\n }\r\n return '';\r\n };\r\n Theme.prototype.getCustomButtonIconClass = function (customButtonProps) {\r\n var className;\r\n if (this.iconOverrideCustomButtonOption) {\r\n className = customButtonProps[this.iconOverrideCustomButtonOption];\r\n if (className) {\r\n return this.baseIconClass + ' ' + this.applyIconOverridePrefix(className);\r\n }\r\n }\r\n return '';\r\n };\r\n return Theme;\r\n}());\r\nexports.default = Theme;\r\nTheme.prototype.classes = {};\r\nTheme.prototype.iconClasses = {};\r\nTheme.prototype.baseIconClass = '';\r\nTheme.prototype.iconOverridePrefix = '';\r\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar exportHooks = __webpack_require__(18);\r\nvar EmitterMixin_1 = __webpack_require__(13);\r\nvar ListenerMixin_1 = __webpack_require__(7);\r\nexportHooks.touchMouseIgnoreWait = 500;\r\nvar globalEmitter = null;\r\nvar neededCount = 0;\r\n/*\r\nListens to document and window-level user-interaction events, like touch events and mouse events,\r\nand fires these events as-is to whoever is observing a GlobalEmitter.\r\nBest when used as a singleton via GlobalEmitter.get()\r\n\nNormalizes mouse/touch events. For examples:\r\n- ignores the the simulated mouse events that happen after a quick tap: mousemove+mousedown+mouseup+click\r\n- compensates for various buggy scenarios where a touchend does not fire\r\n*/\r\nvar GlobalEmitter = /** @class */ (function () {\r\n function GlobalEmitter() {\r\n this.isTouching = false;\r\n this.mouseIgnoreDepth = 0;\r\n }\r\n // gets the singleton\r\n GlobalEmitter.get = function () {\r\n if (!globalEmitter) {\r\n globalEmitter = new GlobalEmitter();\r\n globalEmitter.bind();\r\n }\r\n return globalEmitter;\r\n };\r\n // called when an object knows it will need a GlobalEmitter in the near future.\r\n GlobalEmitter.needed = function () {\r\n GlobalEmitter.get(); // ensures globalEmitter\r\n neededCount++;\r\n };\r\n // called when the object that originally called needed() doesn't need a GlobalEmitter anymore.\r\n GlobalEmitter.unneeded = function () {\r\n neededCount--;\r\n if (!neededCount) { // nobody else needs it\r\n globalEmitter.unbind();\r\n globalEmitter = null;\r\n }\r\n };\r\n GlobalEmitter.prototype.bind = function () {\r\n var _this = this;\r\n this.listenTo($(document), {\r\n touchstart: this.handleTouchStart,\r\n touchcancel: this.handleTouchCancel,\r\n touchend: this.handleTouchEnd,\r\n mousedown: this.handleMouseDown,\r\n mousemove: this.handleMouseMove,\r\n mouseup: this.handleMouseUp,\r\n click: this.handleClick,\r\n selectstart: this.handleSelectStart,\r\n contextmenu: this.handleContextMenu\r\n });\r\n // because we need to call preventDefault\r\n // because https://www.chromestatus.com/features/5093566007214080\r\n // TODO: investigate performance because this is a global handler\r\n window.addEventListener('touchmove', this.handleTouchMoveProxy = function (ev) {\r\n _this.handleTouchMove($.Event(ev));\r\n }, { passive: false } // allows preventDefault()\r\n );\r\n // attach a handler to get called when ANY scroll action happens on the page.\r\n // this was impossible to do with normal on/off because 'scroll' doesn't bubble.\r\n // http://stackoverflow.com/a/32954565/96342\r\n window.addEventListener('scroll', this.handleScrollProxy = function (ev) {\r\n _this.handleScroll($.Event(ev));\r\n }, true // useCapture\r\n );\r\n };\r\n GlobalEmitter.prototype.unbind = function () {\r\n this.stopListeningTo($(document));\r\n window.removeEventListener('touchmove', this.handleTouchMoveProxy, { passive: false } // use same options as addEventListener\r\n );\r\n window.removeEventListener('scroll', this.handleScrollProxy, true // useCapture\r\n );\r\n };\r\n // Touch Handlers\r\n // -----------------------------------------------------------------------------------------------------------------\r\n GlobalEmitter.prototype.handleTouchStart = function (ev) {\r\n // if a previous touch interaction never ended with a touchend, then implicitly end it,\r\n // but since a new touch interaction is about to begin, don't start the mouse ignore period.\r\n this.stopTouch(ev, true); // skipMouseIgnore=true\r\n this.isTouching = true;\r\n this.trigger('touchstart', ev);\r\n };\r\n GlobalEmitter.prototype.handleTouchMove = function (ev) {\r\n if (this.isTouching) {\r\n this.trigger('touchmove', ev);\r\n }\r\n };\r\n GlobalEmitter.prototype.handleTouchCancel = function (ev) {\r\n if (this.isTouching) {\r\n this.trigger('touchcancel', ev);\r\n // Have touchcancel fire an artificial touchend. That way, handlers won't need to listen to both.\r\n // If touchend fires later, it won't have any effect b/c isTouching will be false.\r\n this.stopTouch(ev);\r\n }\r\n };\r\n GlobalEmitter.prototype.handleTouchEnd = function (ev) {\r\n this.stopTouch(ev);\r\n };\r\n // Mouse Handlers\r\n // -----------------------------------------------------------------------------------------------------------------\r\n GlobalEmitter.prototype.handleMouseDown = function (ev) {\r\n if (!this.shouldIgnoreMouse()) {\r\n this.trigger('mousedown', ev);\r\n }\r\n };\r\n GlobalEmitter.prototype.handleMouseMove = function (ev) {\r\n if (!this.shouldIgnoreMouse()) {\r\n this.trigger('mousemove', ev);\r\n }\r\n };\r\n GlobalEmitter.prototype.handleMouseUp = function (ev) {\r\n if (!this.shouldIgnoreMouse()) {\r\n this.trigger('mouseup', ev);\r\n }\r\n };\r\n GlobalEmitter.prototype.handleClick = function (ev) {\r\n if (!this.shouldIgnoreMouse()) {\r\n this.trigger('click', ev);\r\n }\r\n };\r\n // Misc Handlers\r\n // -----------------------------------------------------------------------------------------------------------------\r\n GlobalEmitter.prototype.handleSelectStart = function (ev) {\r\n this.trigger('selectstart', ev);\r\n };\r\n GlobalEmitter.prototype.handleContextMenu = function (ev) {\r\n this.trigger('contextmenu', ev);\r\n };\r\n GlobalEmitter.prototype.handleScroll = function (ev) {\r\n this.trigger('scroll', ev);\r\n };\r\n // Utils\r\n // -----------------------------------------------------------------------------------------------------------------\r\n GlobalEmitter.prototype.stopTouch = function (ev, skipMouseIgnore) {\r\n if (skipMouseIgnore === void 0) { skipMouseIgnore = false; }\r\n if (this.isTouching) {\r\n this.isTouching = false;\r\n this.trigger('touchend', ev);\r\n if (!skipMouseIgnore) {\r\n this.startTouchMouseIgnore();\r\n }\r\n }\r\n };\r\n GlobalEmitter.prototype.startTouchMouseIgnore = function () {\r\n var _this = this;\r\n var wait = exportHooks.touchMouseIgnoreWait;\r\n if (wait) {\r\n this.mouseIgnoreDepth++;\r\n setTimeout(function () {\r\n _this.mouseIgnoreDepth--;\r\n }, wait);\r\n }\r\n };\r\n GlobalEmitter.prototype.shouldIgnoreMouse = function () {\r\n return this.isTouching || Boolean(this.mouseIgnoreDepth);\r\n };\r\n return GlobalEmitter;\r\n}());\r\nexports.default = GlobalEmitter;\r\nListenerMixin_1.default.mixInto(GlobalEmitter);\r\nEmitterMixin_1.default.mixInto(GlobalEmitter);\r\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar exportHooks = __webpack_require__(18);\r\nexports.viewHash = {};\r\nexportHooks.views = exports.viewHash;\r\nfunction defineView(viewName, viewConfig) {\r\n exports.viewHash[viewName] = viewConfig;\r\n}\r\nexports.defineView = defineView;\r\nfunction getViewConfig(viewName) {\r\n return exports.viewHash[viewName];\r\n}\r\nexports.getViewConfig = getViewConfig;\r\n\n\n/***/ }),\n/* 25 */,\n/* 26 */,\n/* 27 */,\n/* 28 */,\n/* 29 */,\n/* 30 */,\n/* 31 */,\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar moment = __webpack_require__(0);\r\nvar exportHooks = __webpack_require__(18);\r\nvar options_1 = __webpack_require__(33);\r\nvar util_1 = __webpack_require__(4);\r\nexports.localeOptionHash = {};\r\nexportHooks.locales = exports.localeOptionHash;\r\n// NOTE: can't guarantee any of these computations will run because not every locale has datepicker\r\n// configs, so make sure there are English fallbacks for these in the defaults file.\r\nvar dpComputableOptions = {\r\n buttonText: function (dpOptions) {\r\n return {\r\n // the translations sometimes wrongly contain HTML entities\r\n prev: util_1.stripHtmlEntities(dpOptions.prevText),\r\n next: util_1.stripHtmlEntities(dpOptions.nextText),\r\n today: util_1.stripHtmlEntities(dpOptions.currentText)\r\n };\r\n },\r\n // Produces format strings like \"MMMM YYYY\" -> \"September 2014\"\r\n monthYearFormat: function (dpOptions) {\r\n return dpOptions.showMonthAfterYear ?\r\n 'YYYY[' + dpOptions.yearSuffix + '] MMMM' :\r\n 'MMMM YYYY[' + dpOptions.yearSuffix + ']';\r\n }\r\n};\r\nvar momComputableOptions = {\r\n // Produces format strings like \"ddd M/D\" -> \"Fri 9/15\"\r\n dayOfMonthFormat: function (momOptions, fcOptions) {\r\n var format = momOptions.longDateFormat('l'); // for the format like \"M/D/YYYY\"\r\n // strip the year off the edge, as well as other misc non-whitespace chars\r\n format = format.replace(/^Y+[^\\w\\s]*|[^\\w\\s]*Y+$/g, '');\r\n if (fcOptions.isRTL) {\r\n format += ' ddd'; // for RTL, add day-of-week to end\r\n }\r\n else {\r\n format = 'ddd ' + format; // for LTR, add day-of-week to beginning\r\n }\r\n return format;\r\n },\r\n // Produces format strings like \"h:mma\" -> \"6:00pm\"\r\n mediumTimeFormat: function (momOptions) {\r\n return momOptions.longDateFormat('LT')\r\n .replace(/\\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand\r\n },\r\n // Produces format strings like \"h(:mm)a\" -> \"6pm\" / \"6:30pm\"\r\n smallTimeFormat: function (momOptions) {\r\n return momOptions.longDateFormat('LT')\r\n .replace(':mm', '(:mm)')\r\n .replace(/(\\Wmm)$/, '($1)') // like above, but for foreign locales\r\n .replace(/\\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand\r\n },\r\n // Produces format strings like \"h(:mm)t\" -> \"6p\" / \"6:30p\"\r\n extraSmallTimeFormat: function (momOptions) {\r\n return momOptions.longDateFormat('LT')\r\n .replace(':mm', '(:mm)')\r\n .replace(/(\\Wmm)$/, '($1)') // like above, but for foreign locales\r\n .replace(/\\s*a$/i, 't'); // convert to AM/PM/am/pm to lowercase one-letter. remove any spaces beforehand\r\n },\r\n // Produces format strings like \"ha\" / \"H\" -> \"6pm\" / \"18\"\r\n hourFormat: function (momOptions) {\r\n return momOptions.longDateFormat('LT')\r\n .replace(':mm', '')\r\n .replace(/(\\Wmm)$/, '') // like above, but for foreign locales\r\n .replace(/\\s*a$/i, 'a'); // convert AM/PM/am/pm to lowercase. remove any spaces beforehand\r\n },\r\n // Produces format strings like \"h:mm\" -> \"6:30\" (with no AM/PM)\r\n noMeridiemTimeFormat: function (momOptions) {\r\n return momOptions.longDateFormat('LT')\r\n .replace(/\\s*a$/i, ''); // remove trailing AM/PM\r\n }\r\n};\r\n// options that should be computed off live calendar options (considers override options)\r\n// TODO: best place for this? related to locale?\r\n// TODO: flipping text based on isRTL is a bad idea because the CSS `direction` might want to handle it\r\nvar instanceComputableOptions = {\r\n // Produces format strings for results like \"Mo 16\"\r\n smallDayDateFormat: function (options) {\r\n return options.isRTL ?\r\n 'D dd' :\r\n 'dd D';\r\n },\r\n // Produces format strings for results like \"Wk 5\"\r\n weekFormat: function (options) {\r\n return options.isRTL ?\r\n 'w[ ' + options.weekNumberTitle + ']' :\r\n '[' + options.weekNumberTitle + ' ]w';\r\n },\r\n // Produces format strings for results like \"Wk5\"\r\n smallWeekFormat: function (options) {\r\n return options.isRTL ?\r\n 'w[' + options.weekNumberTitle + ']' :\r\n '[' + options.weekNumberTitle + ']w';\r\n }\r\n};\r\n// TODO: make these computable properties in optionsManager\r\nfunction populateInstanceComputableOptions(options) {\r\n $.each(instanceComputableOptions, function (name, func) {\r\n if (options[name] == null) {\r\n options[name] = func(options);\r\n }\r\n });\r\n}\r\nexports.populateInstanceComputableOptions = populateInstanceComputableOptions;\r\n// Initialize jQuery UI datepicker translations while using some of the translations\r\n// Will set this as the default locales for datepicker.\r\nfunction datepickerLocale(localeCode, dpLocaleCode, dpOptions) {\r\n // get the FullCalendar internal option hash for this locale. create if necessary\r\n var fcOptions = exports.localeOptionHash[localeCode] || (exports.localeOptionHash[localeCode] = {});\r\n // transfer some simple options from datepicker to fc\r\n fcOptions.isRTL = dpOptions.isRTL;\r\n fcOptions.weekNumberTitle = dpOptions.weekHeader;\r\n // compute some more complex options from datepicker\r\n $.each(dpComputableOptions, function (name, func) {\r\n fcOptions[name] = func(dpOptions);\r\n });\r\n var jqDatePicker = $.datepicker;\r\n // is jQuery UI Datepicker is on the page?\r\n if (jqDatePicker) {\r\n // Register the locale data.\r\n // FullCalendar and MomentJS use locale codes like \"pt-br\" but Datepicker\r\n // does it like \"pt-BR\" or if it doesn't have the locale, maybe just \"pt\".\r\n // Make an alias so the locale can be referenced either way.\r\n jqDatePicker.regional[dpLocaleCode] =\r\n jqDatePicker.regional[localeCode] = // alias\r\n dpOptions;\r\n // Alias 'en' to the default locale data. Do this every time.\r\n jqDatePicker.regional.en = jqDatePicker.regional[''];\r\n // Set as Datepicker's global defaults.\r\n jqDatePicker.setDefaults(dpOptions);\r\n }\r\n}\r\nexports.datepickerLocale = datepickerLocale;\r\n// Sets FullCalendar-specific translations. Will set the locales as the global default.\r\nfunction locale(localeCode, newFcOptions) {\r\n var fcOptions;\r\n var momOptions;\r\n // get the FullCalendar internal option hash for this locale. create if necessary\r\n fcOptions = exports.localeOptionHash[localeCode] || (exports.localeOptionHash[localeCode] = {});\r\n // provided new options for this locales? merge them in\r\n if (newFcOptions) {\r\n fcOptions = exports.localeOptionHash[localeCode] = options_1.mergeOptions([fcOptions, newFcOptions]);\r\n }\r\n // compute locale options that weren't defined.\r\n // always do this. newFcOptions can be undefined when initializing from i18n file,\r\n // so no way to tell if this is an initialization or a default-setting.\r\n momOptions = getMomentLocaleData(localeCode); // will fall back to en\r\n $.each(momComputableOptions, function (name, func) {\r\n if (fcOptions[name] == null) {\r\n fcOptions[name] = (func)(momOptions, fcOptions);\r\n }\r\n });\r\n // set it as the default locale for FullCalendar\r\n options_1.globalDefaults.locale = localeCode;\r\n}\r\nexports.locale = locale;\r\n// Returns moment's internal locale data. If doesn't exist, returns English.\r\nfunction getMomentLocaleData(localeCode) {\r\n return moment.localeData(localeCode) || moment.localeData('en');\r\n}\r\nexports.getMomentLocaleData = getMomentLocaleData;\r\n// Initialize English by forcing computation of moment-derived options.\r\n// Also, sets it as the default.\r\nlocale('en', options_1.englishDefaults);\r\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar util_1 = __webpack_require__(4);\r\nexports.globalDefaults = {\r\n titleRangeSeparator: ' \\u2013 ',\r\n monthYearFormat: 'MMMM YYYY',\r\n defaultTimedEventDuration: '02:00:00',\r\n defaultAllDayEventDuration: { days: 1 },\r\n forceEventDuration: false,\r\n nextDayThreshold: '09:00:00',\r\n // display\r\n columnHeader: true,\r\n defaultView: 'month',\r\n aspectRatio: 1.35,\r\n header: {\r\n left: 'title',\r\n center: '',\r\n right: 'today prev,next'\r\n },\r\n weekends: true,\r\n weekNumbers: false,\r\n weekNumberTitle: 'W',\r\n weekNumberCalculation: 'local',\r\n // editable: false,\r\n // nowIndicator: false,\r\n scrollTime: '06:00:00',\r\n minTime: '00:00:00',\r\n maxTime: '24:00:00',\r\n showNonCurrentDates: true,\r\n // event ajax\r\n lazyFetching: true,\r\n startParam: 'start',\r\n endParam: 'end',\r\n timezoneParam: 'timezone',\r\n timezone: false,\r\n // allDayDefault: undefined,\r\n // locale\r\n locale: null,\r\n isRTL: false,\r\n buttonText: {\r\n prev: 'prev',\r\n next: 'next',\r\n prevYear: 'prev year',\r\n nextYear: 'next year',\r\n year: 'year',\r\n today: 'today',\r\n month: 'month',\r\n week: 'week',\r\n day: 'day'\r\n },\r\n // buttonIcons: null,\r\n allDayText: 'all-day',\r\n // allows setting a min-height to the event segment to prevent short events overlapping each other\r\n agendaEventMinHeight: 0,\r\n // jquery-ui theming\r\n theme: false,\r\n // themeButtonIcons: null,\r\n // eventResizableFromStart: false,\r\n dragOpacity: .75,\r\n dragRevertDuration: 500,\r\n dragScroll: true,\r\n // selectable: false,\r\n unselectAuto: true,\r\n // selectMinDistance: 0,\r\n dropAccept: '*',\r\n eventOrder: 'title',\r\n // eventRenderWait: null,\r\n eventLimit: false,\r\n eventLimitText: 'more',\r\n eventLimitClick: 'popover',\r\n dayPopoverFormat: 'LL',\r\n handleWindowResize: true,\r\n windowResizeDelay: 100,\r\n longPressDelay: 1000\r\n};\r\nexports.englishDefaults = {\r\n dayPopoverFormat: 'dddd, MMMM D'\r\n};\r\nexports.rtlDefaults = {\r\n header: {\r\n left: 'next,prev today',\r\n center: '',\r\n right: 'title'\r\n },\r\n buttonIcons: {\r\n prev: 'right-single-arrow',\r\n next: 'left-single-arrow',\r\n prevYear: 'right-double-arrow',\r\n nextYear: 'left-double-arrow'\r\n },\r\n themeButtonIcons: {\r\n prev: 'circle-triangle-e',\r\n next: 'circle-triangle-w',\r\n nextYear: 'seek-prev',\r\n prevYear: 'seek-next'\r\n }\r\n};\r\nvar complexOptions = [\r\n 'header',\r\n 'footer',\r\n 'buttonText',\r\n 'buttonIcons',\r\n 'themeButtonIcons'\r\n];\r\n// Merges an array of option objects into a single object\r\nfunction mergeOptions(optionObjs) {\r\n return util_1.mergeProps(optionObjs, complexOptions);\r\n}\r\nexports.mergeOptions = mergeOptions;\r\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar EventFootprint = /** @class */ (function () {\r\n function EventFootprint(componentFootprint, eventDef, eventInstance) {\r\n this.componentFootprint = componentFootprint;\r\n this.eventDef = eventDef;\r\n if (eventInstance) {\r\n this.eventInstance = eventInstance;\r\n }\r\n }\r\n EventFootprint.prototype.getEventLegacy = function () {\r\n return (this.eventInstance || this.eventDef).toLegacy();\r\n };\r\n return EventFootprint;\r\n}());\r\nexports.default = EventFootprint;\r\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar util_1 = __webpack_require__(4);\r\n// Class that all other classes will inherit from\r\nvar Class = /** @class */ (function () {\r\n function Class() {\r\n }\r\n // Called on a class to create a subclass.\r\n // LIMITATION: cannot provide a constructor!\r\n Class.extend = function (members) {\r\n var SubClass = /** @class */ (function (_super) {\r\n tslib_1.__extends(SubClass, _super);\r\n function SubClass() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return SubClass;\r\n }(this));\r\n util_1.copyOwnProps(members, SubClass.prototype);\r\n return SubClass;\r\n };\r\n // Adds new member variables/methods to the class's prototype.\r\n // Can be called with another class, or a plain object hash containing new members.\r\n Class.mixin = function (members) {\r\n util_1.copyOwnProps(members, this.prototype);\r\n };\r\n return Class;\r\n}());\r\nexports.default = Class;\r\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar moment = __webpack_require__(0);\r\nvar util_1 = __webpack_require__(4);\r\nvar SingleEventDef_1 = __webpack_require__(9);\r\nvar RecurringEventDef_1 = __webpack_require__(54);\r\nexports.default = {\r\n parse: function (eventInput, source) {\r\n if (util_1.isTimeString(eventInput.start) || moment.isDuration(eventInput.start) ||\r\n util_1.isTimeString(eventInput.end) || moment.isDuration(eventInput.end)) {\r\n return RecurringEventDef_1.default.parse(eventInput, source);\r\n }\r\n else {\r\n return SingleEventDef_1.default.parse(eventInput, source);\r\n }\r\n }\r\n};\r\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar ParsableModelMixin_1 = __webpack_require__(52);\r\nvar EventDef = /** @class */ (function () {\r\n function EventDef(source) {\r\n this.source = source;\r\n this.className = [];\r\n this.miscProps = {};\r\n }\r\n EventDef.parse = function (rawInput, source) {\r\n var def = new this(source);\r\n if (def.applyProps(rawInput)) {\r\n return def;\r\n }\r\n return false;\r\n };\r\n EventDef.normalizeId = function (id) {\r\n return String(id);\r\n };\r\n EventDef.generateId = function () {\r\n return '_fc' + (EventDef.uuid++);\r\n };\r\n EventDef.prototype.clone = function () {\r\n var copy = new this.constructor(this.source);\r\n copy.id = this.id;\r\n copy.rawId = this.rawId;\r\n copy.uid = this.uid; // not really unique anymore :(\r\n EventDef.copyVerbatimStandardProps(this, copy);\r\n copy.className = this.className.slice(); // copy\r\n copy.miscProps = $.extend({}, this.miscProps);\r\n return copy;\r\n };\r\n EventDef.prototype.hasInverseRendering = function () {\r\n return this.getRendering() === 'inverse-background';\r\n };\r\n EventDef.prototype.hasBgRendering = function () {\r\n var rendering = this.getRendering();\r\n return rendering === 'inverse-background' || rendering === 'background';\r\n };\r\n EventDef.prototype.getRendering = function () {\r\n if (this.rendering != null) {\r\n return this.rendering;\r\n }\r\n return this.source.rendering;\r\n };\r\n EventDef.prototype.getConstraint = function () {\r\n if (this.constraint != null) {\r\n return this.constraint;\r\n }\r\n if (this.source.constraint != null) {\r\n return this.source.constraint;\r\n }\r\n return this.source.calendar.opt('eventConstraint'); // what about View option?\r\n };\r\n EventDef.prototype.getOverlap = function () {\r\n if (this.overlap != null) {\r\n return this.overlap;\r\n }\r\n if (this.source.overlap != null) {\r\n return this.source.overlap;\r\n }\r\n return this.source.calendar.opt('eventOverlap'); // what about View option?\r\n };\r\n EventDef.prototype.isStartExplicitlyEditable = function () {\r\n if (this.startEditable != null) {\r\n return this.startEditable;\r\n }\r\n return this.source.startEditable;\r\n };\r\n EventDef.prototype.isDurationExplicitlyEditable = function () {\r\n if (this.durationEditable != null) {\r\n return this.durationEditable;\r\n }\r\n return this.source.durationEditable;\r\n };\r\n EventDef.prototype.isExplicitlyEditable = function () {\r\n if (this.editable != null) {\r\n return this.editable;\r\n }\r\n return this.source.editable;\r\n };\r\n EventDef.prototype.toLegacy = function () {\r\n var obj = $.extend({}, this.miscProps);\r\n obj._id = this.uid;\r\n obj.source = this.source;\r\n obj.className = this.className.slice(); // copy\r\n obj.allDay = this.isAllDay();\r\n if (this.rawId != null) {\r\n obj.id = this.rawId;\r\n }\r\n EventDef.copyVerbatimStandardProps(this, obj);\r\n return obj;\r\n };\r\n EventDef.prototype.applyManualStandardProps = function (rawProps) {\r\n if (rawProps.id != null) {\r\n this.id = EventDef.normalizeId((this.rawId = rawProps.id));\r\n }\r\n else {\r\n this.id = EventDef.generateId();\r\n }\r\n if (rawProps._id != null) { // accept this prop, even tho somewhat internal\r\n this.uid = String(rawProps._id);\r\n }\r\n else {\r\n this.uid = EventDef.generateId();\r\n }\r\n // TODO: converge with EventSource\r\n if ($.isArray(rawProps.className)) {\r\n this.className = rawProps.className;\r\n }\r\n if (typeof rawProps.className === 'string') {\r\n this.className = rawProps.className.split(/\\s+/);\r\n }\r\n return true;\r\n };\r\n EventDef.prototype.applyMiscProps = function (rawProps) {\r\n $.extend(this.miscProps, rawProps);\r\n };\r\n EventDef.uuid = 0;\r\n EventDef.defineStandardProps = ParsableModelMixin_1.default.defineStandardProps;\r\n EventDef.copyVerbatimStandardProps = ParsableModelMixin_1.default.copyVerbatimStandardProps;\r\n return EventDef;\r\n}());\r\nexports.default = EventDef;\r\nParsableModelMixin_1.default.mixInto(EventDef);\r\nEventDef.defineStandardProps({\r\n // not automatically assigned (`false`)\r\n _id: false,\r\n id: false,\r\n className: false,\r\n source: false,\r\n // automatically assigned (`true`)\r\n title: true,\r\n url: true,\r\n rendering: true,\r\n constraint: true,\r\n overlap: true,\r\n editable: true,\r\n startEditable: true,\r\n durationEditable: true,\r\n color: true,\r\n backgroundColor: true,\r\n borderColor: true,\r\n textColor: true\r\n});\r\n\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.default = {\r\n sourceClasses: [],\r\n registerClass: function (EventSourceClass) {\r\n this.sourceClasses.unshift(EventSourceClass); // give highest priority\r\n },\r\n parse: function (rawInput, calendar) {\r\n var sourceClasses = this.sourceClasses;\r\n var i;\r\n var eventSource;\r\n for (i = 0; i < sourceClasses.length; i++) {\r\n eventSource = sourceClasses[i].parse(rawInput, calendar);\r\n if (eventSource) {\r\n return eventSource;\r\n }\r\n }\r\n }\r\n};\r\n\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar util_1 = __webpack_require__(4);\r\nvar EventDateProfile_1 = __webpack_require__(16);\r\nvar EventDef_1 = __webpack_require__(37);\r\nvar EventDefDateMutation_1 = __webpack_require__(40);\r\nvar SingleEventDef_1 = __webpack_require__(9);\r\nvar EventDefMutation = /** @class */ (function () {\r\n function EventDefMutation() {\r\n }\r\n EventDefMutation.createFromRawProps = function (eventInstance, rawProps, largeUnit) {\r\n var eventDef = eventInstance.def;\r\n var dateProps = {};\r\n var standardProps = {};\r\n var miscProps = {};\r\n var verbatimStandardProps = {};\r\n var eventDefId = null;\r\n var className = null;\r\n var propName;\r\n var dateProfile;\r\n var dateMutation;\r\n var defMutation;\r\n for (propName in rawProps) {\r\n if (EventDateProfile_1.default.isStandardProp(propName)) {\r\n dateProps[propName] = rawProps[propName];\r\n }\r\n else if (eventDef.isStandardProp(propName)) {\r\n standardProps[propName] = rawProps[propName];\r\n }\r\n else if (eventDef.miscProps[propName] !== rawProps[propName]) { // only if changed\r\n miscProps[propName] = rawProps[propName];\r\n }\r\n }\r\n dateProfile = EventDateProfile_1.default.parse(dateProps, eventDef.source);\r\n if (dateProfile) { // no failure?\r\n dateMutation = EventDefDateMutation_1.default.createFromDiff(eventInstance.dateProfile, dateProfile, largeUnit);\r\n }\r\n if (standardProps.id !== eventDef.id) {\r\n eventDefId = standardProps.id; // only apply if there's a change\r\n }\r\n if (!util_1.isArraysEqual(standardProps.className, eventDef.className)) {\r\n className = standardProps.className; // only apply if there's a change\r\n }\r\n EventDef_1.default.copyVerbatimStandardProps(standardProps, // src\r\n verbatimStandardProps // dest\r\n );\r\n defMutation = new EventDefMutation();\r\n defMutation.eventDefId = eventDefId;\r\n defMutation.className = className;\r\n defMutation.verbatimStandardProps = verbatimStandardProps;\r\n defMutation.miscProps = miscProps;\r\n if (dateMutation) {\r\n defMutation.dateMutation = dateMutation;\r\n }\r\n return defMutation;\r\n };\r\n /*\r\n eventDef assumed to be a SingleEventDef.\r\n returns an undo function.\r\n */\r\n EventDefMutation.prototype.mutateSingle = function (eventDef) {\r\n var origDateProfile;\r\n if (this.dateMutation) {\r\n origDateProfile = eventDef.dateProfile;\r\n eventDef.dateProfile = this.dateMutation.buildNewDateProfile(origDateProfile, eventDef.source.calendar);\r\n }\r\n // can't undo\r\n // TODO: more DRY with EventDef::applyManualStandardProps\r\n if (this.eventDefId != null) {\r\n eventDef.id = EventDef_1.default.normalizeId((eventDef.rawId = this.eventDefId));\r\n }\r\n // can't undo\r\n // TODO: more DRY with EventDef::applyManualStandardProps\r\n if (this.className) {\r\n eventDef.className = this.className;\r\n }\r\n // can't undo\r\n if (this.verbatimStandardProps) {\r\n SingleEventDef_1.default.copyVerbatimStandardProps(this.verbatimStandardProps, // src\r\n eventDef // dest\r\n );\r\n }\r\n // can't undo\r\n if (this.miscProps) {\r\n eventDef.applyMiscProps(this.miscProps);\r\n }\r\n if (origDateProfile) {\r\n return function () {\r\n eventDef.dateProfile = origDateProfile;\r\n };\r\n }\r\n else {\r\n return function () { };\r\n }\r\n };\r\n EventDefMutation.prototype.setDateMutation = function (dateMutation) {\r\n if (dateMutation && !dateMutation.isEmpty()) {\r\n this.dateMutation = dateMutation;\r\n }\r\n else {\r\n this.dateMutation = null;\r\n }\r\n };\r\n EventDefMutation.prototype.isEmpty = function () {\r\n return !this.dateMutation;\r\n };\r\n return EventDefMutation;\r\n}());\r\nexports.default = EventDefMutation;\r\n\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar util_1 = __webpack_require__(4);\r\nvar EventDateProfile_1 = __webpack_require__(16);\r\nvar EventDefDateMutation = /** @class */ (function () {\r\n function EventDefDateMutation() {\r\n this.clearEnd = false;\r\n this.forceTimed = false;\r\n this.forceAllDay = false;\r\n }\r\n EventDefDateMutation.createFromDiff = function (dateProfile0, dateProfile1, largeUnit) {\r\n var clearEnd = dateProfile0.end && !dateProfile1.end;\r\n var forceTimed = dateProfile0.isAllDay() && !dateProfile1.isAllDay();\r\n var forceAllDay = !dateProfile0.isAllDay() && dateProfile1.isAllDay();\r\n var dateDelta;\r\n var endDiff;\r\n var endDelta;\r\n var mutation;\r\n // subtracts the dates in the appropriate way, returning a duration\r\n function subtractDates(date1, date0) {\r\n if (largeUnit) {\r\n return util_1.diffByUnit(date1, date0, largeUnit); // poorly named\r\n }\r\n else if (dateProfile1.isAllDay()) {\r\n return util_1.diffDay(date1, date0); // poorly named\r\n }\r\n else {\r\n return util_1.diffDayTime(date1, date0); // poorly named\r\n }\r\n }\r\n dateDelta = subtractDates(dateProfile1.start, dateProfile0.start);\r\n if (dateProfile1.end) {\r\n // use unzonedRanges because dateProfile0.end might be null\r\n endDiff = subtractDates(dateProfile1.unzonedRange.getEnd(), dateProfile0.unzonedRange.getEnd());\r\n endDelta = endDiff.subtract(dateDelta);\r\n }\r\n mutation = new EventDefDateMutation();\r\n mutation.clearEnd = clearEnd;\r\n mutation.forceTimed = forceTimed;\r\n mutation.forceAllDay = forceAllDay;\r\n mutation.setDateDelta(dateDelta);\r\n mutation.setEndDelta(endDelta);\r\n return mutation;\r\n };\r\n /*\r\n returns an undo function.\r\n */\r\n EventDefDateMutation.prototype.buildNewDateProfile = function (eventDateProfile, calendar) {\r\n var start = eventDateProfile.start.clone();\r\n var end = null;\r\n var shouldRezone = false;\r\n if (eventDateProfile.end && !this.clearEnd) {\r\n end = eventDateProfile.end.clone();\r\n }\r\n else if (this.endDelta && !end) {\r\n end = calendar.getDefaultEventEnd(eventDateProfile.isAllDay(), start);\r\n }\r\n if (this.forceTimed) {\r\n shouldRezone = true;\r\n if (!start.hasTime()) {\r\n start.time(0);\r\n }\r\n if (end && !end.hasTime()) {\r\n end.time(0);\r\n }\r\n }\r\n else if (this.forceAllDay) {\r\n if (start.hasTime()) {\r\n start.stripTime();\r\n }\r\n if (end && end.hasTime()) {\r\n end.stripTime();\r\n }\r\n }\r\n if (this.dateDelta) {\r\n shouldRezone = true;\r\n start.add(this.dateDelta);\r\n if (end) {\r\n end.add(this.dateDelta);\r\n }\r\n }\r\n // do this before adding startDelta to start, so we can work off of start\r\n if (this.endDelta) {\r\n shouldRezone = true;\r\n end.add(this.endDelta);\r\n }\r\n if (this.startDelta) {\r\n shouldRezone = true;\r\n start.add(this.startDelta);\r\n }\r\n if (shouldRezone) {\r\n start = calendar.applyTimezone(start);\r\n if (end) {\r\n end = calendar.applyTimezone(end);\r\n }\r\n }\r\n // TODO: okay to access calendar option?\r\n if (!end && calendar.opt('forceEventDuration')) {\r\n end = calendar.getDefaultEventEnd(eventDateProfile.isAllDay(), start);\r\n }\r\n return new EventDateProfile_1.default(start, end, calendar);\r\n };\r\n EventDefDateMutation.prototype.setDateDelta = function (dateDelta) {\r\n if (dateDelta && dateDelta.valueOf()) {\r\n this.dateDelta = dateDelta;\r\n }\r\n else {\r\n this.dateDelta = null;\r\n }\r\n };\r\n EventDefDateMutation.prototype.setStartDelta = function (startDelta) {\r\n if (startDelta && startDelta.valueOf()) {\r\n this.startDelta = startDelta;\r\n }\r\n else {\r\n this.startDelta = null;\r\n }\r\n };\r\n EventDefDateMutation.prototype.setEndDelta = function (endDelta) {\r\n if (endDelta && endDelta.valueOf()) {\r\n this.endDelta = endDelta;\r\n }\r\n else {\r\n this.endDelta = null;\r\n }\r\n };\r\n EventDefDateMutation.prototype.isEmpty = function () {\r\n return !this.clearEnd && !this.forceTimed && !this.forceAllDay &&\r\n !this.dateDelta && !this.startDelta && !this.endDelta;\r\n };\r\n return EventDefDateMutation;\r\n}());\r\nexports.default = EventDefDateMutation;\r\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar Class_1 = __webpack_require__(35);\r\n/*\r\nEmbodies a div that has potential scrollbars\r\n*/\r\nvar Scroller = /** @class */ (function (_super) {\r\n tslib_1.__extends(Scroller, _super);\r\n function Scroller(options) {\r\n var _this = _super.call(this) || this;\r\n options = options || {};\r\n _this.overflowX = options.overflowX || options.overflow || 'auto';\r\n _this.overflowY = options.overflowY || options.overflow || 'auto';\r\n return _this;\r\n }\r\n Scroller.prototype.render = function () {\r\n this.el = this.renderEl();\r\n this.applyOverflow();\r\n };\r\n Scroller.prototype.renderEl = function () {\r\n return (this.scrollEl = $('<div class=\"fc-scroller\"></div>'));\r\n };\r\n // sets to natural height, unlocks overflow\r\n Scroller.prototype.clear = function () {\r\n this.setHeight('auto');\r\n this.applyOverflow();\r\n };\r\n Scroller.prototype.destroy = function () {\r\n this.el.remove();\r\n };\r\n // Overflow\r\n // -----------------------------------------------------------------------------------------------------------------\r\n Scroller.prototype.applyOverflow = function () {\r\n this.scrollEl.css({\r\n 'overflow-x': this.overflowX,\r\n 'overflow-y': this.overflowY\r\n });\r\n };\r\n // Causes any 'auto' overflow values to resolves to 'scroll' or 'hidden'.\r\n // Useful for preserving scrollbar widths regardless of future resizes.\r\n // Can pass in scrollbarWidths for optimization.\r\n Scroller.prototype.lockOverflow = function (scrollbarWidths) {\r\n var overflowX = this.overflowX;\r\n var overflowY = this.overflowY;\r\n scrollbarWidths = scrollbarWidths || this.getScrollbarWidths();\r\n if (overflowX === 'auto') {\r\n overflowX = (scrollbarWidths.top || scrollbarWidths.bottom || // horizontal scrollbars?\r\n // OR scrolling pane with massless scrollbars?\r\n this.scrollEl[0].scrollWidth - 1 > this.scrollEl[0].clientWidth\r\n // subtract 1 because of IE off-by-one issue\r\n ) ? 'scroll' : 'hidden';\r\n }\r\n if (overflowY === 'auto') {\r\n overflowY = (scrollbarWidths.left || scrollbarWidths.right || // vertical scrollbars?\r\n // OR scrolling pane with massless scrollbars?\r\n this.scrollEl[0].scrollHeight - 1 > this.scrollEl[0].clientHeight\r\n // subtract 1 because of IE off-by-one issue\r\n ) ? 'scroll' : 'hidden';\r\n }\r\n this.scrollEl.css({ 'overflow-x': overflowX, 'overflow-y': overflowY });\r\n };\r\n // Getters / Setters\r\n // -----------------------------------------------------------------------------------------------------------------\r\n Scroller.prototype.setHeight = function (height) {\r\n this.scrollEl.height(height);\r\n };\r\n Scroller.prototype.getScrollTop = function () {\r\n return this.scrollEl.scrollTop();\r\n };\r\n Scroller.prototype.setScrollTop = function (top) {\r\n this.scrollEl.scrollTop(top);\r\n };\r\n Scroller.prototype.getClientWidth = function () {\r\n return this.scrollEl[0].clientWidth;\r\n };\r\n Scroller.prototype.getClientHeight = function () {\r\n return this.scrollEl[0].clientHeight;\r\n };\r\n Scroller.prototype.getScrollbarWidths = function () {\r\n return util_1.getScrollbarWidths(this.scrollEl);\r\n };\r\n return Scroller;\r\n}(Class_1.default));\r\nexports.default = Scroller;\r\n\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar DateComponent_1 = __webpack_require__(231);\r\nvar GlobalEmitter_1 = __webpack_require__(23);\r\nvar InteractiveDateComponent = /** @class */ (function (_super) {\r\n tslib_1.__extends(InteractiveDateComponent, _super);\r\n function InteractiveDateComponent(_view, _options) {\r\n var _this = _super.call(this, _view, _options) || this;\r\n // self-config, overridable by subclasses\r\n _this.segSelector = '.fc-event-container > *'; // what constitutes an event element?\r\n if (_this.dateSelectingClass) {\r\n _this.dateClicking = new _this.dateClickingClass(_this);\r\n }\r\n if (_this.dateSelectingClass) {\r\n _this.dateSelecting = new _this.dateSelectingClass(_this);\r\n }\r\n if (_this.eventPointingClass) {\r\n _this.eventPointing = new _this.eventPointingClass(_this);\r\n }\r\n if (_this.eventDraggingClass && _this.eventPointing) {\r\n _this.eventDragging = new _this.eventDraggingClass(_this, _this.eventPointing);\r\n }\r\n if (_this.eventResizingClass && _this.eventPointing) {\r\n _this.eventResizing = new _this.eventResizingClass(_this, _this.eventPointing);\r\n }\r\n if (_this.externalDroppingClass) {\r\n _this.externalDropping = new _this.externalDroppingClass(_this);\r\n }\r\n return _this;\r\n }\r\n // Sets the container element that the view should render inside of, does global DOM-related initializations,\r\n // and renders all the non-date-related content inside.\r\n InteractiveDateComponent.prototype.setElement = function (el) {\r\n _super.prototype.setElement.call(this, el);\r\n if (this.dateClicking) {\r\n this.dateClicking.bindToEl(el);\r\n }\r\n if (this.dateSelecting) {\r\n this.dateSelecting.bindToEl(el);\r\n }\r\n this.bindAllSegHandlersToEl(el);\r\n };\r\n InteractiveDateComponent.prototype.removeElement = function () {\r\n this.endInteractions();\r\n _super.prototype.removeElement.call(this);\r\n };\r\n InteractiveDateComponent.prototype.executeEventUnrender = function () {\r\n this.endInteractions();\r\n _super.prototype.executeEventUnrender.call(this);\r\n };\r\n InteractiveDateComponent.prototype.bindGlobalHandlers = function () {\r\n _super.prototype.bindGlobalHandlers.call(this);\r\n if (this.externalDropping) {\r\n this.externalDropping.bindToDocument();\r\n }\r\n };\r\n InteractiveDateComponent.prototype.unbindGlobalHandlers = function () {\r\n _super.prototype.unbindGlobalHandlers.call(this);\r\n if (this.externalDropping) {\r\n this.externalDropping.unbindFromDocument();\r\n }\r\n };\r\n InteractiveDateComponent.prototype.bindDateHandlerToEl = function (el, name, handler) {\r\n var _this = this;\r\n // attach a handler to the grid's root element.\r\n // jQuery will take care of unregistering them when removeElement gets called.\r\n this.el.on(name, function (ev) {\r\n if (!$(ev.target).is(_this.segSelector + ':not(.fc-helper),' + // directly on an event element\r\n _this.segSelector + ':not(.fc-helper) *,' + // within an event element\r\n '.fc-more,' + // a \"more..\" link\r\n 'a[data-goto]' // a clickable nav link\r\n )) {\r\n return handler.call(_this, ev);\r\n }\r\n });\r\n };\r\n InteractiveDateComponent.prototype.bindAllSegHandlersToEl = function (el) {\r\n [\r\n this.eventPointing,\r\n this.eventDragging,\r\n this.eventResizing\r\n ].forEach(function (eventInteraction) {\r\n if (eventInteraction) {\r\n eventInteraction.bindToEl(el);\r\n }\r\n });\r\n };\r\n InteractiveDateComponent.prototype.bindSegHandlerToEl = function (el, name, handler) {\r\n var _this = this;\r\n el.on(name, this.segSelector, function (ev) {\r\n var segEl = $(ev.currentTarget);\r\n if (!segEl.is('.fc-helper')) {\r\n var seg = segEl.data('fc-seg'); // grab segment data. put there by View::renderEventsPayload\r\n if (seg && !_this.shouldIgnoreEventPointing()) {\r\n return handler.call(_this, seg, ev); // context will be the Grid\r\n }\r\n }\r\n });\r\n };\r\n InteractiveDateComponent.prototype.shouldIgnoreMouse = function () {\r\n // HACK\r\n // This will still work even though bindDateHandlerToEl doesn't use GlobalEmitter.\r\n return GlobalEmitter_1.default.get().shouldIgnoreMouse();\r\n };\r\n InteractiveDateComponent.prototype.shouldIgnoreTouch = function () {\r\n var view = this._getView();\r\n // On iOS (and Android?) when a new selection is initiated overtop another selection,\r\n // the touchend never fires because the elements gets removed mid-touch-interaction (my theory).\r\n // HACK: simply don't allow this to happen.\r\n // ALSO: prevent selection when an *event* is already raised.\r\n return view.isSelected || view.selectedEvent;\r\n };\r\n InteractiveDateComponent.prototype.shouldIgnoreEventPointing = function () {\r\n // only call the handlers if there is not a drag/resize in progress\r\n return (this.eventDragging && this.eventDragging.isDragging) ||\r\n (this.eventResizing && this.eventResizing.isResizing);\r\n };\r\n InteractiveDateComponent.prototype.canStartSelection = function (seg, ev) {\r\n return util_1.getEvIsTouch(ev) &&\r\n !this.canStartResize(seg, ev) &&\r\n (this.isEventDefDraggable(seg.footprint.eventDef) ||\r\n this.isEventDefResizable(seg.footprint.eventDef));\r\n };\r\n InteractiveDateComponent.prototype.canStartDrag = function (seg, ev) {\r\n return !this.canStartResize(seg, ev) &&\r\n this.isEventDefDraggable(seg.footprint.eventDef);\r\n };\r\n InteractiveDateComponent.prototype.canStartResize = function (seg, ev) {\r\n var view = this._getView();\r\n var eventDef = seg.footprint.eventDef;\r\n return (!util_1.getEvIsTouch(ev) || view.isEventDefSelected(eventDef)) &&\r\n this.isEventDefResizable(eventDef) &&\r\n $(ev.target).is('.fc-resizer');\r\n };\r\n // Kills all in-progress dragging.\r\n // Useful for when public API methods that result in re-rendering are invoked during a drag.\r\n // Also useful for when touch devices misbehave and don't fire their touchend.\r\n InteractiveDateComponent.prototype.endInteractions = function () {\r\n [\r\n this.dateClicking,\r\n this.dateSelecting,\r\n this.eventPointing,\r\n this.eventDragging,\r\n this.eventResizing\r\n ].forEach(function (interaction) {\r\n if (interaction) {\r\n interaction.end();\r\n }\r\n });\r\n };\r\n // Event Drag-n-Drop\r\n // ---------------------------------------------------------------------------------------------------------------\r\n // Computes if the given event is allowed to be dragged by the user\r\n InteractiveDateComponent.prototype.isEventDefDraggable = function (eventDef) {\r\n return this.isEventDefStartEditable(eventDef);\r\n };\r\n InteractiveDateComponent.prototype.isEventDefStartEditable = function (eventDef) {\r\n var isEditable = eventDef.isStartExplicitlyEditable();\r\n if (isEditable == null) {\r\n isEditable = this.opt('eventStartEditable');\r\n if (isEditable == null) {\r\n isEditable = this.isEventDefGenerallyEditable(eventDef);\r\n }\r\n }\r\n return isEditable;\r\n };\r\n InteractiveDateComponent.prototype.isEventDefGenerallyEditable = function (eventDef) {\r\n var isEditable = eventDef.isExplicitlyEditable();\r\n if (isEditable == null) {\r\n isEditable = this.opt('editable');\r\n }\r\n return isEditable;\r\n };\r\n // Event Resizing\r\n // ---------------------------------------------------------------------------------------------------------------\r\n // Computes if the given event is allowed to be resized from its starting edge\r\n InteractiveDateComponent.prototype.isEventDefResizableFromStart = function (eventDef) {\r\n return this.opt('eventResizableFromStart') && this.isEventDefResizable(eventDef);\r\n };\r\n // Computes if the given event is allowed to be resized from its ending edge\r\n InteractiveDateComponent.prototype.isEventDefResizableFromEnd = function (eventDef) {\r\n return this.isEventDefResizable(eventDef);\r\n };\r\n // Computes if the given event is allowed to be resized by the user at all\r\n InteractiveDateComponent.prototype.isEventDefResizable = function (eventDef) {\r\n var isResizable = eventDef.isDurationExplicitlyEditable();\r\n if (isResizable == null) {\r\n isResizable = this.opt('eventDurationEditable');\r\n if (isResizable == null) {\r\n isResizable = this.isEventDefGenerallyEditable(eventDef);\r\n }\r\n }\r\n return isResizable;\r\n };\r\n // Event Mutation / Constraints\r\n // ---------------------------------------------------------------------------------------------------------------\r\n // Diffs the two dates, returning a duration, based on granularity of the grid\r\n // TODO: port isTimeScale into this system?\r\n InteractiveDateComponent.prototype.diffDates = function (a, b) {\r\n if (this.largeUnit) {\r\n return util_1.diffByUnit(a, b, this.largeUnit);\r\n }\r\n else {\r\n return util_1.diffDayTime(a, b);\r\n }\r\n };\r\n // is it allowed, in relation to the view's validRange?\r\n // NOTE: very similar to isExternalInstanceGroupAllowed\r\n InteractiveDateComponent.prototype.isEventInstanceGroupAllowed = function (eventInstanceGroup) {\r\n var view = this._getView();\r\n var dateProfile = this.dateProfile;\r\n var eventFootprints = this.eventRangesToEventFootprints(eventInstanceGroup.getAllEventRanges());\r\n var i;\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n // TODO: just use getAllEventRanges directly\r\n if (!dateProfile.validUnzonedRange.containsRange(eventFootprints[i].componentFootprint.unzonedRange)) {\r\n return false;\r\n }\r\n }\r\n return view.calendar.constraints.isEventInstanceGroupAllowed(eventInstanceGroup);\r\n };\r\n // NOTE: very similar to isEventInstanceGroupAllowed\r\n // when it's a completely anonymous external drag, no event.\r\n InteractiveDateComponent.prototype.isExternalInstanceGroupAllowed = function (eventInstanceGroup) {\r\n var view = this._getView();\r\n var dateProfile = this.dateProfile;\r\n var eventFootprints = this.eventRangesToEventFootprints(eventInstanceGroup.getAllEventRanges());\r\n var i;\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n if (!dateProfile.validUnzonedRange.containsRange(eventFootprints[i].componentFootprint.unzonedRange)) {\r\n return false;\r\n }\r\n }\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n // treat it as a selection\r\n // TODO: pass in eventInstanceGroup instead\r\n // because we don't want calendar's constraint system to depend on a component's\r\n // determination of footprints.\r\n if (!view.calendar.constraints.isSelectionFootprintAllowed(eventFootprints[i].componentFootprint)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n return InteractiveDateComponent;\r\n}(DateComponent_1.default));\r\nexports.default = InteractiveDateComponent;\r\n\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar moment = __webpack_require__(0);\r\nvar util_1 = __webpack_require__(4);\r\nvar RenderQueue_1 = __webpack_require__(229);\r\nvar DateProfileGenerator_1 = __webpack_require__(55);\r\nvar InteractiveDateComponent_1 = __webpack_require__(42);\r\nvar GlobalEmitter_1 = __webpack_require__(23);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\n/* An abstract class from which other views inherit from\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nvar View = /** @class */ (function (_super) {\r\n tslib_1.__extends(View, _super);\r\n function View(calendar, viewSpec) {\r\n var _this = _super.call(this, null, viewSpec.options) || this;\r\n _this.batchRenderDepth = 0;\r\n _this.isSelected = false; // boolean whether a range of time is user-selected or not\r\n _this.calendar = calendar;\r\n _this.viewSpec = viewSpec;\r\n // shortcuts\r\n _this.type = viewSpec.type;\r\n // .name is deprecated\r\n _this.name = _this.type;\r\n _this.initRenderQueue();\r\n _this.initHiddenDays();\r\n _this.dateProfileGenerator = new _this.dateProfileGeneratorClass(_this);\r\n _this.bindBaseRenderHandlers();\r\n _this.eventOrderSpecs = util_1.parseFieldSpecs(_this.opt('eventOrder'));\r\n // legacy\r\n if (_this['initialize']) {\r\n _this['initialize']();\r\n }\r\n return _this;\r\n }\r\n View.prototype._getView = function () {\r\n return this;\r\n };\r\n // Retrieves an option with the given name\r\n View.prototype.opt = function (name) {\r\n return this.options[name];\r\n };\r\n /* Render Queue\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n View.prototype.initRenderQueue = function () {\r\n this.renderQueue = new RenderQueue_1.default({\r\n event: this.opt('eventRenderWait')\r\n });\r\n this.renderQueue.on('start', this.onRenderQueueStart.bind(this));\r\n this.renderQueue.on('stop', this.onRenderQueueStop.bind(this));\r\n this.on('before:change', this.startBatchRender);\r\n this.on('change', this.stopBatchRender);\r\n };\r\n View.prototype.onRenderQueueStart = function () {\r\n this.calendar.freezeContentHeight();\r\n this.addScroll(this.queryScroll());\r\n };\r\n View.prototype.onRenderQueueStop = function () {\r\n if (this.calendar.updateViewSize()) { // success?\r\n this.popScroll();\r\n }\r\n this.calendar.thawContentHeight();\r\n };\r\n View.prototype.startBatchRender = function () {\r\n if (!(this.batchRenderDepth++)) {\r\n this.renderQueue.pause();\r\n }\r\n };\r\n View.prototype.stopBatchRender = function () {\r\n if (!(--this.batchRenderDepth)) {\r\n this.renderQueue.resume();\r\n }\r\n };\r\n View.prototype.requestRender = function (func, namespace, actionType) {\r\n this.renderQueue.queue(func, namespace, actionType);\r\n };\r\n // given func will auto-bind to `this`\r\n View.prototype.whenSizeUpdated = function (func) {\r\n if (this.renderQueue.isRunning) {\r\n this.renderQueue.one('stop', func.bind(this));\r\n }\r\n else {\r\n func.call(this);\r\n }\r\n };\r\n /* Title and Date Formatting\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Computes what the title at the top of the calendar should be for this view\r\n View.prototype.computeTitle = function (dateProfile) {\r\n var unzonedRange;\r\n // for views that span a large unit of time, show the proper interval, ignoring stray days before and after\r\n if (/^(year|month)$/.test(dateProfile.currentRangeUnit)) {\r\n unzonedRange = dateProfile.currentUnzonedRange;\r\n }\r\n else { // for day units or smaller, use the actual day range\r\n unzonedRange = dateProfile.activeUnzonedRange;\r\n }\r\n return this.formatRange({\r\n start: this.calendar.msToMoment(unzonedRange.startMs, dateProfile.isRangeAllDay),\r\n end: this.calendar.msToMoment(unzonedRange.endMs, dateProfile.isRangeAllDay)\r\n }, dateProfile.isRangeAllDay, this.opt('titleFormat') || this.computeTitleFormat(dateProfile), this.opt('titleRangeSeparator'));\r\n };\r\n // Generates the format string that should be used to generate the title for the current date range.\r\n // Attempts to compute the most appropriate format if not explicitly specified with `titleFormat`.\r\n View.prototype.computeTitleFormat = function (dateProfile) {\r\n var currentRangeUnit = dateProfile.currentRangeUnit;\r\n if (currentRangeUnit === 'year') {\r\n return 'YYYY';\r\n }\r\n else if (currentRangeUnit === 'month') {\r\n return this.opt('monthYearFormat'); // like \"September 2014\"\r\n }\r\n else if (dateProfile.currentUnzonedRange.as('days') > 1) {\r\n return 'll'; // multi-day range. shorter, like \"Sep 9 - 10 2014\"\r\n }\r\n else {\r\n return 'LL'; // one day. longer, like \"September 9 2014\"\r\n }\r\n };\r\n // Date Setting/Unsetting\r\n // -----------------------------------------------------------------------------------------------------------------\r\n View.prototype.setDate = function (date) {\r\n var currentDateProfile = this.get('dateProfile');\r\n var newDateProfile = this.dateProfileGenerator.build(date, undefined, true); // forceToValid=true\r\n if (!currentDateProfile ||\r\n !currentDateProfile.activeUnzonedRange.equals(newDateProfile.activeUnzonedRange)) {\r\n this.set('dateProfile', newDateProfile);\r\n }\r\n };\r\n View.prototype.unsetDate = function () {\r\n this.unset('dateProfile');\r\n };\r\n // Event Data\r\n // -----------------------------------------------------------------------------------------------------------------\r\n View.prototype.fetchInitialEvents = function (dateProfile) {\r\n var calendar = this.calendar;\r\n var forceAllDay = dateProfile.isRangeAllDay && !this.usesMinMaxTime;\r\n return calendar.requestEvents(calendar.msToMoment(dateProfile.activeUnzonedRange.startMs, forceAllDay), calendar.msToMoment(dateProfile.activeUnzonedRange.endMs, forceAllDay));\r\n };\r\n View.prototype.bindEventChanges = function () {\r\n this.listenTo(this.calendar, 'eventsReset', this.resetEvents); // TODO: make this a real event\r\n };\r\n View.prototype.unbindEventChanges = function () {\r\n this.stopListeningTo(this.calendar, 'eventsReset');\r\n };\r\n View.prototype.setEvents = function (eventsPayload) {\r\n this.set('currentEvents', eventsPayload);\r\n this.set('hasEvents', true);\r\n };\r\n View.prototype.unsetEvents = function () {\r\n this.unset('currentEvents');\r\n this.unset('hasEvents');\r\n };\r\n View.prototype.resetEvents = function (eventsPayload) {\r\n this.startBatchRender();\r\n this.unsetEvents();\r\n this.setEvents(eventsPayload);\r\n this.stopBatchRender();\r\n };\r\n // Date High-level Rendering\r\n // -----------------------------------------------------------------------------------------------------------------\r\n View.prototype.requestDateRender = function (dateProfile) {\r\n var _this = this;\r\n this.requestRender(function () {\r\n _this.executeDateRender(dateProfile);\r\n }, 'date', 'init');\r\n };\r\n View.prototype.requestDateUnrender = function () {\r\n var _this = this;\r\n this.requestRender(function () {\r\n _this.executeDateUnrender();\r\n }, 'date', 'destroy');\r\n };\r\n // if dateProfile not specified, uses current\r\n View.prototype.executeDateRender = function (dateProfile) {\r\n _super.prototype.executeDateRender.call(this, dateProfile);\r\n if (this['render']) {\r\n this['render'](); // TODO: deprecate\r\n }\r\n this.trigger('datesRendered');\r\n this.addScroll({ isDateInit: true });\r\n this.startNowIndicator(); // shouldn't render yet because updateSize will be called soon\r\n };\r\n View.prototype.executeDateUnrender = function () {\r\n this.unselect();\r\n this.stopNowIndicator();\r\n this.trigger('before:datesUnrendered');\r\n if (this['destroy']) {\r\n this['destroy'](); // TODO: deprecate\r\n }\r\n _super.prototype.executeDateUnrender.call(this);\r\n };\r\n // \"Base\" rendering\r\n // -----------------------------------------------------------------------------------------------------------------\r\n View.prototype.bindBaseRenderHandlers = function () {\r\n var _this = this;\r\n this.on('datesRendered', function () {\r\n _this.whenSizeUpdated(_this.triggerViewRender);\r\n });\r\n this.on('before:datesUnrendered', function () {\r\n _this.triggerViewDestroy();\r\n });\r\n };\r\n View.prototype.triggerViewRender = function () {\r\n this.publiclyTrigger('viewRender', {\r\n context: this,\r\n args: [this, this.el]\r\n });\r\n };\r\n View.prototype.triggerViewDestroy = function () {\r\n this.publiclyTrigger('viewDestroy', {\r\n context: this,\r\n args: [this, this.el]\r\n });\r\n };\r\n // Event High-level Rendering\r\n // -----------------------------------------------------------------------------------------------------------------\r\n View.prototype.requestEventsRender = function (eventsPayload) {\r\n var _this = this;\r\n this.requestRender(function () {\r\n _this.executeEventRender(eventsPayload);\r\n _this.whenSizeUpdated(_this.triggerAfterEventsRendered);\r\n }, 'event', 'init');\r\n };\r\n View.prototype.requestEventsUnrender = function () {\r\n var _this = this;\r\n this.requestRender(function () {\r\n _this.triggerBeforeEventsDestroyed();\r\n _this.executeEventUnrender();\r\n }, 'event', 'destroy');\r\n };\r\n // Business Hour High-level Rendering\r\n // -----------------------------------------------------------------------------------------------------------------\r\n View.prototype.requestBusinessHoursRender = function (businessHourGenerator) {\r\n var _this = this;\r\n this.requestRender(function () {\r\n _this.renderBusinessHours(businessHourGenerator);\r\n }, 'businessHours', 'init');\r\n };\r\n View.prototype.requestBusinessHoursUnrender = function () {\r\n var _this = this;\r\n this.requestRender(function () {\r\n _this.unrenderBusinessHours();\r\n }, 'businessHours', 'destroy');\r\n };\r\n // Misc view rendering utils\r\n // -----------------------------------------------------------------------------------------------------------------\r\n // Binds DOM handlers to elements that reside outside the view container, such as the document\r\n View.prototype.bindGlobalHandlers = function () {\r\n _super.prototype.bindGlobalHandlers.call(this);\r\n this.listenTo(GlobalEmitter_1.default.get(), {\r\n touchstart: this.processUnselect,\r\n mousedown: this.handleDocumentMousedown\r\n });\r\n };\r\n // Unbinds DOM handlers from elements that reside outside the view container\r\n View.prototype.unbindGlobalHandlers = function () {\r\n _super.prototype.unbindGlobalHandlers.call(this);\r\n this.stopListeningTo(GlobalEmitter_1.default.get());\r\n };\r\n /* Now Indicator\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Immediately render the current time indicator and begins re-rendering it at an interval,\r\n // which is defined by this.getNowIndicatorUnit().\r\n // TODO: somehow do this for the current whole day's background too\r\n View.prototype.startNowIndicator = function () {\r\n var _this = this;\r\n var unit;\r\n var update;\r\n var delay; // ms wait value\r\n if (this.opt('nowIndicator')) {\r\n unit = this.getNowIndicatorUnit();\r\n if (unit) {\r\n update = util_1.proxy(this, 'updateNowIndicator'); // bind to `this`\r\n this.initialNowDate = this.calendar.getNow();\r\n this.initialNowQueriedMs = new Date().valueOf();\r\n // wait until the beginning of the next interval\r\n delay = this.initialNowDate.clone().startOf(unit).add(1, unit).valueOf() - this.initialNowDate.valueOf();\r\n this.nowIndicatorTimeoutID = setTimeout(function () {\r\n _this.nowIndicatorTimeoutID = null;\r\n update();\r\n delay = +moment.duration(1, unit);\r\n delay = Math.max(100, delay); // prevent too frequent\r\n _this.nowIndicatorIntervalID = setInterval(update, delay); // update every interval\r\n }, delay);\r\n }\r\n // rendering will be initiated in updateSize\r\n }\r\n };\r\n // rerenders the now indicator, computing the new current time from the amount of time that has passed\r\n // since the initial getNow call.\r\n View.prototype.updateNowIndicator = function () {\r\n if (this.isDatesRendered &&\r\n this.initialNowDate // activated before?\r\n ) {\r\n this.unrenderNowIndicator(); // won't unrender if unnecessary\r\n this.renderNowIndicator(this.initialNowDate.clone().add(new Date().valueOf() - this.initialNowQueriedMs) // add ms\r\n );\r\n this.isNowIndicatorRendered = true;\r\n }\r\n };\r\n // Immediately unrenders the view's current time indicator and stops any re-rendering timers.\r\n // Won't cause side effects if indicator isn't rendered.\r\n View.prototype.stopNowIndicator = function () {\r\n if (this.isNowIndicatorRendered) {\r\n if (this.nowIndicatorTimeoutID) {\r\n clearTimeout(this.nowIndicatorTimeoutID);\r\n this.nowIndicatorTimeoutID = null;\r\n }\r\n if (this.nowIndicatorIntervalID) {\r\n clearInterval(this.nowIndicatorIntervalID);\r\n this.nowIndicatorIntervalID = null;\r\n }\r\n this.unrenderNowIndicator();\r\n this.isNowIndicatorRendered = false;\r\n }\r\n };\r\n /* Dimensions\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n View.prototype.updateSize = function (totalHeight, isAuto, isResize) {\r\n if (this['setHeight']) { // for legacy API\r\n this['setHeight'](totalHeight, isAuto);\r\n }\r\n else {\r\n _super.prototype.updateSize.call(this, totalHeight, isAuto, isResize);\r\n }\r\n this.updateNowIndicator();\r\n };\r\n /* Scroller\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n View.prototype.addScroll = function (scroll) {\r\n var queuedScroll = this.queuedScroll || (this.queuedScroll = {});\r\n $.extend(queuedScroll, scroll);\r\n };\r\n View.prototype.popScroll = function () {\r\n this.applyQueuedScroll();\r\n this.queuedScroll = null;\r\n };\r\n View.prototype.applyQueuedScroll = function () {\r\n if (this.queuedScroll) {\r\n this.applyScroll(this.queuedScroll);\r\n }\r\n };\r\n View.prototype.queryScroll = function () {\r\n var scroll = {};\r\n if (this.isDatesRendered) {\r\n $.extend(scroll, this.queryDateScroll());\r\n }\r\n return scroll;\r\n };\r\n View.prototype.applyScroll = function (scroll) {\r\n if (scroll.isDateInit && this.isDatesRendered) {\r\n $.extend(scroll, this.computeInitialDateScroll());\r\n }\r\n if (this.isDatesRendered) {\r\n this.applyDateScroll(scroll);\r\n }\r\n };\r\n View.prototype.computeInitialDateScroll = function () {\r\n return {}; // subclasses must implement\r\n };\r\n View.prototype.queryDateScroll = function () {\r\n return {}; // subclasses must implement\r\n };\r\n View.prototype.applyDateScroll = function (scroll) {\r\n // subclasses must implement\r\n };\r\n /* Event Drag-n-Drop\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n View.prototype.reportEventDrop = function (eventInstance, eventMutation, el, ev) {\r\n var eventManager = this.calendar.eventManager;\r\n var undoFunc = eventManager.mutateEventsWithId(eventInstance.def.id, eventMutation);\r\n var dateMutation = eventMutation.dateMutation;\r\n // update the EventInstance, for handlers\r\n if (dateMutation) {\r\n eventInstance.dateProfile = dateMutation.buildNewDateProfile(eventInstance.dateProfile, this.calendar);\r\n }\r\n this.triggerEventDrop(eventInstance, \r\n // a drop doesn't necessarily mean a date mutation (ex: resource change)\r\n (dateMutation && dateMutation.dateDelta) || moment.duration(), undoFunc, el, ev);\r\n };\r\n // Triggers event-drop handlers that have subscribed via the API\r\n View.prototype.triggerEventDrop = function (eventInstance, dateDelta, undoFunc, el, ev) {\r\n this.publiclyTrigger('eventDrop', {\r\n context: el[0],\r\n args: [\r\n eventInstance.toLegacy(),\r\n dateDelta,\r\n undoFunc,\r\n ev,\r\n {},\r\n this\r\n ]\r\n });\r\n };\r\n /* External Element Drag-n-Drop\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Must be called when an external element, via jQuery UI, has been dropped onto the calendar.\r\n // `meta` is the parsed data that has been embedded into the dragging event.\r\n // `dropLocation` is an object that contains the new zoned start/end/allDay values for the event.\r\n View.prototype.reportExternalDrop = function (singleEventDef, isEvent, isSticky, el, ev, ui) {\r\n if (isEvent) {\r\n this.calendar.eventManager.addEventDef(singleEventDef, isSticky);\r\n }\r\n this.triggerExternalDrop(singleEventDef, isEvent, el, ev, ui);\r\n };\r\n // Triggers external-drop handlers that have subscribed via the API\r\n View.prototype.triggerExternalDrop = function (singleEventDef, isEvent, el, ev, ui) {\r\n // trigger 'drop' regardless of whether element represents an event\r\n this.publiclyTrigger('drop', {\r\n context: el[0],\r\n args: [\r\n singleEventDef.dateProfile.start.clone(),\r\n ev,\r\n ui,\r\n this\r\n ]\r\n });\r\n if (isEvent) {\r\n // signal an external event landed\r\n this.publiclyTrigger('eventReceive', {\r\n context: this,\r\n args: [\r\n singleEventDef.buildInstance().toLegacy(),\r\n this\r\n ]\r\n });\r\n }\r\n };\r\n /* Event Resizing\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Must be called when an event in the view has been resized to a new length\r\n View.prototype.reportEventResize = function (eventInstance, eventMutation, el, ev) {\r\n var eventManager = this.calendar.eventManager;\r\n var undoFunc = eventManager.mutateEventsWithId(eventInstance.def.id, eventMutation);\r\n // update the EventInstance, for handlers\r\n eventInstance.dateProfile = eventMutation.dateMutation.buildNewDateProfile(eventInstance.dateProfile, this.calendar);\r\n var resizeDelta = eventMutation.dateMutation.endDelta || eventMutation.dateMutation.startDelta;\r\n this.triggerEventResize(eventInstance, resizeDelta, undoFunc, el, ev);\r\n };\r\n // Triggers event-resize handlers that have subscribed via the API\r\n View.prototype.triggerEventResize = function (eventInstance, resizeDelta, undoFunc, el, ev) {\r\n this.publiclyTrigger('eventResize', {\r\n context: el[0],\r\n args: [\r\n eventInstance.toLegacy(),\r\n resizeDelta,\r\n undoFunc,\r\n ev,\r\n {},\r\n this\r\n ]\r\n });\r\n };\r\n /* Selection (time range)\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Selects a date span on the view. `start` and `end` are both Moments.\r\n // `ev` is the native mouse event that begin the interaction.\r\n View.prototype.select = function (footprint, ev) {\r\n this.unselect(ev);\r\n this.renderSelectionFootprint(footprint);\r\n this.reportSelection(footprint, ev);\r\n };\r\n View.prototype.renderSelectionFootprint = function (footprint) {\r\n if (this['renderSelection']) { // legacy method in custom view classes\r\n this['renderSelection'](footprint.toLegacy(this.calendar));\r\n }\r\n else {\r\n _super.prototype.renderSelectionFootprint.call(this, footprint);\r\n }\r\n };\r\n // Called when a new selection is made. Updates internal state and triggers handlers.\r\n View.prototype.reportSelection = function (footprint, ev) {\r\n this.isSelected = true;\r\n this.triggerSelect(footprint, ev);\r\n };\r\n // Triggers handlers to 'select'\r\n View.prototype.triggerSelect = function (footprint, ev) {\r\n var dateProfile = this.calendar.footprintToDateProfile(footprint); // abuse of \"Event\"DateProfile?\r\n this.publiclyTrigger('select', {\r\n context: this,\r\n args: [\r\n dateProfile.start,\r\n dateProfile.end,\r\n ev,\r\n this\r\n ]\r\n });\r\n };\r\n // Undoes a selection. updates in the internal state and triggers handlers.\r\n // `ev` is the native mouse event that began the interaction.\r\n View.prototype.unselect = function (ev) {\r\n if (this.isSelected) {\r\n this.isSelected = false;\r\n if (this['destroySelection']) {\r\n this['destroySelection'](); // TODO: deprecate\r\n }\r\n this.unrenderSelection();\r\n this.publiclyTrigger('unselect', {\r\n context: this,\r\n args: [ev, this]\r\n });\r\n }\r\n };\r\n /* Event Selection\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n View.prototype.selectEventInstance = function (eventInstance) {\r\n if (!this.selectedEventInstance ||\r\n this.selectedEventInstance !== eventInstance) {\r\n this.unselectEventInstance();\r\n this.getEventSegs().forEach(function (seg) {\r\n if (seg.footprint.eventInstance === eventInstance &&\r\n seg.el // necessary?\r\n ) {\r\n seg.el.addClass('fc-selected');\r\n }\r\n });\r\n this.selectedEventInstance = eventInstance;\r\n }\r\n };\r\n View.prototype.unselectEventInstance = function () {\r\n if (this.selectedEventInstance) {\r\n this.getEventSegs().forEach(function (seg) {\r\n if (seg.el) { // necessary?\r\n seg.el.removeClass('fc-selected');\r\n }\r\n });\r\n this.selectedEventInstance = null;\r\n }\r\n };\r\n View.prototype.isEventDefSelected = function (eventDef) {\r\n // event references might change on refetchEvents(), while selectedEventInstance doesn't,\r\n // so compare IDs\r\n return this.selectedEventInstance && this.selectedEventInstance.def.id === eventDef.id;\r\n };\r\n /* Mouse / Touch Unselecting (time range & event unselection)\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // TODO: move consistently to down/start or up/end?\r\n // TODO: don't kill previous selection if touch scrolling\r\n View.prototype.handleDocumentMousedown = function (ev) {\r\n if (util_1.isPrimaryMouseButton(ev)) {\r\n this.processUnselect(ev);\r\n }\r\n };\r\n View.prototype.processUnselect = function (ev) {\r\n this.processRangeUnselect(ev);\r\n this.processEventUnselect(ev);\r\n };\r\n View.prototype.processRangeUnselect = function (ev) {\r\n var ignore;\r\n // is there a time-range selection?\r\n if (this.isSelected && this.opt('unselectAuto')) {\r\n // only unselect if the clicked element is not identical to or inside of an 'unselectCancel' element\r\n ignore = this.opt('unselectCancel');\r\n if (!ignore || !$(ev.target).closest(ignore).length) {\r\n this.unselect(ev);\r\n }\r\n }\r\n };\r\n View.prototype.processEventUnselect = function (ev) {\r\n if (this.selectedEventInstance) {\r\n if (!$(ev.target).closest('.fc-selected').length) {\r\n this.unselectEventInstance();\r\n }\r\n }\r\n };\r\n /* Triggers\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n View.prototype.triggerBaseRendered = function () {\r\n this.publiclyTrigger('viewRender', {\r\n context: this,\r\n args: [this, this.el]\r\n });\r\n };\r\n View.prototype.triggerBaseUnrendered = function () {\r\n this.publiclyTrigger('viewDestroy', {\r\n context: this,\r\n args: [this, this.el]\r\n });\r\n };\r\n // Triggers handlers to 'dayClick'\r\n // Span has start/end of the clicked area. Only the start is useful.\r\n View.prototype.triggerDayClick = function (footprint, dayEl, ev) {\r\n var dateProfile = this.calendar.footprintToDateProfile(footprint); // abuse of \"Event\"DateProfile?\r\n this.publiclyTrigger('dayClick', {\r\n context: dayEl,\r\n args: [dateProfile.start, ev, this]\r\n });\r\n };\r\n /* Date Utils\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // For DateComponent::getDayClasses\r\n View.prototype.isDateInOtherMonth = function (date, dateProfile) {\r\n return false;\r\n };\r\n // Arguments after name will be forwarded to a hypothetical function value\r\n // WARNING: passed-in arguments will be given to generator functions as-is and can cause side-effects.\r\n // Always clone your objects if you fear mutation.\r\n View.prototype.getUnzonedRangeOption = function (name) {\r\n var val = this.opt(name);\r\n if (typeof val === 'function') {\r\n val = val.apply(null, Array.prototype.slice.call(arguments, 1));\r\n }\r\n if (val) {\r\n return this.calendar.parseUnzonedRange(val);\r\n }\r\n };\r\n /* Hidden Days\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Initializes internal variables related to calculating hidden days-of-week\r\n View.prototype.initHiddenDays = function () {\r\n var hiddenDays = this.opt('hiddenDays') || []; // array of day-of-week indices that are hidden\r\n var isHiddenDayHash = []; // is the day-of-week hidden? (hash with day-of-week-index -> bool)\r\n var dayCnt = 0;\r\n var i;\r\n if (this.opt('weekends') === false) {\r\n hiddenDays.push(0, 6); // 0=sunday, 6=saturday\r\n }\r\n for (i = 0; i < 7; i++) {\r\n if (!(isHiddenDayHash[i] = $.inArray(i, hiddenDays) !== -1)) {\r\n dayCnt++;\r\n }\r\n }\r\n if (!dayCnt) {\r\n throw new Error('invalid hiddenDays'); // all days were hidden? bad.\r\n }\r\n this.isHiddenDayHash = isHiddenDayHash;\r\n };\r\n // Remove days from the beginning and end of the range that are computed as hidden.\r\n // If the whole range is trimmed off, returns null\r\n View.prototype.trimHiddenDays = function (inputUnzonedRange) {\r\n var start = inputUnzonedRange.getStart();\r\n var end = inputUnzonedRange.getEnd();\r\n if (start) {\r\n start = this.skipHiddenDays(start);\r\n }\r\n if (end) {\r\n end = this.skipHiddenDays(end, -1, true);\r\n }\r\n if (start === null || end === null || start < end) {\r\n return new UnzonedRange_1.default(start, end);\r\n }\r\n return null;\r\n };\r\n // Is the current day hidden?\r\n // `day` is a day-of-week index (0-6), or a Moment\r\n View.prototype.isHiddenDay = function (day) {\r\n if (moment.isMoment(day)) {\r\n day = day.day();\r\n }\r\n return this.isHiddenDayHash[day];\r\n };\r\n // Incrementing the current day until it is no longer a hidden day, returning a copy.\r\n // DOES NOT CONSIDER validUnzonedRange!\r\n // If the initial value of `date` is not a hidden day, don't do anything.\r\n // Pass `isExclusive` as `true` if you are dealing with an end date.\r\n // `inc` defaults to `1` (increment one day forward each time)\r\n View.prototype.skipHiddenDays = function (date, inc, isExclusive) {\r\n if (inc === void 0) { inc = 1; }\r\n if (isExclusive === void 0) { isExclusive = false; }\r\n var out = date.clone();\r\n while (this.isHiddenDayHash[(out.day() + (isExclusive ? inc : 0) + 7) % 7]) {\r\n out.add(inc, 'days');\r\n }\r\n return out;\r\n };\r\n return View;\r\n}(InteractiveDateComponent_1.default));\r\nexports.default = View;\r\nView.prototype.usesMinMaxTime = false;\r\nView.prototype.dateProfileGeneratorClass = DateProfileGenerator_1.default;\r\nView.watch('displayingDates', ['isInDom', 'dateProfile'], function (deps) {\r\n this.requestDateRender(deps.dateProfile);\r\n}, function () {\r\n this.requestDateUnrender();\r\n});\r\nView.watch('displayingBusinessHours', ['displayingDates', 'businessHourGenerator'], function (deps) {\r\n this.requestBusinessHoursRender(deps.businessHourGenerator);\r\n}, function () {\r\n this.requestBusinessHoursUnrender();\r\n});\r\nView.watch('initialEvents', ['dateProfile'], function (deps) {\r\n return this.fetchInitialEvents(deps.dateProfile);\r\n});\r\nView.watch('bindingEvents', ['initialEvents'], function (deps) {\r\n this.setEvents(deps.initialEvents);\r\n this.bindEventChanges();\r\n}, function () {\r\n this.unbindEventChanges();\r\n this.unsetEvents();\r\n});\r\nView.watch('displayingEvents', ['displayingDates', 'hasEvents'], function () {\r\n this.requestEventsRender(this.get('currentEvents'));\r\n}, function () {\r\n this.requestEventsUnrender();\r\n});\r\nView.watch('title', ['dateProfile'], function (deps) {\r\n return (this.title = this.computeTitle(deps.dateProfile)); // assign to View for legacy reasons\r\n});\r\nView.watch('legacyDateProps', ['dateProfile'], function (deps) {\r\n var calendar = this.calendar;\r\n var dateProfile = deps.dateProfile;\r\n // DEPRECATED, but we need to keep it updated...\r\n this.start = calendar.msToMoment(dateProfile.activeUnzonedRange.startMs, dateProfile.isRangeAllDay);\r\n this.end = calendar.msToMoment(dateProfile.activeUnzonedRange.endMs, dateProfile.isRangeAllDay);\r\n this.intervalStart = calendar.msToMoment(dateProfile.currentUnzonedRange.startMs, dateProfile.isRangeAllDay);\r\n this.intervalEnd = calendar.msToMoment(dateProfile.currentUnzonedRange.endMs, dateProfile.isRangeAllDay);\r\n});\r\n\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar EventRenderer = /** @class */ (function () {\r\n function EventRenderer(component, fillRenderer) {\r\n this.view = component._getView();\r\n this.component = component;\r\n this.fillRenderer = fillRenderer;\r\n }\r\n EventRenderer.prototype.opt = function (name) {\r\n return this.view.opt(name);\r\n };\r\n // Updates values that rely on options and also relate to range\r\n EventRenderer.prototype.rangeUpdated = function () {\r\n var displayEventTime;\r\n var displayEventEnd;\r\n this.eventTimeFormat =\r\n this.opt('eventTimeFormat') ||\r\n this.opt('timeFormat') || // deprecated\r\n this.computeEventTimeFormat();\r\n displayEventTime = this.opt('displayEventTime');\r\n if (displayEventTime == null) {\r\n displayEventTime = this.computeDisplayEventTime(); // might be based off of range\r\n }\r\n displayEventEnd = this.opt('displayEventEnd');\r\n if (displayEventEnd == null) {\r\n displayEventEnd = this.computeDisplayEventEnd(); // might be based off of range\r\n }\r\n this.displayEventTime = displayEventTime;\r\n this.displayEventEnd = displayEventEnd;\r\n };\r\n EventRenderer.prototype.render = function (eventsPayload) {\r\n var dateProfile = this.component._getDateProfile();\r\n var eventDefId;\r\n var instanceGroup;\r\n var eventRanges;\r\n var bgRanges = [];\r\n var fgRanges = [];\r\n for (eventDefId in eventsPayload) {\r\n instanceGroup = eventsPayload[eventDefId];\r\n eventRanges = instanceGroup.sliceRenderRanges(dateProfile.activeUnzonedRange);\r\n if (instanceGroup.getEventDef().hasBgRendering()) {\r\n bgRanges.push.apply(bgRanges, eventRanges);\r\n }\r\n else {\r\n fgRanges.push.apply(fgRanges, eventRanges);\r\n }\r\n }\r\n this.renderBgRanges(bgRanges);\r\n this.renderFgRanges(fgRanges);\r\n };\r\n EventRenderer.prototype.unrender = function () {\r\n this.unrenderBgRanges();\r\n this.unrenderFgRanges();\r\n };\r\n EventRenderer.prototype.renderFgRanges = function (eventRanges) {\r\n var eventFootprints = this.component.eventRangesToEventFootprints(eventRanges);\r\n var segs = this.component.eventFootprintsToSegs(eventFootprints);\r\n // render an `.el` on each seg\r\n // returns a subset of the segs. segs that were actually rendered\r\n segs = this.renderFgSegEls(segs);\r\n if (this.renderFgSegs(segs) !== false) { // no failure?\r\n this.fgSegs = segs;\r\n }\r\n };\r\n EventRenderer.prototype.unrenderFgRanges = function () {\r\n this.unrenderFgSegs(this.fgSegs || []);\r\n this.fgSegs = null;\r\n };\r\n EventRenderer.prototype.renderBgRanges = function (eventRanges) {\r\n var eventFootprints = this.component.eventRangesToEventFootprints(eventRanges);\r\n var segs = this.component.eventFootprintsToSegs(eventFootprints);\r\n if (this.renderBgSegs(segs) !== false) { // no failure?\r\n this.bgSegs = segs;\r\n }\r\n };\r\n EventRenderer.prototype.unrenderBgRanges = function () {\r\n this.unrenderBgSegs();\r\n this.bgSegs = null;\r\n };\r\n EventRenderer.prototype.getSegs = function () {\r\n return (this.bgSegs || []).concat(this.fgSegs || []);\r\n };\r\n // Renders foreground event segments onto the grid\r\n EventRenderer.prototype.renderFgSegs = function (segs) {\r\n // subclasses must implement\r\n // segs already has rendered els, and has been filtered.\r\n return false; // signal failure if not implemented\r\n };\r\n // Unrenders all currently rendered foreground segments\r\n EventRenderer.prototype.unrenderFgSegs = function (segs) {\r\n // subclasses must implement\r\n };\r\n EventRenderer.prototype.renderBgSegs = function (segs) {\r\n var _this = this;\r\n if (this.fillRenderer) {\r\n this.fillRenderer.renderSegs('bgEvent', segs, {\r\n getClasses: function (seg) {\r\n return _this.getBgClasses(seg.footprint.eventDef);\r\n },\r\n getCss: function (seg) {\r\n return {\r\n 'background-color': _this.getBgColor(seg.footprint.eventDef)\r\n };\r\n },\r\n filterEl: function (seg, el) {\r\n return _this.filterEventRenderEl(seg.footprint, el);\r\n }\r\n });\r\n }\r\n else {\r\n return false; // signal failure if no fillRenderer\r\n }\r\n };\r\n EventRenderer.prototype.unrenderBgSegs = function () {\r\n if (this.fillRenderer) {\r\n this.fillRenderer.unrender('bgEvent');\r\n }\r\n };\r\n // Renders and assigns an `el` property for each foreground event segment.\r\n // Only returns segments that successfully rendered.\r\n EventRenderer.prototype.renderFgSegEls = function (segs, disableResizing) {\r\n var _this = this;\r\n if (disableResizing === void 0) { disableResizing = false; }\r\n var hasEventRenderHandlers = this.view.hasPublicHandlers('eventRender');\r\n var html = '';\r\n var renderedSegs = [];\r\n var i;\r\n if (segs.length) { // don't build an empty html string\r\n // build a large concatenation of event segment HTML\r\n for (i = 0; i < segs.length; i++) {\r\n this.beforeFgSegHtml(segs[i]);\r\n html += this.fgSegHtml(segs[i], disableResizing);\r\n }\r\n // Grab individual elements from the combined HTML string. Use each as the default rendering.\r\n // Then, compute the 'el' for each segment. An el might be null if the eventRender callback returned false.\r\n $(html).each(function (i, node) {\r\n var seg = segs[i];\r\n var el = $(node);\r\n if (hasEventRenderHandlers) { // optimization\r\n el = _this.filterEventRenderEl(seg.footprint, el);\r\n }\r\n if (el) {\r\n el.data('fc-seg', seg); // used by handlers\r\n seg.el = el;\r\n renderedSegs.push(seg);\r\n }\r\n });\r\n }\r\n return renderedSegs;\r\n };\r\n EventRenderer.prototype.beforeFgSegHtml = function (seg) {\r\n };\r\n // Generates the HTML for the default rendering of a foreground event segment. Used by renderFgSegEls()\r\n EventRenderer.prototype.fgSegHtml = function (seg, disableResizing) {\r\n // subclasses should implement\r\n };\r\n // Generic utility for generating the HTML classNames for an event segment's element\r\n EventRenderer.prototype.getSegClasses = function (seg, isDraggable, isResizable) {\r\n var classes = [\r\n 'fc-event',\r\n seg.isStart ? 'fc-start' : 'fc-not-start',\r\n seg.isEnd ? 'fc-end' : 'fc-not-end'\r\n ].concat(this.getClasses(seg.footprint.eventDef));\r\n if (isDraggable) {\r\n classes.push('fc-draggable');\r\n }\r\n if (isResizable) {\r\n classes.push('fc-resizable');\r\n }\r\n // event is currently selected? attach a className.\r\n if (this.view.isEventDefSelected(seg.footprint.eventDef)) {\r\n classes.push('fc-selected');\r\n }\r\n return classes;\r\n };\r\n // Given an event and the default element used for rendering, returns the element that should actually be used.\r\n // Basically runs events and elements through the eventRender hook.\r\n EventRenderer.prototype.filterEventRenderEl = function (eventFootprint, el) {\r\n var legacy = eventFootprint.getEventLegacy();\r\n var custom = this.view.publiclyTrigger('eventRender', {\r\n context: legacy,\r\n args: [legacy, el, this.view]\r\n });\r\n if (custom === false) { // means don't render at all\r\n el = null;\r\n }\r\n else if (custom && custom !== true) {\r\n el = $(custom);\r\n }\r\n return el;\r\n };\r\n // Compute the text that should be displayed on an event's element.\r\n // `range` can be the Event object itself, or something range-like, with at least a `start`.\r\n // If event times are disabled, or the event has no time, will return a blank string.\r\n // If not specified, formatStr will default to the eventTimeFormat setting,\r\n // and displayEnd will default to the displayEventEnd setting.\r\n EventRenderer.prototype.getTimeText = function (eventFootprint, formatStr, displayEnd) {\r\n return this._getTimeText(eventFootprint.eventInstance.dateProfile.start, eventFootprint.eventInstance.dateProfile.end, eventFootprint.componentFootprint.isAllDay, formatStr, displayEnd);\r\n };\r\n EventRenderer.prototype._getTimeText = function (start, end, isAllDay, formatStr, displayEnd) {\r\n if (formatStr == null) {\r\n formatStr = this.eventTimeFormat;\r\n }\r\n if (displayEnd == null) {\r\n displayEnd = this.displayEventEnd;\r\n }\r\n if (this.displayEventTime && !isAllDay) {\r\n if (displayEnd && end) {\r\n return this.view.formatRange({ start: start, end: end }, false, // allDay\r\n formatStr);\r\n }\r\n else {\r\n return start.format(formatStr);\r\n }\r\n }\r\n return '';\r\n };\r\n EventRenderer.prototype.computeEventTimeFormat = function () {\r\n return this.opt('smallTimeFormat');\r\n };\r\n EventRenderer.prototype.computeDisplayEventTime = function () {\r\n return true;\r\n };\r\n EventRenderer.prototype.computeDisplayEventEnd = function () {\r\n return true;\r\n };\r\n EventRenderer.prototype.getBgClasses = function (eventDef) {\r\n var classNames = this.getClasses(eventDef);\r\n classNames.push('fc-bgevent');\r\n return classNames;\r\n };\r\n EventRenderer.prototype.getClasses = function (eventDef) {\r\n var objs = this.getStylingObjs(eventDef);\r\n var i;\r\n var classNames = [];\r\n for (i = 0; i < objs.length; i++) {\r\n classNames.push.apply(// append\r\n classNames, objs[i].eventClassName || objs[i].className || []);\r\n }\r\n return classNames;\r\n };\r\n // Utility for generating event skin-related CSS properties\r\n EventRenderer.prototype.getSkinCss = function (eventDef) {\r\n return {\r\n 'background-color': this.getBgColor(eventDef),\r\n 'border-color': this.getBorderColor(eventDef),\r\n color: this.getTextColor(eventDef)\r\n };\r\n };\r\n // Queries for caller-specified color, then falls back to default\r\n EventRenderer.prototype.getBgColor = function (eventDef) {\r\n var objs = this.getStylingObjs(eventDef);\r\n var i;\r\n var val;\r\n for (i = 0; i < objs.length && !val; i++) {\r\n val = objs[i].eventBackgroundColor || objs[i].eventColor ||\r\n objs[i].backgroundColor || objs[i].color;\r\n }\r\n if (!val) {\r\n val = this.opt('eventBackgroundColor') || this.opt('eventColor');\r\n }\r\n return val;\r\n };\r\n // Queries for caller-specified color, then falls back to default\r\n EventRenderer.prototype.getBorderColor = function (eventDef) {\r\n var objs = this.getStylingObjs(eventDef);\r\n var i;\r\n var val;\r\n for (i = 0; i < objs.length && !val; i++) {\r\n val = objs[i].eventBorderColor || objs[i].eventColor ||\r\n objs[i].borderColor || objs[i].color;\r\n }\r\n if (!val) {\r\n val = this.opt('eventBorderColor') || this.opt('eventColor');\r\n }\r\n return val;\r\n };\r\n // Queries for caller-specified color, then falls back to default\r\n EventRenderer.prototype.getTextColor = function (eventDef) {\r\n var objs = this.getStylingObjs(eventDef);\r\n var i;\r\n var val;\r\n for (i = 0; i < objs.length && !val; i++) {\r\n val = objs[i].eventTextColor ||\r\n objs[i].textColor;\r\n }\r\n if (!val) {\r\n val = this.opt('eventTextColor');\r\n }\r\n return val;\r\n };\r\n EventRenderer.prototype.getStylingObjs = function (eventDef) {\r\n var objs = this.getFallbackStylingObjs(eventDef);\r\n objs.unshift(eventDef);\r\n return objs;\r\n };\r\n EventRenderer.prototype.getFallbackStylingObjs = function (eventDef) {\r\n return [eventDef.source];\r\n };\r\n EventRenderer.prototype.sortEventSegs = function (segs) {\r\n segs.sort(util_1.proxy(this, 'compareEventSegs'));\r\n };\r\n // A cmp function for determining which segments should take visual priority\r\n EventRenderer.prototype.compareEventSegs = function (seg1, seg2) {\r\n var f1 = seg1.footprint;\r\n var f2 = seg2.footprint;\r\n var cf1 = f1.componentFootprint;\r\n var cf2 = f2.componentFootprint;\r\n var r1 = cf1.unzonedRange;\r\n var r2 = cf2.unzonedRange;\r\n return r1.startMs - r2.startMs || // earlier events go first\r\n (r2.endMs - r2.startMs) - (r1.endMs - r1.startMs) || // tie? longer events go first\r\n cf2.isAllDay - cf1.isAllDay || // tie? put all-day events first (booleans cast to 0/1)\r\n util_1.compareByFieldSpecs(f1.eventDef, f2.eventDef, this.view.eventOrderSpecs, f1.eventDef.miscProps, f2.eventDef.miscProps);\r\n };\r\n return EventRenderer;\r\n}());\r\nexports.default = EventRenderer;\r\n\n\n/***/ }),\n/* 45 */,\n/* 46 */,\n/* 47 */,\n/* 48 */,\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar moment_ext_1 = __webpack_require__(11);\r\n// Plugin\r\n// -------------------------------------------------------------------------------------------------\r\nmoment_ext_1.newMomentProto.format = function () {\r\n if (this._fullCalendar && arguments[0]) { // an enhanced moment? and a format string provided?\r\n return formatDate(this, arguments[0]); // our extended formatting\r\n }\r\n if (this._ambigTime) {\r\n return moment_ext_1.oldMomentFormat(englishMoment(this), 'YYYY-MM-DD');\r\n }\r\n if (this._ambigZone) {\r\n return moment_ext_1.oldMomentFormat(englishMoment(this), 'YYYY-MM-DD[T]HH:mm:ss');\r\n }\r\n if (this._fullCalendar) { // enhanced non-ambig moment?\r\n // moment.format() doesn't ensure english, but we want to.\r\n return moment_ext_1.oldMomentFormat(englishMoment(this));\r\n }\r\n return moment_ext_1.oldMomentProto.format.apply(this, arguments);\r\n};\r\nmoment_ext_1.newMomentProto.toISOString = function () {\r\n if (this._ambigTime) {\r\n return moment_ext_1.oldMomentFormat(englishMoment(this), 'YYYY-MM-DD');\r\n }\r\n if (this._ambigZone) {\r\n return moment_ext_1.oldMomentFormat(englishMoment(this), 'YYYY-MM-DD[T]HH:mm:ss');\r\n }\r\n if (this._fullCalendar) { // enhanced non-ambig moment?\r\n // depending on browser, moment might not output english. ensure english.\r\n // https://github.com/moment/moment/blob/2.18.1/src/lib/moment/format.js#L22\r\n return moment_ext_1.oldMomentProto.toISOString.apply(englishMoment(this), arguments);\r\n }\r\n return moment_ext_1.oldMomentProto.toISOString.apply(this, arguments);\r\n};\r\nfunction englishMoment(mom) {\r\n if (mom.locale() !== 'en') {\r\n return mom.clone().locale('en');\r\n }\r\n return mom;\r\n}\r\n// Config\r\n// ---------------------------------------------------------------------------------------------------------------------\r\n/*\r\nInserted between chunks in the fake (\"intermediate\") formatting string.\r\nImportant that it passes as whitespace (\\s) because moment often identifies non-standalone months\r\nvia a regexp with an \\s.\r\n*/\r\nvar PART_SEPARATOR = '\\u000b'; // vertical tab\r\n/*\r\nInserted as the first character of a literal-text chunk to indicate that the literal text is not actually literal text,\r\nbut rather, a \"special\" token that has custom rendering (see specialTokens map).\r\n*/\r\nvar SPECIAL_TOKEN_MARKER = '\\u001f'; // information separator 1\r\n/*\r\nInserted at the beginning and end of a span of text that must have non-zero numeric characters.\r\nHandling of these markers is done in a post-processing step at the very end of text rendering.\r\n*/\r\nvar MAYBE_MARKER = '\\u001e'; // information separator 2\r\nvar MAYBE_REGEXP = new RegExp(MAYBE_MARKER + '([^' + MAYBE_MARKER + ']*)' + MAYBE_MARKER, 'g'); // must be global\r\n/*\r\nAddition formatting tokens we want recognized\r\n*/\r\nvar specialTokens = {\r\n t: function (date) {\r\n return moment_ext_1.oldMomentFormat(date, 'a').charAt(0);\r\n },\r\n T: function (date) {\r\n return moment_ext_1.oldMomentFormat(date, 'A').charAt(0);\r\n }\r\n};\r\n/*\r\nThe first characters of formatting tokens for units that are 1 day or larger.\r\n`value` is for ranking relative size (lower means bigger).\r\n`unit` is a normalized unit, used for comparing moments.\r\n*/\r\nvar largeTokenMap = {\r\n Y: { value: 1, unit: 'year' },\r\n M: { value: 2, unit: 'month' },\r\n W: { value: 3, unit: 'week' },\r\n w: { value: 3, unit: 'week' },\r\n D: { value: 4, unit: 'day' },\r\n d: { value: 4, unit: 'day' } // day of week\r\n};\r\n// Single Date Formatting\r\n// ---------------------------------------------------------------------------------------------------------------------\r\n/*\r\nFormats `date` with a Moment formatting string, but allow our non-zero areas and special token\r\n*/\r\nfunction formatDate(date, formatStr) {\r\n return renderFakeFormatString(getParsedFormatString(formatStr).fakeFormatString, date);\r\n}\r\nexports.formatDate = formatDate;\r\n// Date Range Formatting\r\n// -------------------------------------------------------------------------------------------------\r\n// TODO: make it work with timezone offset\r\n/*\r\nUsing a formatting string meant for a single date, generate a range string, like\r\n\"Sep 2 - 9 2013\", that intelligently inserts a separator where the dates differ.\r\nIf the dates are the same as far as the format string is concerned, just return a single\r\nrendering of one date, without any separator.\r\n*/\r\nfunction formatRange(date1, date2, formatStr, separator, isRTL) {\r\n var localeData;\r\n date1 = moment_ext_1.default.parseZone(date1);\r\n date2 = moment_ext_1.default.parseZone(date2);\r\n localeData = date1.localeData();\r\n // Expand localized format strings, like \"LL\" -> \"MMMM D YYYY\".\r\n // BTW, this is not important for `formatDate` because it is impossible to put custom tokens\r\n // or non-zero areas in Moment's localized format strings.\r\n formatStr = localeData.longDateFormat(formatStr) || formatStr;\r\n return renderParsedFormat(getParsedFormatString(formatStr), date1, date2, separator || ' - ', isRTL);\r\n}\r\nexports.formatRange = formatRange;\r\n/*\r\nRenders a range with an already-parsed format string.\r\n*/\r\nfunction renderParsedFormat(parsedFormat, date1, date2, separator, isRTL) {\r\n var sameUnits = parsedFormat.sameUnits;\r\n var unzonedDate1 = date1.clone().stripZone(); // for same-unit comparisons\r\n var unzonedDate2 = date2.clone().stripZone(); // \"\r\n var renderedParts1 = renderFakeFormatStringParts(parsedFormat.fakeFormatString, date1);\r\n var renderedParts2 = renderFakeFormatStringParts(parsedFormat.fakeFormatString, date2);\r\n var leftI;\r\n var leftStr = '';\r\n var rightI;\r\n var rightStr = '';\r\n var middleI;\r\n var middleStr1 = '';\r\n var middleStr2 = '';\r\n var middleStr = '';\r\n // Start at the leftmost side of the formatting string and continue until you hit a token\r\n // that is not the same between dates.\r\n for (leftI = 0; leftI < sameUnits.length && (!sameUnits[leftI] || unzonedDate1.isSame(unzonedDate2, sameUnits[leftI])); leftI++) {\r\n leftStr += renderedParts1[leftI];\r\n }\r\n // Similarly, start at the rightmost side of the formatting string and move left\r\n for (rightI = sameUnits.length - 1; rightI > leftI && (!sameUnits[rightI] || unzonedDate1.isSame(unzonedDate2, sameUnits[rightI])); rightI--) {\r\n // If current chunk is on the boundary of unique date-content, and is a special-case\r\n // date-formatting postfix character, then don't consume it. Consider it unique date-content.\r\n // TODO: make configurable\r\n if (rightI - 1 === leftI && renderedParts1[rightI] === '.') {\r\n break;\r\n }\r\n rightStr = renderedParts1[rightI] + rightStr;\r\n }\r\n // The area in the middle is different for both of the dates.\r\n // Collect them distinctly so we can jam them together later.\r\n for (middleI = leftI; middleI <= rightI; middleI++) {\r\n middleStr1 += renderedParts1[middleI];\r\n middleStr2 += renderedParts2[middleI];\r\n }\r\n if (middleStr1 || middleStr2) {\r\n if (isRTL) {\r\n middleStr = middleStr2 + separator + middleStr1;\r\n }\r\n else {\r\n middleStr = middleStr1 + separator + middleStr2;\r\n }\r\n }\r\n return processMaybeMarkers(leftStr + middleStr + rightStr);\r\n}\r\n// Format String Parsing\r\n// ---------------------------------------------------------------------------------------------------------------------\r\nvar parsedFormatStrCache = {};\r\n/*\r\nReturns a parsed format string, leveraging a cache.\r\n*/\r\nfunction getParsedFormatString(formatStr) {\r\n return parsedFormatStrCache[formatStr] ||\r\n (parsedFormatStrCache[formatStr] = parseFormatString(formatStr));\r\n}\r\n/*\r\nParses a format string into the following:\r\n- fakeFormatString: a momentJS formatting string, littered with special control characters that get post-processed.\r\n- sameUnits: for every part in fakeFormatString, if the part is a token, the value will be a unit string (like \"day\"),\r\n that indicates how similar a range's start & end must be in order to share the same formatted text.\r\n If not a token, then the value is null.\r\n Always a flat array (not nested liked \"chunks\").\r\n*/\r\nfunction parseFormatString(formatStr) {\r\n var chunks = chunkFormatString(formatStr);\r\n return {\r\n fakeFormatString: buildFakeFormatString(chunks),\r\n sameUnits: buildSameUnits(chunks)\r\n };\r\n}\r\n/*\r\nBreak the formatting string into an array of chunks.\r\nA 'maybe' chunk will have nested chunks.\r\n*/\r\nfunction chunkFormatString(formatStr) {\r\n var chunks = [];\r\n var match;\r\n // TODO: more descrimination\r\n // \\4 is a backreference to the first character of a multi-character set.\r\n var chunker = /\\[([^\\]]*)\\]|\\(([^\\)]*)\\)|(LTS|LT|(\\w)\\4*o?)|([^\\w\\[\\(]+)/g;\r\n while ((match = chunker.exec(formatStr))) {\r\n if (match[1]) { // a literal string inside [ ... ]\r\n chunks.push.apply(chunks, // append\r\n splitStringLiteral(match[1]));\r\n }\r\n else if (match[2]) { // non-zero formatting inside ( ... )\r\n chunks.push({ maybe: chunkFormatString(match[2]) });\r\n }\r\n else if (match[3]) { // a formatting token\r\n chunks.push({ token: match[3] });\r\n }\r\n else if (match[5]) { // an unenclosed literal string\r\n chunks.push.apply(chunks, // append\r\n splitStringLiteral(match[5]));\r\n }\r\n }\r\n return chunks;\r\n}\r\n/*\r\nPotentially splits a literal-text string into multiple parts. For special cases.\r\n*/\r\nfunction splitStringLiteral(s) {\r\n if (s === '. ') {\r\n return ['.', ' ']; // for locales with periods bound to the end of each year/month/date\r\n }\r\n else {\r\n return [s];\r\n }\r\n}\r\n/*\r\nGiven chunks parsed from a real format string, generate a fake (aka \"intermediate\") format string with special control\r\ncharacters that will eventually be given to moment for formatting, and then post-processed.\r\n*/\r\nfunction buildFakeFormatString(chunks) {\r\n var parts = [];\r\n var i;\r\n var chunk;\r\n for (i = 0; i < chunks.length; i++) {\r\n chunk = chunks[i];\r\n if (typeof chunk === 'string') {\r\n parts.push('[' + chunk + ']');\r\n }\r\n else if (chunk.token) {\r\n if (chunk.token in specialTokens) {\r\n parts.push(SPECIAL_TOKEN_MARKER + // useful during post-processing\r\n '[' + chunk.token + ']' // preserve as literal text\r\n );\r\n }\r\n else {\r\n parts.push(chunk.token); // unprotected text implies a format string\r\n }\r\n }\r\n else if (chunk.maybe) {\r\n parts.push(MAYBE_MARKER + // useful during post-processing\r\n buildFakeFormatString(chunk.maybe) +\r\n MAYBE_MARKER);\r\n }\r\n }\r\n return parts.join(PART_SEPARATOR);\r\n}\r\n/*\r\nGiven parsed chunks from a real formatting string, generates an array of unit strings (like \"day\") that indicate\r\nin which regard two dates must be similar in order to share range formatting text.\r\nThe `chunks` can be nested (because of \"maybe\" chunks), however, the returned array will be flat.\r\n*/\r\nfunction buildSameUnits(chunks) {\r\n var units = [];\r\n var i;\r\n var chunk;\r\n var tokenInfo;\r\n for (i = 0; i < chunks.length; i++) {\r\n chunk = chunks[i];\r\n if (chunk.token) {\r\n tokenInfo = largeTokenMap[chunk.token.charAt(0)];\r\n units.push(tokenInfo ? tokenInfo.unit : 'second'); // default to a very strict same-second\r\n }\r\n else if (chunk.maybe) {\r\n units.push.apply(units, // append\r\n buildSameUnits(chunk.maybe));\r\n }\r\n else {\r\n units.push(null);\r\n }\r\n }\r\n return units;\r\n}\r\n// Rendering to text\r\n// ---------------------------------------------------------------------------------------------------------------------\r\n/*\r\nFormats a date with a fake format string, post-processes the control characters, then returns.\r\n*/\r\nfunction renderFakeFormatString(fakeFormatString, date) {\r\n return processMaybeMarkers(renderFakeFormatStringParts(fakeFormatString, date).join(''));\r\n}\r\n/*\r\nFormats a date into parts that will have been post-processed, EXCEPT for the \"maybe\" markers.\r\n*/\r\nfunction renderFakeFormatStringParts(fakeFormatString, date) {\r\n var parts = [];\r\n var fakeRender = moment_ext_1.oldMomentFormat(date, fakeFormatString);\r\n var fakeParts = fakeRender.split(PART_SEPARATOR);\r\n var i;\r\n var fakePart;\r\n for (i = 0; i < fakeParts.length; i++) {\r\n fakePart = fakeParts[i];\r\n if (fakePart.charAt(0) === SPECIAL_TOKEN_MARKER) {\r\n parts.push(\r\n // the literal string IS the token's name.\r\n // call special token's registered function.\r\n specialTokens[fakePart.substring(1)](date));\r\n }\r\n else {\r\n parts.push(fakePart);\r\n }\r\n }\r\n return parts;\r\n}\r\n/*\r\nAccepts an almost-finally-formatted string and processes the \"maybe\" control characters, returning a new string.\r\n*/\r\nfunction processMaybeMarkers(s) {\r\n return s.replace(MAYBE_REGEXP, function (m0, m1) {\r\n if (m1.match(/[1-9]/)) { // any non-zero numeric characters?\r\n return m1;\r\n }\r\n else {\r\n return '';\r\n }\r\n });\r\n}\r\n// Misc Utils\r\n// -------------------------------------------------------------------------------------------------\r\n/*\r\nReturns a unit string, either 'year', 'month', 'day', or null for the most granular formatting token in the string.\r\n*/\r\nfunction queryMostGranularFormatUnit(formatStr) {\r\n var chunks = chunkFormatString(formatStr);\r\n var i;\r\n var chunk;\r\n var candidate;\r\n var best;\r\n for (i = 0; i < chunks.length; i++) {\r\n chunk = chunks[i];\r\n if (chunk.token) {\r\n candidate = largeTokenMap[chunk.token.charAt(0)];\r\n if (candidate) {\r\n if (!best || candidate.value > best.value) {\r\n best = candidate;\r\n }\r\n }\r\n }\r\n }\r\n if (best) {\r\n return best.unit;\r\n }\r\n return null;\r\n}\r\nexports.queryMostGranularFormatUnit = queryMostGranularFormatUnit;\r\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar EventRange = /** @class */ (function () {\r\n function EventRange(unzonedRange, eventDef, eventInstance) {\r\n this.unzonedRange = unzonedRange;\r\n this.eventDef = eventDef;\r\n if (eventInstance) {\r\n this.eventInstance = eventInstance;\r\n }\r\n }\r\n return EventRange;\r\n}());\r\nexports.default = EventRange;\r\n\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar Class_1 = __webpack_require__(35);\r\nvar EmitterMixin_1 = __webpack_require__(13);\r\nvar ListenerMixin_1 = __webpack_require__(7);\r\nvar Model = /** @class */ (function (_super) {\r\n tslib_1.__extends(Model, _super);\r\n function Model() {\r\n var _this = _super.call(this) || this;\r\n _this._watchers = {};\r\n _this._props = {};\r\n _this.applyGlobalWatchers();\r\n _this.constructed();\r\n return _this;\r\n }\r\n Model.watch = function (name) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n // subclasses should make a masked-copy of the superclass's map\r\n // TODO: write test\r\n if (!this.prototype.hasOwnProperty('_globalWatchArgs')) {\r\n this.prototype._globalWatchArgs = Object.create(this.prototype._globalWatchArgs);\r\n }\r\n this.prototype._globalWatchArgs[name] = args;\r\n };\r\n Model.prototype.constructed = function () {\r\n // useful for monkeypatching. TODO: BaseClass?\r\n };\r\n Model.prototype.applyGlobalWatchers = function () {\r\n var map = this._globalWatchArgs;\r\n var name;\r\n for (name in map) {\r\n this.watch.apply(this, [name].concat(map[name]));\r\n }\r\n };\r\n Model.prototype.has = function (name) {\r\n return name in this._props;\r\n };\r\n Model.prototype.get = function (name) {\r\n if (name === undefined) {\r\n return this._props;\r\n }\r\n return this._props[name];\r\n };\r\n Model.prototype.set = function (name, val) {\r\n var newProps;\r\n if (typeof name === 'string') {\r\n newProps = {};\r\n newProps[name] = val === undefined ? null : val;\r\n }\r\n else {\r\n newProps = name;\r\n }\r\n this.setProps(newProps);\r\n };\r\n Model.prototype.reset = function (newProps) {\r\n var oldProps = this._props;\r\n var changeset = {}; // will have undefined's to signal unsets\r\n var name;\r\n for (name in oldProps) {\r\n changeset[name] = undefined;\r\n }\r\n for (name in newProps) {\r\n changeset[name] = newProps[name];\r\n }\r\n this.setProps(changeset);\r\n };\r\n Model.prototype.unset = function (name) {\r\n var newProps = {};\r\n var names;\r\n var i;\r\n if (typeof name === 'string') {\r\n names = [name];\r\n }\r\n else {\r\n names = name;\r\n }\r\n for (i = 0; i < names.length; i++) {\r\n newProps[names[i]] = undefined;\r\n }\r\n this.setProps(newProps);\r\n };\r\n Model.prototype.setProps = function (newProps) {\r\n var changedProps = {};\r\n var changedCnt = 0;\r\n var name;\r\n var val;\r\n for (name in newProps) {\r\n val = newProps[name];\r\n // a change in value?\r\n // if an object, don't check equality, because might have been mutated internally.\r\n // TODO: eventually enforce immutability.\r\n if (typeof val === 'object' ||\r\n val !== this._props[name]) {\r\n changedProps[name] = val;\r\n changedCnt++;\r\n }\r\n }\r\n if (changedCnt) {\r\n this.trigger('before:batchChange', changedProps);\r\n for (name in changedProps) {\r\n val = changedProps[name];\r\n this.trigger('before:change', name, val);\r\n this.trigger('before:change:' + name, val);\r\n }\r\n for (name in changedProps) {\r\n val = changedProps[name];\r\n if (val === undefined) {\r\n delete this._props[name];\r\n }\r\n else {\r\n this._props[name] = val;\r\n }\r\n this.trigger('change:' + name, val);\r\n this.trigger('change', name, val);\r\n }\r\n this.trigger('batchChange', changedProps);\r\n }\r\n };\r\n Model.prototype.watch = function (name, depList, startFunc, stopFunc) {\r\n var _this = this;\r\n this.unwatch(name);\r\n this._watchers[name] = this._watchDeps(depList, function (deps) {\r\n var res = startFunc.call(_this, deps);\r\n if (res && res.then) {\r\n _this.unset(name); // put in an unset state while resolving\r\n res.then(function (val) {\r\n _this.set(name, val);\r\n });\r\n }\r\n else {\r\n _this.set(name, res);\r\n }\r\n }, function (deps) {\r\n _this.unset(name);\r\n if (stopFunc) {\r\n stopFunc.call(_this, deps);\r\n }\r\n });\r\n };\r\n Model.prototype.unwatch = function (name) {\r\n var watcher = this._watchers[name];\r\n if (watcher) {\r\n delete this._watchers[name];\r\n watcher.teardown();\r\n }\r\n };\r\n Model.prototype._watchDeps = function (depList, startFunc, stopFunc) {\r\n var _this = this;\r\n var queuedChangeCnt = 0;\r\n var depCnt = depList.length;\r\n var satisfyCnt = 0;\r\n var values = {}; // what's passed as the `deps` arguments\r\n var bindTuples = []; // array of [ eventName, handlerFunc ] arrays\r\n var isCallingStop = false;\r\n var onBeforeDepChange = function (depName, val, isOptional) {\r\n queuedChangeCnt++;\r\n if (queuedChangeCnt === 1) { // first change to cause a \"stop\" ?\r\n if (satisfyCnt === depCnt) { // all deps previously satisfied?\r\n isCallingStop = true;\r\n stopFunc(values);\r\n isCallingStop = false;\r\n }\r\n }\r\n };\r\n var onDepChange = function (depName, val, isOptional) {\r\n if (val === undefined) { // unsetting a value?\r\n // required dependency that was previously set?\r\n if (!isOptional && values[depName] !== undefined) {\r\n satisfyCnt--;\r\n }\r\n delete values[depName];\r\n }\r\n else { // setting a value?\r\n // required dependency that was previously unset?\r\n if (!isOptional && values[depName] === undefined) {\r\n satisfyCnt++;\r\n }\r\n values[depName] = val;\r\n }\r\n queuedChangeCnt--;\r\n if (!queuedChangeCnt) { // last change to cause a \"start\"?\r\n // now finally satisfied or satisfied all along?\r\n if (satisfyCnt === depCnt) {\r\n // if the stopFunc initiated another value change, ignore it.\r\n // it will be processed by another change event anyway.\r\n if (!isCallingStop) {\r\n startFunc(values);\r\n }\r\n }\r\n }\r\n };\r\n // intercept for .on() that remembers handlers\r\n var bind = function (eventName, handler) {\r\n _this.on(eventName, handler);\r\n bindTuples.push([eventName, handler]);\r\n };\r\n // listen to dependency changes\r\n depList.forEach(function (depName) {\r\n var isOptional = false;\r\n if (depName.charAt(0) === '?') { // TODO: more DRY\r\n depName = depName.substring(1);\r\n isOptional = true;\r\n }\r\n bind('before:change:' + depName, function (val) {\r\n onBeforeDepChange(depName, val, isOptional);\r\n });\r\n bind('change:' + depName, function (val) {\r\n onDepChange(depName, val, isOptional);\r\n });\r\n });\r\n // process current dependency values\r\n depList.forEach(function (depName) {\r\n var isOptional = false;\r\n if (depName.charAt(0) === '?') { // TODO: more DRY\r\n depName = depName.substring(1);\r\n isOptional = true;\r\n }\r\n if (_this.has(depName)) {\r\n values[depName] = _this.get(depName);\r\n satisfyCnt++;\r\n }\r\n else if (isOptional) {\r\n satisfyCnt++;\r\n }\r\n });\r\n // initially satisfied\r\n if (satisfyCnt === depCnt) {\r\n startFunc(values);\r\n }\r\n return {\r\n teardown: function () {\r\n // remove all handlers\r\n for (var i = 0; i < bindTuples.length; i++) {\r\n _this.off(bindTuples[i][0], bindTuples[i][1]);\r\n }\r\n bindTuples = null;\r\n // was satisfied, so call stopFunc\r\n if (satisfyCnt === depCnt) {\r\n stopFunc();\r\n }\r\n },\r\n flash: function () {\r\n if (satisfyCnt === depCnt) {\r\n stopFunc();\r\n startFunc(values);\r\n }\r\n }\r\n };\r\n };\r\n Model.prototype.flash = function (name) {\r\n var watcher = this._watchers[name];\r\n if (watcher) {\r\n watcher.flash();\r\n }\r\n };\r\n return Model;\r\n}(Class_1.default));\r\nexports.default = Model;\r\nModel.prototype._globalWatchArgs = {}; // mutation protection in Model.watch\r\nEmitterMixin_1.default.mixInto(Model);\r\nListenerMixin_1.default.mixInto(Model);\r\n\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*\r\nUSAGE:\r\n import { default as ParsableModelMixin, ParsableModelInterface } from './ParsableModelMixin'\r\nin class:\r\n applyProps: ParsableModelInterface['applyProps']\r\n applyManualStandardProps: ParsableModelInterface['applyManualStandardProps']\r\n applyMiscProps: ParsableModelInterface['applyMiscProps']\r\n isStandardProp: ParsableModelInterface['isStandardProp']\r\n static defineStandardProps = ParsableModelMixin.defineStandardProps\r\n static copyVerbatimStandardProps = ParsableModelMixin.copyVerbatimStandardProps\r\nafter class:\r\n ParsableModelMixin.mixInto(TheClass)\r\n*/\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar util_1 = __webpack_require__(4);\r\nvar Mixin_1 = __webpack_require__(15);\r\nvar ParsableModelMixin = /** @class */ (function (_super) {\r\n tslib_1.__extends(ParsableModelMixin, _super);\r\n function ParsableModelMixin() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ParsableModelMixin.defineStandardProps = function (propDefs) {\r\n var proto = this.prototype;\r\n if (!proto.hasOwnProperty('standardPropMap')) {\r\n proto.standardPropMap = Object.create(proto.standardPropMap);\r\n }\r\n util_1.copyOwnProps(propDefs, proto.standardPropMap);\r\n };\r\n ParsableModelMixin.copyVerbatimStandardProps = function (src, dest) {\r\n var map = this.prototype.standardPropMap;\r\n var propName;\r\n for (propName in map) {\r\n if (src[propName] != null && // in the src object?\r\n map[propName] === true // false means \"copy verbatim\"\r\n ) {\r\n dest[propName] = src[propName];\r\n }\r\n }\r\n };\r\n /*\r\n Returns true/false for success.\r\n Meant to be only called ONCE, at object creation.\r\n */\r\n ParsableModelMixin.prototype.applyProps = function (rawProps) {\r\n var standardPropMap = this.standardPropMap;\r\n var manualProps = {};\r\n var miscProps = {};\r\n var propName;\r\n for (propName in rawProps) {\r\n if (standardPropMap[propName] === true) { // copy verbatim\r\n this[propName] = rawProps[propName];\r\n }\r\n else if (standardPropMap[propName] === false) {\r\n manualProps[propName] = rawProps[propName];\r\n }\r\n else {\r\n miscProps[propName] = rawProps[propName];\r\n }\r\n }\r\n this.applyMiscProps(miscProps);\r\n return this.applyManualStandardProps(manualProps);\r\n };\r\n /*\r\n If subclasses override, they must call this supermethod and return the boolean response.\r\n Meant to be only called ONCE, at object creation.\r\n */\r\n ParsableModelMixin.prototype.applyManualStandardProps = function (rawProps) {\r\n return true;\r\n };\r\n /*\r\n Can be called even after initial object creation.\r\n */\r\n ParsableModelMixin.prototype.applyMiscProps = function (rawProps) {\r\n // subclasses can implement\r\n };\r\n /*\r\n TODO: why is this a method when defineStandardProps is static\r\n */\r\n ParsableModelMixin.prototype.isStandardProp = function (propName) {\r\n return propName in this.standardPropMap;\r\n };\r\n return ParsableModelMixin;\r\n}(Mixin_1.default));\r\nexports.default = ParsableModelMixin;\r\nParsableModelMixin.prototype.standardPropMap = {}; // will be cloned by defineStandardProps\r\n\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar EventInstance = /** @class */ (function () {\r\n function EventInstance(def, dateProfile) {\r\n this.def = def;\r\n this.dateProfile = dateProfile;\r\n }\r\n EventInstance.prototype.toLegacy = function () {\r\n var dateProfile = this.dateProfile;\r\n var obj = this.def.toLegacy();\r\n obj.start = dateProfile.start.clone();\r\n obj.end = dateProfile.end ? dateProfile.end.clone() : null;\r\n return obj;\r\n };\r\n return EventInstance;\r\n}());\r\nexports.default = EventInstance;\r\n\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar moment = __webpack_require__(0);\r\nvar EventDef_1 = __webpack_require__(37);\r\nvar EventInstance_1 = __webpack_require__(53);\r\nvar EventDateProfile_1 = __webpack_require__(16);\r\nvar RecurringEventDef = /** @class */ (function (_super) {\r\n tslib_1.__extends(RecurringEventDef, _super);\r\n function RecurringEventDef() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n RecurringEventDef.prototype.isAllDay = function () {\r\n return !this.startTime && !this.endTime;\r\n };\r\n RecurringEventDef.prototype.buildInstances = function (unzonedRange) {\r\n var calendar = this.source.calendar;\r\n var unzonedDate = unzonedRange.getStart();\r\n var unzonedEnd = unzonedRange.getEnd();\r\n var zonedDayStart;\r\n var instanceStart;\r\n var instanceEnd;\r\n var instances = [];\r\n while (unzonedDate.isBefore(unzonedEnd)) {\r\n // if everyday, or this particular day-of-week\r\n if (!this.dowHash || this.dowHash[unzonedDate.day()]) {\r\n zonedDayStart = calendar.applyTimezone(unzonedDate);\r\n instanceStart = zonedDayStart.clone();\r\n instanceEnd = null;\r\n if (this.startTime) {\r\n instanceStart.time(this.startTime);\r\n }\r\n else {\r\n instanceStart.stripTime();\r\n }\r\n if (this.endTime) {\r\n instanceEnd = zonedDayStart.clone().time(this.endTime);\r\n }\r\n instances.push(new EventInstance_1.default(this, // definition\r\n new EventDateProfile_1.default(instanceStart, instanceEnd, calendar)));\r\n }\r\n unzonedDate.add(1, 'days');\r\n }\r\n return instances;\r\n };\r\n RecurringEventDef.prototype.setDow = function (dowNumbers) {\r\n if (!this.dowHash) {\r\n this.dowHash = {};\r\n }\r\n for (var i = 0; i < dowNumbers.length; i++) {\r\n this.dowHash[dowNumbers[i]] = true;\r\n }\r\n };\r\n RecurringEventDef.prototype.clone = function () {\r\n var def = _super.prototype.clone.call(this);\r\n if (def.startTime) {\r\n def.startTime = moment.duration(this.startTime);\r\n }\r\n if (def.endTime) {\r\n def.endTime = moment.duration(this.endTime);\r\n }\r\n if (this.dowHash) {\r\n def.dowHash = $.extend({}, this.dowHash);\r\n }\r\n return def;\r\n };\r\n return RecurringEventDef;\r\n}(EventDef_1.default));\r\nexports.default = RecurringEventDef;\r\n/*\r\nHACK to work with TypeScript mixins\r\nNOTE: if super-method fails, should still attempt to apply\r\n*/\r\nRecurringEventDef.prototype.applyProps = function (rawProps) {\r\n var superSuccess = EventDef_1.default.prototype.applyProps.call(this, rawProps);\r\n if (rawProps.start) {\r\n this.startTime = moment.duration(rawProps.start);\r\n }\r\n if (rawProps.end) {\r\n this.endTime = moment.duration(rawProps.end);\r\n }\r\n if (rawProps.dow) {\r\n this.setDow(rawProps.dow);\r\n }\r\n return superSuccess;\r\n};\r\n// Parsing\r\n// ---------------------------------------------------------------------------------------------------------------------\r\nRecurringEventDef.defineStandardProps({\r\n start: false,\r\n end: false,\r\n dow: false\r\n});\r\n\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar moment = __webpack_require__(0);\r\nvar util_1 = __webpack_require__(4);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar DateProfileGenerator = /** @class */ (function () {\r\n function DateProfileGenerator(_view) {\r\n this._view = _view;\r\n }\r\n DateProfileGenerator.prototype.opt = function (name) {\r\n return this._view.opt(name);\r\n };\r\n DateProfileGenerator.prototype.trimHiddenDays = function (unzonedRange) {\r\n return this._view.trimHiddenDays(unzonedRange);\r\n };\r\n DateProfileGenerator.prototype.msToUtcMoment = function (ms, forceAllDay) {\r\n return this._view.calendar.msToUtcMoment(ms, forceAllDay);\r\n };\r\n /* Date Range Computation\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Builds a structure with info about what the dates/ranges will be for the \"prev\" view.\r\n DateProfileGenerator.prototype.buildPrev = function (currentDateProfile) {\r\n var prevDate = currentDateProfile.date.clone()\r\n .startOf(currentDateProfile.currentRangeUnit)\r\n .subtract(currentDateProfile.dateIncrement);\r\n return this.build(prevDate, -1);\r\n };\r\n // Builds a structure with info about what the dates/ranges will be for the \"next\" view.\r\n DateProfileGenerator.prototype.buildNext = function (currentDateProfile) {\r\n var nextDate = currentDateProfile.date.clone()\r\n .startOf(currentDateProfile.currentRangeUnit)\r\n .add(currentDateProfile.dateIncrement);\r\n return this.build(nextDate, 1);\r\n };\r\n // Builds a structure holding dates/ranges for rendering around the given date.\r\n // Optional direction param indicates whether the date is being incremented/decremented\r\n // from its previous value. decremented = -1, incremented = 1 (default).\r\n DateProfileGenerator.prototype.build = function (date, direction, forceToValid) {\r\n if (forceToValid === void 0) { forceToValid = false; }\r\n var isDateAllDay = !date.hasTime();\r\n var validUnzonedRange;\r\n var minTime = null;\r\n var maxTime = null;\r\n var currentInfo;\r\n var isRangeAllDay;\r\n var renderUnzonedRange;\r\n var activeUnzonedRange;\r\n var isValid;\r\n validUnzonedRange = this.buildValidRange();\r\n validUnzonedRange = this.trimHiddenDays(validUnzonedRange);\r\n if (forceToValid) {\r\n date = this.msToUtcMoment(validUnzonedRange.constrainDate(date), // returns MS\r\n isDateAllDay);\r\n }\r\n currentInfo = this.buildCurrentRangeInfo(date, direction);\r\n isRangeAllDay = /^(year|month|week|day)$/.test(currentInfo.unit);\r\n renderUnzonedRange = this.buildRenderRange(this.trimHiddenDays(currentInfo.unzonedRange), currentInfo.unit, isRangeAllDay);\r\n renderUnzonedRange = this.trimHiddenDays(renderUnzonedRange);\r\n activeUnzonedRange = renderUnzonedRange.clone();\r\n if (!this.opt('showNonCurrentDates')) {\r\n activeUnzonedRange = activeUnzonedRange.intersect(currentInfo.unzonedRange);\r\n }\r\n minTime = moment.duration(this.opt('minTime'));\r\n maxTime = moment.duration(this.opt('maxTime'));\r\n activeUnzonedRange = this.adjustActiveRange(activeUnzonedRange, minTime, maxTime);\r\n activeUnzonedRange = activeUnzonedRange.intersect(validUnzonedRange); // might return null\r\n if (activeUnzonedRange) {\r\n date = this.msToUtcMoment(activeUnzonedRange.constrainDate(date), // returns MS\r\n isDateAllDay);\r\n }\r\n // it's invalid if the originally requested date is not contained,\r\n // or if the range is completely outside of the valid range.\r\n isValid = currentInfo.unzonedRange.intersectsWith(validUnzonedRange);\r\n return {\r\n // constraint for where prev/next operations can go and where events can be dragged/resized to.\r\n // an object with optional start and end properties.\r\n validUnzonedRange: validUnzonedRange,\r\n // range the view is formally responsible for.\r\n // for example, a month view might have 1st-31st, excluding padded dates\r\n currentUnzonedRange: currentInfo.unzonedRange,\r\n // name of largest unit being displayed, like \"month\" or \"week\"\r\n currentRangeUnit: currentInfo.unit,\r\n isRangeAllDay: isRangeAllDay,\r\n // dates that display events and accept drag-n-drop\r\n // will be `null` if no dates accept events\r\n activeUnzonedRange: activeUnzonedRange,\r\n // date range with a rendered skeleton\r\n // includes not-active days that need some sort of DOM\r\n renderUnzonedRange: renderUnzonedRange,\r\n // Duration object that denotes the first visible time of any given day\r\n minTime: minTime,\r\n // Duration object that denotes the exclusive visible end time of any given day\r\n maxTime: maxTime,\r\n isValid: isValid,\r\n date: date,\r\n // how far the current date will move for a prev/next operation\r\n dateIncrement: this.buildDateIncrement(currentInfo.duration)\r\n // pass a fallback (might be null) ^\r\n };\r\n };\r\n // Builds an object with optional start/end properties.\r\n // Indicates the minimum/maximum dates to display.\r\n // not responsible for trimming hidden days.\r\n DateProfileGenerator.prototype.buildValidRange = function () {\r\n return this._view.getUnzonedRangeOption('validRange', this._view.calendar.getNow()) ||\r\n new UnzonedRange_1.default(); // completely open-ended\r\n };\r\n // Builds a structure with info about the \"current\" range, the range that is\r\n // highlighted as being the current month for example.\r\n // See build() for a description of `direction`.\r\n // Guaranteed to have `range` and `unit` properties. `duration` is optional.\r\n // TODO: accept a MS-time instead of a moment `date`?\r\n DateProfileGenerator.prototype.buildCurrentRangeInfo = function (date, direction) {\r\n var viewSpec = this._view.viewSpec;\r\n var duration = null;\r\n var unit = null;\r\n var unzonedRange = null;\r\n var dayCount;\r\n if (viewSpec.duration) {\r\n duration = viewSpec.duration;\r\n unit = viewSpec.durationUnit;\r\n unzonedRange = this.buildRangeFromDuration(date, direction, duration, unit);\r\n }\r\n else if ((dayCount = this.opt('dayCount'))) {\r\n unit = 'day';\r\n unzonedRange = this.buildRangeFromDayCount(date, direction, dayCount);\r\n }\r\n else if ((unzonedRange = this.buildCustomVisibleRange(date))) {\r\n unit = util_1.computeGreatestUnit(unzonedRange.getStart(), unzonedRange.getEnd());\r\n }\r\n else {\r\n duration = this.getFallbackDuration();\r\n unit = util_1.computeGreatestUnit(duration);\r\n unzonedRange = this.buildRangeFromDuration(date, direction, duration, unit);\r\n }\r\n return { duration: duration, unit: unit, unzonedRange: unzonedRange };\r\n };\r\n DateProfileGenerator.prototype.getFallbackDuration = function () {\r\n return moment.duration({ days: 1 });\r\n };\r\n // Returns a new activeUnzonedRange to have time values (un-ambiguate)\r\n // minTime or maxTime causes the range to expand.\r\n DateProfileGenerator.prototype.adjustActiveRange = function (unzonedRange, minTime, maxTime) {\r\n var start = unzonedRange.getStart();\r\n var end = unzonedRange.getEnd();\r\n if (this._view.usesMinMaxTime) {\r\n if (minTime < 0) {\r\n start.time(0).add(minTime);\r\n }\r\n if (maxTime > 24 * 60 * 60 * 1000) { // beyond 24 hours?\r\n end.time(maxTime - (24 * 60 * 60 * 1000));\r\n }\r\n }\r\n return new UnzonedRange_1.default(start, end);\r\n };\r\n // Builds the \"current\" range when it is specified as an explicit duration.\r\n // `unit` is the already-computed computeGreatestUnit value of duration.\r\n // TODO: accept a MS-time instead of a moment `date`?\r\n DateProfileGenerator.prototype.buildRangeFromDuration = function (date, direction, duration, unit) {\r\n var alignment = this.opt('dateAlignment');\r\n var dateIncrementInput;\r\n var dateIncrementDuration;\r\n var start;\r\n var end;\r\n var res;\r\n // compute what the alignment should be\r\n if (!alignment) {\r\n dateIncrementInput = this.opt('dateIncrement');\r\n if (dateIncrementInput) {\r\n dateIncrementDuration = moment.duration(dateIncrementInput);\r\n // use the smaller of the two units\r\n if (dateIncrementDuration < duration) {\r\n alignment = util_1.computeDurationGreatestUnit(dateIncrementDuration, dateIncrementInput);\r\n }\r\n else {\r\n alignment = unit;\r\n }\r\n }\r\n else {\r\n alignment = unit;\r\n }\r\n }\r\n // if the view displays a single day or smaller\r\n if (duration.as('days') <= 1) {\r\n if (this._view.isHiddenDay(start)) {\r\n start = this._view.skipHiddenDays(start, direction);\r\n start.startOf('day');\r\n }\r\n }\r\n function computeRes() {\r\n start = date.clone().startOf(alignment);\r\n end = start.clone().add(duration);\r\n res = new UnzonedRange_1.default(start, end);\r\n }\r\n computeRes();\r\n // if range is completely enveloped by hidden days, go past the hidden days\r\n if (!this.trimHiddenDays(res)) {\r\n date = this._view.skipHiddenDays(date, direction);\r\n computeRes();\r\n }\r\n return res;\r\n };\r\n // Builds the \"current\" range when a dayCount is specified.\r\n // TODO: accept a MS-time instead of a moment `date`?\r\n DateProfileGenerator.prototype.buildRangeFromDayCount = function (date, direction, dayCount) {\r\n var customAlignment = this.opt('dateAlignment');\r\n var runningCount = 0;\r\n var start;\r\n var end;\r\n if (customAlignment || direction !== -1) {\r\n start = date.clone();\r\n if (customAlignment) {\r\n start.startOf(customAlignment);\r\n }\r\n start.startOf('day');\r\n start = this._view.skipHiddenDays(start);\r\n end = start.clone();\r\n do {\r\n end.add(1, 'day');\r\n if (!this._view.isHiddenDay(end)) {\r\n runningCount++;\r\n }\r\n } while (runningCount < dayCount);\r\n }\r\n else {\r\n end = date.clone().startOf('day').add(1, 'day');\r\n end = this._view.skipHiddenDays(end, -1, true);\r\n start = end.clone();\r\n do {\r\n start.add(-1, 'day');\r\n if (!this._view.isHiddenDay(start)) {\r\n runningCount++;\r\n }\r\n } while (runningCount < dayCount);\r\n }\r\n return new UnzonedRange_1.default(start, end);\r\n };\r\n // Builds a normalized range object for the \"visible\" range,\r\n // which is a way to define the currentUnzonedRange and activeUnzonedRange at the same time.\r\n // TODO: accept a MS-time instead of a moment `date`?\r\n DateProfileGenerator.prototype.buildCustomVisibleRange = function (date) {\r\n var visibleUnzonedRange = this._view.getUnzonedRangeOption('visibleRange', this._view.calendar.applyTimezone(date) // correct zone. also generates new obj that avoids mutations\r\n );\r\n if (visibleUnzonedRange && (visibleUnzonedRange.startMs == null || visibleUnzonedRange.endMs == null)) {\r\n return null;\r\n }\r\n return visibleUnzonedRange;\r\n };\r\n // Computes the range that will represent the element/cells for *rendering*,\r\n // but which may have voided days/times.\r\n // not responsible for trimming hidden days.\r\n DateProfileGenerator.prototype.buildRenderRange = function (currentUnzonedRange, currentRangeUnit, isRangeAllDay) {\r\n return currentUnzonedRange.clone();\r\n };\r\n // Compute the duration value that should be added/substracted to the current date\r\n // when a prev/next operation happens.\r\n DateProfileGenerator.prototype.buildDateIncrement = function (fallback) {\r\n var dateIncrementInput = this.opt('dateIncrement');\r\n var customAlignment;\r\n if (dateIncrementInput) {\r\n return moment.duration(dateIncrementInput);\r\n }\r\n else if ((customAlignment = this.opt('dateAlignment'))) {\r\n return moment.duration(1, customAlignment);\r\n }\r\n else if (fallback) {\r\n return fallback;\r\n }\r\n else {\r\n return moment.duration({ days: 1 });\r\n }\r\n };\r\n return DateProfileGenerator;\r\n}());\r\nexports.default = DateProfileGenerator;\r\n\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar Promise_1 = __webpack_require__(21);\r\nvar EventSource_1 = __webpack_require__(6);\r\nvar SingleEventDef_1 = __webpack_require__(9);\r\nvar ArrayEventSource = /** @class */ (function (_super) {\r\n tslib_1.__extends(ArrayEventSource, _super);\r\n function ArrayEventSource(calendar) {\r\n var _this = _super.call(this, calendar) || this;\r\n _this.eventDefs = []; // for if setRawEventDefs is never called\r\n return _this;\r\n }\r\n ArrayEventSource.parse = function (rawInput, calendar) {\r\n var rawProps;\r\n // normalize raw input\r\n if ($.isArray(rawInput.events)) { // extended form\r\n rawProps = rawInput;\r\n }\r\n else if ($.isArray(rawInput)) { // short form\r\n rawProps = { events: rawInput };\r\n }\r\n if (rawProps) {\r\n return EventSource_1.default.parse.call(this, rawProps, calendar);\r\n }\r\n return false;\r\n };\r\n ArrayEventSource.prototype.setRawEventDefs = function (rawEventDefs) {\r\n this.rawEventDefs = rawEventDefs;\r\n this.eventDefs = this.parseEventDefs(rawEventDefs);\r\n };\r\n ArrayEventSource.prototype.fetch = function (start, end, timezone) {\r\n var eventDefs = this.eventDefs;\r\n var i;\r\n if (this.currentTimezone != null &&\r\n this.currentTimezone !== timezone) {\r\n for (i = 0; i < eventDefs.length; i++) {\r\n if (eventDefs[i] instanceof SingleEventDef_1.default) {\r\n eventDefs[i].rezone();\r\n }\r\n }\r\n }\r\n this.currentTimezone = timezone;\r\n return Promise_1.default.resolve(eventDefs);\r\n };\r\n ArrayEventSource.prototype.addEventDef = function (eventDef) {\r\n this.eventDefs.push(eventDef);\r\n };\r\n /*\r\n eventDefId already normalized to a string\r\n */\r\n ArrayEventSource.prototype.removeEventDefsById = function (eventDefId) {\r\n return util_1.removeMatching(this.eventDefs, function (eventDef) {\r\n return eventDef.id === eventDefId;\r\n });\r\n };\r\n ArrayEventSource.prototype.removeAllEventDefs = function () {\r\n this.eventDefs = [];\r\n };\r\n ArrayEventSource.prototype.getPrimitive = function () {\r\n return this.rawEventDefs;\r\n };\r\n ArrayEventSource.prototype.applyManualStandardProps = function (rawProps) {\r\n var superSuccess = _super.prototype.applyManualStandardProps.call(this, rawProps);\r\n this.setRawEventDefs(rawProps.events);\r\n return superSuccess;\r\n };\r\n return ArrayEventSource;\r\n}(EventSource_1.default));\r\nexports.default = ArrayEventSource;\r\nArrayEventSource.defineStandardProps({\r\n events: false // don't automatically transfer\r\n});\r\n\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar StandardTheme_1 = __webpack_require__(221);\r\nvar JqueryUiTheme_1 = __webpack_require__(222);\r\nvar themeClassHash = {};\r\nfunction defineThemeSystem(themeName, themeClass) {\r\n themeClassHash[themeName] = themeClass;\r\n}\r\nexports.defineThemeSystem = defineThemeSystem;\r\nfunction getThemeSystemClass(themeSetting) {\r\n if (!themeSetting) {\r\n return StandardTheme_1.default;\r\n }\r\n else if (themeSetting === true) {\r\n return JqueryUiTheme_1.default;\r\n }\r\n else {\r\n return themeClassHash[themeSetting];\r\n }\r\n}\r\nexports.getThemeSystemClass = getThemeSystemClass;\r\n\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\n/*\r\nA cache for the left/right/top/bottom/width/height values for one or more elements.\r\nWorks with both offset (from topleft document) and position (from offsetParent).\r\n\noptions:\r\n- els\r\n- isHorizontal\r\n- isVertical\r\n*/\r\nvar CoordCache = /** @class */ (function () {\r\n function CoordCache(options) {\r\n this.isHorizontal = false; // whether to query for left/right/width\r\n this.isVertical = false; // whether to query for top/bottom/height\r\n this.els = $(options.els);\r\n this.isHorizontal = options.isHorizontal;\r\n this.isVertical = options.isVertical;\r\n this.forcedOffsetParentEl = options.offsetParent ? $(options.offsetParent) : null;\r\n }\r\n // Queries the els for coordinates and stores them.\r\n // Call this method before using and of the get* methods below.\r\n CoordCache.prototype.build = function () {\r\n var offsetParentEl = this.forcedOffsetParentEl;\r\n if (!offsetParentEl && this.els.length > 0) {\r\n offsetParentEl = this.els.eq(0).offsetParent();\r\n }\r\n this.origin = offsetParentEl ?\r\n offsetParentEl.offset() :\r\n null;\r\n this.boundingRect = this.queryBoundingRect();\r\n if (this.isHorizontal) {\r\n this.buildElHorizontals();\r\n }\r\n if (this.isVertical) {\r\n this.buildElVerticals();\r\n }\r\n };\r\n // Destroys all internal data about coordinates, freeing memory\r\n CoordCache.prototype.clear = function () {\r\n this.origin = null;\r\n this.boundingRect = null;\r\n this.lefts = null;\r\n this.rights = null;\r\n this.tops = null;\r\n this.bottoms = null;\r\n };\r\n // When called, if coord caches aren't built, builds them\r\n CoordCache.prototype.ensureBuilt = function () {\r\n if (!this.origin) {\r\n this.build();\r\n }\r\n };\r\n // Populates the left/right internal coordinate arrays\r\n CoordCache.prototype.buildElHorizontals = function () {\r\n var lefts = [];\r\n var rights = [];\r\n this.els.each(function (i, node) {\r\n var el = $(node);\r\n var left = el.offset().left;\r\n var width = el.outerWidth();\r\n lefts.push(left);\r\n rights.push(left + width);\r\n });\r\n this.lefts = lefts;\r\n this.rights = rights;\r\n };\r\n // Populates the top/bottom internal coordinate arrays\r\n CoordCache.prototype.buildElVerticals = function () {\r\n var tops = [];\r\n var bottoms = [];\r\n this.els.each(function (i, node) {\r\n var el = $(node);\r\n var top = el.offset().top;\r\n var height = el.outerHeight();\r\n tops.push(top);\r\n bottoms.push(top + height);\r\n });\r\n this.tops = tops;\r\n this.bottoms = bottoms;\r\n };\r\n // Given a left offset (from document left), returns the index of the el that it horizontally intersects.\r\n // If no intersection is made, returns undefined.\r\n CoordCache.prototype.getHorizontalIndex = function (leftOffset) {\r\n this.ensureBuilt();\r\n var lefts = this.lefts;\r\n var rights = this.rights;\r\n var len = lefts.length;\r\n var i;\r\n for (i = 0; i < len; i++) {\r\n if (leftOffset >= lefts[i] && leftOffset < rights[i]) {\r\n return i;\r\n }\r\n }\r\n };\r\n // Given a top offset (from document top), returns the index of the el that it vertically intersects.\r\n // If no intersection is made, returns undefined.\r\n CoordCache.prototype.getVerticalIndex = function (topOffset) {\r\n this.ensureBuilt();\r\n var tops = this.tops;\r\n var bottoms = this.bottoms;\r\n var len = tops.length;\r\n var i;\r\n for (i = 0; i < len; i++) {\r\n if (topOffset >= tops[i] && topOffset < bottoms[i]) {\r\n return i;\r\n }\r\n }\r\n };\r\n // Gets the left offset (from document left) of the element at the given index\r\n CoordCache.prototype.getLeftOffset = function (leftIndex) {\r\n this.ensureBuilt();\r\n return this.lefts[leftIndex];\r\n };\r\n // Gets the left position (from offsetParent left) of the element at the given index\r\n CoordCache.prototype.getLeftPosition = function (leftIndex) {\r\n this.ensureBuilt();\r\n return this.lefts[leftIndex] - this.origin.left;\r\n };\r\n // Gets the right offset (from document left) of the element at the given index.\r\n // This value is NOT relative to the document's right edge, like the CSS concept of \"right\" would be.\r\n CoordCache.prototype.getRightOffset = function (leftIndex) {\r\n this.ensureBuilt();\r\n return this.rights[leftIndex];\r\n };\r\n // Gets the right position (from offsetParent left) of the element at the given index.\r\n // This value is NOT relative to the offsetParent's right edge, like the CSS concept of \"right\" would be.\r\n CoordCache.prototype.getRightPosition = function (leftIndex) {\r\n this.ensureBuilt();\r\n return this.rights[leftIndex] - this.origin.left;\r\n };\r\n // Gets the width of the element at the given index\r\n CoordCache.prototype.getWidth = function (leftIndex) {\r\n this.ensureBuilt();\r\n return this.rights[leftIndex] - this.lefts[leftIndex];\r\n };\r\n // Gets the top offset (from document top) of the element at the given index\r\n CoordCache.prototype.getTopOffset = function (topIndex) {\r\n this.ensureBuilt();\r\n return this.tops[topIndex];\r\n };\r\n // Gets the top position (from offsetParent top) of the element at the given position\r\n CoordCache.prototype.getTopPosition = function (topIndex) {\r\n this.ensureBuilt();\r\n return this.tops[topIndex] - this.origin.top;\r\n };\r\n // Gets the bottom offset (from the document top) of the element at the given index.\r\n // This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of \"bottom\" would be.\r\n CoordCache.prototype.getBottomOffset = function (topIndex) {\r\n this.ensureBuilt();\r\n return this.bottoms[topIndex];\r\n };\r\n // Gets the bottom position (from the offsetParent top) of the element at the given index.\r\n // This value is NOT relative to the offsetParent's bottom edge, like the CSS concept of \"bottom\" would be.\r\n CoordCache.prototype.getBottomPosition = function (topIndex) {\r\n this.ensureBuilt();\r\n return this.bottoms[topIndex] - this.origin.top;\r\n };\r\n // Gets the height of the element at the given index\r\n CoordCache.prototype.getHeight = function (topIndex) {\r\n this.ensureBuilt();\r\n return this.bottoms[topIndex] - this.tops[topIndex];\r\n };\r\n // Bounding Rect\r\n // TODO: decouple this from CoordCache\r\n // Compute and return what the elements' bounding rectangle is, from the user's perspective.\r\n // Right now, only returns a rectangle if constrained by an overflow:scroll element.\r\n // Returns null if there are no elements\r\n CoordCache.prototype.queryBoundingRect = function () {\r\n var scrollParentEl;\r\n if (this.els.length > 0) {\r\n scrollParentEl = util_1.getScrollParent(this.els.eq(0));\r\n if (!scrollParentEl.is(document) &&\r\n !scrollParentEl.is('html,body') // don't consider these bounding rects. solves issue 3615\r\n ) {\r\n return util_1.getClientRect(scrollParentEl);\r\n }\r\n }\r\n return null;\r\n };\r\n CoordCache.prototype.isPointInBounds = function (leftOffset, topOffset) {\r\n return this.isLeftInBounds(leftOffset) && this.isTopInBounds(topOffset);\r\n };\r\n CoordCache.prototype.isLeftInBounds = function (leftOffset) {\r\n return !this.boundingRect || (leftOffset >= this.boundingRect.left && leftOffset < this.boundingRect.right);\r\n };\r\n CoordCache.prototype.isTopInBounds = function (topOffset) {\r\n return !this.boundingRect || (topOffset >= this.boundingRect.top && topOffset < this.boundingRect.bottom);\r\n };\r\n return CoordCache;\r\n}());\r\nexports.default = CoordCache;\r\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar ListenerMixin_1 = __webpack_require__(7);\r\nvar GlobalEmitter_1 = __webpack_require__(23);\r\n/* Tracks a drag's mouse movement, firing various handlers\r\n----------------------------------------------------------------------------------------------------------------------*/\r\n// TODO: use Emitter\r\nvar DragListener = /** @class */ (function () {\r\n function DragListener(options) {\r\n this.isInteracting = false;\r\n this.isDistanceSurpassed = false;\r\n this.isDelayEnded = false;\r\n this.isDragging = false;\r\n this.isTouch = false;\r\n this.isGeneric = false; // initiated by 'dragstart' (jqui)\r\n this.shouldCancelTouchScroll = true;\r\n this.scrollAlwaysKills = false;\r\n this.isAutoScroll = false;\r\n // defaults\r\n this.scrollSensitivity = 30; // pixels from edge for scrolling to start\r\n this.scrollSpeed = 200; // pixels per second, at maximum speed\r\n this.scrollIntervalMs = 50; // millisecond wait between scroll increment\r\n this.options = options || {};\r\n }\r\n // Interaction (high-level)\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DragListener.prototype.startInteraction = function (ev, extraOptions) {\r\n if (extraOptions === void 0) { extraOptions = {}; }\r\n if (ev.type === 'mousedown') {\r\n if (GlobalEmitter_1.default.get().shouldIgnoreMouse()) {\r\n return;\r\n }\r\n else if (!util_1.isPrimaryMouseButton(ev)) {\r\n return;\r\n }\r\n else {\r\n ev.preventDefault(); // prevents native selection in most browsers\r\n }\r\n }\r\n if (!this.isInteracting) {\r\n // process options\r\n this.delay = util_1.firstDefined(extraOptions.delay, this.options.delay, 0);\r\n this.minDistance = util_1.firstDefined(extraOptions.distance, this.options.distance, 0);\r\n this.subjectEl = this.options.subjectEl;\r\n util_1.preventSelection($('body'));\r\n this.isInteracting = true;\r\n this.isTouch = util_1.getEvIsTouch(ev);\r\n this.isGeneric = ev.type === 'dragstart';\r\n this.isDelayEnded = false;\r\n this.isDistanceSurpassed = false;\r\n this.originX = util_1.getEvX(ev);\r\n this.originY = util_1.getEvY(ev);\r\n this.scrollEl = util_1.getScrollParent($(ev.target));\r\n this.bindHandlers();\r\n this.initAutoScroll();\r\n this.handleInteractionStart(ev);\r\n this.startDelay(ev);\r\n if (!this.minDistance) {\r\n this.handleDistanceSurpassed(ev);\r\n }\r\n }\r\n };\r\n DragListener.prototype.handleInteractionStart = function (ev) {\r\n this.trigger('interactionStart', ev);\r\n };\r\n DragListener.prototype.endInteraction = function (ev, isCancelled) {\r\n if (this.isInteracting) {\r\n this.endDrag(ev);\r\n if (this.delayTimeoutId) {\r\n clearTimeout(this.delayTimeoutId);\r\n this.delayTimeoutId = null;\r\n }\r\n this.destroyAutoScroll();\r\n this.unbindHandlers();\r\n this.isInteracting = false;\r\n this.handleInteractionEnd(ev, isCancelled);\r\n util_1.allowSelection($('body'));\r\n }\r\n };\r\n DragListener.prototype.handleInteractionEnd = function (ev, isCancelled) {\r\n this.trigger('interactionEnd', ev, isCancelled || false);\r\n };\r\n // Binding To DOM\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DragListener.prototype.bindHandlers = function () {\r\n // some browsers (Safari in iOS 10) don't allow preventDefault on touch events that are bound after touchstart,\r\n // so listen to the GlobalEmitter singleton, which is always bound, instead of the document directly.\r\n var globalEmitter = GlobalEmitter_1.default.get();\r\n if (this.isGeneric) {\r\n this.listenTo($(document), {\r\n drag: this.handleMove,\r\n dragstop: this.endInteraction\r\n });\r\n }\r\n else if (this.isTouch) {\r\n this.listenTo(globalEmitter, {\r\n touchmove: this.handleTouchMove,\r\n touchend: this.endInteraction,\r\n scroll: this.handleTouchScroll\r\n });\r\n }\r\n else {\r\n this.listenTo(globalEmitter, {\r\n mousemove: this.handleMouseMove,\r\n mouseup: this.endInteraction\r\n });\r\n }\r\n this.listenTo(globalEmitter, {\r\n selectstart: util_1.preventDefault,\r\n contextmenu: util_1.preventDefault // long taps would open menu on Chrome dev tools\r\n });\r\n };\r\n DragListener.prototype.unbindHandlers = function () {\r\n this.stopListeningTo(GlobalEmitter_1.default.get());\r\n this.stopListeningTo($(document)); // for isGeneric\r\n };\r\n // Drag (high-level)\r\n // -----------------------------------------------------------------------------------------------------------------\r\n // extraOptions ignored if drag already started\r\n DragListener.prototype.startDrag = function (ev, extraOptions) {\r\n this.startInteraction(ev, extraOptions); // ensure interaction began\r\n if (!this.isDragging) {\r\n this.isDragging = true;\r\n this.handleDragStart(ev);\r\n }\r\n };\r\n DragListener.prototype.handleDragStart = function (ev) {\r\n this.trigger('dragStart', ev);\r\n };\r\n DragListener.prototype.handleMove = function (ev) {\r\n var dx = util_1.getEvX(ev) - this.originX;\r\n var dy = util_1.getEvY(ev) - this.originY;\r\n var minDistance = this.minDistance;\r\n var distanceSq; // current distance from the origin, squared\r\n if (!this.isDistanceSurpassed) {\r\n distanceSq = dx * dx + dy * dy;\r\n if (distanceSq >= minDistance * minDistance) { // use pythagorean theorem\r\n this.handleDistanceSurpassed(ev);\r\n }\r\n }\r\n if (this.isDragging) {\r\n this.handleDrag(dx, dy, ev);\r\n }\r\n };\r\n // Called while the mouse is being moved and when we know a legitimate drag is taking place\r\n DragListener.prototype.handleDrag = function (dx, dy, ev) {\r\n this.trigger('drag', dx, dy, ev);\r\n this.updateAutoScroll(ev); // will possibly cause scrolling\r\n };\r\n DragListener.prototype.endDrag = function (ev) {\r\n if (this.isDragging) {\r\n this.isDragging = false;\r\n this.handleDragEnd(ev);\r\n }\r\n };\r\n DragListener.prototype.handleDragEnd = function (ev) {\r\n this.trigger('dragEnd', ev);\r\n };\r\n // Delay\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DragListener.prototype.startDelay = function (initialEv) {\r\n var _this = this;\r\n if (this.delay) {\r\n this.delayTimeoutId = setTimeout(function () {\r\n _this.handleDelayEnd(initialEv);\r\n }, this.delay);\r\n }\r\n else {\r\n this.handleDelayEnd(initialEv);\r\n }\r\n };\r\n DragListener.prototype.handleDelayEnd = function (initialEv) {\r\n this.isDelayEnded = true;\r\n if (this.isDistanceSurpassed) {\r\n this.startDrag(initialEv);\r\n }\r\n };\r\n // Distance\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DragListener.prototype.handleDistanceSurpassed = function (ev) {\r\n this.isDistanceSurpassed = true;\r\n if (this.isDelayEnded) {\r\n this.startDrag(ev);\r\n }\r\n };\r\n // Mouse / Touch\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DragListener.prototype.handleTouchMove = function (ev) {\r\n // prevent inertia and touchmove-scrolling while dragging\r\n if (this.isDragging && this.shouldCancelTouchScroll) {\r\n ev.preventDefault();\r\n }\r\n this.handleMove(ev);\r\n };\r\n DragListener.prototype.handleMouseMove = function (ev) {\r\n this.handleMove(ev);\r\n };\r\n // Scrolling (unrelated to auto-scroll)\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DragListener.prototype.handleTouchScroll = function (ev) {\r\n // if the drag is being initiated by touch, but a scroll happens before\r\n // the drag-initiating delay is over, cancel the drag\r\n if (!this.isDragging || this.scrollAlwaysKills) {\r\n this.endInteraction(ev, true); // isCancelled=true\r\n }\r\n };\r\n // Utils\r\n // -----------------------------------------------------------------------------------------------------------------\r\n // Triggers a callback. Calls a function in the option hash of the same name.\r\n // Arguments beyond the first `name` are forwarded on.\r\n DragListener.prototype.trigger = function (name) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n if (this.options[name]) {\r\n this.options[name].apply(this, args);\r\n }\r\n // makes _methods callable by event name. TODO: kill this\r\n if (this['_' + name]) {\r\n this['_' + name].apply(this, args);\r\n }\r\n };\r\n // Auto-scroll\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DragListener.prototype.initAutoScroll = function () {\r\n var scrollEl = this.scrollEl;\r\n this.isAutoScroll =\r\n this.options.scroll &&\r\n scrollEl &&\r\n !scrollEl.is(window) &&\r\n !scrollEl.is(document);\r\n if (this.isAutoScroll) {\r\n // debounce makes sure rapid calls don't happen\r\n this.listenTo(scrollEl, 'scroll', util_1.debounce(this.handleDebouncedScroll, 100));\r\n }\r\n };\r\n DragListener.prototype.destroyAutoScroll = function () {\r\n this.endAutoScroll(); // kill any animation loop\r\n // remove the scroll handler if there is a scrollEl\r\n if (this.isAutoScroll) {\r\n this.stopListeningTo(this.scrollEl, 'scroll'); // will probably get removed by unbindHandlers too :(\r\n }\r\n };\r\n // Computes and stores the bounding rectangle of scrollEl\r\n DragListener.prototype.computeScrollBounds = function () {\r\n if (this.isAutoScroll) {\r\n this.scrollBounds = util_1.getOuterRect(this.scrollEl);\r\n // TODO: use getClientRect in future. but prevents auto scrolling when on top of scrollbars\r\n }\r\n };\r\n // Called when the dragging is in progress and scrolling should be updated\r\n DragListener.prototype.updateAutoScroll = function (ev) {\r\n var sensitivity = this.scrollSensitivity;\r\n var bounds = this.scrollBounds;\r\n var topCloseness;\r\n var bottomCloseness;\r\n var leftCloseness;\r\n var rightCloseness;\r\n var topVel = 0;\r\n var leftVel = 0;\r\n if (bounds) { // only scroll if scrollEl exists\r\n // compute closeness to edges. valid range is from 0.0 - 1.0\r\n topCloseness = (sensitivity - (util_1.getEvY(ev) - bounds.top)) / sensitivity;\r\n bottomCloseness = (sensitivity - (bounds.bottom - util_1.getEvY(ev))) / sensitivity;\r\n leftCloseness = (sensitivity - (util_1.getEvX(ev) - bounds.left)) / sensitivity;\r\n rightCloseness = (sensitivity - (bounds.right - util_1.getEvX(ev))) / sensitivity;\r\n // translate vertical closeness into velocity.\r\n // mouse must be completely in bounds for velocity to happen.\r\n if (topCloseness >= 0 && topCloseness <= 1) {\r\n topVel = topCloseness * this.scrollSpeed * -1; // negative. for scrolling up\r\n }\r\n else if (bottomCloseness >= 0 && bottomCloseness <= 1) {\r\n topVel = bottomCloseness * this.scrollSpeed;\r\n }\r\n // translate horizontal closeness into velocity\r\n if (leftCloseness >= 0 && leftCloseness <= 1) {\r\n leftVel = leftCloseness * this.scrollSpeed * -1; // negative. for scrolling left\r\n }\r\n else if (rightCloseness >= 0 && rightCloseness <= 1) {\r\n leftVel = rightCloseness * this.scrollSpeed;\r\n }\r\n }\r\n this.setScrollVel(topVel, leftVel);\r\n };\r\n // Sets the speed-of-scrolling for the scrollEl\r\n DragListener.prototype.setScrollVel = function (topVel, leftVel) {\r\n this.scrollTopVel = topVel;\r\n this.scrollLeftVel = leftVel;\r\n this.constrainScrollVel(); // massages into realistic values\r\n // if there is non-zero velocity, and an animation loop hasn't already started, then START\r\n if ((this.scrollTopVel || this.scrollLeftVel) && !this.scrollIntervalId) {\r\n this.scrollIntervalId = setInterval(util_1.proxy(this, 'scrollIntervalFunc'), // scope to `this`\r\n this.scrollIntervalMs);\r\n }\r\n };\r\n // Forces scrollTopVel and scrollLeftVel to be zero if scrolling has already gone all the way\r\n DragListener.prototype.constrainScrollVel = function () {\r\n var el = this.scrollEl;\r\n if (this.scrollTopVel < 0) { // scrolling up?\r\n if (el.scrollTop() <= 0) { // already scrolled all the way up?\r\n this.scrollTopVel = 0;\r\n }\r\n }\r\n else if (this.scrollTopVel > 0) { // scrolling down?\r\n if (el.scrollTop() + el[0].clientHeight >= el[0].scrollHeight) { // already scrolled all the way down?\r\n this.scrollTopVel = 0;\r\n }\r\n }\r\n if (this.scrollLeftVel < 0) { // scrolling left?\r\n if (el.scrollLeft() <= 0) { // already scrolled all the left?\r\n this.scrollLeftVel = 0;\r\n }\r\n }\r\n else if (this.scrollLeftVel > 0) { // scrolling right?\r\n if (el.scrollLeft() + el[0].clientWidth >= el[0].scrollWidth) { // already scrolled all the way right?\r\n this.scrollLeftVel = 0;\r\n }\r\n }\r\n };\r\n // This function gets called during every iteration of the scrolling animation loop\r\n DragListener.prototype.scrollIntervalFunc = function () {\r\n var el = this.scrollEl;\r\n var frac = this.scrollIntervalMs / 1000; // considering animation frequency, what the vel should be mult'd by\r\n // change the value of scrollEl's scroll\r\n if (this.scrollTopVel) {\r\n el.scrollTop(el.scrollTop() + this.scrollTopVel * frac);\r\n }\r\n if (this.scrollLeftVel) {\r\n el.scrollLeft(el.scrollLeft() + this.scrollLeftVel * frac);\r\n }\r\n this.constrainScrollVel(); // since the scroll values changed, recompute the velocities\r\n // if scrolled all the way, which causes the vels to be zero, stop the animation loop\r\n if (!this.scrollTopVel && !this.scrollLeftVel) {\r\n this.endAutoScroll();\r\n }\r\n };\r\n // Kills any existing scrolling animation loop\r\n DragListener.prototype.endAutoScroll = function () {\r\n if (this.scrollIntervalId) {\r\n clearInterval(this.scrollIntervalId);\r\n this.scrollIntervalId = null;\r\n this.handleScrollEnd();\r\n }\r\n };\r\n // Get called when the scrollEl is scrolled (NOTE: this is delayed via debounce)\r\n DragListener.prototype.handleDebouncedScroll = function () {\r\n // recompute all coordinates, but *only* if this is *not* part of our scrolling animation\r\n if (!this.scrollIntervalId) {\r\n this.handleScrollEnd();\r\n }\r\n };\r\n DragListener.prototype.handleScrollEnd = function () {\r\n // Called when scrolling has stopped, whether through auto scroll, or the user scrolling\r\n };\r\n return DragListener;\r\n}());\r\nexports.default = DragListener;\r\nListenerMixin_1.default.mixInto(DragListener);\r\n\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar util_1 = __webpack_require__(4);\r\nvar Mixin_1 = __webpack_require__(15);\r\n/*\r\nA set of rendering and date-related methods for a visual component comprised of one or more rows of day columns.\r\nPrerequisite: the object being mixed into needs to be a *Grid*\r\n*/\r\nvar DayTableMixin = /** @class */ (function (_super) {\r\n tslib_1.__extends(DayTableMixin, _super);\r\n function DayTableMixin() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // Populates internal variables used for date calculation and rendering\r\n DayTableMixin.prototype.updateDayTable = function () {\r\n var t = this;\r\n var view = t.view;\r\n var calendar = view.calendar;\r\n var date = calendar.msToUtcMoment(t.dateProfile.renderUnzonedRange.startMs, true);\r\n var end = calendar.msToUtcMoment(t.dateProfile.renderUnzonedRange.endMs, true);\r\n var dayIndex = -1;\r\n var dayIndices = [];\r\n var dayDates = [];\r\n var daysPerRow;\r\n var firstDay;\r\n var rowCnt;\r\n while (date.isBefore(end)) { // loop each day from start to end\r\n if (view.isHiddenDay(date)) {\r\n dayIndices.push(dayIndex + 0.5); // mark that it's between indices\r\n }\r\n else {\r\n dayIndex++;\r\n dayIndices.push(dayIndex);\r\n dayDates.push(date.clone());\r\n }\r\n date.add(1, 'days');\r\n }\r\n if (this.breakOnWeeks) {\r\n // count columns until the day-of-week repeats\r\n firstDay = dayDates[0].day();\r\n for (daysPerRow = 1; daysPerRow < dayDates.length; daysPerRow++) {\r\n if (dayDates[daysPerRow].day() === firstDay) {\r\n break;\r\n }\r\n }\r\n rowCnt = Math.ceil(dayDates.length / daysPerRow);\r\n }\r\n else {\r\n rowCnt = 1;\r\n daysPerRow = dayDates.length;\r\n }\r\n this.dayDates = dayDates;\r\n this.dayIndices = dayIndices;\r\n this.daysPerRow = daysPerRow;\r\n this.rowCnt = rowCnt;\r\n this.updateDayTableCols();\r\n };\r\n // Computes and assigned the colCnt property and updates any options that may be computed from it\r\n DayTableMixin.prototype.updateDayTableCols = function () {\r\n this.colCnt = this.computeColCnt();\r\n this.colHeadFormat =\r\n this.opt('columnHeaderFormat') ||\r\n this.opt('columnFormat') || // deprecated\r\n this.computeColHeadFormat();\r\n };\r\n // Determines how many columns there should be in the table\r\n DayTableMixin.prototype.computeColCnt = function () {\r\n return this.daysPerRow;\r\n };\r\n // Computes the ambiguously-timed moment for the given cell\r\n DayTableMixin.prototype.getCellDate = function (row, col) {\r\n return this.dayDates[this.getCellDayIndex(row, col)].clone();\r\n };\r\n // Computes the ambiguously-timed date range for the given cell\r\n DayTableMixin.prototype.getCellRange = function (row, col) {\r\n var start = this.getCellDate(row, col);\r\n var end = start.clone().add(1, 'days');\r\n return { start: start, end: end };\r\n };\r\n // Returns the number of day cells, chronologically, from the first of the grid (0-based)\r\n DayTableMixin.prototype.getCellDayIndex = function (row, col) {\r\n return row * this.daysPerRow + this.getColDayIndex(col);\r\n };\r\n // Returns the numner of day cells, chronologically, from the first cell in *any given row*\r\n DayTableMixin.prototype.getColDayIndex = function (col) {\r\n if (this.isRTL) {\r\n return this.colCnt - 1 - col;\r\n }\r\n else {\r\n return col;\r\n }\r\n };\r\n // Given a date, returns its chronolocial cell-index from the first cell of the grid.\r\n // If the date lies between cells (because of hiddenDays), returns a floating-point value between offsets.\r\n // If before the first offset, returns a negative number.\r\n // If after the last offset, returns an offset past the last cell offset.\r\n // Only works for *start* dates of cells. Will not work for exclusive end dates for cells.\r\n DayTableMixin.prototype.getDateDayIndex = function (date) {\r\n var dayIndices = this.dayIndices;\r\n var dayOffset = date.diff(this.dayDates[0], 'days');\r\n if (dayOffset < 0) {\r\n return dayIndices[0] - 1;\r\n }\r\n else if (dayOffset >= dayIndices.length) {\r\n return dayIndices[dayIndices.length - 1] + 1;\r\n }\r\n else {\r\n return dayIndices[dayOffset];\r\n }\r\n };\r\n /* Options\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Computes a default column header formatting string if `colFormat` is not explicitly defined\r\n DayTableMixin.prototype.computeColHeadFormat = function () {\r\n // if more than one week row, or if there are a lot of columns with not much space,\r\n // put just the day numbers will be in each cell\r\n if (this.rowCnt > 1 || this.colCnt > 10) {\r\n return 'ddd'; // \"Sat\"\r\n }\r\n else if (this.colCnt > 1) {\r\n return this.opt('dayOfMonthFormat'); // \"Sat 12/10\"\r\n }\r\n else {\r\n return 'dddd'; // \"Saturday\"\r\n }\r\n };\r\n /* Slicing\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Slices up a date range into a segment for every week-row it intersects with\r\n DayTableMixin.prototype.sliceRangeByRow = function (unzonedRange) {\r\n var daysPerRow = this.daysPerRow;\r\n var normalRange = this.view.computeDayRange(unzonedRange); // make whole-day range, considering nextDayThreshold\r\n var rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index\r\n var rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index\r\n var segs = [];\r\n var row;\r\n var rowFirst;\r\n var rowLast; // inclusive day-index range for current row\r\n var segFirst;\r\n var segLast; // inclusive day-index range for segment\r\n for (row = 0; row < this.rowCnt; row++) {\r\n rowFirst = row * daysPerRow;\r\n rowLast = rowFirst + daysPerRow - 1;\r\n // intersect segment's offset range with the row's\r\n segFirst = Math.max(rangeFirst, rowFirst);\r\n segLast = Math.min(rangeLast, rowLast);\r\n // deal with in-between indices\r\n segFirst = Math.ceil(segFirst); // in-between starts round to next cell\r\n segLast = Math.floor(segLast); // in-between ends round to prev cell\r\n if (segFirst <= segLast) { // was there any intersection with the current row?\r\n segs.push({\r\n row: row,\r\n // normalize to start of row\r\n firstRowDayIndex: segFirst - rowFirst,\r\n lastRowDayIndex: segLast - rowFirst,\r\n // must be matching integers to be the segment's start/end\r\n isStart: segFirst === rangeFirst,\r\n isEnd: segLast === rangeLast\r\n });\r\n }\r\n }\r\n return segs;\r\n };\r\n // Slices up a date range into a segment for every day-cell it intersects with.\r\n // TODO: make more DRY with sliceRangeByRow somehow.\r\n DayTableMixin.prototype.sliceRangeByDay = function (unzonedRange) {\r\n var daysPerRow = this.daysPerRow;\r\n var normalRange = this.view.computeDayRange(unzonedRange); // make whole-day range, considering nextDayThreshold\r\n var rangeFirst = this.getDateDayIndex(normalRange.start); // inclusive first index\r\n var rangeLast = this.getDateDayIndex(normalRange.end.clone().subtract(1, 'days')); // inclusive last index\r\n var segs = [];\r\n var row;\r\n var rowFirst;\r\n var rowLast; // inclusive day-index range for current row\r\n var i;\r\n var segFirst;\r\n var segLast; // inclusive day-index range for segment\r\n for (row = 0; row < this.rowCnt; row++) {\r\n rowFirst = row * daysPerRow;\r\n rowLast = rowFirst + daysPerRow - 1;\r\n for (i = rowFirst; i <= rowLast; i++) {\r\n // intersect segment's offset range with the row's\r\n segFirst = Math.max(rangeFirst, i);\r\n segLast = Math.min(rangeLast, i);\r\n // deal with in-between indices\r\n segFirst = Math.ceil(segFirst); // in-between starts round to next cell\r\n segLast = Math.floor(segLast); // in-between ends round to prev cell\r\n if (segFirst <= segLast) { // was there any intersection with the current row?\r\n segs.push({\r\n row: row,\r\n // normalize to start of row\r\n firstRowDayIndex: segFirst - rowFirst,\r\n lastRowDayIndex: segLast - rowFirst,\r\n // must be matching integers to be the segment's start/end\r\n isStart: segFirst === rangeFirst,\r\n isEnd: segLast === rangeLast\r\n });\r\n }\r\n }\r\n }\r\n return segs;\r\n };\r\n /* Header Rendering\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n DayTableMixin.prototype.renderHeadHtml = function () {\r\n var theme = this.view.calendar.theme;\r\n return '' +\r\n '<div class=\"fc-row ' + theme.getClass('headerRow') + '\">' +\r\n '<table class=\"' + theme.getClass('tableGrid') + '\">' +\r\n '<thead>' +\r\n this.renderHeadTrHtml() +\r\n '</thead>' +\r\n '</table>' +\r\n '</div>';\r\n };\r\n DayTableMixin.prototype.renderHeadIntroHtml = function () {\r\n return this.renderIntroHtml(); // fall back to generic\r\n };\r\n DayTableMixin.prototype.renderHeadTrHtml = function () {\r\n return '' +\r\n '<tr>' +\r\n (this.isRTL ? '' : this.renderHeadIntroHtml()) +\r\n this.renderHeadDateCellsHtml() +\r\n (this.isRTL ? this.renderHeadIntroHtml() : '') +\r\n '</tr>';\r\n };\r\n DayTableMixin.prototype.renderHeadDateCellsHtml = function () {\r\n var htmls = [];\r\n var col;\r\n var date;\r\n for (col = 0; col < this.colCnt; col++) {\r\n date = this.getCellDate(0, col);\r\n htmls.push(this.renderHeadDateCellHtml(date));\r\n }\r\n return htmls.join('');\r\n };\r\n // TODO: when internalApiVersion, accept an object for HTML attributes\r\n // (colspan should be no different)\r\n DayTableMixin.prototype.renderHeadDateCellHtml = function (date, colspan, otherAttrs) {\r\n var t = this;\r\n var view = t.view;\r\n var isDateValid = t.dateProfile.activeUnzonedRange.containsDate(date); // TODO: called too frequently. cache somehow.\r\n var classNames = [\r\n 'fc-day-header',\r\n view.calendar.theme.getClass('widgetHeader')\r\n ];\r\n var innerHtml;\r\n if (typeof t.opt('columnHeaderHtml') === 'function') {\r\n innerHtml = t.opt('columnHeaderHtml')(date);\r\n }\r\n else if (typeof t.opt('columnHeaderText') === 'function') {\r\n innerHtml = util_1.htmlEscape(t.opt('columnHeaderText')(date));\r\n }\r\n else {\r\n innerHtml = util_1.htmlEscape(date.format(t.colHeadFormat));\r\n }\r\n // if only one row of days, the classNames on the header can represent the specific days beneath\r\n if (t.rowCnt === 1) {\r\n classNames = classNames.concat(\r\n // includes the day-of-week class\r\n // noThemeHighlight=true (don't highlight the header)\r\n t.getDayClasses(date, true));\r\n }\r\n else {\r\n classNames.push('fc-' + util_1.dayIDs[date.day()]); // only add the day-of-week class\r\n }\r\n return '' +\r\n '<th class=\"' + classNames.join(' ') + '\"' +\r\n ((isDateValid && t.rowCnt) === 1 ?\r\n ' data-date=\"' + date.format('YYYY-MM-DD') + '\"' :\r\n '') +\r\n (colspan > 1 ?\r\n ' colspan=\"' + colspan + '\"' :\r\n '') +\r\n (otherAttrs ?\r\n ' ' + otherAttrs :\r\n '') +\r\n '>' +\r\n (isDateValid ?\r\n // don't make a link if the heading could represent multiple days, or if there's only one day (forceOff)\r\n view.buildGotoAnchorHtml({ date: date, forceOff: t.rowCnt > 1 || t.colCnt === 1 }, innerHtml) :\r\n // if not valid, display text, but no link\r\n innerHtml) +\r\n '</th>';\r\n };\r\n /* Background Rendering\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n DayTableMixin.prototype.renderBgTrHtml = function (row) {\r\n return '' +\r\n '<tr>' +\r\n (this.isRTL ? '' : this.renderBgIntroHtml(row)) +\r\n this.renderBgCellsHtml(row) +\r\n (this.isRTL ? this.renderBgIntroHtml(row) : '') +\r\n '</tr>';\r\n };\r\n DayTableMixin.prototype.renderBgIntroHtml = function (row) {\r\n return this.renderIntroHtml(); // fall back to generic\r\n };\r\n DayTableMixin.prototype.renderBgCellsHtml = function (row) {\r\n var htmls = [];\r\n var col;\r\n var date;\r\n for (col = 0; col < this.colCnt; col++) {\r\n date = this.getCellDate(row, col);\r\n htmls.push(this.renderBgCellHtml(date));\r\n }\r\n return htmls.join('');\r\n };\r\n DayTableMixin.prototype.renderBgCellHtml = function (date, otherAttrs) {\r\n var t = this;\r\n var view = t.view;\r\n var isDateValid = t.dateProfile.activeUnzonedRange.containsDate(date); // TODO: called too frequently. cache somehow.\r\n var classes = t.getDayClasses(date);\r\n classes.unshift('fc-day', view.calendar.theme.getClass('widgetContent'));\r\n return '<td class=\"' + classes.join(' ') + '\"' +\r\n (isDateValid ?\r\n ' data-date=\"' + date.format('YYYY-MM-DD') + '\"' : // if date has a time, won't format it\r\n '') +\r\n (otherAttrs ?\r\n ' ' + otherAttrs :\r\n '') +\r\n '></td>';\r\n };\r\n /* Generic\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n DayTableMixin.prototype.renderIntroHtml = function () {\r\n // Generates the default HTML intro for any row. User classes should override\r\n };\r\n // TODO: a generic method for dealing with <tr>, RTL, intro\r\n // when increment internalApiVersion\r\n // wrapTr (scheduler)\r\n /* Utils\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Applies the generic \"intro\" and \"outro\" HTML to the given cells.\r\n // Intro means the leftmost cell when the calendar is LTR and the rightmost cell when RTL. Vice-versa for outro.\r\n DayTableMixin.prototype.bookendCells = function (trEl) {\r\n var introHtml = this.renderIntroHtml();\r\n if (introHtml) {\r\n if (this.isRTL) {\r\n trEl.append(introHtml);\r\n }\r\n else {\r\n trEl.prepend(introHtml);\r\n }\r\n }\r\n };\r\n return DayTableMixin;\r\n}(Mixin_1.default));\r\nexports.default = DayTableMixin;\r\n\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar BusinessHourRenderer = /** @class */ (function () {\r\n /*\r\n component implements:\r\n - eventRangesToEventFootprints\r\n - eventFootprintsToSegs\r\n */\r\n function BusinessHourRenderer(component, fillRenderer) {\r\n this.component = component;\r\n this.fillRenderer = fillRenderer;\r\n }\r\n BusinessHourRenderer.prototype.render = function (businessHourGenerator) {\r\n var component = this.component;\r\n var unzonedRange = component._getDateProfile().activeUnzonedRange;\r\n var eventInstanceGroup = businessHourGenerator.buildEventInstanceGroup(component.hasAllDayBusinessHours, unzonedRange);\r\n var eventFootprints = eventInstanceGroup ?\r\n component.eventRangesToEventFootprints(eventInstanceGroup.sliceRenderRanges(unzonedRange)) :\r\n [];\r\n this.renderEventFootprints(eventFootprints);\r\n };\r\n BusinessHourRenderer.prototype.renderEventFootprints = function (eventFootprints) {\r\n var segs = this.component.eventFootprintsToSegs(eventFootprints);\r\n this.renderSegs(segs);\r\n this.segs = segs;\r\n };\r\n BusinessHourRenderer.prototype.renderSegs = function (segs) {\r\n if (this.fillRenderer) {\r\n this.fillRenderer.renderSegs('businessHours', segs, {\r\n getClasses: function (seg) {\r\n return ['fc-nonbusiness', 'fc-bgevent'];\r\n }\r\n });\r\n }\r\n };\r\n BusinessHourRenderer.prototype.unrender = function () {\r\n if (this.fillRenderer) {\r\n this.fillRenderer.unrender('businessHours');\r\n }\r\n this.segs = null;\r\n };\r\n BusinessHourRenderer.prototype.getSegs = function () {\r\n return this.segs || [];\r\n };\r\n return BusinessHourRenderer;\r\n}());\r\nexports.default = BusinessHourRenderer;\r\n\n\n/***/ }),\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar FillRenderer = /** @class */ (function () {\r\n function FillRenderer(component) {\r\n this.fillSegTag = 'div';\r\n this.component = component;\r\n this.elsByFill = {};\r\n }\r\n FillRenderer.prototype.renderFootprint = function (type, componentFootprint, props) {\r\n this.renderSegs(type, this.component.componentFootprintToSegs(componentFootprint), props);\r\n };\r\n FillRenderer.prototype.renderSegs = function (type, segs, props) {\r\n var els;\r\n segs = this.buildSegEls(type, segs, props); // assignes `.el` to each seg. returns successfully rendered segs\r\n els = this.attachSegEls(type, segs);\r\n if (els) {\r\n this.reportEls(type, els);\r\n }\r\n return segs;\r\n };\r\n // Unrenders a specific type of fill that is currently rendered on the grid\r\n FillRenderer.prototype.unrender = function (type) {\r\n var el = this.elsByFill[type];\r\n if (el) {\r\n el.remove();\r\n delete this.elsByFill[type];\r\n }\r\n };\r\n // Renders and assigns an `el` property for each fill segment. Generic enough to work with different types.\r\n // Only returns segments that successfully rendered.\r\n FillRenderer.prototype.buildSegEls = function (type, segs, props) {\r\n var _this = this;\r\n var html = '';\r\n var renderedSegs = [];\r\n var i;\r\n if (segs.length) {\r\n // build a large concatenation of segment HTML\r\n for (i = 0; i < segs.length; i++) {\r\n html += this.buildSegHtml(type, segs[i], props);\r\n }\r\n // Grab individual elements from the combined HTML string. Use each as the default rendering.\r\n // Then, compute the 'el' for each segment.\r\n $(html).each(function (i, node) {\r\n var seg = segs[i];\r\n var el = $(node);\r\n // allow custom filter methods per-type\r\n if (props.filterEl) {\r\n el = props.filterEl(seg, el);\r\n }\r\n if (el) { // custom filters did not cancel the render\r\n el = $(el); // allow custom filter to return raw DOM node\r\n // correct element type? (would be bad if a non-TD were inserted into a table for example)\r\n if (el.is(_this.fillSegTag)) {\r\n seg.el = el;\r\n renderedSegs.push(seg);\r\n }\r\n }\r\n });\r\n }\r\n return renderedSegs;\r\n };\r\n // Builds the HTML needed for one fill segment. Generic enough to work with different types.\r\n FillRenderer.prototype.buildSegHtml = function (type, seg, props) {\r\n // custom hooks per-type\r\n var classes = props.getClasses ? props.getClasses(seg) : [];\r\n var css = util_1.cssToStr(props.getCss ? props.getCss(seg) : {});\r\n return '<' + this.fillSegTag +\r\n (classes.length ? ' class=\"' + classes.join(' ') + '\"' : '') +\r\n (css ? ' style=\"' + css + '\"' : '') +\r\n '></' + this.fillSegTag + '>';\r\n };\r\n // Should return wrapping DOM structure\r\n FillRenderer.prototype.attachSegEls = function (type, segs) {\r\n // subclasses must implement\r\n };\r\n FillRenderer.prototype.reportEls = function (type, nodes) {\r\n if (this.elsByFill[type]) {\r\n this.elsByFill[type] = this.elsByFill[type].add(nodes);\r\n }\r\n else {\r\n this.elsByFill[type] = $(nodes);\r\n }\r\n };\r\n return FillRenderer;\r\n}());\r\nexports.default = FillRenderer;\r\n\n\n/***/ }),\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar SingleEventDef_1 = __webpack_require__(9);\r\nvar EventFootprint_1 = __webpack_require__(34);\r\nvar EventSource_1 = __webpack_require__(6);\r\nvar HelperRenderer = /** @class */ (function () {\r\n function HelperRenderer(component, eventRenderer) {\r\n this.view = component._getView();\r\n this.component = component;\r\n this.eventRenderer = eventRenderer;\r\n }\r\n HelperRenderer.prototype.renderComponentFootprint = function (componentFootprint) {\r\n this.renderEventFootprints([\r\n this.fabricateEventFootprint(componentFootprint)\r\n ]);\r\n };\r\n HelperRenderer.prototype.renderEventDraggingFootprints = function (eventFootprints, sourceSeg, isTouch) {\r\n this.renderEventFootprints(eventFootprints, sourceSeg, 'fc-dragging', isTouch ? null : this.view.opt('dragOpacity'));\r\n };\r\n HelperRenderer.prototype.renderEventResizingFootprints = function (eventFootprints, sourceSeg, isTouch) {\r\n this.renderEventFootprints(eventFootprints, sourceSeg, 'fc-resizing');\r\n };\r\n HelperRenderer.prototype.renderEventFootprints = function (eventFootprints, sourceSeg, extraClassNames, opacity) {\r\n var segs = this.component.eventFootprintsToSegs(eventFootprints);\r\n var classNames = 'fc-helper ' + (extraClassNames || '');\r\n var i;\r\n // assigns each seg's el and returns a subset of segs that were rendered\r\n segs = this.eventRenderer.renderFgSegEls(segs);\r\n for (i = 0; i < segs.length; i++) {\r\n segs[i].el.addClass(classNames);\r\n }\r\n if (opacity != null) {\r\n for (i = 0; i < segs.length; i++) {\r\n segs[i].el.css('opacity', opacity);\r\n }\r\n }\r\n this.helperEls = this.renderSegs(segs, sourceSeg);\r\n };\r\n /*\r\n Must return all mock event elements\r\n */\r\n HelperRenderer.prototype.renderSegs = function (segs, sourceSeg) {\r\n // Subclasses must implement\r\n };\r\n HelperRenderer.prototype.unrender = function () {\r\n if (this.helperEls) {\r\n this.helperEls.remove();\r\n this.helperEls = null;\r\n }\r\n };\r\n HelperRenderer.prototype.fabricateEventFootprint = function (componentFootprint) {\r\n var calendar = this.view.calendar;\r\n var eventDateProfile = calendar.footprintToDateProfile(componentFootprint);\r\n var dummyEvent = new SingleEventDef_1.default(new EventSource_1.default(calendar));\r\n var dummyInstance;\r\n dummyEvent.dateProfile = eventDateProfile;\r\n dummyInstance = dummyEvent.buildInstance();\r\n return new EventFootprint_1.default(componentFootprint, dummyEvent, dummyInstance);\r\n };\r\n return HelperRenderer;\r\n}());\r\nexports.default = HelperRenderer;\r\n\n\n/***/ }),\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar GlobalEmitter_1 = __webpack_require__(23);\r\nvar Interaction_1 = __webpack_require__(14);\r\nvar EventPointing = /** @class */ (function (_super) {\r\n tslib_1.__extends(EventPointing, _super);\r\n function EventPointing() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /*\r\n component must implement:\r\n - publiclyTrigger\r\n */\r\n EventPointing.prototype.bindToEl = function (el) {\r\n var component = this.component;\r\n component.bindSegHandlerToEl(el, 'click', this.handleClick.bind(this));\r\n component.bindSegHandlerToEl(el, 'mouseenter', this.handleMouseover.bind(this));\r\n component.bindSegHandlerToEl(el, 'mouseleave', this.handleMouseout.bind(this));\r\n };\r\n EventPointing.prototype.handleClick = function (seg, ev) {\r\n var res = this.component.publiclyTrigger('eventClick', {\r\n context: seg.el[0],\r\n args: [seg.footprint.getEventLegacy(), ev, this.view]\r\n });\r\n if (res === false) {\r\n ev.preventDefault();\r\n }\r\n };\r\n // Updates internal state and triggers handlers for when an event element is moused over\r\n EventPointing.prototype.handleMouseover = function (seg, ev) {\r\n if (!GlobalEmitter_1.default.get().shouldIgnoreMouse() &&\r\n !this.mousedOverSeg) {\r\n this.mousedOverSeg = seg;\r\n // TODO: move to EventSelecting's responsibility\r\n if (this.view.isEventDefResizable(seg.footprint.eventDef)) {\r\n seg.el.addClass('fc-allow-mouse-resize');\r\n }\r\n this.component.publiclyTrigger('eventMouseover', {\r\n context: seg.el[0],\r\n args: [seg.footprint.getEventLegacy(), ev, this.view]\r\n });\r\n }\r\n };\r\n // Updates internal state and triggers handlers for when an event element is moused out.\r\n // Can be given no arguments, in which case it will mouseout the segment that was previously moused over.\r\n EventPointing.prototype.handleMouseout = function (seg, ev) {\r\n if (this.mousedOverSeg) {\r\n this.mousedOverSeg = null;\r\n // TODO: move to EventSelecting's responsibility\r\n if (this.view.isEventDefResizable(seg.footprint.eventDef)) {\r\n seg.el.removeClass('fc-allow-mouse-resize');\r\n }\r\n this.component.publiclyTrigger('eventMouseout', {\r\n context: seg.el[0],\r\n args: [\r\n seg.footprint.getEventLegacy(),\r\n ev || {},\r\n this.view\r\n ]\r\n });\r\n }\r\n };\r\n EventPointing.prototype.end = function () {\r\n if (this.mousedOverSeg) {\r\n this.handleMouseout(this.mousedOverSeg);\r\n }\r\n };\r\n return EventPointing;\r\n}(Interaction_1.default));\r\nexports.default = EventPointing;\r\n\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar Mixin_1 = __webpack_require__(15);\r\nvar DateClicking_1 = __webpack_require__(237);\r\nvar DateSelecting_1 = __webpack_require__(236);\r\nvar EventPointing_1 = __webpack_require__(64);\r\nvar EventDragging_1 = __webpack_require__(235);\r\nvar EventResizing_1 = __webpack_require__(234);\r\nvar ExternalDropping_1 = __webpack_require__(233);\r\nvar StandardInteractionsMixin = /** @class */ (function (_super) {\r\n tslib_1.__extends(StandardInteractionsMixin, _super);\r\n function StandardInteractionsMixin() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return StandardInteractionsMixin;\r\n}(Mixin_1.default));\r\nexports.default = StandardInteractionsMixin;\r\nStandardInteractionsMixin.prototype.dateClickingClass = DateClicking_1.default;\r\nStandardInteractionsMixin.prototype.dateSelectingClass = DateSelecting_1.default;\r\nStandardInteractionsMixin.prototype.eventPointingClass = EventPointing_1.default;\r\nStandardInteractionsMixin.prototype.eventDraggingClass = EventDragging_1.default;\r\nStandardInteractionsMixin.prototype.eventResizingClass = EventResizing_1.default;\r\nStandardInteractionsMixin.prototype.externalDroppingClass = ExternalDropping_1.default;\r\n\n\n/***/ }),\n/* 66 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar CoordCache_1 = __webpack_require__(58);\r\nvar Popover_1 = __webpack_require__(227);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar ComponentFootprint_1 = __webpack_require__(12);\r\nvar EventFootprint_1 = __webpack_require__(34);\r\nvar BusinessHourRenderer_1 = __webpack_require__(61);\r\nvar StandardInteractionsMixin_1 = __webpack_require__(65);\r\nvar InteractiveDateComponent_1 = __webpack_require__(42);\r\nvar DayTableMixin_1 = __webpack_require__(60);\r\nvar DayGridEventRenderer_1 = __webpack_require__(243);\r\nvar DayGridHelperRenderer_1 = __webpack_require__(244);\r\nvar DayGridFillRenderer_1 = __webpack_require__(245);\r\n/* A component that renders a grid of whole-days that runs horizontally. There can be multiple rows, one per week.\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nvar DayGrid = /** @class */ (function (_super) {\r\n tslib_1.__extends(DayGrid, _super);\r\n function DayGrid(view) {\r\n var _this = _super.call(this, view) || this;\r\n _this.cellWeekNumbersVisible = false; // display week numbers in day cell?\r\n _this.bottomCoordPadding = 0; // hack for extending the hit area for the last row of the coordinate grid\r\n // isRigid determines whether the individual rows should ignore the contents and be a constant height.\r\n // Relies on the view's colCnt and rowCnt. In the future, this component should probably be self-sufficient.\r\n _this.isRigid = false;\r\n _this.hasAllDayBusinessHours = true;\r\n return _this;\r\n }\r\n // Slices up the given span (unzoned start/end with other misc data) into an array of segments\r\n DayGrid.prototype.componentFootprintToSegs = function (componentFootprint) {\r\n var segs = this.sliceRangeByRow(componentFootprint.unzonedRange);\r\n var i;\r\n var seg;\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n if (this.isRTL) {\r\n seg.leftCol = this.daysPerRow - 1 - seg.lastRowDayIndex;\r\n seg.rightCol = this.daysPerRow - 1 - seg.firstRowDayIndex;\r\n }\r\n else {\r\n seg.leftCol = seg.firstRowDayIndex;\r\n seg.rightCol = seg.lastRowDayIndex;\r\n }\r\n }\r\n return segs;\r\n };\r\n /* Date Rendering\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n DayGrid.prototype.renderDates = function (dateProfile) {\r\n this.dateProfile = dateProfile;\r\n this.updateDayTable();\r\n this.renderGrid();\r\n };\r\n DayGrid.prototype.unrenderDates = function () {\r\n this.removeSegPopover();\r\n };\r\n // Renders the rows and columns into the component's `this.el`, which should already be assigned.\r\n DayGrid.prototype.renderGrid = function () {\r\n var view = this.view;\r\n var rowCnt = this.rowCnt;\r\n var colCnt = this.colCnt;\r\n var html = '';\r\n var row;\r\n var col;\r\n if (this.headContainerEl) {\r\n this.headContainerEl.html(this.renderHeadHtml());\r\n }\r\n for (row = 0; row < rowCnt; row++) {\r\n html += this.renderDayRowHtml(row, this.isRigid);\r\n }\r\n this.el.html(html);\r\n this.rowEls = this.el.find('.fc-row');\r\n this.cellEls = this.el.find('.fc-day, .fc-disabled-day');\r\n this.rowCoordCache = new CoordCache_1.default({\r\n els: this.rowEls,\r\n isVertical: true\r\n });\r\n this.colCoordCache = new CoordCache_1.default({\r\n els: this.cellEls.slice(0, this.colCnt),\r\n isHorizontal: true\r\n });\r\n // trigger dayRender with each cell's element\r\n for (row = 0; row < rowCnt; row++) {\r\n for (col = 0; col < colCnt; col++) {\r\n this.publiclyTrigger('dayRender', {\r\n context: view,\r\n args: [\r\n this.getCellDate(row, col),\r\n this.getCellEl(row, col),\r\n view\r\n ]\r\n });\r\n }\r\n }\r\n };\r\n // Generates the HTML for a single row, which is a div that wraps a table.\r\n // `row` is the row number.\r\n DayGrid.prototype.renderDayRowHtml = function (row, isRigid) {\r\n var theme = this.view.calendar.theme;\r\n var classes = ['fc-row', 'fc-week', theme.getClass('dayRow')];\r\n if (isRigid) {\r\n classes.push('fc-rigid');\r\n }\r\n return '' +\r\n '<div class=\"' + classes.join(' ') + '\">' +\r\n '<div class=\"fc-bg\">' +\r\n '<table class=\"' + theme.getClass('tableGrid') + '\">' +\r\n this.renderBgTrHtml(row) +\r\n '</table>' +\r\n '</div>' +\r\n '<div class=\"fc-content-skeleton\">' +\r\n '<table>' +\r\n (this.getIsNumbersVisible() ?\r\n '<thead>' +\r\n this.renderNumberTrHtml(row) +\r\n '</thead>' :\r\n '') +\r\n '</table>' +\r\n '</div>' +\r\n '</div>';\r\n };\r\n DayGrid.prototype.getIsNumbersVisible = function () {\r\n return this.getIsDayNumbersVisible() || this.cellWeekNumbersVisible;\r\n };\r\n DayGrid.prototype.getIsDayNumbersVisible = function () {\r\n return this.rowCnt > 1;\r\n };\r\n /* Grid Number Rendering\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n DayGrid.prototype.renderNumberTrHtml = function (row) {\r\n return '' +\r\n '<tr>' +\r\n (this.isRTL ? '' : this.renderNumberIntroHtml(row)) +\r\n this.renderNumberCellsHtml(row) +\r\n (this.isRTL ? this.renderNumberIntroHtml(row) : '') +\r\n '</tr>';\r\n };\r\n DayGrid.prototype.renderNumberIntroHtml = function (row) {\r\n return this.renderIntroHtml();\r\n };\r\n DayGrid.prototype.renderNumberCellsHtml = function (row) {\r\n var htmls = [];\r\n var col;\r\n var date;\r\n for (col = 0; col < this.colCnt; col++) {\r\n date = this.getCellDate(row, col);\r\n htmls.push(this.renderNumberCellHtml(date));\r\n }\r\n return htmls.join('');\r\n };\r\n // Generates the HTML for the <td>s of the \"number\" row in the DayGrid's content skeleton.\r\n // The number row will only exist if either day numbers or week numbers are turned on.\r\n DayGrid.prototype.renderNumberCellHtml = function (date) {\r\n var view = this.view;\r\n var html = '';\r\n var isDateValid = this.dateProfile.activeUnzonedRange.containsDate(date); // TODO: called too frequently. cache somehow.\r\n var isDayNumberVisible = this.getIsDayNumbersVisible() && isDateValid;\r\n var classes;\r\n var weekCalcFirstDoW;\r\n if (!isDayNumberVisible && !this.cellWeekNumbersVisible) {\r\n // no numbers in day cell (week number must be along the side)\r\n return '<td></td>'; // will create an empty space above events :(\r\n }\r\n classes = this.getDayClasses(date);\r\n classes.unshift('fc-day-top');\r\n if (this.cellWeekNumbersVisible) {\r\n // To determine the day of week number change under ISO, we cannot\r\n // rely on moment.js methods such as firstDayOfWeek() or weekday(),\r\n // because they rely on the locale's dow (possibly overridden by\r\n // our firstDay option), which may not be Monday. We cannot change\r\n // dow, because that would affect the calendar start day as well.\r\n if (date._locale._fullCalendar_weekCalc === 'ISO') {\r\n weekCalcFirstDoW = 1; // Monday by ISO 8601 definition\r\n }\r\n else {\r\n weekCalcFirstDoW = date._locale.firstDayOfWeek();\r\n }\r\n }\r\n html += '<td class=\"' + classes.join(' ') + '\"' +\r\n (isDateValid ?\r\n ' data-date=\"' + date.format() + '\"' :\r\n '') +\r\n '>';\r\n if (this.cellWeekNumbersVisible && (date.day() === weekCalcFirstDoW)) {\r\n html += view.buildGotoAnchorHtml({ date: date, type: 'week' }, { 'class': 'fc-week-number' }, date.format('w') // inner HTML\r\n );\r\n }\r\n if (isDayNumberVisible) {\r\n html += view.buildGotoAnchorHtml(date, { 'class': 'fc-day-number' }, date.format('D') // inner HTML\r\n );\r\n }\r\n html += '</td>';\r\n return html;\r\n };\r\n /* Hit System\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n DayGrid.prototype.prepareHits = function () {\r\n this.colCoordCache.build();\r\n this.rowCoordCache.build();\r\n this.rowCoordCache.bottoms[this.rowCnt - 1] += this.bottomCoordPadding; // hack\r\n };\r\n DayGrid.prototype.releaseHits = function () {\r\n this.colCoordCache.clear();\r\n this.rowCoordCache.clear();\r\n };\r\n DayGrid.prototype.queryHit = function (leftOffset, topOffset) {\r\n if (this.colCoordCache.isLeftInBounds(leftOffset) && this.rowCoordCache.isTopInBounds(topOffset)) {\r\n var col = this.colCoordCache.getHorizontalIndex(leftOffset);\r\n var row = this.rowCoordCache.getVerticalIndex(topOffset);\r\n if (row != null && col != null) {\r\n return this.getCellHit(row, col);\r\n }\r\n }\r\n };\r\n DayGrid.prototype.getHitFootprint = function (hit) {\r\n var range = this.getCellRange(hit.row, hit.col);\r\n return new ComponentFootprint_1.default(new UnzonedRange_1.default(range.start, range.end), true // all-day?\r\n );\r\n };\r\n DayGrid.prototype.getHitEl = function (hit) {\r\n return this.getCellEl(hit.row, hit.col);\r\n };\r\n /* Cell System\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // FYI: the first column is the leftmost column, regardless of date\r\n DayGrid.prototype.getCellHit = function (row, col) {\r\n return {\r\n row: row,\r\n col: col,\r\n component: this,\r\n left: this.colCoordCache.getLeftOffset(col),\r\n right: this.colCoordCache.getRightOffset(col),\r\n top: this.rowCoordCache.getTopOffset(row),\r\n bottom: this.rowCoordCache.getBottomOffset(row)\r\n };\r\n };\r\n DayGrid.prototype.getCellEl = function (row, col) {\r\n return this.cellEls.eq(row * this.colCnt + col);\r\n };\r\n /* Event Rendering\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Unrenders all events currently rendered on the grid\r\n DayGrid.prototype.executeEventUnrender = function () {\r\n this.removeSegPopover(); // removes the \"more..\" events popover\r\n _super.prototype.executeEventUnrender.call(this);\r\n };\r\n // Retrieves all rendered segment objects currently rendered on the grid\r\n DayGrid.prototype.getOwnEventSegs = function () {\r\n // append the segments from the \"more...\" popover\r\n return _super.prototype.getOwnEventSegs.call(this).concat(this.popoverSegs || []);\r\n };\r\n /* Event Drag Visualization\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Renders a visual indication of an event or external element being dragged.\r\n // `eventLocation` has zoned start and end (optional)\r\n DayGrid.prototype.renderDrag = function (eventFootprints, seg, isTouch) {\r\n var i;\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n this.renderHighlight(eventFootprints[i].componentFootprint);\r\n }\r\n // render drags from OTHER components as helpers\r\n if (eventFootprints.length && seg && seg.component !== this) {\r\n this.helperRenderer.renderEventDraggingFootprints(eventFootprints, seg, isTouch);\r\n return true; // signal helpers rendered\r\n }\r\n };\r\n // Unrenders any visual indication of a hovering event\r\n DayGrid.prototype.unrenderDrag = function () {\r\n this.unrenderHighlight();\r\n this.helperRenderer.unrender();\r\n };\r\n /* Event Resize Visualization\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Renders a visual indication of an event being resized\r\n DayGrid.prototype.renderEventResize = function (eventFootprints, seg, isTouch) {\r\n var i;\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n this.renderHighlight(eventFootprints[i].componentFootprint);\r\n }\r\n this.helperRenderer.renderEventResizingFootprints(eventFootprints, seg, isTouch);\r\n };\r\n // Unrenders a visual indication of an event being resized\r\n DayGrid.prototype.unrenderEventResize = function () {\r\n this.unrenderHighlight();\r\n this.helperRenderer.unrender();\r\n };\r\n /* More+ Link Popover\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n DayGrid.prototype.removeSegPopover = function () {\r\n if (this.segPopover) {\r\n this.segPopover.hide(); // in handler, will call segPopover's removeElement\r\n }\r\n };\r\n // Limits the number of \"levels\" (vertically stacking layers of events) for each row of the grid.\r\n // `levelLimit` can be false (don't limit), a number, or true (should be computed).\r\n DayGrid.prototype.limitRows = function (levelLimit) {\r\n var rowStructs = this.eventRenderer.rowStructs || [];\r\n var row; // row #\r\n var rowLevelLimit;\r\n for (row = 0; row < rowStructs.length; row++) {\r\n this.unlimitRow(row);\r\n if (!levelLimit) {\r\n rowLevelLimit = false;\r\n }\r\n else if (typeof levelLimit === 'number') {\r\n rowLevelLimit = levelLimit;\r\n }\r\n else {\r\n rowLevelLimit = this.computeRowLevelLimit(row);\r\n }\r\n if (rowLevelLimit !== false) {\r\n this.limitRow(row, rowLevelLimit);\r\n }\r\n }\r\n };\r\n // Computes the number of levels a row will accomodate without going outside its bounds.\r\n // Assumes the row is \"rigid\" (maintains a constant height regardless of what is inside).\r\n // `row` is the row number.\r\n DayGrid.prototype.computeRowLevelLimit = function (row) {\r\n var rowEl = this.rowEls.eq(row); // the containing \"fake\" row div\r\n var rowHeight = rowEl.height(); // TODO: cache somehow?\r\n var trEls = this.eventRenderer.rowStructs[row].tbodyEl.children();\r\n var i;\r\n var trEl;\r\n var trHeight;\r\n function iterInnerHeights(i, childNode) {\r\n trHeight = Math.max(trHeight, $(childNode).outerHeight());\r\n }\r\n // Reveal one level <tr> at a time and stop when we find one out of bounds\r\n for (i = 0; i < trEls.length; i++) {\r\n trEl = trEls.eq(i).removeClass('fc-limited'); // reset to original state (reveal)\r\n // with rowspans>1 and IE8, trEl.outerHeight() would return the height of the largest cell,\r\n // so instead, find the tallest inner content element.\r\n trHeight = 0;\r\n trEl.find('> td > :first-child').each(iterInnerHeights);\r\n if (trEl.position().top + trHeight > rowHeight) {\r\n return i;\r\n }\r\n }\r\n return false; // should not limit at all\r\n };\r\n // Limits the given grid row to the maximum number of levels and injects \"more\" links if necessary.\r\n // `row` is the row number.\r\n // `levelLimit` is a number for the maximum (inclusive) number of levels allowed.\r\n DayGrid.prototype.limitRow = function (row, levelLimit) {\r\n var _this = this;\r\n var rowStruct = this.eventRenderer.rowStructs[row];\r\n var moreNodes = []; // array of \"more\" <a> links and <td> DOM nodes\r\n var col = 0; // col #, left-to-right (not chronologically)\r\n var levelSegs; // array of segment objects in the last allowable level, ordered left-to-right\r\n var cellMatrix; // a matrix (by level, then column) of all <td> jQuery elements in the row\r\n var limitedNodes; // array of temporarily hidden level <tr> and segment <td> DOM nodes\r\n var i;\r\n var seg;\r\n var segsBelow; // array of segment objects below `seg` in the current `col`\r\n var totalSegsBelow; // total number of segments below `seg` in any of the columns `seg` occupies\r\n var colSegsBelow; // array of segment arrays, below seg, one for each column (offset from segs's first column)\r\n var td;\r\n var rowspan;\r\n var segMoreNodes; // array of \"more\" <td> cells that will stand-in for the current seg's cell\r\n var j;\r\n var moreTd;\r\n var moreWrap;\r\n var moreLink;\r\n // Iterates through empty level cells and places \"more\" links inside if need be\r\n var emptyCellsUntil = function (endCol) {\r\n while (col < endCol) {\r\n segsBelow = _this.getCellSegs(row, col, levelLimit);\r\n if (segsBelow.length) {\r\n td = cellMatrix[levelLimit - 1][col];\r\n moreLink = _this.renderMoreLink(row, col, segsBelow);\r\n moreWrap = $('<div>').append(moreLink);\r\n td.append(moreWrap);\r\n moreNodes.push(moreWrap[0]);\r\n }\r\n col++;\r\n }\r\n };\r\n if (levelLimit && levelLimit < rowStruct.segLevels.length) { // is it actually over the limit?\r\n levelSegs = rowStruct.segLevels[levelLimit - 1];\r\n cellMatrix = rowStruct.cellMatrix;\r\n limitedNodes = rowStruct.tbodyEl.children().slice(levelLimit) // get level <tr> elements past the limit\r\n .addClass('fc-limited').get(); // hide elements and get a simple DOM-nodes array\r\n // iterate though segments in the last allowable level\r\n for (i = 0; i < levelSegs.length; i++) {\r\n seg = levelSegs[i];\r\n emptyCellsUntil(seg.leftCol); // process empty cells before the segment\r\n // determine *all* segments below `seg` that occupy the same columns\r\n colSegsBelow = [];\r\n totalSegsBelow = 0;\r\n while (col <= seg.rightCol) {\r\n segsBelow = this.getCellSegs(row, col, levelLimit);\r\n colSegsBelow.push(segsBelow);\r\n totalSegsBelow += segsBelow.length;\r\n col++;\r\n }\r\n if (totalSegsBelow) { // do we need to replace this segment with one or many \"more\" links?\r\n td = cellMatrix[levelLimit - 1][seg.leftCol]; // the segment's parent cell\r\n rowspan = td.attr('rowspan') || 1;\r\n segMoreNodes = [];\r\n // make a replacement <td> for each column the segment occupies. will be one for each colspan\r\n for (j = 0; j < colSegsBelow.length; j++) {\r\n moreTd = $('<td class=\"fc-more-cell\">').attr('rowspan', rowspan);\r\n segsBelow = colSegsBelow[j];\r\n moreLink = this.renderMoreLink(row, seg.leftCol + j, [seg].concat(segsBelow) // count seg as hidden too\r\n );\r\n moreWrap = $('<div>').append(moreLink);\r\n moreTd.append(moreWrap);\r\n segMoreNodes.push(moreTd[0]);\r\n moreNodes.push(moreTd[0]);\r\n }\r\n td.addClass('fc-limited').after($(segMoreNodes)); // hide original <td> and inject replacements\r\n limitedNodes.push(td[0]);\r\n }\r\n }\r\n emptyCellsUntil(this.colCnt); // finish off the level\r\n rowStruct.moreEls = $(moreNodes); // for easy undoing later\r\n rowStruct.limitedEls = $(limitedNodes); // for easy undoing later\r\n }\r\n };\r\n // Reveals all levels and removes all \"more\"-related elements for a grid's row.\r\n // `row` is a row number.\r\n DayGrid.prototype.unlimitRow = function (row) {\r\n var rowStruct = this.eventRenderer.rowStructs[row];\r\n if (rowStruct.moreEls) {\r\n rowStruct.moreEls.remove();\r\n rowStruct.moreEls = null;\r\n }\r\n if (rowStruct.limitedEls) {\r\n rowStruct.limitedEls.removeClass('fc-limited');\r\n rowStruct.limitedEls = null;\r\n }\r\n };\r\n // Renders an <a> element that represents hidden event element for a cell.\r\n // Responsible for attaching click handler as well.\r\n DayGrid.prototype.renderMoreLink = function (row, col, hiddenSegs) {\r\n var _this = this;\r\n var view = this.view;\r\n return $('<a class=\"fc-more\">')\r\n .text(this.getMoreLinkText(hiddenSegs.length))\r\n .on('click', function (ev) {\r\n var clickOption = _this.opt('eventLimitClick');\r\n var date = _this.getCellDate(row, col);\r\n var moreEl = $(ev.currentTarget);\r\n var dayEl = _this.getCellEl(row, col);\r\n var allSegs = _this.getCellSegs(row, col);\r\n // rescope the segments to be within the cell's date\r\n var reslicedAllSegs = _this.resliceDaySegs(allSegs, date);\r\n var reslicedHiddenSegs = _this.resliceDaySegs(hiddenSegs, date);\r\n if (typeof clickOption === 'function') {\r\n // the returned value can be an atomic option\r\n clickOption = _this.publiclyTrigger('eventLimitClick', {\r\n context: view,\r\n args: [\r\n {\r\n date: date.clone(),\r\n dayEl: dayEl,\r\n moreEl: moreEl,\r\n segs: reslicedAllSegs,\r\n hiddenSegs: reslicedHiddenSegs\r\n },\r\n ev,\r\n view\r\n ]\r\n });\r\n }\r\n if (clickOption === 'popover') {\r\n _this.showSegPopover(row, col, moreEl, reslicedAllSegs);\r\n }\r\n else if (typeof clickOption === 'string') { // a view name\r\n view.calendar.zoomTo(date, clickOption);\r\n }\r\n });\r\n };\r\n // Reveals the popover that displays all events within a cell\r\n DayGrid.prototype.showSegPopover = function (row, col, moreLink, segs) {\r\n var _this = this;\r\n var view = this.view;\r\n var moreWrap = moreLink.parent(); // the <div> wrapper around the <a>\r\n var topEl; // the element we want to match the top coordinate of\r\n var options;\r\n if (this.rowCnt === 1) {\r\n topEl = view.el; // will cause the popover to cover any sort of header\r\n }\r\n else {\r\n topEl = this.rowEls.eq(row); // will align with top of row\r\n }\r\n options = {\r\n className: 'fc-more-popover ' + view.calendar.theme.getClass('popover'),\r\n content: this.renderSegPopoverContent(row, col, segs),\r\n parentEl: view.el,\r\n top: topEl.offset().top,\r\n autoHide: true,\r\n viewportConstrain: this.opt('popoverViewportConstrain'),\r\n hide: function () {\r\n // kill everything when the popover is hidden\r\n // notify events to be removed\r\n if (_this.popoverSegs) {\r\n _this.triggerBeforeEventSegsDestroyed(_this.popoverSegs);\r\n }\r\n _this.segPopover.removeElement();\r\n _this.segPopover = null;\r\n _this.popoverSegs = null;\r\n }\r\n };\r\n // Determine horizontal coordinate.\r\n // We use the moreWrap instead of the <td> to avoid border confusion.\r\n if (this.isRTL) {\r\n options.right = moreWrap.offset().left + moreWrap.outerWidth() + 1; // +1 to be over cell border\r\n }\r\n else {\r\n options.left = moreWrap.offset().left - 1; // -1 to be over cell border\r\n }\r\n this.segPopover = new Popover_1.default(options);\r\n this.segPopover.show();\r\n // the popover doesn't live within the grid's container element, and thus won't get the event\r\n // delegated-handlers for free. attach event-related handlers to the popover.\r\n this.bindAllSegHandlersToEl(this.segPopover.el);\r\n this.triggerAfterEventSegsRendered(segs);\r\n };\r\n // Builds the inner DOM contents of the segment popover\r\n DayGrid.prototype.renderSegPopoverContent = function (row, col, segs) {\r\n var view = this.view;\r\n var theme = view.calendar.theme;\r\n var title = this.getCellDate(row, col).format(this.opt('dayPopoverFormat'));\r\n var content = $('<div class=\"fc-header ' + theme.getClass('popoverHeader') + '\">' +\r\n '<span class=\"fc-close ' + theme.getIconClass('close') + '\"></span>' +\r\n '<span class=\"fc-title\">' +\r\n util_1.htmlEscape(title) +\r\n '</span>' +\r\n '<div class=\"fc-clear\"></div>' +\r\n '</div>' +\r\n '<div class=\"fc-body ' + theme.getClass('popoverContent') + '\">' +\r\n '<div class=\"fc-event-container\"></div>' +\r\n '</div>');\r\n var segContainer = content.find('.fc-event-container');\r\n var i;\r\n // render each seg's `el` and only return the visible segs\r\n segs = this.eventRenderer.renderFgSegEls(segs, true); // disableResizing=true\r\n this.popoverSegs = segs;\r\n for (i = 0; i < segs.length; i++) {\r\n // because segments in the popover are not part of a grid coordinate system, provide a hint to any\r\n // grids that want to do drag-n-drop about which cell it came from\r\n this.hitsNeeded();\r\n segs[i].hit = this.getCellHit(row, col);\r\n this.hitsNotNeeded();\r\n segContainer.append(segs[i].el);\r\n }\r\n return content;\r\n };\r\n // Given the events within an array of segment objects, reslice them to be in a single day\r\n DayGrid.prototype.resliceDaySegs = function (segs, dayDate) {\r\n var dayStart = dayDate.clone();\r\n var dayEnd = dayStart.clone().add(1, 'days');\r\n var dayRange = new UnzonedRange_1.default(dayStart, dayEnd);\r\n var newSegs = [];\r\n var i;\r\n var seg;\r\n var slicedRange;\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n slicedRange = seg.footprint.componentFootprint.unzonedRange.intersect(dayRange);\r\n if (slicedRange) {\r\n newSegs.push($.extend({}, seg, {\r\n footprint: new EventFootprint_1.default(new ComponentFootprint_1.default(slicedRange, seg.footprint.componentFootprint.isAllDay), seg.footprint.eventDef, seg.footprint.eventInstance),\r\n isStart: seg.isStart && slicedRange.isStart,\r\n isEnd: seg.isEnd && slicedRange.isEnd\r\n }));\r\n }\r\n }\r\n // force an order because eventsToSegs doesn't guarantee one\r\n // TODO: research if still needed\r\n this.eventRenderer.sortEventSegs(newSegs);\r\n return newSegs;\r\n };\r\n // Generates the text that should be inside a \"more\" link, given the number of events it represents\r\n DayGrid.prototype.getMoreLinkText = function (num) {\r\n var opt = this.opt('eventLimitText');\r\n if (typeof opt === 'function') {\r\n return opt(num);\r\n }\r\n else {\r\n return '+' + num + ' ' + opt;\r\n }\r\n };\r\n // Returns segments within a given cell.\r\n // If `startLevel` is specified, returns only events including and below that level. Otherwise returns all segs.\r\n DayGrid.prototype.getCellSegs = function (row, col, startLevel) {\r\n var segMatrix = this.eventRenderer.rowStructs[row].segMatrix;\r\n var level = startLevel || 0;\r\n var segs = [];\r\n var seg;\r\n while (level < segMatrix.length) {\r\n seg = segMatrix[level][col];\r\n if (seg) {\r\n segs.push(seg);\r\n }\r\n level++;\r\n }\r\n return segs;\r\n };\r\n return DayGrid;\r\n}(InteractiveDateComponent_1.default));\r\nexports.default = DayGrid;\r\nDayGrid.prototype.eventRendererClass = DayGridEventRenderer_1.default;\r\nDayGrid.prototype.businessHourRendererClass = BusinessHourRenderer_1.default;\r\nDayGrid.prototype.helperRendererClass = DayGridHelperRenderer_1.default;\r\nDayGrid.prototype.fillRendererClass = DayGridFillRenderer_1.default;\r\nStandardInteractionsMixin_1.default.mixInto(DayGrid);\r\nDayTableMixin_1.default.mixInto(DayGrid);\r\n\n\n/***/ }),\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar Scroller_1 = __webpack_require__(41);\r\nvar View_1 = __webpack_require__(43);\r\nvar BasicViewDateProfileGenerator_1 = __webpack_require__(68);\r\nvar DayGrid_1 = __webpack_require__(66);\r\n/* An abstract class for the \"basic\" views, as well as month view. Renders one or more rows of day cells.\r\n----------------------------------------------------------------------------------------------------------------------*/\r\n// It is a manager for a DayGrid subcomponent, which does most of the heavy lifting.\r\n// It is responsible for managing width/height.\r\nvar BasicView = /** @class */ (function (_super) {\r\n tslib_1.__extends(BasicView, _super);\r\n function BasicView(calendar, viewSpec) {\r\n var _this = _super.call(this, calendar, viewSpec) || this;\r\n _this.dayGrid = _this.instantiateDayGrid();\r\n _this.dayGrid.isRigid = _this.hasRigidRows();\r\n if (_this.opt('weekNumbers')) {\r\n if (_this.opt('weekNumbersWithinDays')) {\r\n _this.dayGrid.cellWeekNumbersVisible = true;\r\n _this.dayGrid.colWeekNumbersVisible = false;\r\n }\r\n else {\r\n _this.dayGrid.cellWeekNumbersVisible = false;\r\n _this.dayGrid.colWeekNumbersVisible = true;\r\n }\r\n }\r\n _this.addChild(_this.dayGrid);\r\n _this.scroller = new Scroller_1.default({\r\n overflowX: 'hidden',\r\n overflowY: 'auto'\r\n });\r\n return _this;\r\n }\r\n // Generates the DayGrid object this view needs. Draws from this.dayGridClass\r\n BasicView.prototype.instantiateDayGrid = function () {\r\n // generate a subclass on the fly with BasicView-specific behavior\r\n // TODO: cache this subclass\r\n var subclass = makeDayGridSubclass(this.dayGridClass);\r\n return new subclass(this);\r\n };\r\n BasicView.prototype.executeDateRender = function (dateProfile) {\r\n this.dayGrid.breakOnWeeks = /year|month|week/.test(dateProfile.currentRangeUnit);\r\n _super.prototype.executeDateRender.call(this, dateProfile);\r\n };\r\n BasicView.prototype.renderSkeleton = function () {\r\n var dayGridContainerEl;\r\n var dayGridEl;\r\n this.el.addClass('fc-basic-view').html(this.renderSkeletonHtml());\r\n this.scroller.render();\r\n dayGridContainerEl = this.scroller.el.addClass('fc-day-grid-container');\r\n dayGridEl = $('<div class=\"fc-day-grid\">').appendTo(dayGridContainerEl);\r\n this.el.find('.fc-body > tr > td').append(dayGridContainerEl);\r\n this.dayGrid.headContainerEl = this.el.find('.fc-head-container');\r\n this.dayGrid.setElement(dayGridEl);\r\n };\r\n BasicView.prototype.unrenderSkeleton = function () {\r\n this.dayGrid.removeElement();\r\n this.scroller.destroy();\r\n };\r\n // Builds the HTML skeleton for the view.\r\n // The day-grid component will render inside of a container defined by this HTML.\r\n BasicView.prototype.renderSkeletonHtml = function () {\r\n var theme = this.calendar.theme;\r\n return '' +\r\n '<table class=\"' + theme.getClass('tableGrid') + '\">' +\r\n (this.opt('columnHeader') ?\r\n '<thead class=\"fc-head\">' +\r\n '<tr>' +\r\n '<td class=\"fc-head-container ' + theme.getClass('widgetHeader') + '\"> </td>' +\r\n '</tr>' +\r\n '</thead>' :\r\n '') +\r\n '<tbody class=\"fc-body\">' +\r\n '<tr>' +\r\n '<td class=\"' + theme.getClass('widgetContent') + '\"></td>' +\r\n '</tr>' +\r\n '</tbody>' +\r\n '</table>';\r\n };\r\n // Generates an HTML attribute string for setting the width of the week number column, if it is known\r\n BasicView.prototype.weekNumberStyleAttr = function () {\r\n if (this.weekNumberWidth != null) {\r\n return 'style=\"width:' + this.weekNumberWidth + 'px\"';\r\n }\r\n return '';\r\n };\r\n // Determines whether each row should have a constant height\r\n BasicView.prototype.hasRigidRows = function () {\r\n var eventLimit = this.opt('eventLimit');\r\n return eventLimit && typeof eventLimit !== 'number';\r\n };\r\n /* Dimensions\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Refreshes the horizontal dimensions of the view\r\n BasicView.prototype.updateSize = function (totalHeight, isAuto, isResize) {\r\n var eventLimit = this.opt('eventLimit');\r\n var headRowEl = this.dayGrid.headContainerEl.find('.fc-row');\r\n var scrollerHeight;\r\n var scrollbarWidths;\r\n // hack to give the view some height prior to dayGrid's columns being rendered\r\n // TODO: separate setting height from scroller VS dayGrid.\r\n if (!this.dayGrid.rowEls) {\r\n if (!isAuto) {\r\n scrollerHeight = this.computeScrollerHeight(totalHeight);\r\n this.scroller.setHeight(scrollerHeight);\r\n }\r\n return;\r\n }\r\n _super.prototype.updateSize.call(this, totalHeight, isAuto, isResize);\r\n if (this.dayGrid.colWeekNumbersVisible) {\r\n // Make sure all week number cells running down the side have the same width.\r\n // Record the width for cells created later.\r\n this.weekNumberWidth = util_1.matchCellWidths(this.el.find('.fc-week-number'));\r\n }\r\n // reset all heights to be natural\r\n this.scroller.clear();\r\n util_1.uncompensateScroll(headRowEl);\r\n this.dayGrid.removeSegPopover(); // kill the \"more\" popover if displayed\r\n // is the event limit a constant level number?\r\n if (eventLimit && typeof eventLimit === 'number') {\r\n this.dayGrid.limitRows(eventLimit); // limit the levels first so the height can redistribute after\r\n }\r\n // distribute the height to the rows\r\n // (totalHeight is a \"recommended\" value if isAuto)\r\n scrollerHeight = this.computeScrollerHeight(totalHeight);\r\n this.setGridHeight(scrollerHeight, isAuto);\r\n // is the event limit dynamically calculated?\r\n if (eventLimit && typeof eventLimit !== 'number') {\r\n this.dayGrid.limitRows(eventLimit); // limit the levels after the grid's row heights have been set\r\n }\r\n if (!isAuto) { // should we force dimensions of the scroll container?\r\n this.scroller.setHeight(scrollerHeight);\r\n scrollbarWidths = this.scroller.getScrollbarWidths();\r\n if (scrollbarWidths.left || scrollbarWidths.right) { // using scrollbars?\r\n util_1.compensateScroll(headRowEl, scrollbarWidths);\r\n // doing the scrollbar compensation might have created text overflow which created more height. redo\r\n scrollerHeight = this.computeScrollerHeight(totalHeight);\r\n this.scroller.setHeight(scrollerHeight);\r\n }\r\n // guarantees the same scrollbar widths\r\n this.scroller.lockOverflow(scrollbarWidths);\r\n }\r\n };\r\n // given a desired total height of the view, returns what the height of the scroller should be\r\n BasicView.prototype.computeScrollerHeight = function (totalHeight) {\r\n return totalHeight -\r\n util_1.subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller\r\n };\r\n // Sets the height of just the DayGrid component in this view\r\n BasicView.prototype.setGridHeight = function (height, isAuto) {\r\n if (isAuto) {\r\n util_1.undistributeHeight(this.dayGrid.rowEls); // let the rows be their natural height with no expanding\r\n }\r\n else {\r\n util_1.distributeHeight(this.dayGrid.rowEls, height, true); // true = compensate for height-hogging rows\r\n }\r\n };\r\n /* Scroll\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n BasicView.prototype.computeInitialDateScroll = function () {\r\n return { top: 0 };\r\n };\r\n BasicView.prototype.queryDateScroll = function () {\r\n return { top: this.scroller.getScrollTop() };\r\n };\r\n BasicView.prototype.applyDateScroll = function (scroll) {\r\n if (scroll.top !== undefined) {\r\n this.scroller.setScrollTop(scroll.top);\r\n }\r\n };\r\n return BasicView;\r\n}(View_1.default));\r\nexports.default = BasicView;\r\nBasicView.prototype.dateProfileGeneratorClass = BasicViewDateProfileGenerator_1.default;\r\nBasicView.prototype.dayGridClass = DayGrid_1.default;\r\n// customize the rendering behavior of BasicView's dayGrid\r\nfunction makeDayGridSubclass(SuperClass) {\r\n return /** @class */ (function (_super) {\r\n tslib_1.__extends(SubClass, _super);\r\n function SubClass() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.colWeekNumbersVisible = false; // display week numbers along the side?\r\n return _this;\r\n }\r\n // Generates the HTML that will go before the day-of week header cells\r\n SubClass.prototype.renderHeadIntroHtml = function () {\r\n var view = this.view;\r\n if (this.colWeekNumbersVisible) {\r\n return '' +\r\n '<th class=\"fc-week-number ' + view.calendar.theme.getClass('widgetHeader') + '\" ' + view.weekNumberStyleAttr() + '>' +\r\n '<span>' + // needed for matchCellWidths\r\n util_1.htmlEscape(this.opt('weekNumberTitle')) +\r\n '</span>' +\r\n '</th>';\r\n }\r\n return '';\r\n };\r\n // Generates the HTML that will go before content-skeleton cells that display the day/week numbers\r\n SubClass.prototype.renderNumberIntroHtml = function (row) {\r\n var view = this.view;\r\n var weekStart = this.getCellDate(row, 0);\r\n if (this.colWeekNumbersVisible) {\r\n return '' +\r\n '<td class=\"fc-week-number\" ' + view.weekNumberStyleAttr() + '>' +\r\n view.buildGotoAnchorHtml(// aside from link, important for matchCellWidths\r\n { date: weekStart, type: 'week', forceOff: this.colCnt === 1 }, weekStart.format('w') // inner HTML\r\n ) +\r\n '</td>';\r\n }\r\n return '';\r\n };\r\n // Generates the HTML that goes before the day bg cells for each day-row\r\n SubClass.prototype.renderBgIntroHtml = function () {\r\n var view = this.view;\r\n if (this.colWeekNumbersVisible) {\r\n return '<td class=\"fc-week-number ' + view.calendar.theme.getClass('widgetContent') + '\" ' +\r\n view.weekNumberStyleAttr() + '></td>';\r\n }\r\n return '';\r\n };\r\n // Generates the HTML that goes before every other type of row generated by DayGrid.\r\n // Affects helper-skeleton and highlight-skeleton rows.\r\n SubClass.prototype.renderIntroHtml = function () {\r\n var view = this.view;\r\n if (this.colWeekNumbersVisible) {\r\n return '<td class=\"fc-week-number\" ' + view.weekNumberStyleAttr() + '></td>';\r\n }\r\n return '';\r\n };\r\n SubClass.prototype.getIsNumbersVisible = function () {\r\n return DayGrid_1.default.prototype.getIsNumbersVisible.apply(this, arguments) || this.colWeekNumbersVisible;\r\n };\r\n return SubClass;\r\n }(SuperClass));\r\n}\r\n\n\n/***/ }),\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar DateProfileGenerator_1 = __webpack_require__(55);\r\nvar BasicViewDateProfileGenerator = /** @class */ (function (_super) {\r\n tslib_1.__extends(BasicViewDateProfileGenerator, _super);\r\n function BasicViewDateProfileGenerator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // Computes the date range that will be rendered.\r\n BasicViewDateProfileGenerator.prototype.buildRenderRange = function (currentUnzonedRange, currentRangeUnit, isRangeAllDay) {\r\n var renderUnzonedRange = _super.prototype.buildRenderRange.call(this, currentUnzonedRange, currentRangeUnit, isRangeAllDay); // an UnzonedRange\r\n var start = this.msToUtcMoment(renderUnzonedRange.startMs, isRangeAllDay);\r\n var end = this.msToUtcMoment(renderUnzonedRange.endMs, isRangeAllDay);\r\n // year and month views should be aligned with weeks. this is already done for week\r\n if (/^(year|month)$/.test(currentRangeUnit)) {\r\n start.startOf('week');\r\n // make end-of-week if not already\r\n if (end.weekday()) {\r\n end.add(1, 'week').startOf('week'); // exclusively move backwards\r\n }\r\n }\r\n return new UnzonedRange_1.default(start, end);\r\n };\r\n return BasicViewDateProfileGenerator;\r\n}(DateProfileGenerator_1.default));\r\nexports.default = BasicViewDateProfileGenerator;\r\n\n\n/***/ }),\n/* 69 */,\n/* 70 */,\n/* 71 */,\n/* 72 */,\n/* 73 */,\n/* 74 */,\n/* 75 */,\n/* 76 */,\n/* 77 */,\n/* 78 */,\n/* 79 */,\n/* 80 */,\n/* 81 */,\n/* 82 */,\n/* 83 */,\n/* 84 */,\n/* 85 */,\n/* 86 */,\n/* 87 */,\n/* 88 */,\n/* 89 */,\n/* 90 */,\n/* 91 */,\n/* 92 */,\n/* 93 */,\n/* 94 */,\n/* 95 */,\n/* 96 */,\n/* 97 */,\n/* 98 */,\n/* 99 */,\n/* 100 */,\n/* 101 */,\n/* 102 */,\n/* 103 */,\n/* 104 */,\n/* 105 */,\n/* 106 */,\n/* 107 */,\n/* 108 */,\n/* 109 */,\n/* 110 */,\n/* 111 */,\n/* 112 */,\n/* 113 */,\n/* 114 */,\n/* 115 */,\n/* 116 */,\n/* 117 */,\n/* 118 */,\n/* 119 */,\n/* 120 */,\n/* 121 */,\n/* 122 */,\n/* 123 */,\n/* 124 */,\n/* 125 */,\n/* 126 */,\n/* 127 */,\n/* 128 */,\n/* 129 */,\n/* 130 */,\n/* 131 */,\n/* 132 */,\n/* 133 */,\n/* 134 */,\n/* 135 */,\n/* 136 */,\n/* 137 */,\n/* 138 */,\n/* 139 */,\n/* 140 */,\n/* 141 */,\n/* 142 */,\n/* 143 */,\n/* 144 */,\n/* 145 */,\n/* 146 */,\n/* 147 */,\n/* 148 */,\n/* 149 */,\n/* 150 */,\n/* 151 */,\n/* 152 */,\n/* 153 */,\n/* 154 */,\n/* 155 */,\n/* 156 */,\n/* 157 */,\n/* 158 */,\n/* 159 */,\n/* 160 */,\n/* 161 */,\n/* 162 */,\n/* 163 */,\n/* 164 */,\n/* 165 */,\n/* 166 */,\n/* 167 */,\n/* 168 */,\n/* 169 */,\n/* 170 */,\n/* 171 */,\n/* 172 */,\n/* 173 */,\n/* 174 */,\n/* 175 */,\n/* 176 */,\n/* 177 */,\n/* 178 */,\n/* 179 */,\n/* 180 */,\n/* 181 */,\n/* 182 */,\n/* 183 */,\n/* 184 */,\n/* 185 */,\n/* 186 */,\n/* 187 */,\n/* 188 */,\n/* 189 */,\n/* 190 */,\n/* 191 */,\n/* 192 */,\n/* 193 */,\n/* 194 */,\n/* 195 */,\n/* 196 */,\n/* 197 */,\n/* 198 */,\n/* 199 */,\n/* 200 */,\n/* 201 */,\n/* 202 */,\n/* 203 */,\n/* 204 */,\n/* 205 */,\n/* 206 */,\n/* 207 */,\n/* 208 */,\n/* 209 */,\n/* 210 */,\n/* 211 */,\n/* 212 */,\n/* 213 */,\n/* 214 */,\n/* 215 */,\n/* 216 */,\n/* 217 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar ComponentFootprint_1 = __webpack_require__(12);\r\nvar EventDefParser_1 = __webpack_require__(36);\r\nvar EventSource_1 = __webpack_require__(6);\r\nvar util_1 = __webpack_require__(19);\r\nvar Constraints = /** @class */ (function () {\r\n function Constraints(eventManager, _calendar) {\r\n this.eventManager = eventManager;\r\n this._calendar = _calendar;\r\n }\r\n Constraints.prototype.opt = function (name) {\r\n return this._calendar.opt(name);\r\n };\r\n /*\r\n determines if eventInstanceGroup is allowed,\r\n in relation to other EVENTS and business hours.\r\n */\r\n Constraints.prototype.isEventInstanceGroupAllowed = function (eventInstanceGroup) {\r\n var eventDef = eventInstanceGroup.getEventDef();\r\n var eventFootprints = this.eventRangesToEventFootprints(eventInstanceGroup.getAllEventRanges());\r\n var i;\r\n var peerEventInstances = this.getPeerEventInstances(eventDef);\r\n var peerEventRanges = peerEventInstances.map(util_1.eventInstanceToEventRange);\r\n var peerEventFootprints = this.eventRangesToEventFootprints(peerEventRanges);\r\n var constraintVal = eventDef.getConstraint();\r\n var overlapVal = eventDef.getOverlap();\r\n var eventAllowFunc = this.opt('eventAllow');\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n if (!this.isFootprintAllowed(eventFootprints[i].componentFootprint, peerEventFootprints, constraintVal, overlapVal, eventFootprints[i].eventInstance)) {\r\n return false;\r\n }\r\n }\r\n if (eventAllowFunc) {\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n if (eventAllowFunc(eventFootprints[i].componentFootprint.toLegacy(this._calendar), eventFootprints[i].getEventLegacy()) === false) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n Constraints.prototype.getPeerEventInstances = function (eventDef) {\r\n return this.eventManager.getEventInstancesWithoutId(eventDef.id);\r\n };\r\n Constraints.prototype.isSelectionFootprintAllowed = function (componentFootprint) {\r\n var peerEventInstances = this.eventManager.getEventInstances();\r\n var peerEventRanges = peerEventInstances.map(util_1.eventInstanceToEventRange);\r\n var peerEventFootprints = this.eventRangesToEventFootprints(peerEventRanges);\r\n var selectAllowFunc;\r\n if (this.isFootprintAllowed(componentFootprint, peerEventFootprints, this.opt('selectConstraint'), this.opt('selectOverlap'))) {\r\n selectAllowFunc = this.opt('selectAllow');\r\n if (selectAllowFunc) {\r\n return selectAllowFunc(componentFootprint.toLegacy(this._calendar)) !== false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Constraints.prototype.isFootprintAllowed = function (componentFootprint, peerEventFootprints, constraintVal, overlapVal, subjectEventInstance // optional\r\n ) {\r\n var constraintFootprints; // ComponentFootprint[]\r\n var overlapEventFootprints; // EventFootprint[]\r\n if (constraintVal != null) {\r\n constraintFootprints = this.constraintValToFootprints(constraintVal, componentFootprint.isAllDay);\r\n if (!this.isFootprintWithinConstraints(componentFootprint, constraintFootprints)) {\r\n return false;\r\n }\r\n }\r\n overlapEventFootprints = this.collectOverlapEventFootprints(peerEventFootprints, componentFootprint);\r\n if (overlapVal === false) {\r\n if (overlapEventFootprints.length) {\r\n return false;\r\n }\r\n }\r\n else if (typeof overlapVal === 'function') {\r\n if (!isOverlapsAllowedByFunc(overlapEventFootprints, overlapVal, subjectEventInstance)) {\r\n return false;\r\n }\r\n }\r\n if (subjectEventInstance) {\r\n if (!isOverlapEventInstancesAllowed(overlapEventFootprints, subjectEventInstance)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n // Constraint\r\n // ------------------------------------------------------------------------------------------------\r\n Constraints.prototype.isFootprintWithinConstraints = function (componentFootprint, constraintFootprints) {\r\n var i;\r\n for (i = 0; i < constraintFootprints.length; i++) {\r\n if (this.footprintContainsFootprint(constraintFootprints[i], componentFootprint)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n Constraints.prototype.constraintValToFootprints = function (constraintVal, isAllDay) {\r\n var eventInstances;\r\n if (constraintVal === 'businessHours') {\r\n return this.buildCurrentBusinessFootprints(isAllDay);\r\n }\r\n else if (typeof constraintVal === 'object') {\r\n eventInstances = this.parseEventDefToInstances(constraintVal); // handles recurring events\r\n if (!eventInstances) { // invalid input. fallback to parsing footprint directly\r\n return this.parseFootprints(constraintVal);\r\n }\r\n else {\r\n return this.eventInstancesToFootprints(eventInstances);\r\n }\r\n }\r\n else if (constraintVal != null) { // an ID\r\n eventInstances = this.eventManager.getEventInstancesWithId(constraintVal);\r\n return this.eventInstancesToFootprints(eventInstances);\r\n }\r\n };\r\n // returns ComponentFootprint[]\r\n // uses current view's range\r\n Constraints.prototype.buildCurrentBusinessFootprints = function (isAllDay) {\r\n var view = this._calendar.view;\r\n var businessHourGenerator = view.get('businessHourGenerator');\r\n var unzonedRange = view.dateProfile.activeUnzonedRange;\r\n var eventInstanceGroup = businessHourGenerator.buildEventInstanceGroup(isAllDay, unzonedRange);\r\n if (eventInstanceGroup) {\r\n return this.eventInstancesToFootprints(eventInstanceGroup.eventInstances);\r\n }\r\n else {\r\n return [];\r\n }\r\n };\r\n // conversion util\r\n Constraints.prototype.eventInstancesToFootprints = function (eventInstances) {\r\n var eventRanges = eventInstances.map(util_1.eventInstanceToEventRange);\r\n var eventFootprints = this.eventRangesToEventFootprints(eventRanges);\r\n return eventFootprints.map(util_1.eventFootprintToComponentFootprint);\r\n };\r\n // Overlap\r\n // ------------------------------------------------------------------------------------------------\r\n Constraints.prototype.collectOverlapEventFootprints = function (peerEventFootprints, targetFootprint) {\r\n var overlapEventFootprints = [];\r\n var i;\r\n for (i = 0; i < peerEventFootprints.length; i++) {\r\n if (this.footprintsIntersect(targetFootprint, peerEventFootprints[i].componentFootprint)) {\r\n overlapEventFootprints.push(peerEventFootprints[i]);\r\n }\r\n }\r\n return overlapEventFootprints;\r\n };\r\n // Conversion: eventDefs -> eventInstances -> eventRanges -> eventFootprints -> componentFootprints\r\n // ------------------------------------------------------------------------------------------------\r\n // NOTE: this might seem like repetitive code with the Grid class, however, this code is related to\r\n // constraints whereas the Grid code is related to rendering. Each approach might want to convert\r\n // eventRanges -> eventFootprints in a different way. Regardless, there are opportunities to make\r\n // this more DRY.\r\n /*\r\n Returns false on invalid input.\r\n */\r\n Constraints.prototype.parseEventDefToInstances = function (eventInput) {\r\n var eventManager = this.eventManager;\r\n var eventDef = EventDefParser_1.default.parse(eventInput, new EventSource_1.default(this._calendar));\r\n if (!eventDef) { // invalid\r\n return false;\r\n }\r\n return eventDef.buildInstances(eventManager.currentPeriod.unzonedRange);\r\n };\r\n Constraints.prototype.eventRangesToEventFootprints = function (eventRanges) {\r\n var i;\r\n var eventFootprints = [];\r\n for (i = 0; i < eventRanges.length; i++) {\r\n eventFootprints.push.apply(// footprints\r\n eventFootprints, this.eventRangeToEventFootprints(eventRanges[i]));\r\n }\r\n return eventFootprints;\r\n };\r\n Constraints.prototype.eventRangeToEventFootprints = function (eventRange) {\r\n return [util_1.eventRangeToEventFootprint(eventRange)];\r\n };\r\n /*\r\n Parses footprints directly.\r\n Very similar to EventDateProfile::parse :(\r\n */\r\n Constraints.prototype.parseFootprints = function (rawInput) {\r\n var start;\r\n var end;\r\n if (rawInput.start) {\r\n start = this._calendar.moment(rawInput.start);\r\n if (!start.isValid()) {\r\n start = null;\r\n }\r\n }\r\n if (rawInput.end) {\r\n end = this._calendar.moment(rawInput.end);\r\n if (!end.isValid()) {\r\n end = null;\r\n }\r\n }\r\n return [\r\n new ComponentFootprint_1.default(new UnzonedRange_1.default(start, end), (start && !start.hasTime()) || (end && !end.hasTime()) // isAllDay\r\n )\r\n ];\r\n };\r\n // Footprint Utils\r\n // ----------------------------------------------------------------------------------------\r\n Constraints.prototype.footprintContainsFootprint = function (outerFootprint, innerFootprint) {\r\n return outerFootprint.unzonedRange.containsRange(innerFootprint.unzonedRange);\r\n };\r\n Constraints.prototype.footprintsIntersect = function (footprint0, footprint1) {\r\n return footprint0.unzonedRange.intersectsWith(footprint1.unzonedRange);\r\n };\r\n return Constraints;\r\n}());\r\nexports.default = Constraints;\r\n// optional subjectEventInstance\r\nfunction isOverlapsAllowedByFunc(overlapEventFootprints, overlapFunc, subjectEventInstance) {\r\n var i;\r\n for (i = 0; i < overlapEventFootprints.length; i++) {\r\n if (!overlapFunc(overlapEventFootprints[i].eventInstance.toLegacy(), subjectEventInstance ? subjectEventInstance.toLegacy() : null)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction isOverlapEventInstancesAllowed(overlapEventFootprints, subjectEventInstance) {\r\n var subjectLegacyInstance = subjectEventInstance.toLegacy();\r\n var i;\r\n var overlapEventInstance;\r\n var overlapEventDef;\r\n var overlapVal;\r\n for (i = 0; i < overlapEventFootprints.length; i++) {\r\n overlapEventInstance = overlapEventFootprints[i].eventInstance;\r\n overlapEventDef = overlapEventInstance.def;\r\n // don't need to pass in calendar, because don't want to consider global eventOverlap property,\r\n // because we already considered that earlier in the process.\r\n overlapVal = overlapEventDef.getOverlap();\r\n if (overlapVal === false) {\r\n return false;\r\n }\r\n else if (typeof overlapVal === 'function') {\r\n if (!overlapVal(overlapEventInstance.toLegacy(), subjectLegacyInstance)) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\n\n\n/***/ }),\n/* 218 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(19);\r\nvar EventInstanceGroup_1 = __webpack_require__(20);\r\nvar RecurringEventDef_1 = __webpack_require__(54);\r\nvar EventSource_1 = __webpack_require__(6);\r\nvar BUSINESS_HOUR_EVENT_DEFAULTS = {\r\n start: '09:00',\r\n end: '17:00',\r\n dow: [1, 2, 3, 4, 5],\r\n rendering: 'inverse-background'\r\n // classNames are defined in businessHoursSegClasses\r\n};\r\nvar BusinessHourGenerator = /** @class */ (function () {\r\n function BusinessHourGenerator(rawComplexDef, calendar) {\r\n this.rawComplexDef = rawComplexDef;\r\n this.calendar = calendar;\r\n }\r\n BusinessHourGenerator.prototype.buildEventInstanceGroup = function (isAllDay, unzonedRange) {\r\n var eventDefs = this.buildEventDefs(isAllDay);\r\n var eventInstanceGroup;\r\n if (eventDefs.length) {\r\n eventInstanceGroup = new EventInstanceGroup_1.default(util_1.eventDefsToEventInstances(eventDefs, unzonedRange));\r\n // so that inverse-background rendering can happen even when no eventRanges in view\r\n eventInstanceGroup.explicitEventDef = eventDefs[0];\r\n return eventInstanceGroup;\r\n }\r\n };\r\n BusinessHourGenerator.prototype.buildEventDefs = function (isAllDay) {\r\n var rawComplexDef = this.rawComplexDef;\r\n var rawDefs = [];\r\n var requireDow = false;\r\n var i;\r\n var defs = [];\r\n if (rawComplexDef === true) {\r\n rawDefs = [{}]; // will get BUSINESS_HOUR_EVENT_DEFAULTS verbatim\r\n }\r\n else if ($.isPlainObject(rawComplexDef)) {\r\n rawDefs = [rawComplexDef];\r\n }\r\n else if ($.isArray(rawComplexDef)) {\r\n rawDefs = rawComplexDef;\r\n requireDow = true; // every sub-definition NEEDS a day-of-week\r\n }\r\n for (i = 0; i < rawDefs.length; i++) {\r\n if (!requireDow || rawDefs[i].dow) {\r\n defs.push(this.buildEventDef(isAllDay, rawDefs[i]));\r\n }\r\n }\r\n return defs;\r\n };\r\n BusinessHourGenerator.prototype.buildEventDef = function (isAllDay, rawDef) {\r\n var fullRawDef = $.extend({}, BUSINESS_HOUR_EVENT_DEFAULTS, rawDef);\r\n if (isAllDay) {\r\n fullRawDef.start = null;\r\n fullRawDef.end = null;\r\n }\r\n return RecurringEventDef_1.default.parse(fullRawDef, new EventSource_1.default(this.calendar) // dummy source\r\n );\r\n };\r\n return BusinessHourGenerator;\r\n}());\r\nexports.default = BusinessHourGenerator;\r\n\n\n/***/ }),\n/* 219 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar Promise_1 = __webpack_require__(21);\r\nvar EmitterMixin_1 = __webpack_require__(13);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar EventInstanceGroup_1 = __webpack_require__(20);\r\nvar EventPeriod = /** @class */ (function () {\r\n function EventPeriod(start, end, timezone) {\r\n this.pendingCnt = 0;\r\n this.freezeDepth = 0;\r\n this.stuntedReleaseCnt = 0;\r\n this.releaseCnt = 0;\r\n this.start = start;\r\n this.end = end;\r\n this.timezone = timezone;\r\n this.unzonedRange = new UnzonedRange_1.default(start.clone().stripZone(), end.clone().stripZone());\r\n this.requestsByUid = {};\r\n this.eventDefsByUid = {};\r\n this.eventDefsById = {};\r\n this.eventInstanceGroupsById = {};\r\n }\r\n EventPeriod.prototype.isWithinRange = function (start, end) {\r\n // TODO: use a range util function?\r\n return !start.isBefore(this.start) && !end.isAfter(this.end);\r\n };\r\n // Requesting and Purging\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventPeriod.prototype.requestSources = function (sources) {\r\n this.freeze();\r\n for (var i = 0; i < sources.length; i++) {\r\n this.requestSource(sources[i]);\r\n }\r\n this.thaw();\r\n };\r\n EventPeriod.prototype.requestSource = function (source) {\r\n var _this = this;\r\n var request = { source: source, status: 'pending', eventDefs: null };\r\n this.requestsByUid[source.uid] = request;\r\n this.pendingCnt += 1;\r\n source.fetch(this.start, this.end, this.timezone).then(function (eventDefs) {\r\n if (request.status !== 'cancelled') {\r\n request.status = 'completed';\r\n request.eventDefs = eventDefs;\r\n _this.addEventDefs(eventDefs);\r\n _this.pendingCnt--;\r\n _this.tryRelease();\r\n }\r\n }, function () {\r\n if (request.status !== 'cancelled') {\r\n request.status = 'failed';\r\n _this.pendingCnt--;\r\n _this.tryRelease();\r\n }\r\n });\r\n };\r\n EventPeriod.prototype.purgeSource = function (source) {\r\n var request = this.requestsByUid[source.uid];\r\n if (request) {\r\n delete this.requestsByUid[source.uid];\r\n if (request.status === 'pending') {\r\n request.status = 'cancelled';\r\n this.pendingCnt--;\r\n this.tryRelease();\r\n }\r\n else if (request.status === 'completed') {\r\n request.eventDefs.forEach(this.removeEventDef.bind(this));\r\n }\r\n }\r\n };\r\n EventPeriod.prototype.purgeAllSources = function () {\r\n var requestsByUid = this.requestsByUid;\r\n var uid;\r\n var request;\r\n var completedCnt = 0;\r\n for (uid in requestsByUid) {\r\n request = requestsByUid[uid];\r\n if (request.status === 'pending') {\r\n request.status = 'cancelled';\r\n }\r\n else if (request.status === 'completed') {\r\n completedCnt++;\r\n }\r\n }\r\n this.requestsByUid = {};\r\n this.pendingCnt = 0;\r\n if (completedCnt) {\r\n this.removeAllEventDefs(); // might release\r\n }\r\n };\r\n // Event Definitions\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventPeriod.prototype.getEventDefByUid = function (eventDefUid) {\r\n return this.eventDefsByUid[eventDefUid];\r\n };\r\n EventPeriod.prototype.getEventDefsById = function (eventDefId) {\r\n var a = this.eventDefsById[eventDefId];\r\n if (a) {\r\n return a.slice(); // clone\r\n }\r\n return [];\r\n };\r\n EventPeriod.prototype.addEventDefs = function (eventDefs) {\r\n for (var i = 0; i < eventDefs.length; i++) {\r\n this.addEventDef(eventDefs[i]);\r\n }\r\n };\r\n EventPeriod.prototype.addEventDef = function (eventDef) {\r\n var eventDefsById = this.eventDefsById;\r\n var eventDefId = eventDef.id;\r\n var eventDefs = eventDefsById[eventDefId] || (eventDefsById[eventDefId] = []);\r\n var eventInstances = eventDef.buildInstances(this.unzonedRange);\r\n var i;\r\n eventDefs.push(eventDef);\r\n this.eventDefsByUid[eventDef.uid] = eventDef;\r\n for (i = 0; i < eventInstances.length; i++) {\r\n this.addEventInstance(eventInstances[i], eventDefId);\r\n }\r\n };\r\n EventPeriod.prototype.removeEventDefsById = function (eventDefId) {\r\n var _this = this;\r\n this.getEventDefsById(eventDefId).forEach(function (eventDef) {\r\n _this.removeEventDef(eventDef);\r\n });\r\n };\r\n EventPeriod.prototype.removeAllEventDefs = function () {\r\n var isEmpty = $.isEmptyObject(this.eventDefsByUid);\r\n this.eventDefsByUid = {};\r\n this.eventDefsById = {};\r\n this.eventInstanceGroupsById = {};\r\n if (!isEmpty) {\r\n this.tryRelease();\r\n }\r\n };\r\n EventPeriod.prototype.removeEventDef = function (eventDef) {\r\n var eventDefsById = this.eventDefsById;\r\n var eventDefs = eventDefsById[eventDef.id];\r\n delete this.eventDefsByUid[eventDef.uid];\r\n if (eventDefs) {\r\n util_1.removeExact(eventDefs, eventDef);\r\n if (!eventDefs.length) {\r\n delete eventDefsById[eventDef.id];\r\n }\r\n this.removeEventInstancesForDef(eventDef);\r\n }\r\n };\r\n // Event Instances\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventPeriod.prototype.getEventInstances = function () {\r\n var eventInstanceGroupsById = this.eventInstanceGroupsById;\r\n var eventInstances = [];\r\n var id;\r\n for (id in eventInstanceGroupsById) {\r\n eventInstances.push.apply(eventInstances, // append\r\n eventInstanceGroupsById[id].eventInstances);\r\n }\r\n return eventInstances;\r\n };\r\n EventPeriod.prototype.getEventInstancesWithId = function (eventDefId) {\r\n var eventInstanceGroup = this.eventInstanceGroupsById[eventDefId];\r\n if (eventInstanceGroup) {\r\n return eventInstanceGroup.eventInstances.slice(); // clone\r\n }\r\n return [];\r\n };\r\n EventPeriod.prototype.getEventInstancesWithoutId = function (eventDefId) {\r\n var eventInstanceGroupsById = this.eventInstanceGroupsById;\r\n var matchingInstances = [];\r\n var id;\r\n for (id in eventInstanceGroupsById) {\r\n if (id !== eventDefId) {\r\n matchingInstances.push.apply(matchingInstances, // append\r\n eventInstanceGroupsById[id].eventInstances);\r\n }\r\n }\r\n return matchingInstances;\r\n };\r\n EventPeriod.prototype.addEventInstance = function (eventInstance, eventDefId) {\r\n var eventInstanceGroupsById = this.eventInstanceGroupsById;\r\n var eventInstanceGroup = eventInstanceGroupsById[eventDefId] ||\r\n (eventInstanceGroupsById[eventDefId] = new EventInstanceGroup_1.default());\r\n eventInstanceGroup.eventInstances.push(eventInstance);\r\n this.tryRelease();\r\n };\r\n EventPeriod.prototype.removeEventInstancesForDef = function (eventDef) {\r\n var eventInstanceGroupsById = this.eventInstanceGroupsById;\r\n var eventInstanceGroup = eventInstanceGroupsById[eventDef.id];\r\n var removeCnt;\r\n if (eventInstanceGroup) {\r\n removeCnt = util_1.removeMatching(eventInstanceGroup.eventInstances, function (currentEventInstance) {\r\n return currentEventInstance.def === eventDef;\r\n });\r\n if (!eventInstanceGroup.eventInstances.length) {\r\n delete eventInstanceGroupsById[eventDef.id];\r\n }\r\n if (removeCnt) {\r\n this.tryRelease();\r\n }\r\n }\r\n };\r\n // Releasing and Freezing\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventPeriod.prototype.tryRelease = function () {\r\n if (!this.pendingCnt) {\r\n if (!this.freezeDepth) {\r\n this.release();\r\n }\r\n else {\r\n this.stuntedReleaseCnt++;\r\n }\r\n }\r\n };\r\n EventPeriod.prototype.release = function () {\r\n this.releaseCnt++;\r\n this.trigger('release', this.eventInstanceGroupsById);\r\n };\r\n EventPeriod.prototype.whenReleased = function () {\r\n var _this = this;\r\n if (this.releaseCnt) {\r\n return Promise_1.default.resolve(this.eventInstanceGroupsById);\r\n }\r\n else {\r\n return Promise_1.default.construct(function (onResolve) {\r\n _this.one('release', onResolve);\r\n });\r\n }\r\n };\r\n EventPeriod.prototype.freeze = function () {\r\n if (!(this.freezeDepth++)) {\r\n this.stuntedReleaseCnt = 0;\r\n }\r\n };\r\n EventPeriod.prototype.thaw = function () {\r\n if (!(--this.freezeDepth) && this.stuntedReleaseCnt && !this.pendingCnt) {\r\n this.release();\r\n }\r\n };\r\n return EventPeriod;\r\n}());\r\nexports.default = EventPeriod;\r\nEmitterMixin_1.default.mixInto(EventPeriod);\r\n\n\n/***/ }),\n/* 220 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar EventPeriod_1 = __webpack_require__(219);\r\nvar ArrayEventSource_1 = __webpack_require__(56);\r\nvar EventSource_1 = __webpack_require__(6);\r\nvar EventSourceParser_1 = __webpack_require__(38);\r\nvar SingleEventDef_1 = __webpack_require__(9);\r\nvar EventInstanceGroup_1 = __webpack_require__(20);\r\nvar EmitterMixin_1 = __webpack_require__(13);\r\nvar ListenerMixin_1 = __webpack_require__(7);\r\nvar EventManager = /** @class */ (function () {\r\n function EventManager(calendar) {\r\n this.calendar = calendar;\r\n this.stickySource = new ArrayEventSource_1.default(calendar);\r\n this.otherSources = [];\r\n }\r\n EventManager.prototype.requestEvents = function (start, end, timezone, force) {\r\n if (force ||\r\n !this.currentPeriod ||\r\n !this.currentPeriod.isWithinRange(start, end) ||\r\n timezone !== this.currentPeriod.timezone) {\r\n this.setPeriod(// will change this.currentPeriod\r\n new EventPeriod_1.default(start, end, timezone));\r\n }\r\n return this.currentPeriod.whenReleased();\r\n };\r\n // Source Adding/Removing\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventManager.prototype.addSource = function (eventSource) {\r\n this.otherSources.push(eventSource);\r\n if (this.currentPeriod) {\r\n this.currentPeriod.requestSource(eventSource); // might release\r\n }\r\n };\r\n EventManager.prototype.removeSource = function (doomedSource) {\r\n util_1.removeExact(this.otherSources, doomedSource);\r\n if (this.currentPeriod) {\r\n this.currentPeriod.purgeSource(doomedSource); // might release\r\n }\r\n };\r\n EventManager.prototype.removeAllSources = function () {\r\n this.otherSources = [];\r\n if (this.currentPeriod) {\r\n this.currentPeriod.purgeAllSources(); // might release\r\n }\r\n };\r\n // Source Refetching\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventManager.prototype.refetchSource = function (eventSource) {\r\n var currentPeriod = this.currentPeriod;\r\n if (currentPeriod) {\r\n currentPeriod.freeze();\r\n currentPeriod.purgeSource(eventSource);\r\n currentPeriod.requestSource(eventSource);\r\n currentPeriod.thaw();\r\n }\r\n };\r\n EventManager.prototype.refetchAllSources = function () {\r\n var currentPeriod = this.currentPeriod;\r\n if (currentPeriod) {\r\n currentPeriod.freeze();\r\n currentPeriod.purgeAllSources();\r\n currentPeriod.requestSources(this.getSources());\r\n currentPeriod.thaw();\r\n }\r\n };\r\n // Source Querying\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventManager.prototype.getSources = function () {\r\n return [this.stickySource].concat(this.otherSources);\r\n };\r\n // like querySources, but accepts multple match criteria (like multiple IDs)\r\n EventManager.prototype.multiQuerySources = function (matchInputs) {\r\n // coerce into an array\r\n if (!matchInputs) {\r\n matchInputs = [];\r\n }\r\n else if (!$.isArray(matchInputs)) {\r\n matchInputs = [matchInputs];\r\n }\r\n var matchingSources = [];\r\n var i;\r\n // resolve raw inputs to real event source objects\r\n for (i = 0; i < matchInputs.length; i++) {\r\n matchingSources.push.apply(// append\r\n matchingSources, this.querySources(matchInputs[i]));\r\n }\r\n return matchingSources;\r\n };\r\n // matchInput can either by a real event source object, an ID, or the function/URL for the source.\r\n // returns an array of matching source objects.\r\n EventManager.prototype.querySources = function (matchInput) {\r\n var sources = this.otherSources;\r\n var i;\r\n var source;\r\n // given a proper event source object\r\n for (i = 0; i < sources.length; i++) {\r\n source = sources[i];\r\n if (source === matchInput) {\r\n return [source];\r\n }\r\n }\r\n // an ID match\r\n source = this.getSourceById(EventSource_1.default.normalizeId(matchInput));\r\n if (source) {\r\n return [source];\r\n }\r\n // parse as an event source\r\n matchInput = EventSourceParser_1.default.parse(matchInput, this.calendar);\r\n if (matchInput) {\r\n return $.grep(sources, function (source) {\r\n return isSourcesEquivalent(matchInput, source);\r\n });\r\n }\r\n };\r\n /*\r\n ID assumed to already be normalized\r\n */\r\n EventManager.prototype.getSourceById = function (id) {\r\n return $.grep(this.otherSources, function (source) {\r\n return source.id && source.id === id;\r\n })[0];\r\n };\r\n // Event-Period\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventManager.prototype.setPeriod = function (eventPeriod) {\r\n if (this.currentPeriod) {\r\n this.unbindPeriod(this.currentPeriod);\r\n this.currentPeriod = null;\r\n }\r\n this.currentPeriod = eventPeriod;\r\n this.bindPeriod(eventPeriod);\r\n eventPeriod.requestSources(this.getSources());\r\n };\r\n EventManager.prototype.bindPeriod = function (eventPeriod) {\r\n this.listenTo(eventPeriod, 'release', function (eventsPayload) {\r\n this.trigger('release', eventsPayload);\r\n });\r\n };\r\n EventManager.prototype.unbindPeriod = function (eventPeriod) {\r\n this.stopListeningTo(eventPeriod);\r\n };\r\n // Event Getting/Adding/Removing\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventManager.prototype.getEventDefByUid = function (uid) {\r\n if (this.currentPeriod) {\r\n return this.currentPeriod.getEventDefByUid(uid);\r\n }\r\n };\r\n EventManager.prototype.addEventDef = function (eventDef, isSticky) {\r\n if (isSticky) {\r\n this.stickySource.addEventDef(eventDef);\r\n }\r\n if (this.currentPeriod) {\r\n this.currentPeriod.addEventDef(eventDef); // might release\r\n }\r\n };\r\n EventManager.prototype.removeEventDefsById = function (eventId) {\r\n this.getSources().forEach(function (eventSource) {\r\n eventSource.removeEventDefsById(eventId);\r\n });\r\n if (this.currentPeriod) {\r\n this.currentPeriod.removeEventDefsById(eventId); // might release\r\n }\r\n };\r\n EventManager.prototype.removeAllEventDefs = function () {\r\n this.getSources().forEach(function (eventSource) {\r\n eventSource.removeAllEventDefs();\r\n });\r\n if (this.currentPeriod) {\r\n this.currentPeriod.removeAllEventDefs();\r\n }\r\n };\r\n // Event Mutating\r\n // -----------------------------------------------------------------------------------------------------------------\r\n /*\r\n Returns an undo function.\r\n */\r\n EventManager.prototype.mutateEventsWithId = function (eventDefId, eventDefMutation) {\r\n var currentPeriod = this.currentPeriod;\r\n var eventDefs;\r\n var undoFuncs = [];\r\n if (currentPeriod) {\r\n currentPeriod.freeze();\r\n eventDefs = currentPeriod.getEventDefsById(eventDefId);\r\n eventDefs.forEach(function (eventDef) {\r\n // add/remove esp because id might change\r\n currentPeriod.removeEventDef(eventDef);\r\n undoFuncs.push(eventDefMutation.mutateSingle(eventDef));\r\n currentPeriod.addEventDef(eventDef);\r\n });\r\n currentPeriod.thaw();\r\n return function () {\r\n currentPeriod.freeze();\r\n for (var i = 0; i < eventDefs.length; i++) {\r\n currentPeriod.removeEventDef(eventDefs[i]);\r\n undoFuncs[i]();\r\n currentPeriod.addEventDef(eventDefs[i]);\r\n }\r\n currentPeriod.thaw();\r\n };\r\n }\r\n return function () { };\r\n };\r\n /*\r\n copies and then mutates\r\n */\r\n EventManager.prototype.buildMutatedEventInstanceGroup = function (eventDefId, eventDefMutation) {\r\n var eventDefs = this.getEventDefsById(eventDefId);\r\n var i;\r\n var defCopy;\r\n var allInstances = [];\r\n for (i = 0; i < eventDefs.length; i++) {\r\n defCopy = eventDefs[i].clone();\r\n if (defCopy instanceof SingleEventDef_1.default) {\r\n eventDefMutation.mutateSingle(defCopy);\r\n allInstances.push.apply(allInstances, // append\r\n defCopy.buildInstances());\r\n }\r\n }\r\n return new EventInstanceGroup_1.default(allInstances);\r\n };\r\n // Freezing\r\n // -----------------------------------------------------------------------------------------------------------------\r\n EventManager.prototype.freeze = function () {\r\n if (this.currentPeriod) {\r\n this.currentPeriod.freeze();\r\n }\r\n };\r\n EventManager.prototype.thaw = function () {\r\n if (this.currentPeriod) {\r\n this.currentPeriod.thaw();\r\n }\r\n };\r\n // methods that simply forward to EventPeriod\r\n EventManager.prototype.getEventDefsById = function (eventDefId) {\r\n return this.currentPeriod.getEventDefsById(eventDefId);\r\n };\r\n EventManager.prototype.getEventInstances = function () {\r\n return this.currentPeriod.getEventInstances();\r\n };\r\n EventManager.prototype.getEventInstancesWithId = function (eventDefId) {\r\n return this.currentPeriod.getEventInstancesWithId(eventDefId);\r\n };\r\n EventManager.prototype.getEventInstancesWithoutId = function (eventDefId) {\r\n return this.currentPeriod.getEventInstancesWithoutId(eventDefId);\r\n };\r\n return EventManager;\r\n}());\r\nexports.default = EventManager;\r\nEmitterMixin_1.default.mixInto(EventManager);\r\nListenerMixin_1.default.mixInto(EventManager);\r\nfunction isSourcesEquivalent(source0, source1) {\r\n return source0.getPrimitive() === source1.getPrimitive();\r\n}\r\n\n\n/***/ }),\n/* 221 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar Theme_1 = __webpack_require__(22);\r\nvar StandardTheme = /** @class */ (function (_super) {\r\n tslib_1.__extends(StandardTheme, _super);\r\n function StandardTheme() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return StandardTheme;\r\n}(Theme_1.default));\r\nexports.default = StandardTheme;\r\nStandardTheme.prototype.classes = {\r\n widget: 'fc-unthemed',\r\n widgetHeader: 'fc-widget-header',\r\n widgetContent: 'fc-widget-content',\r\n buttonGroup: 'fc-button-group',\r\n button: 'fc-button',\r\n cornerLeft: 'fc-corner-left',\r\n cornerRight: 'fc-corner-right',\r\n stateDefault: 'fc-state-default',\r\n stateActive: 'fc-state-active',\r\n stateDisabled: 'fc-state-disabled',\r\n stateHover: 'fc-state-hover',\r\n stateDown: 'fc-state-down',\r\n popoverHeader: 'fc-widget-header',\r\n popoverContent: 'fc-widget-content',\r\n // day grid\r\n headerRow: 'fc-widget-header',\r\n dayRow: 'fc-widget-content',\r\n // list view\r\n listView: 'fc-widget-content'\r\n};\r\nStandardTheme.prototype.baseIconClass = 'fc-icon';\r\nStandardTheme.prototype.iconClasses = {\r\n close: 'fc-icon-x',\r\n prev: 'fc-icon-left-single-arrow',\r\n next: 'fc-icon-right-single-arrow',\r\n prevYear: 'fc-icon-left-double-arrow',\r\n nextYear: 'fc-icon-right-double-arrow'\r\n};\r\nStandardTheme.prototype.iconOverrideOption = 'buttonIcons';\r\nStandardTheme.prototype.iconOverrideCustomButtonOption = 'icon';\r\nStandardTheme.prototype.iconOverridePrefix = 'fc-icon-';\r\n\n\n/***/ }),\n/* 222 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar Theme_1 = __webpack_require__(22);\r\nvar JqueryUiTheme = /** @class */ (function (_super) {\r\n tslib_1.__extends(JqueryUiTheme, _super);\r\n function JqueryUiTheme() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return JqueryUiTheme;\r\n}(Theme_1.default));\r\nexports.default = JqueryUiTheme;\r\nJqueryUiTheme.prototype.classes = {\r\n widget: 'ui-widget',\r\n widgetHeader: 'ui-widget-header',\r\n widgetContent: 'ui-widget-content',\r\n buttonGroup: 'fc-button-group',\r\n button: 'ui-button',\r\n cornerLeft: 'ui-corner-left',\r\n cornerRight: 'ui-corner-right',\r\n stateDefault: 'ui-state-default',\r\n stateActive: 'ui-state-active',\r\n stateDisabled: 'ui-state-disabled',\r\n stateHover: 'ui-state-hover',\r\n stateDown: 'ui-state-down',\r\n today: 'ui-state-highlight',\r\n popoverHeader: 'ui-widget-header',\r\n popoverContent: 'ui-widget-content',\r\n // day grid\r\n headerRow: 'ui-widget-header',\r\n dayRow: 'ui-widget-content',\r\n // list view\r\n listView: 'ui-widget-content'\r\n};\r\nJqueryUiTheme.prototype.baseIconClass = 'ui-icon';\r\nJqueryUiTheme.prototype.iconClasses = {\r\n close: 'ui-icon-closethick',\r\n prev: 'ui-icon-circle-triangle-w',\r\n next: 'ui-icon-circle-triangle-e',\r\n prevYear: 'ui-icon-seek-prev',\r\n nextYear: 'ui-icon-seek-next'\r\n};\r\nJqueryUiTheme.prototype.iconOverrideOption = 'themeButtonIcons';\r\nJqueryUiTheme.prototype.iconOverrideCustomButtonOption = 'themeIcon';\r\nJqueryUiTheme.prototype.iconOverridePrefix = 'ui-icon-';\r\n\n\n/***/ }),\n/* 223 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar Promise_1 = __webpack_require__(21);\r\nvar EventSource_1 = __webpack_require__(6);\r\nvar FuncEventSource = /** @class */ (function (_super) {\r\n tslib_1.__extends(FuncEventSource, _super);\r\n function FuncEventSource() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n FuncEventSource.parse = function (rawInput, calendar) {\r\n var rawProps;\r\n // normalize raw input\r\n if ($.isFunction(rawInput.events)) { // extended form\r\n rawProps = rawInput;\r\n }\r\n else if ($.isFunction(rawInput)) { // short form\r\n rawProps = { events: rawInput };\r\n }\r\n if (rawProps) {\r\n return EventSource_1.default.parse.call(this, rawProps, calendar);\r\n }\r\n return false;\r\n };\r\n FuncEventSource.prototype.fetch = function (start, end, timezone) {\r\n var _this = this;\r\n this.calendar.pushLoading();\r\n return Promise_1.default.construct(function (onResolve) {\r\n _this.func.call(_this.calendar, start.clone(), end.clone(), timezone, function (rawEventDefs) {\r\n _this.calendar.popLoading();\r\n onResolve(_this.parseEventDefs(rawEventDefs));\r\n });\r\n });\r\n };\r\n FuncEventSource.prototype.getPrimitive = function () {\r\n return this.func;\r\n };\r\n FuncEventSource.prototype.applyManualStandardProps = function (rawProps) {\r\n var superSuccess = _super.prototype.applyManualStandardProps.call(this, rawProps);\r\n this.func = rawProps.events;\r\n return superSuccess;\r\n };\r\n return FuncEventSource;\r\n}(EventSource_1.default));\r\nexports.default = FuncEventSource;\r\nFuncEventSource.defineStandardProps({\r\n events: false // don't automatically transfer\r\n});\r\n\n\n/***/ }),\n/* 224 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar Promise_1 = __webpack_require__(21);\r\nvar EventSource_1 = __webpack_require__(6);\r\nvar JsonFeedEventSource = /** @class */ (function (_super) {\r\n tslib_1.__extends(JsonFeedEventSource, _super);\r\n function JsonFeedEventSource() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n JsonFeedEventSource.parse = function (rawInput, calendar) {\r\n var rawProps;\r\n // normalize raw input\r\n if (typeof rawInput.url === 'string') { // extended form\r\n rawProps = rawInput;\r\n }\r\n else if (typeof rawInput === 'string') { // short form\r\n rawProps = { url: rawInput };\r\n }\r\n if (rawProps) {\r\n return EventSource_1.default.parse.call(this, rawProps, calendar);\r\n }\r\n return false;\r\n };\r\n JsonFeedEventSource.prototype.fetch = function (start, end, timezone) {\r\n var _this = this;\r\n var ajaxSettings = this.ajaxSettings;\r\n var onSuccess = ajaxSettings.success;\r\n var onError = ajaxSettings.error;\r\n var requestParams = this.buildRequestParams(start, end, timezone);\r\n // todo: eventually handle the promise's then,\r\n // don't intercept success/error\r\n // tho will be a breaking API change\r\n this.calendar.pushLoading();\r\n return Promise_1.default.construct(function (onResolve, onReject) {\r\n $.ajax($.extend({}, // destination\r\n JsonFeedEventSource.AJAX_DEFAULTS, ajaxSettings, {\r\n url: _this.url,\r\n data: requestParams,\r\n success: function (rawEventDefs, status, xhr) {\r\n var callbackRes;\r\n _this.calendar.popLoading();\r\n if (rawEventDefs) {\r\n callbackRes = util_1.applyAll(onSuccess, _this, [rawEventDefs, status, xhr]); // redirect `this`\r\n if ($.isArray(callbackRes)) {\r\n rawEventDefs = callbackRes;\r\n }\r\n onResolve(_this.parseEventDefs(rawEventDefs));\r\n }\r\n else {\r\n onReject();\r\n }\r\n },\r\n error: function (xhr, statusText, errorThrown) {\r\n _this.calendar.popLoading();\r\n util_1.applyAll(onError, _this, [xhr, statusText, errorThrown]); // redirect `this`\r\n onReject();\r\n }\r\n }));\r\n });\r\n };\r\n JsonFeedEventSource.prototype.buildRequestParams = function (start, end, timezone) {\r\n var calendar = this.calendar;\r\n var ajaxSettings = this.ajaxSettings;\r\n var startParam;\r\n var endParam;\r\n var timezoneParam;\r\n var customRequestParams;\r\n var params = {};\r\n startParam = this.startParam;\r\n if (startParam == null) {\r\n startParam = calendar.opt('startParam');\r\n }\r\n endParam = this.endParam;\r\n if (endParam == null) {\r\n endParam = calendar.opt('endParam');\r\n }\r\n timezoneParam = this.timezoneParam;\r\n if (timezoneParam == null) {\r\n timezoneParam = calendar.opt('timezoneParam');\r\n }\r\n // retrieve any outbound GET/POST $.ajax data from the options\r\n if ($.isFunction(ajaxSettings.data)) {\r\n // supplied as a function that returns a key/value object\r\n customRequestParams = ajaxSettings.data();\r\n }\r\n else {\r\n // probably supplied as a straight key/value object\r\n customRequestParams = ajaxSettings.data || {};\r\n }\r\n $.extend(params, customRequestParams);\r\n params[startParam] = start.format();\r\n params[endParam] = end.format();\r\n if (timezone && timezone !== 'local') {\r\n params[timezoneParam] = timezone;\r\n }\r\n return params;\r\n };\r\n JsonFeedEventSource.prototype.getPrimitive = function () {\r\n return this.url;\r\n };\r\n JsonFeedEventSource.prototype.applyMiscProps = function (rawProps) {\r\n this.ajaxSettings = rawProps;\r\n };\r\n JsonFeedEventSource.AJAX_DEFAULTS = {\r\n dataType: 'json',\r\n cache: false\r\n };\r\n return JsonFeedEventSource;\r\n}(EventSource_1.default));\r\nexports.default = JsonFeedEventSource;\r\nJsonFeedEventSource.defineStandardProps({\r\n // automatically transfer (true)...\r\n url: true,\r\n startParam: true,\r\n endParam: true,\r\n timezoneParam: true\r\n});\r\n\n\n/***/ }),\n/* 225 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar Iterator = /** @class */ (function () {\r\n function Iterator(items) {\r\n this.items = items || [];\r\n }\r\n /* Calls a method on every item passing the arguments through */\r\n Iterator.prototype.proxyCall = function (methodName) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var results = [];\r\n this.items.forEach(function (item) {\r\n results.push(item[methodName].apply(item, args));\r\n });\r\n return results;\r\n };\r\n return Iterator;\r\n}());\r\nexports.default = Iterator;\r\n\n\n/***/ }),\n/* 226 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar ListenerMixin_1 = __webpack_require__(7);\r\n/* Creates a clone of an element and lets it track the mouse as it moves\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nvar MouseFollower = /** @class */ (function () {\r\n function MouseFollower(sourceEl, options) {\r\n this.isFollowing = false;\r\n this.isHidden = false;\r\n this.isAnimating = false; // doing the revert animation?\r\n this.options = options = options || {};\r\n this.sourceEl = sourceEl;\r\n this.parentEl = options.parentEl ? $(options.parentEl) : sourceEl.parent(); // default to sourceEl's parent\r\n }\r\n // Causes the element to start following the mouse\r\n MouseFollower.prototype.start = function (ev) {\r\n if (!this.isFollowing) {\r\n this.isFollowing = true;\r\n this.y0 = util_1.getEvY(ev);\r\n this.x0 = util_1.getEvX(ev);\r\n this.topDelta = 0;\r\n this.leftDelta = 0;\r\n if (!this.isHidden) {\r\n this.updatePosition();\r\n }\r\n if (util_1.getEvIsTouch(ev)) {\r\n this.listenTo($(document), 'touchmove', this.handleMove);\r\n }\r\n else {\r\n this.listenTo($(document), 'mousemove', this.handleMove);\r\n }\r\n }\r\n };\r\n // Causes the element to stop following the mouse. If shouldRevert is true, will animate back to original position.\r\n // `callback` gets invoked when the animation is complete. If no animation, it is invoked immediately.\r\n MouseFollower.prototype.stop = function (shouldRevert, callback) {\r\n var _this = this;\r\n var revertDuration = this.options.revertDuration;\r\n var complete = function () {\r\n _this.isAnimating = false;\r\n _this.removeElement();\r\n _this.top0 = _this.left0 = null; // reset state for future updatePosition calls\r\n if (callback) {\r\n callback();\r\n }\r\n };\r\n if (this.isFollowing && !this.isAnimating) { // disallow more than one stop animation at a time\r\n this.isFollowing = false;\r\n this.stopListeningTo($(document));\r\n if (shouldRevert && revertDuration && !this.isHidden) { // do a revert animation?\r\n this.isAnimating = true;\r\n this.el.animate({\r\n top: this.top0,\r\n left: this.left0\r\n }, {\r\n duration: revertDuration,\r\n complete: complete\r\n });\r\n }\r\n else {\r\n complete();\r\n }\r\n }\r\n };\r\n // Gets the tracking element. Create it if necessary\r\n MouseFollower.prototype.getEl = function () {\r\n var el = this.el;\r\n if (!el) {\r\n el = this.el = this.sourceEl.clone()\r\n .addClass(this.options.additionalClass || '')\r\n .css({\r\n position: 'absolute',\r\n visibility: '',\r\n display: this.isHidden ? 'none' : '',\r\n margin: 0,\r\n right: 'auto',\r\n bottom: 'auto',\r\n width: this.sourceEl.width(),\r\n height: this.sourceEl.height(),\r\n opacity: this.options.opacity || '',\r\n zIndex: this.options.zIndex\r\n });\r\n // we don't want long taps or any mouse interaction causing selection/menus.\r\n // would use preventSelection(), but that prevents selectstart, causing problems.\r\n el.addClass('fc-unselectable');\r\n el.appendTo(this.parentEl);\r\n }\r\n return el;\r\n };\r\n // Removes the tracking element if it has already been created\r\n MouseFollower.prototype.removeElement = function () {\r\n if (this.el) {\r\n this.el.remove();\r\n this.el = null;\r\n }\r\n };\r\n // Update the CSS position of the tracking element\r\n MouseFollower.prototype.updatePosition = function () {\r\n var sourceOffset;\r\n var origin;\r\n this.getEl(); // ensure this.el\r\n // make sure origin info was computed\r\n if (this.top0 == null) {\r\n sourceOffset = this.sourceEl.offset();\r\n origin = this.el.offsetParent().offset();\r\n this.top0 = sourceOffset.top - origin.top;\r\n this.left0 = sourceOffset.left - origin.left;\r\n }\r\n this.el.css({\r\n top: this.top0 + this.topDelta,\r\n left: this.left0 + this.leftDelta\r\n });\r\n };\r\n // Gets called when the user moves the mouse\r\n MouseFollower.prototype.handleMove = function (ev) {\r\n this.topDelta = util_1.getEvY(ev) - this.y0;\r\n this.leftDelta = util_1.getEvX(ev) - this.x0;\r\n if (!this.isHidden) {\r\n this.updatePosition();\r\n }\r\n };\r\n // Temporarily makes the tracking element invisible. Can be called before following starts\r\n MouseFollower.prototype.hide = function () {\r\n if (!this.isHidden) {\r\n this.isHidden = true;\r\n if (this.el) {\r\n this.el.hide();\r\n }\r\n }\r\n };\r\n // Show the tracking element after it has been temporarily hidden\r\n MouseFollower.prototype.show = function () {\r\n if (this.isHidden) {\r\n this.isHidden = false;\r\n this.updatePosition();\r\n this.getEl().show();\r\n }\r\n };\r\n return MouseFollower;\r\n}());\r\nexports.default = MouseFollower;\r\nListenerMixin_1.default.mixInto(MouseFollower);\r\n\n\n/***/ }),\n/* 227 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/* A rectangular panel that is absolutely positioned over other content\r\n------------------------------------------------------------------------------------------------------------------------\r\nOptions:\r\n - className (string)\r\n - content (HTML string or jQuery element set)\r\n - parentEl\r\n - top\r\n - left\r\n - right (the x coord of where the right edge should be. not a \"CSS\" right)\r\n - autoHide (boolean)\r\n - show (callback)\r\n - hide (callback)\r\n*/\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar ListenerMixin_1 = __webpack_require__(7);\r\nvar Popover = /** @class */ (function () {\r\n function Popover(options) {\r\n this.isHidden = true;\r\n this.margin = 10; // the space required between the popover and the edges of the scroll container\r\n this.options = options || {};\r\n }\r\n // Shows the popover on the specified position. Renders it if not already\r\n Popover.prototype.show = function () {\r\n if (this.isHidden) {\r\n if (!this.el) {\r\n this.render();\r\n }\r\n this.el.show();\r\n this.position();\r\n this.isHidden = false;\r\n this.trigger('show');\r\n }\r\n };\r\n // Hides the popover, through CSS, but does not remove it from the DOM\r\n Popover.prototype.hide = function () {\r\n if (!this.isHidden) {\r\n this.el.hide();\r\n this.isHidden = true;\r\n this.trigger('hide');\r\n }\r\n };\r\n // Creates `this.el` and renders content inside of it\r\n Popover.prototype.render = function () {\r\n var _this = this;\r\n var options = this.options;\r\n this.el = $('<div class=\"fc-popover\">')\r\n .addClass(options.className || '')\r\n .css({\r\n // position initially to the top left to avoid creating scrollbars\r\n top: 0,\r\n left: 0\r\n })\r\n .append(options.content)\r\n .appendTo(options.parentEl);\r\n // when a click happens on anything inside with a 'fc-close' className, hide the popover\r\n this.el.on('click', '.fc-close', function () {\r\n _this.hide();\r\n });\r\n if (options.autoHide) {\r\n this.listenTo($(document), 'mousedown', this.documentMousedown);\r\n }\r\n };\r\n // Triggered when the user clicks *anywhere* in the document, for the autoHide feature\r\n Popover.prototype.documentMousedown = function (ev) {\r\n // only hide the popover if the click happened outside the popover\r\n if (this.el && !$(ev.target).closest(this.el).length) {\r\n this.hide();\r\n }\r\n };\r\n // Hides and unregisters any handlers\r\n Popover.prototype.removeElement = function () {\r\n this.hide();\r\n if (this.el) {\r\n this.el.remove();\r\n this.el = null;\r\n }\r\n this.stopListeningTo($(document), 'mousedown');\r\n };\r\n // Positions the popover optimally, using the top/left/right options\r\n Popover.prototype.position = function () {\r\n var options = this.options;\r\n var origin = this.el.offsetParent().offset();\r\n var width = this.el.outerWidth();\r\n var height = this.el.outerHeight();\r\n var windowEl = $(window);\r\n var viewportEl = util_1.getScrollParent(this.el);\r\n var viewportTop;\r\n var viewportLeft;\r\n var viewportOffset;\r\n var top; // the \"position\" (not \"offset\") values for the popover\r\n var left; //\r\n // compute top and left\r\n top = options.top || 0;\r\n if (options.left !== undefined) {\r\n left = options.left;\r\n }\r\n else if (options.right !== undefined) {\r\n left = options.right - width; // derive the left value from the right value\r\n }\r\n else {\r\n left = 0;\r\n }\r\n if (viewportEl.is(window) || viewportEl.is(document)) { // normalize getScrollParent's result\r\n viewportEl = windowEl;\r\n viewportTop = 0; // the window is always at the top left\r\n viewportLeft = 0; // (and .offset() won't work if called here)\r\n }\r\n else {\r\n viewportOffset = viewportEl.offset();\r\n viewportTop = viewportOffset.top;\r\n viewportLeft = viewportOffset.left;\r\n }\r\n // if the window is scrolled, it causes the visible area to be further down\r\n viewportTop += windowEl.scrollTop();\r\n viewportLeft += windowEl.scrollLeft();\r\n // constrain to the view port. if constrained by two edges, give precedence to top/left\r\n if (options.viewportConstrain !== false) {\r\n top = Math.min(top, viewportTop + viewportEl.outerHeight() - height - this.margin);\r\n top = Math.max(top, viewportTop + this.margin);\r\n left = Math.min(left, viewportLeft + viewportEl.outerWidth() - width - this.margin);\r\n left = Math.max(left, viewportLeft + this.margin);\r\n }\r\n this.el.css({\r\n top: top - origin.top,\r\n left: left - origin.left\r\n });\r\n };\r\n // Triggers a callback. Calls a function in the option hash of the same name.\r\n // Arguments beyond the first `name` are forwarded on.\r\n // TODO: better code reuse for this. Repeat code\r\n Popover.prototype.trigger = function (name) {\r\n if (this.options[name]) {\r\n this.options[name].apply(this, Array.prototype.slice.call(arguments, 1));\r\n }\r\n };\r\n return Popover;\r\n}());\r\nexports.default = Popover;\r\nListenerMixin_1.default.mixInto(Popover);\r\n\n\n/***/ }),\n/* 228 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar EmitterMixin_1 = __webpack_require__(13);\r\nvar TaskQueue = /** @class */ (function () {\r\n function TaskQueue() {\r\n this.q = [];\r\n this.isPaused = false;\r\n this.isRunning = false;\r\n }\r\n TaskQueue.prototype.queue = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n this.q.push.apply(this.q, args); // append\r\n this.tryStart();\r\n };\r\n TaskQueue.prototype.pause = function () {\r\n this.isPaused = true;\r\n };\r\n TaskQueue.prototype.resume = function () {\r\n this.isPaused = false;\r\n this.tryStart();\r\n };\r\n TaskQueue.prototype.getIsIdle = function () {\r\n return !this.isRunning && !this.isPaused;\r\n };\r\n TaskQueue.prototype.tryStart = function () {\r\n if (!this.isRunning && this.canRunNext()) {\r\n this.isRunning = true;\r\n this.trigger('start');\r\n this.runRemaining();\r\n }\r\n };\r\n TaskQueue.prototype.canRunNext = function () {\r\n return !this.isPaused && this.q.length;\r\n };\r\n TaskQueue.prototype.runRemaining = function () {\r\n var _this = this;\r\n var task;\r\n var res;\r\n do {\r\n task = this.q.shift(); // always freshly reference q. might have been reassigned.\r\n res = this.runTask(task);\r\n if (res && res.then) {\r\n res.then(function () {\r\n if (_this.canRunNext()) {\r\n _this.runRemaining();\r\n }\r\n });\r\n return; // prevent marking as stopped\r\n }\r\n } while (this.canRunNext());\r\n this.trigger('stop'); // not really a 'stop' ... more of a 'drained'\r\n this.isRunning = false;\r\n // if 'stop' handler added more tasks.... TODO: write test for this\r\n this.tryStart();\r\n };\r\n TaskQueue.prototype.runTask = function (task) {\r\n return task(); // task *is* the function, but subclasses can change the format of a task\r\n };\r\n return TaskQueue;\r\n}());\r\nexports.default = TaskQueue;\r\nEmitterMixin_1.default.mixInto(TaskQueue);\r\n\n\n/***/ }),\n/* 229 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar TaskQueue_1 = __webpack_require__(228);\r\nvar RenderQueue = /** @class */ (function (_super) {\r\n tslib_1.__extends(RenderQueue, _super);\r\n function RenderQueue(waitsByNamespace) {\r\n var _this = _super.call(this) || this;\r\n _this.waitsByNamespace = waitsByNamespace || {};\r\n return _this;\r\n }\r\n RenderQueue.prototype.queue = function (taskFunc, namespace, type) {\r\n var task = {\r\n func: taskFunc,\r\n namespace: namespace,\r\n type: type\r\n };\r\n var waitMs;\r\n if (namespace) {\r\n waitMs = this.waitsByNamespace[namespace];\r\n }\r\n if (this.waitNamespace) {\r\n if (namespace === this.waitNamespace && waitMs != null) {\r\n this.delayWait(waitMs);\r\n }\r\n else {\r\n this.clearWait();\r\n this.tryStart();\r\n }\r\n }\r\n if (this.compoundTask(task)) { // appended to queue?\r\n if (!this.waitNamespace && waitMs != null) {\r\n this.startWait(namespace, waitMs);\r\n }\r\n else {\r\n this.tryStart();\r\n }\r\n }\r\n };\r\n RenderQueue.prototype.startWait = function (namespace, waitMs) {\r\n this.waitNamespace = namespace;\r\n this.spawnWait(waitMs);\r\n };\r\n RenderQueue.prototype.delayWait = function (waitMs) {\r\n clearTimeout(this.waitId);\r\n this.spawnWait(waitMs);\r\n };\r\n RenderQueue.prototype.spawnWait = function (waitMs) {\r\n var _this = this;\r\n this.waitId = setTimeout(function () {\r\n _this.waitNamespace = null;\r\n _this.tryStart();\r\n }, waitMs);\r\n };\r\n RenderQueue.prototype.clearWait = function () {\r\n if (this.waitNamespace) {\r\n clearTimeout(this.waitId);\r\n this.waitId = null;\r\n this.waitNamespace = null;\r\n }\r\n };\r\n RenderQueue.prototype.canRunNext = function () {\r\n if (!_super.prototype.canRunNext.call(this)) {\r\n return false;\r\n }\r\n // waiting for a certain namespace to stop receiving tasks?\r\n if (this.waitNamespace) {\r\n var q = this.q;\r\n // if there was a different namespace task in the meantime,\r\n // that forces all previously-waiting tasks to suddenly execute.\r\n // TODO: find a way to do this in constant time.\r\n for (var i = 0; i < q.length; i++) {\r\n if (q[i].namespace !== this.waitNamespace) {\r\n return true; // allow execution\r\n }\r\n }\r\n return false;\r\n }\r\n return true;\r\n };\r\n RenderQueue.prototype.runTask = function (task) {\r\n task.func();\r\n };\r\n RenderQueue.prototype.compoundTask = function (newTask) {\r\n var q = this.q;\r\n var shouldAppend = true;\r\n var i;\r\n var task;\r\n if (newTask.namespace && newTask.type === 'destroy') {\r\n // remove all init/add/remove ops with same namespace, regardless of order\r\n for (i = q.length - 1; i >= 0; i--) {\r\n task = q[i];\r\n if (task.namespace === newTask.namespace) {\r\n switch (task.type) {\r\n case 'init':\r\n shouldAppend = false;\r\n // the latest destroy is cancelled out by not doing the init\r\n /* falls through */\r\n case 'add':\r\n /* falls through */\r\n case 'remove':\r\n q.splice(i, 1); // remove task\r\n }\r\n }\r\n }\r\n }\r\n if (shouldAppend) {\r\n q.push(newTask);\r\n }\r\n return shouldAppend;\r\n };\r\n return RenderQueue;\r\n}(TaskQueue_1.default));\r\nexports.default = RenderQueue;\r\n\n\n/***/ }),\n/* 230 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar Model_1 = __webpack_require__(51);\r\nvar Component = /** @class */ (function (_super) {\r\n tslib_1.__extends(Component, _super);\r\n function Component() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Component.prototype.setElement = function (el) {\r\n this.el = el;\r\n this.bindGlobalHandlers();\r\n this.renderSkeleton();\r\n this.set('isInDom', true);\r\n };\r\n Component.prototype.removeElement = function () {\r\n this.unset('isInDom');\r\n this.unrenderSkeleton();\r\n this.unbindGlobalHandlers();\r\n this.el.remove();\r\n // NOTE: don't null-out this.el in case the View was destroyed within an API callback.\r\n // We don't null-out the View's other jQuery element references upon destroy,\r\n // so we shouldn't kill this.el either.\r\n };\r\n Component.prototype.bindGlobalHandlers = function () {\r\n // subclasses can override\r\n };\r\n Component.prototype.unbindGlobalHandlers = function () {\r\n // subclasses can override\r\n };\r\n /*\r\n NOTE: Can't have a `render` method. Read the deprecation notice in View::executeDateRender\r\n */\r\n // Renders the basic structure of the view before any content is rendered\r\n Component.prototype.renderSkeleton = function () {\r\n // subclasses should implement\r\n };\r\n // Unrenders the basic structure of the view\r\n Component.prototype.unrenderSkeleton = function () {\r\n // subclasses should implement\r\n };\r\n return Component;\r\n}(Model_1.default));\r\nexports.default = Component;\r\n\n\n/***/ }),\n/* 231 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar moment = __webpack_require__(0);\r\nvar util_1 = __webpack_require__(4);\r\nvar moment_ext_1 = __webpack_require__(11);\r\nvar date_formatting_1 = __webpack_require__(49);\r\nvar Component_1 = __webpack_require__(230);\r\nvar util_2 = __webpack_require__(19);\r\nvar DateComponent = /** @class */ (function (_super) {\r\n tslib_1.__extends(DateComponent, _super);\r\n function DateComponent(_view, _options) {\r\n var _this = _super.call(this) || this;\r\n _this.isRTL = false; // frequently accessed options\r\n _this.hitsNeededDepth = 0; // necessary because multiple callers might need the same hits\r\n _this.hasAllDayBusinessHours = false; // TODO: unify with largeUnit and isTimeScale?\r\n _this.isDatesRendered = false;\r\n // hack to set options prior to the this.opt calls\r\n if (_view) {\r\n _this['view'] = _view;\r\n }\r\n if (_options) {\r\n _this['options'] = _options;\r\n }\r\n _this.uid = String(DateComponent.guid++);\r\n _this.childrenByUid = {};\r\n _this.nextDayThreshold = moment.duration(_this.opt('nextDayThreshold'));\r\n _this.isRTL = _this.opt('isRTL');\r\n if (_this.fillRendererClass) {\r\n _this.fillRenderer = new _this.fillRendererClass(_this);\r\n }\r\n if (_this.eventRendererClass) { // fillRenderer is optional -----v\r\n _this.eventRenderer = new _this.eventRendererClass(_this, _this.fillRenderer);\r\n }\r\n if (_this.helperRendererClass && _this.eventRenderer) {\r\n _this.helperRenderer = new _this.helperRendererClass(_this, _this.eventRenderer);\r\n }\r\n if (_this.businessHourRendererClass && _this.fillRenderer) {\r\n _this.businessHourRenderer = new _this.businessHourRendererClass(_this, _this.fillRenderer);\r\n }\r\n return _this;\r\n }\r\n DateComponent.prototype.addChild = function (child) {\r\n if (!this.childrenByUid[child.uid]) {\r\n this.childrenByUid[child.uid] = child;\r\n return true;\r\n }\r\n return false;\r\n };\r\n DateComponent.prototype.removeChild = function (child) {\r\n if (this.childrenByUid[child.uid]) {\r\n delete this.childrenByUid[child.uid];\r\n return true;\r\n }\r\n return false;\r\n };\r\n // TODO: only do if isInDom?\r\n // TODO: make part of Component, along with children/batch-render system?\r\n DateComponent.prototype.updateSize = function (totalHeight, isAuto, isResize) {\r\n this.callChildren('updateSize', arguments);\r\n };\r\n // Options\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DateComponent.prototype.opt = function (name) {\r\n return this._getView().opt(name); // default implementation\r\n };\r\n DateComponent.prototype.publiclyTrigger = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var calendar = this._getCalendar();\r\n return calendar.publiclyTrigger.apply(calendar, args);\r\n };\r\n DateComponent.prototype.hasPublicHandlers = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var calendar = this._getCalendar();\r\n return calendar.hasPublicHandlers.apply(calendar, args);\r\n };\r\n // Date\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DateComponent.prototype.executeDateRender = function (dateProfile) {\r\n this.dateProfile = dateProfile; // for rendering\r\n this.renderDates(dateProfile);\r\n this.isDatesRendered = true;\r\n this.callChildren('executeDateRender', arguments);\r\n };\r\n DateComponent.prototype.executeDateUnrender = function () {\r\n this.callChildren('executeDateUnrender', arguments);\r\n this.dateProfile = null;\r\n this.unrenderDates();\r\n this.isDatesRendered = false;\r\n };\r\n // date-cell content only\r\n DateComponent.prototype.renderDates = function (dateProfile) {\r\n // subclasses should implement\r\n };\r\n // date-cell content only\r\n DateComponent.prototype.unrenderDates = function () {\r\n // subclasses should override\r\n };\r\n // Now-Indicator\r\n // -----------------------------------------------------------------------------------------------------------------\r\n // Returns a string unit, like 'second' or 'minute' that defined how often the current time indicator\r\n // should be refreshed. If something falsy is returned, no time indicator is rendered at all.\r\n DateComponent.prototype.getNowIndicatorUnit = function () {\r\n // subclasses should implement\r\n };\r\n // Renders a current time indicator at the given datetime\r\n DateComponent.prototype.renderNowIndicator = function (date) {\r\n this.callChildren('renderNowIndicator', arguments);\r\n };\r\n // Undoes the rendering actions from renderNowIndicator\r\n DateComponent.prototype.unrenderNowIndicator = function () {\r\n this.callChildren('unrenderNowIndicator', arguments);\r\n };\r\n // Business Hours\r\n // ---------------------------------------------------------------------------------------------------------------\r\n DateComponent.prototype.renderBusinessHours = function (businessHourGenerator) {\r\n if (this.businessHourRenderer) {\r\n this.businessHourRenderer.render(businessHourGenerator);\r\n }\r\n this.callChildren('renderBusinessHours', arguments);\r\n };\r\n // Unrenders previously-rendered business-hours\r\n DateComponent.prototype.unrenderBusinessHours = function () {\r\n this.callChildren('unrenderBusinessHours', arguments);\r\n if (this.businessHourRenderer) {\r\n this.businessHourRenderer.unrender();\r\n }\r\n };\r\n // Event Displaying\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DateComponent.prototype.executeEventRender = function (eventsPayload) {\r\n if (this.eventRenderer) {\r\n this.eventRenderer.rangeUpdated(); // poorly named now\r\n this.eventRenderer.render(eventsPayload);\r\n }\r\n else if (this['renderEvents']) { // legacy\r\n this['renderEvents'](convertEventsPayloadToLegacyArray(eventsPayload));\r\n }\r\n this.callChildren('executeEventRender', arguments);\r\n };\r\n DateComponent.prototype.executeEventUnrender = function () {\r\n this.callChildren('executeEventUnrender', arguments);\r\n if (this.eventRenderer) {\r\n this.eventRenderer.unrender();\r\n }\r\n else if (this['destroyEvents']) { // legacy\r\n this['destroyEvents']();\r\n }\r\n };\r\n DateComponent.prototype.getBusinessHourSegs = function () {\r\n var segs = this.getOwnBusinessHourSegs();\r\n this.iterChildren(function (child) {\r\n segs.push.apply(segs, child.getBusinessHourSegs());\r\n });\r\n return segs;\r\n };\r\n DateComponent.prototype.getOwnBusinessHourSegs = function () {\r\n if (this.businessHourRenderer) {\r\n return this.businessHourRenderer.getSegs();\r\n }\r\n return [];\r\n };\r\n DateComponent.prototype.getEventSegs = function () {\r\n var segs = this.getOwnEventSegs();\r\n this.iterChildren(function (child) {\r\n segs.push.apply(segs, child.getEventSegs());\r\n });\r\n return segs;\r\n };\r\n DateComponent.prototype.getOwnEventSegs = function () {\r\n if (this.eventRenderer) {\r\n return this.eventRenderer.getSegs();\r\n }\r\n return [];\r\n };\r\n // Event Rendering Triggering\r\n // -----------------------------------------------------------------------------------------------------------------\r\n DateComponent.prototype.triggerAfterEventsRendered = function () {\r\n this.triggerAfterEventSegsRendered(this.getEventSegs());\r\n this.publiclyTrigger('eventAfterAllRender', {\r\n context: this,\r\n args: [this]\r\n });\r\n };\r\n DateComponent.prototype.triggerAfterEventSegsRendered = function (segs) {\r\n var _this = this;\r\n // an optimization, because getEventLegacy is expensive\r\n if (this.hasPublicHandlers('eventAfterRender')) {\r\n segs.forEach(function (seg) {\r\n var legacy;\r\n if (seg.el) { // necessary?\r\n legacy = seg.footprint.getEventLegacy();\r\n _this.publiclyTrigger('eventAfterRender', {\r\n context: legacy,\r\n args: [legacy, seg.el, _this]\r\n });\r\n }\r\n });\r\n }\r\n };\r\n DateComponent.prototype.triggerBeforeEventsDestroyed = function () {\r\n this.triggerBeforeEventSegsDestroyed(this.getEventSegs());\r\n };\r\n DateComponent.prototype.triggerBeforeEventSegsDestroyed = function (segs) {\r\n var _this = this;\r\n if (this.hasPublicHandlers('eventDestroy')) {\r\n segs.forEach(function (seg) {\r\n var legacy;\r\n if (seg.el) { // necessary?\r\n legacy = seg.footprint.getEventLegacy();\r\n _this.publiclyTrigger('eventDestroy', {\r\n context: legacy,\r\n args: [legacy, seg.el, _this]\r\n });\r\n }\r\n });\r\n }\r\n };\r\n // Event Rendering Utils\r\n // -----------------------------------------------------------------------------------------------------------------\r\n // Hides all rendered event segments linked to the given event\r\n // RECURSIVE with subcomponents\r\n DateComponent.prototype.showEventsWithId = function (eventDefId) {\r\n this.getEventSegs().forEach(function (seg) {\r\n if (seg.footprint.eventDef.id === eventDefId &&\r\n seg.el // necessary?\r\n ) {\r\n seg.el.css('visibility', '');\r\n }\r\n });\r\n this.callChildren('showEventsWithId', arguments);\r\n };\r\n // Shows all rendered event segments linked to the given event\r\n // RECURSIVE with subcomponents\r\n DateComponent.prototype.hideEventsWithId = function (eventDefId) {\r\n this.getEventSegs().forEach(function (seg) {\r\n if (seg.footprint.eventDef.id === eventDefId &&\r\n seg.el // necessary?\r\n ) {\r\n seg.el.css('visibility', 'hidden');\r\n }\r\n });\r\n this.callChildren('hideEventsWithId', arguments);\r\n };\r\n // Drag-n-Drop Rendering (for both events and external elements)\r\n // ---------------------------------------------------------------------------------------------------------------\r\n // Renders a visual indication of a event or external-element drag over the given drop zone.\r\n // If an external-element, seg will be `null`.\r\n // Must return elements used for any mock events.\r\n DateComponent.prototype.renderDrag = function (eventFootprints, seg, isTouch) {\r\n var renderedHelper = false;\r\n this.iterChildren(function (child) {\r\n if (child.renderDrag(eventFootprints, seg, isTouch)) {\r\n renderedHelper = true;\r\n }\r\n });\r\n return renderedHelper;\r\n };\r\n // Unrenders a visual indication of an event or external-element being dragged.\r\n DateComponent.prototype.unrenderDrag = function () {\r\n this.callChildren('unrenderDrag', arguments);\r\n };\r\n // Event Resizing\r\n // ---------------------------------------------------------------------------------------------------------------\r\n // Renders a visual indication of an event being resized.\r\n DateComponent.prototype.renderEventResize = function (eventFootprints, seg, isTouch) {\r\n this.callChildren('renderEventResize', arguments);\r\n };\r\n // Unrenders a visual indication of an event being resized.\r\n DateComponent.prototype.unrenderEventResize = function () {\r\n this.callChildren('unrenderEventResize', arguments);\r\n };\r\n // Selection\r\n // ---------------------------------------------------------------------------------------------------------------\r\n // Renders a visual indication of the selection\r\n // TODO: rename to `renderSelection` after legacy is gone\r\n DateComponent.prototype.renderSelectionFootprint = function (componentFootprint) {\r\n this.renderHighlight(componentFootprint);\r\n this.callChildren('renderSelectionFootprint', arguments);\r\n };\r\n // Unrenders a visual indication of selection\r\n DateComponent.prototype.unrenderSelection = function () {\r\n this.unrenderHighlight();\r\n this.callChildren('unrenderSelection', arguments);\r\n };\r\n // Highlight\r\n // ---------------------------------------------------------------------------------------------------------------\r\n // Renders an emphasis on the given date range. Given a span (unzoned start/end and other misc data)\r\n DateComponent.prototype.renderHighlight = function (componentFootprint) {\r\n if (this.fillRenderer) {\r\n this.fillRenderer.renderFootprint('highlight', componentFootprint, {\r\n getClasses: function () {\r\n return ['fc-highlight'];\r\n }\r\n });\r\n }\r\n this.callChildren('renderHighlight', arguments);\r\n };\r\n // Unrenders the emphasis on a date range\r\n DateComponent.prototype.unrenderHighlight = function () {\r\n if (this.fillRenderer) {\r\n this.fillRenderer.unrender('highlight');\r\n }\r\n this.callChildren('unrenderHighlight', arguments);\r\n };\r\n // Hit Areas\r\n // ---------------------------------------------------------------------------------------------------------------\r\n // just because all DateComponents support this interface\r\n // doesn't mean they need to have their own internal coord system. they can defer to sub-components.\r\n DateComponent.prototype.hitsNeeded = function () {\r\n if (!(this.hitsNeededDepth++)) {\r\n this.prepareHits();\r\n }\r\n this.callChildren('hitsNeeded', arguments);\r\n };\r\n DateComponent.prototype.hitsNotNeeded = function () {\r\n if (this.hitsNeededDepth && !(--this.hitsNeededDepth)) {\r\n this.releaseHits();\r\n }\r\n this.callChildren('hitsNotNeeded', arguments);\r\n };\r\n DateComponent.prototype.prepareHits = function () {\r\n // subclasses can implement\r\n };\r\n DateComponent.prototype.releaseHits = function () {\r\n // subclasses can implement\r\n };\r\n // Given coordinates from the topleft of the document, return data about the date-related area underneath.\r\n // Can return an object with arbitrary properties (although top/right/left/bottom are encouraged).\r\n // Must have a `grid` property, a reference to this current grid. TODO: avoid this\r\n // The returned object will be processed by getHitFootprint and getHitEl.\r\n DateComponent.prototype.queryHit = function (leftOffset, topOffset) {\r\n var childrenByUid = this.childrenByUid;\r\n var uid;\r\n var hit;\r\n for (uid in childrenByUid) {\r\n hit = childrenByUid[uid].queryHit(leftOffset, topOffset);\r\n if (hit) {\r\n break;\r\n }\r\n }\r\n return hit;\r\n };\r\n DateComponent.prototype.getSafeHitFootprint = function (hit) {\r\n var footprint = this.getHitFootprint(hit);\r\n if (!this.dateProfile.activeUnzonedRange.containsRange(footprint.unzonedRange)) {\r\n return null;\r\n }\r\n return footprint;\r\n };\r\n DateComponent.prototype.getHitFootprint = function (hit) {\r\n // what about being abstract!?\r\n };\r\n // Given position-level information about a date-related area within the grid,\r\n // should return a jQuery element that best represents it. passed to dayClick callback.\r\n DateComponent.prototype.getHitEl = function (hit) {\r\n // what about being abstract!?\r\n };\r\n /* Converting eventRange -> eventFootprint\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n DateComponent.prototype.eventRangesToEventFootprints = function (eventRanges) {\r\n var eventFootprints = [];\r\n var i;\r\n for (i = 0; i < eventRanges.length; i++) {\r\n eventFootprints.push.apply(// append\r\n eventFootprints, this.eventRangeToEventFootprints(eventRanges[i]));\r\n }\r\n return eventFootprints;\r\n };\r\n DateComponent.prototype.eventRangeToEventFootprints = function (eventRange) {\r\n return [util_2.eventRangeToEventFootprint(eventRange)];\r\n };\r\n /* Converting componentFootprint/eventFootprint -> segs\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n DateComponent.prototype.eventFootprintsToSegs = function (eventFootprints) {\r\n var segs = [];\r\n var i;\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n segs.push.apply(segs, this.eventFootprintToSegs(eventFootprints[i]));\r\n }\r\n return segs;\r\n };\r\n // Given an event's span (unzoned start/end and other misc data), and the event itself,\r\n // slices into segments and attaches event-derived properties to them.\r\n // eventSpan - { start, end, isStart, isEnd, otherthings... }\r\n DateComponent.prototype.eventFootprintToSegs = function (eventFootprint) {\r\n var unzonedRange = eventFootprint.componentFootprint.unzonedRange;\r\n var segs;\r\n var i;\r\n var seg;\r\n segs = this.componentFootprintToSegs(eventFootprint.componentFootprint);\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n if (!unzonedRange.isStart) {\r\n seg.isStart = false;\r\n }\r\n if (!unzonedRange.isEnd) {\r\n seg.isEnd = false;\r\n }\r\n seg.footprint = eventFootprint;\r\n // TODO: rename to seg.eventFootprint\r\n }\r\n return segs;\r\n };\r\n DateComponent.prototype.componentFootprintToSegs = function (componentFootprint) {\r\n return [];\r\n };\r\n // Utils\r\n // ---------------------------------------------------------------------------------------------------------------\r\n DateComponent.prototype.callChildren = function (methodName, args) {\r\n this.iterChildren(function (child) {\r\n child[methodName].apply(child, args);\r\n });\r\n };\r\n DateComponent.prototype.iterChildren = function (func) {\r\n var childrenByUid = this.childrenByUid;\r\n var uid;\r\n for (uid in childrenByUid) {\r\n func(childrenByUid[uid]);\r\n }\r\n };\r\n DateComponent.prototype._getCalendar = function () {\r\n var t = this;\r\n return t.calendar || t.view.calendar;\r\n };\r\n DateComponent.prototype._getView = function () {\r\n return this.view;\r\n };\r\n DateComponent.prototype._getDateProfile = function () {\r\n return this._getView().get('dateProfile');\r\n };\r\n // Generates HTML for an anchor to another view into the calendar.\r\n // Will either generate an <a> tag or a non-clickable <span> tag, depending on enabled settings.\r\n // `gotoOptions` can either be a moment input, or an object with the form:\r\n // { date, type, forceOff }\r\n // `type` is a view-type like \"day\" or \"week\". default value is \"day\".\r\n // `attrs` and `innerHtml` are use to generate the rest of the HTML tag.\r\n DateComponent.prototype.buildGotoAnchorHtml = function (gotoOptions, attrs, innerHtml) {\r\n var date;\r\n var type;\r\n var forceOff;\r\n var finalOptions;\r\n if ($.isPlainObject(gotoOptions)) {\r\n date = gotoOptions.date;\r\n type = gotoOptions.type;\r\n forceOff = gotoOptions.forceOff;\r\n }\r\n else {\r\n date = gotoOptions; // a single moment input\r\n }\r\n date = moment_ext_1.default(date); // if a string, parse it\r\n finalOptions = {\r\n date: date.format('YYYY-MM-DD'),\r\n type: type || 'day'\r\n };\r\n if (typeof attrs === 'string') {\r\n innerHtml = attrs;\r\n attrs = null;\r\n }\r\n attrs = attrs ? ' ' + util_1.attrsToStr(attrs) : ''; // will have a leading space\r\n innerHtml = innerHtml || '';\r\n if (!forceOff && this.opt('navLinks')) {\r\n return '<a' + attrs +\r\n ' data-goto=\"' + util_1.htmlEscape(JSON.stringify(finalOptions)) + '\">' +\r\n innerHtml +\r\n '</a>';\r\n }\r\n else {\r\n return '<span' + attrs + '>' +\r\n innerHtml +\r\n '</span>';\r\n }\r\n };\r\n DateComponent.prototype.getAllDayHtml = function () {\r\n return this.opt('allDayHtml') || util_1.htmlEscape(this.opt('allDayText'));\r\n };\r\n // Computes HTML classNames for a single-day element\r\n DateComponent.prototype.getDayClasses = function (date, noThemeHighlight) {\r\n var view = this._getView();\r\n var classes = [];\r\n var today;\r\n if (!this.dateProfile.activeUnzonedRange.containsDate(date)) {\r\n classes.push('fc-disabled-day'); // TODO: jQuery UI theme?\r\n }\r\n else {\r\n classes.push('fc-' + util_1.dayIDs[date.day()]);\r\n if (view.isDateInOtherMonth(date, this.dateProfile)) { // TODO: use DateComponent subclass somehow\r\n classes.push('fc-other-month');\r\n }\r\n today = view.calendar.getNow();\r\n if (date.isSame(today, 'day')) {\r\n classes.push('fc-today');\r\n if (noThemeHighlight !== true) {\r\n classes.push(view.calendar.theme.getClass('today'));\r\n }\r\n }\r\n else if (date < today) {\r\n classes.push('fc-past');\r\n }\r\n else {\r\n classes.push('fc-future');\r\n }\r\n }\r\n return classes;\r\n };\r\n // Utility for formatting a range. Accepts a range object, formatting string, and optional separator.\r\n // Displays all-day ranges naturally, with an inclusive end. Takes the current isRTL into account.\r\n // The timezones of the dates within `range` will be respected.\r\n DateComponent.prototype.formatRange = function (range, isAllDay, formatStr, separator) {\r\n var end = range.end;\r\n if (isAllDay) {\r\n end = end.clone().subtract(1); // convert to inclusive. last ms of previous day\r\n }\r\n return date_formatting_1.formatRange(range.start, end, formatStr, separator, this.isRTL);\r\n };\r\n // Compute the number of the give units in the \"current\" range.\r\n // Will return a floating-point number. Won't round.\r\n DateComponent.prototype.currentRangeAs = function (unit) {\r\n return this._getDateProfile().currentUnzonedRange.as(unit);\r\n };\r\n // Returns the date range of the full days the given range visually appears to occupy.\r\n // Returns a plain object with start/end, NOT an UnzonedRange!\r\n DateComponent.prototype.computeDayRange = function (unzonedRange) {\r\n var calendar = this._getCalendar();\r\n var startDay = calendar.msToUtcMoment(unzonedRange.startMs, true); // the beginning of the day the range starts\r\n var end = calendar.msToUtcMoment(unzonedRange.endMs);\r\n var endTimeMS = +end.time(); // # of milliseconds into `endDay`\r\n var endDay = end.clone().stripTime(); // the beginning of the day the range exclusively ends\r\n // If the end time is actually inclusively part of the next day and is equal to or\r\n // beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.\r\n // Otherwise, leaving it as inclusive will cause it to exclude `endDay`.\r\n if (endTimeMS && endTimeMS >= this.nextDayThreshold) {\r\n endDay.add(1, 'days');\r\n }\r\n // If end is within `startDay` but not past nextDayThreshold, assign the default duration of one day.\r\n if (endDay <= startDay) {\r\n endDay = startDay.clone().add(1, 'days');\r\n }\r\n return { start: startDay, end: endDay };\r\n };\r\n // Does the given range visually appear to occupy more than one day?\r\n DateComponent.prototype.isMultiDayRange = function (unzonedRange) {\r\n var dayRange = this.computeDayRange(unzonedRange);\r\n return dayRange.end.diff(dayRange.start, 'days') > 1;\r\n };\r\n DateComponent.guid = 0; // TODO: better system for this?\r\n return DateComponent;\r\n}(Component_1.default));\r\nexports.default = DateComponent;\r\n// legacy\r\nfunction convertEventsPayloadToLegacyArray(eventsPayload) {\r\n var eventDefId;\r\n var eventInstances;\r\n var legacyEvents = [];\r\n var i;\r\n for (eventDefId in eventsPayload) {\r\n eventInstances = eventsPayload[eventDefId].eventInstances;\r\n for (i = 0; i < eventInstances.length; i++) {\r\n legacyEvents.push(eventInstances[i].toLegacy());\r\n }\r\n }\r\n return legacyEvents;\r\n}\r\n\n\n/***/ }),\n/* 232 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar moment = __webpack_require__(0);\r\nvar util_1 = __webpack_require__(4);\r\nvar options_1 = __webpack_require__(33);\r\nvar Iterator_1 = __webpack_require__(225);\r\nvar GlobalEmitter_1 = __webpack_require__(23);\r\nvar EmitterMixin_1 = __webpack_require__(13);\r\nvar ListenerMixin_1 = __webpack_require__(7);\r\nvar Toolbar_1 = __webpack_require__(257);\r\nvar OptionsManager_1 = __webpack_require__(258);\r\nvar ViewSpecManager_1 = __webpack_require__(259);\r\nvar Constraints_1 = __webpack_require__(217);\r\nvar locale_1 = __webpack_require__(32);\r\nvar moment_ext_1 = __webpack_require__(11);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar ComponentFootprint_1 = __webpack_require__(12);\r\nvar EventDateProfile_1 = __webpack_require__(16);\r\nvar EventManager_1 = __webpack_require__(220);\r\nvar BusinessHourGenerator_1 = __webpack_require__(218);\r\nvar EventSourceParser_1 = __webpack_require__(38);\r\nvar EventDefParser_1 = __webpack_require__(36);\r\nvar SingleEventDef_1 = __webpack_require__(9);\r\nvar EventDefMutation_1 = __webpack_require__(39);\r\nvar EventSource_1 = __webpack_require__(6);\r\nvar ThemeRegistry_1 = __webpack_require__(57);\r\nvar Calendar = /** @class */ (function () {\r\n function Calendar(el, overrides) {\r\n this.loadingLevel = 0; // number of simultaneous loading tasks\r\n this.ignoreUpdateViewSize = 0;\r\n this.freezeContentHeightDepth = 0;\r\n // declare the current calendar instance relies on GlobalEmitter. needed for garbage collection.\r\n // unneeded() is called in destroy.\r\n GlobalEmitter_1.default.needed();\r\n this.el = el;\r\n this.viewsByType = {};\r\n this.optionsManager = new OptionsManager_1.default(this, overrides);\r\n this.viewSpecManager = new ViewSpecManager_1.default(this.optionsManager, this);\r\n this.initMomentInternals(); // needs to happen after options hash initialized\r\n this.initCurrentDate();\r\n this.initEventManager();\r\n this.constraints = new Constraints_1.default(this.eventManager, this);\r\n this.constructed();\r\n }\r\n Calendar.prototype.constructed = function () {\r\n // useful for monkeypatching. used?\r\n };\r\n Calendar.prototype.getView = function () {\r\n return this.view;\r\n };\r\n Calendar.prototype.publiclyTrigger = function (name, triggerInfo) {\r\n var optHandler = this.opt(name);\r\n var context;\r\n var args;\r\n if ($.isPlainObject(triggerInfo)) {\r\n context = triggerInfo.context;\r\n args = triggerInfo.args;\r\n }\r\n else if ($.isArray(triggerInfo)) {\r\n args = triggerInfo;\r\n }\r\n if (context == null) {\r\n context = this.el[0]; // fallback context\r\n }\r\n if (!args) {\r\n args = [];\r\n }\r\n this.triggerWith(name, context, args); // Emitter's method\r\n if (optHandler) {\r\n return optHandler.apply(context, args);\r\n }\r\n };\r\n Calendar.prototype.hasPublicHandlers = function (name) {\r\n return this.hasHandlers(name) ||\r\n this.opt(name); // handler specified in options\r\n };\r\n // Options Public API\r\n // -----------------------------------------------------------------------------------------------------------------\r\n // public getter/setter\r\n Calendar.prototype.option = function (name, value) {\r\n var newOptionHash;\r\n if (typeof name === 'string') {\r\n if (value === undefined) { // getter\r\n return this.optionsManager.get(name);\r\n }\r\n else { // setter for individual option\r\n newOptionHash = {};\r\n newOptionHash[name] = value;\r\n this.optionsManager.add(newOptionHash);\r\n }\r\n }\r\n else if (typeof name === 'object') { // compound setter with object input\r\n this.optionsManager.add(name);\r\n }\r\n };\r\n // private getter\r\n Calendar.prototype.opt = function (name) {\r\n return this.optionsManager.get(name);\r\n };\r\n // View\r\n // -----------------------------------------------------------------------------------------------------------------\r\n // Given a view name for a custom view or a standard view, creates a ready-to-go View object\r\n Calendar.prototype.instantiateView = function (viewType) {\r\n var spec = this.viewSpecManager.getViewSpec(viewType);\r\n if (!spec) {\r\n throw new Error(\"View type \\\"\" + viewType + \"\\\" is not valid\");\r\n }\r\n return new spec['class'](this, spec);\r\n };\r\n // Returns a boolean about whether the view is okay to instantiate at some point\r\n Calendar.prototype.isValidViewType = function (viewType) {\r\n return Boolean(this.viewSpecManager.getViewSpec(viewType));\r\n };\r\n Calendar.prototype.changeView = function (viewName, dateOrRange) {\r\n if (dateOrRange) {\r\n if (dateOrRange.start && dateOrRange.end) { // a range\r\n this.optionsManager.recordOverrides({\r\n visibleRange: dateOrRange\r\n });\r\n }\r\n else { // a date\r\n this.currentDate = this.moment(dateOrRange).stripZone(); // just like gotoDate\r\n }\r\n }\r\n this.renderView(viewName);\r\n };\r\n // Forces navigation to a view for the given date.\r\n // `viewType` can be a specific view name or a generic one like \"week\" or \"day\".\r\n Calendar.prototype.zoomTo = function (newDate, viewType) {\r\n var spec;\r\n viewType = viewType || 'day'; // day is default zoom\r\n spec = this.viewSpecManager.getViewSpec(viewType) ||\r\n this.viewSpecManager.getUnitViewSpec(viewType);\r\n this.currentDate = newDate.clone();\r\n this.renderView(spec ? spec.type : null);\r\n };\r\n // Current Date\r\n // -----------------------------------------------------------------------------------------------------------------\r\n Calendar.prototype.initCurrentDate = function () {\r\n var defaultDateInput = this.opt('defaultDate');\r\n // compute the initial ambig-timezone date\r\n if (defaultDateInput != null) {\r\n this.currentDate = this.moment(defaultDateInput).stripZone();\r\n }\r\n else {\r\n this.currentDate = this.getNow(); // getNow already returns unzoned\r\n }\r\n };\r\n Calendar.prototype.prev = function () {\r\n var view = this.view;\r\n var prevInfo = view.dateProfileGenerator.buildPrev(view.get('dateProfile'));\r\n if (prevInfo.isValid) {\r\n this.currentDate = prevInfo.date;\r\n this.renderView();\r\n }\r\n };\r\n Calendar.prototype.next = function () {\r\n var view = this.view;\r\n var nextInfo = view.dateProfileGenerator.buildNext(view.get('dateProfile'));\r\n if (nextInfo.isValid) {\r\n this.currentDate = nextInfo.date;\r\n this.renderView();\r\n }\r\n };\r\n Calendar.prototype.prevYear = function () {\r\n this.currentDate.add(-1, 'years');\r\n this.renderView();\r\n };\r\n Calendar.prototype.nextYear = function () {\r\n this.currentDate.add(1, 'years');\r\n this.renderView();\r\n };\r\n Calendar.prototype.today = function () {\r\n this.currentDate = this.getNow(); // should deny like prev/next?\r\n this.renderView();\r\n };\r\n Calendar.prototype.gotoDate = function (zonedDateInput) {\r\n this.currentDate = this.moment(zonedDateInput).stripZone();\r\n this.renderView();\r\n };\r\n Calendar.prototype.incrementDate = function (delta) {\r\n this.currentDate.add(moment.duration(delta));\r\n this.renderView();\r\n };\r\n // for external API\r\n Calendar.prototype.getDate = function () {\r\n return this.applyTimezone(this.currentDate); // infuse the calendar's timezone\r\n };\r\n // Loading Triggering\r\n // -----------------------------------------------------------------------------------------------------------------\r\n // Should be called when any type of async data fetching begins\r\n Calendar.prototype.pushLoading = function () {\r\n if (!(this.loadingLevel++)) {\r\n this.publiclyTrigger('loading', [true, this.view]);\r\n }\r\n };\r\n // Should be called when any type of async data fetching completes\r\n Calendar.prototype.popLoading = function () {\r\n if (!(--this.loadingLevel)) {\r\n this.publiclyTrigger('loading', [false, this.view]);\r\n }\r\n };\r\n // High-level Rendering\r\n // -----------------------------------------------------------------------------------\r\n Calendar.prototype.render = function () {\r\n if (!this.contentEl) {\r\n this.initialRender();\r\n }\r\n else if (this.elementVisible()) {\r\n // mainly for the public API\r\n this.calcSize();\r\n this.updateViewSize();\r\n }\r\n };\r\n Calendar.prototype.initialRender = function () {\r\n var _this = this;\r\n var el = this.el;\r\n el.addClass('fc');\r\n // event delegation for nav links\r\n el.on('click.fc', 'a[data-goto]', function (ev) {\r\n var anchorEl = $(ev.currentTarget);\r\n var gotoOptions = anchorEl.data('goto'); // will automatically parse JSON\r\n var date = _this.moment(gotoOptions.date);\r\n var viewType = gotoOptions.type;\r\n // property like \"navLinkDayClick\". might be a string or a function\r\n var customAction = _this.view.opt('navLink' + util_1.capitaliseFirstLetter(viewType) + 'Click');\r\n if (typeof customAction === 'function') {\r\n customAction(date, ev);\r\n }\r\n else {\r\n if (typeof customAction === 'string') {\r\n viewType = customAction;\r\n }\r\n _this.zoomTo(date, viewType);\r\n }\r\n });\r\n // called immediately, and upon option change\r\n this.optionsManager.watch('settingTheme', ['?theme', '?themeSystem'], function (opts) {\r\n var themeClass = ThemeRegistry_1.getThemeSystemClass(opts.themeSystem || opts.theme);\r\n var theme = new themeClass(_this.optionsManager);\r\n var widgetClass = theme.getClass('widget');\r\n _this.theme = theme;\r\n if (widgetClass) {\r\n el.addClass(widgetClass);\r\n }\r\n }, function () {\r\n var widgetClass = _this.theme.getClass('widget');\r\n _this.theme = null;\r\n if (widgetClass) {\r\n el.removeClass(widgetClass);\r\n }\r\n });\r\n this.optionsManager.watch('settingBusinessHourGenerator', ['?businessHours'], function (deps) {\r\n _this.businessHourGenerator = new BusinessHourGenerator_1.default(deps.businessHours, _this);\r\n if (_this.view) {\r\n _this.view.set('businessHourGenerator', _this.businessHourGenerator);\r\n }\r\n }, function () {\r\n _this.businessHourGenerator = null;\r\n });\r\n // called immediately, and upon option change.\r\n // HACK: locale often affects isRTL, so we explicitly listen to that too.\r\n this.optionsManager.watch('applyingDirClasses', ['?isRTL', '?locale'], function (opts) {\r\n el.toggleClass('fc-ltr', !opts.isRTL);\r\n el.toggleClass('fc-rtl', opts.isRTL);\r\n });\r\n this.contentEl = $(\"<div class='fc-view-container'>\").prependTo(el);\r\n this.initToolbars();\r\n this.renderHeader();\r\n this.renderFooter();\r\n this.renderView(this.opt('defaultView'));\r\n if (this.opt('handleWindowResize')) {\r\n $(window).resize(this.windowResizeProxy = util_1.debounce(// prevents rapid calls\r\n this.windowResize.bind(this), this.opt('windowResizeDelay')));\r\n }\r\n };\r\n Calendar.prototype.destroy = function () {\r\n if (this.view) {\r\n this.clearView();\r\n }\r\n this.toolbarsManager.proxyCall('removeElement');\r\n this.contentEl.remove();\r\n this.el.removeClass('fc fc-ltr fc-rtl');\r\n // removes theme-related root className\r\n this.optionsManager.unwatch('settingTheme');\r\n this.optionsManager.unwatch('settingBusinessHourGenerator');\r\n this.el.off('.fc'); // unbind nav link handlers\r\n if (this.windowResizeProxy) {\r\n $(window).unbind('resize', this.windowResizeProxy);\r\n this.windowResizeProxy = null;\r\n }\r\n GlobalEmitter_1.default.unneeded();\r\n };\r\n Calendar.prototype.elementVisible = function () {\r\n return this.el.is(':visible');\r\n };\r\n // Render Queue\r\n // -----------------------------------------------------------------------------------------------------------------\r\n Calendar.prototype.bindViewHandlers = function (view) {\r\n var _this = this;\r\n view.watch('titleForCalendar', ['title'], function (deps) {\r\n if (view === _this.view) { // hack\r\n _this.setToolbarsTitle(deps.title);\r\n }\r\n });\r\n view.watch('dateProfileForCalendar', ['dateProfile'], function (deps) {\r\n if (view === _this.view) { // hack\r\n _this.currentDate = deps.dateProfile.date; // might have been constrained by view dates\r\n _this.updateToolbarButtons(deps.dateProfile);\r\n }\r\n });\r\n };\r\n Calendar.prototype.unbindViewHandlers = function (view) {\r\n view.unwatch('titleForCalendar');\r\n view.unwatch('dateProfileForCalendar');\r\n };\r\n // View Rendering\r\n // -----------------------------------------------------------------------------------\r\n // Renders a view because of a date change, view-type change, or for the first time.\r\n // If not given a viewType, keep the current view but render different dates.\r\n // Accepts an optional scroll state to restore to.\r\n Calendar.prototype.renderView = function (viewType) {\r\n var oldView = this.view;\r\n var newView;\r\n this.freezeContentHeight();\r\n if (oldView && viewType && oldView.type !== viewType) {\r\n this.clearView();\r\n }\r\n // if viewType changed, or the view was never created, create a fresh view\r\n if (!this.view && viewType) {\r\n newView = this.view =\r\n this.viewsByType[viewType] ||\r\n (this.viewsByType[viewType] = this.instantiateView(viewType));\r\n this.bindViewHandlers(newView);\r\n newView.startBatchRender(); // so that setElement+setDate rendering are joined\r\n newView.setElement($(\"<div class='fc-view fc-\" + viewType + \"-view'>\").appendTo(this.contentEl));\r\n this.toolbarsManager.proxyCall('activateButton', viewType);\r\n }\r\n if (this.view) {\r\n // prevent unnecessary change firing\r\n if (this.view.get('businessHourGenerator') !== this.businessHourGenerator) {\r\n this.view.set('businessHourGenerator', this.businessHourGenerator);\r\n }\r\n this.view.setDate(this.currentDate);\r\n if (newView) {\r\n newView.stopBatchRender();\r\n }\r\n }\r\n this.thawContentHeight();\r\n };\r\n // Unrenders the current view and reflects this change in the Header.\r\n // Unregsiters the `view`, but does not remove from viewByType hash.\r\n Calendar.prototype.clearView = function () {\r\n var currentView = this.view;\r\n this.toolbarsManager.proxyCall('deactivateButton', currentView.type);\r\n this.unbindViewHandlers(currentView);\r\n currentView.removeElement();\r\n currentView.unsetDate(); // so bindViewHandlers doesn't fire with old values next time\r\n this.view = null;\r\n };\r\n // Destroys the view, including the view object. Then, re-instantiates it and renders it.\r\n // Maintains the same scroll state.\r\n // TODO: maintain any other user-manipulated state.\r\n Calendar.prototype.reinitView = function () {\r\n var oldView = this.view;\r\n var scroll = oldView.queryScroll(); // wouldn't be so complicated if Calendar owned the scroll\r\n this.freezeContentHeight();\r\n this.clearView();\r\n this.calcSize();\r\n this.renderView(oldView.type); // needs the type to freshly render\r\n this.view.applyScroll(scroll);\r\n this.thawContentHeight();\r\n };\r\n // Resizing\r\n // -----------------------------------------------------------------------------------\r\n Calendar.prototype.getSuggestedViewHeight = function () {\r\n if (this.suggestedViewHeight == null) {\r\n this.calcSize();\r\n }\r\n return this.suggestedViewHeight;\r\n };\r\n Calendar.prototype.isHeightAuto = function () {\r\n return this.opt('contentHeight') === 'auto' || this.opt('height') === 'auto';\r\n };\r\n Calendar.prototype.updateViewSize = function (isResize) {\r\n if (isResize === void 0) { isResize = false; }\r\n var view = this.view;\r\n var scroll;\r\n if (!this.ignoreUpdateViewSize && view) {\r\n if (isResize) {\r\n this.calcSize();\r\n scroll = view.queryScroll();\r\n }\r\n this.ignoreUpdateViewSize++;\r\n view.updateSize(this.getSuggestedViewHeight(), this.isHeightAuto(), isResize);\r\n this.ignoreUpdateViewSize--;\r\n if (isResize) {\r\n view.applyScroll(scroll);\r\n }\r\n return true; // signal success\r\n }\r\n };\r\n Calendar.prototype.calcSize = function () {\r\n if (this.elementVisible()) {\r\n this._calcSize();\r\n }\r\n };\r\n Calendar.prototype._calcSize = function () {\r\n var contentHeightInput = this.opt('contentHeight');\r\n var heightInput = this.opt('height');\r\n if (typeof contentHeightInput === 'number') { // exists and not 'auto'\r\n this.suggestedViewHeight = contentHeightInput;\r\n }\r\n else if (typeof contentHeightInput === 'function') { // exists and is a function\r\n this.suggestedViewHeight = contentHeightInput();\r\n }\r\n else if (typeof heightInput === 'number') { // exists and not 'auto'\r\n this.suggestedViewHeight = heightInput - this.queryToolbarsHeight();\r\n }\r\n else if (typeof heightInput === 'function') { // exists and is a function\r\n this.suggestedViewHeight = heightInput() - this.queryToolbarsHeight();\r\n }\r\n else if (heightInput === 'parent') { // set to height of parent element\r\n this.suggestedViewHeight = this.el.parent().height() - this.queryToolbarsHeight();\r\n }\r\n else {\r\n this.suggestedViewHeight = Math.round(this.contentEl.width() /\r\n Math.max(this.opt('aspectRatio'), .5));\r\n }\r\n };\r\n Calendar.prototype.windowResize = function (ev) {\r\n if (\r\n // the purpose: so we don't process jqui \"resize\" events that have bubbled up\r\n // cast to any because .target, which is Element, can't be compared to window for some reason.\r\n ev.target === window &&\r\n this.view &&\r\n this.view.isDatesRendered) {\r\n if (this.updateViewSize(true)) { // isResize=true, returns true on success\r\n this.publiclyTrigger('windowResize', [this.view]);\r\n }\r\n }\r\n };\r\n /* Height \"Freezing\"\r\n -----------------------------------------------------------------------------*/\r\n Calendar.prototype.freezeContentHeight = function () {\r\n if (!(this.freezeContentHeightDepth++)) {\r\n this.forceFreezeContentHeight();\r\n }\r\n };\r\n Calendar.prototype.forceFreezeContentHeight = function () {\r\n this.contentEl.css({\r\n width: '100%',\r\n height: this.contentEl.height(),\r\n overflow: 'hidden'\r\n });\r\n };\r\n Calendar.prototype.thawContentHeight = function () {\r\n this.freezeContentHeightDepth--;\r\n // always bring back to natural height\r\n this.contentEl.css({\r\n width: '',\r\n height: '',\r\n overflow: ''\r\n });\r\n // but if there are future thaws, re-freeze\r\n if (this.freezeContentHeightDepth) {\r\n this.forceFreezeContentHeight();\r\n }\r\n };\r\n // Toolbar\r\n // -----------------------------------------------------------------------------------------------------------------\r\n Calendar.prototype.initToolbars = function () {\r\n this.header = new Toolbar_1.default(this, this.computeHeaderOptions());\r\n this.footer = new Toolbar_1.default(this, this.computeFooterOptions());\r\n this.toolbarsManager = new Iterator_1.default([this.header, this.footer]);\r\n };\r\n Calendar.prototype.computeHeaderOptions = function () {\r\n return {\r\n extraClasses: 'fc-header-toolbar',\r\n layout: this.opt('header')\r\n };\r\n };\r\n Calendar.prototype.computeFooterOptions = function () {\r\n return {\r\n extraClasses: 'fc-footer-toolbar',\r\n layout: this.opt('footer')\r\n };\r\n };\r\n // can be called repeatedly and Header will rerender\r\n Calendar.prototype.renderHeader = function () {\r\n var header = this.header;\r\n header.setToolbarOptions(this.computeHeaderOptions());\r\n header.render();\r\n if (header.el) {\r\n this.el.prepend(header.el);\r\n }\r\n };\r\n // can be called repeatedly and Footer will rerender\r\n Calendar.prototype.renderFooter = function () {\r\n var footer = this.footer;\r\n footer.setToolbarOptions(this.computeFooterOptions());\r\n footer.render();\r\n if (footer.el) {\r\n this.el.append(footer.el);\r\n }\r\n };\r\n Calendar.prototype.setToolbarsTitle = function (title) {\r\n this.toolbarsManager.proxyCall('updateTitle', title);\r\n };\r\n Calendar.prototype.updateToolbarButtons = function (dateProfile) {\r\n var now = this.getNow();\r\n var view = this.view;\r\n var todayInfo = view.dateProfileGenerator.build(now);\r\n var prevInfo = view.dateProfileGenerator.buildPrev(view.get('dateProfile'));\r\n var nextInfo = view.dateProfileGenerator.buildNext(view.get('dateProfile'));\r\n this.toolbarsManager.proxyCall((todayInfo.isValid && !dateProfile.currentUnzonedRange.containsDate(now)) ?\r\n 'enableButton' :\r\n 'disableButton', 'today');\r\n this.toolbarsManager.proxyCall(prevInfo.isValid ?\r\n 'enableButton' :\r\n 'disableButton', 'prev');\r\n this.toolbarsManager.proxyCall(nextInfo.isValid ?\r\n 'enableButton' :\r\n 'disableButton', 'next');\r\n };\r\n Calendar.prototype.queryToolbarsHeight = function () {\r\n return this.toolbarsManager.items.reduce(function (accumulator, toolbar) {\r\n var toolbarHeight = toolbar.el ? toolbar.el.outerHeight(true) : 0; // includes margin\r\n return accumulator + toolbarHeight;\r\n }, 0);\r\n };\r\n // Selection\r\n // -----------------------------------------------------------------------------------------------------------------\r\n // this public method receives start/end dates in any format, with any timezone\r\n Calendar.prototype.select = function (zonedStartInput, zonedEndInput) {\r\n this.view.select(this.buildSelectFootprint.apply(this, arguments));\r\n };\r\n Calendar.prototype.unselect = function () {\r\n if (this.view) {\r\n this.view.unselect();\r\n }\r\n };\r\n // Given arguments to the select method in the API, returns a span (unzoned start/end and other info)\r\n Calendar.prototype.buildSelectFootprint = function (zonedStartInput, zonedEndInput) {\r\n var start = this.moment(zonedStartInput).stripZone();\r\n var end;\r\n if (zonedEndInput) {\r\n end = this.moment(zonedEndInput).stripZone();\r\n }\r\n else if (start.hasTime()) {\r\n end = start.clone().add(this.defaultTimedEventDuration);\r\n }\r\n else {\r\n end = start.clone().add(this.defaultAllDayEventDuration);\r\n }\r\n return new ComponentFootprint_1.default(new UnzonedRange_1.default(start, end), !start.hasTime());\r\n };\r\n // Date Utils\r\n // -----------------------------------------------------------------------------------------------------------------\r\n Calendar.prototype.initMomentInternals = function () {\r\n var _this = this;\r\n this.defaultAllDayEventDuration = moment.duration(this.opt('defaultAllDayEventDuration'));\r\n this.defaultTimedEventDuration = moment.duration(this.opt('defaultTimedEventDuration'));\r\n // Called immediately, and when any of the options change.\r\n // Happens before any internal objects rebuild or rerender, because this is very core.\r\n this.optionsManager.watch('buildingMomentLocale', [\r\n '?locale', '?monthNames', '?monthNamesShort', '?dayNames', '?dayNamesShort',\r\n '?firstDay', '?weekNumberCalculation'\r\n ], function (opts) {\r\n var weekNumberCalculation = opts.weekNumberCalculation;\r\n var firstDay = opts.firstDay;\r\n var _week;\r\n // normalize\r\n if (weekNumberCalculation === 'iso') {\r\n weekNumberCalculation = 'ISO'; // normalize\r\n }\r\n var localeData = Object.create(// make a cheap copy\r\n locale_1.getMomentLocaleData(opts.locale) // will fall back to en\r\n );\r\n if (opts.monthNames) {\r\n localeData._months = opts.monthNames;\r\n }\r\n if (opts.monthNamesShort) {\r\n localeData._monthsShort = opts.monthNamesShort;\r\n }\r\n if (opts.dayNames) {\r\n localeData._weekdays = opts.dayNames;\r\n }\r\n if (opts.dayNamesShort) {\r\n localeData._weekdaysShort = opts.dayNamesShort;\r\n }\r\n if (firstDay == null && weekNumberCalculation === 'ISO') {\r\n firstDay = 1;\r\n }\r\n if (firstDay != null) {\r\n _week = Object.create(localeData._week); // _week: { dow: # }\r\n _week.dow = firstDay;\r\n localeData._week = _week;\r\n }\r\n if ( // whitelist certain kinds of input\r\n weekNumberCalculation === 'ISO' ||\r\n weekNumberCalculation === 'local' ||\r\n typeof weekNumberCalculation === 'function') {\r\n localeData._fullCalendar_weekCalc = weekNumberCalculation; // moment-ext will know what to do with it\r\n }\r\n _this.localeData = localeData;\r\n // If the internal current date object already exists, move to new locale.\r\n // We do NOT need to do this technique for event dates, because this happens when converting to \"segments\".\r\n if (_this.currentDate) {\r\n _this.localizeMoment(_this.currentDate); // sets to localeData\r\n }\r\n });\r\n };\r\n // Builds a moment using the settings of the current calendar: timezone and locale.\r\n // Accepts anything the vanilla moment() constructor accepts.\r\n Calendar.prototype.moment = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n var mom;\r\n if (this.opt('timezone') === 'local') {\r\n mom = moment_ext_1.default.apply(null, args);\r\n // Force the moment to be local, because momentExt doesn't guarantee it.\r\n if (mom.hasTime()) { // don't give ambiguously-timed moments a local zone\r\n mom.local();\r\n }\r\n }\r\n else if (this.opt('timezone') === 'UTC') {\r\n mom = moment_ext_1.default.utc.apply(null, args); // process as UTC\r\n }\r\n else {\r\n mom = moment_ext_1.default.parseZone.apply(null, args); // let the input decide the zone\r\n }\r\n this.localizeMoment(mom); // TODO\r\n return mom;\r\n };\r\n Calendar.prototype.msToMoment = function (ms, forceAllDay) {\r\n var mom = moment_ext_1.default.utc(ms); // TODO: optimize by using Date.UTC\r\n if (forceAllDay) {\r\n mom.stripTime();\r\n }\r\n else {\r\n mom = this.applyTimezone(mom); // may or may not apply locale\r\n }\r\n this.localizeMoment(mom);\r\n return mom;\r\n };\r\n Calendar.prototype.msToUtcMoment = function (ms, forceAllDay) {\r\n var mom = moment_ext_1.default.utc(ms); // TODO: optimize by using Date.UTC\r\n if (forceAllDay) {\r\n mom.stripTime();\r\n }\r\n this.localizeMoment(mom);\r\n return mom;\r\n };\r\n // Updates the given moment's locale settings to the current calendar locale settings.\r\n Calendar.prototype.localizeMoment = function (mom) {\r\n mom._locale = this.localeData;\r\n };\r\n // Returns a boolean about whether or not the calendar knows how to calculate\r\n // the timezone offset of arbitrary dates in the current timezone.\r\n Calendar.prototype.getIsAmbigTimezone = function () {\r\n return this.opt('timezone') !== 'local' && this.opt('timezone') !== 'UTC';\r\n };\r\n // Returns a copy of the given date in the current timezone. Has no effect on dates without times.\r\n Calendar.prototype.applyTimezone = function (date) {\r\n if (!date.hasTime()) {\r\n return date.clone();\r\n }\r\n var zonedDate = this.moment(date.toArray());\r\n var timeAdjust = date.time().asMilliseconds() - zonedDate.time().asMilliseconds();\r\n var adjustedZonedDate;\r\n // Safari sometimes has problems with this coersion when near DST. Adjust if necessary. (bug #2396)\r\n if (timeAdjust) { // is the time result different than expected?\r\n adjustedZonedDate = zonedDate.clone().add(timeAdjust); // add milliseconds\r\n if (date.time().asMilliseconds() - adjustedZonedDate.time().asMilliseconds() === 0) { // does it match perfectly now?\r\n zonedDate = adjustedZonedDate;\r\n }\r\n }\r\n return zonedDate;\r\n };\r\n /*\r\n Assumes the footprint is non-open-ended.\r\n */\r\n Calendar.prototype.footprintToDateProfile = function (componentFootprint, ignoreEnd) {\r\n if (ignoreEnd === void 0) { ignoreEnd = false; }\r\n var start = moment_ext_1.default.utc(componentFootprint.unzonedRange.startMs);\r\n var end;\r\n if (!ignoreEnd) {\r\n end = moment_ext_1.default.utc(componentFootprint.unzonedRange.endMs);\r\n }\r\n if (componentFootprint.isAllDay) {\r\n start.stripTime();\r\n if (end) {\r\n end.stripTime();\r\n }\r\n }\r\n else {\r\n start = this.applyTimezone(start);\r\n if (end) {\r\n end = this.applyTimezone(end);\r\n }\r\n }\r\n this.localizeMoment(start);\r\n if (end) {\r\n this.localizeMoment(end);\r\n }\r\n return new EventDateProfile_1.default(start, end, this);\r\n };\r\n // Returns a moment for the current date, as defined by the client's computer or from the `now` option.\r\n // Will return an moment with an ambiguous timezone.\r\n Calendar.prototype.getNow = function () {\r\n var now = this.opt('now');\r\n if (typeof now === 'function') {\r\n now = now();\r\n }\r\n return this.moment(now).stripZone();\r\n };\r\n // Produces a human-readable string for the given duration.\r\n // Side-effect: changes the locale of the given duration.\r\n Calendar.prototype.humanizeDuration = function (duration) {\r\n return duration.locale(this.opt('locale')).humanize();\r\n };\r\n // will return `null` if invalid range\r\n Calendar.prototype.parseUnzonedRange = function (rangeInput) {\r\n var start = null;\r\n var end = null;\r\n if (rangeInput.start) {\r\n start = this.moment(rangeInput.start).stripZone();\r\n }\r\n if (rangeInput.end) {\r\n end = this.moment(rangeInput.end).stripZone();\r\n }\r\n if (!start && !end) {\r\n return null;\r\n }\r\n if (start && end && end.isBefore(start)) {\r\n return null;\r\n }\r\n return new UnzonedRange_1.default(start, end);\r\n };\r\n // Event-Date Utilities\r\n // -----------------------------------------------------------------------------------------------------------------\r\n Calendar.prototype.initEventManager = function () {\r\n var _this = this;\r\n var eventManager = new EventManager_1.default(this);\r\n var rawSources = this.opt('eventSources') || [];\r\n var singleRawSource = this.opt('events');\r\n this.eventManager = eventManager;\r\n if (singleRawSource) {\r\n rawSources.unshift(singleRawSource);\r\n }\r\n eventManager.on('release', function (eventsPayload) {\r\n _this.trigger('eventsReset', eventsPayload);\r\n });\r\n eventManager.freeze();\r\n rawSources.forEach(function (rawSource) {\r\n var source = EventSourceParser_1.default.parse(rawSource, _this);\r\n if (source) {\r\n eventManager.addSource(source);\r\n }\r\n });\r\n eventManager.thaw();\r\n };\r\n Calendar.prototype.requestEvents = function (start, end) {\r\n return this.eventManager.requestEvents(start, end, this.opt('timezone'), !this.opt('lazyFetching'));\r\n };\r\n // Get an event's normalized end date. If not present, calculate it from the defaults.\r\n Calendar.prototype.getEventEnd = function (event) {\r\n if (event.end) {\r\n return event.end.clone();\r\n }\r\n else {\r\n return this.getDefaultEventEnd(event.allDay, event.start);\r\n }\r\n };\r\n // Given an event's allDay status and start date, return what its fallback end date should be.\r\n // TODO: rename to computeDefaultEventEnd\r\n Calendar.prototype.getDefaultEventEnd = function (allDay, zonedStart) {\r\n var end = zonedStart.clone();\r\n if (allDay) {\r\n end.stripTime().add(this.defaultAllDayEventDuration);\r\n }\r\n else {\r\n end.add(this.defaultTimedEventDuration);\r\n }\r\n if (this.getIsAmbigTimezone()) {\r\n end.stripZone(); // we don't know what the tzo should be\r\n }\r\n return end;\r\n };\r\n // Public Events API\r\n // -----------------------------------------------------------------------------------------------------------------\r\n Calendar.prototype.rerenderEvents = function () {\r\n this.view.flash('displayingEvents');\r\n };\r\n Calendar.prototype.refetchEvents = function () {\r\n this.eventManager.refetchAllSources();\r\n };\r\n Calendar.prototype.renderEvents = function (eventInputs, isSticky) {\r\n this.eventManager.freeze();\r\n for (var i = 0; i < eventInputs.length; i++) {\r\n this.renderEvent(eventInputs[i], isSticky);\r\n }\r\n this.eventManager.thaw();\r\n };\r\n Calendar.prototype.renderEvent = function (eventInput, isSticky) {\r\n if (isSticky === void 0) { isSticky = false; }\r\n var eventManager = this.eventManager;\r\n var eventDef = EventDefParser_1.default.parse(eventInput, eventInput.source || eventManager.stickySource);\r\n if (eventDef) {\r\n eventManager.addEventDef(eventDef, isSticky);\r\n }\r\n };\r\n // legacyQuery operates on legacy event instance objects\r\n Calendar.prototype.removeEvents = function (legacyQuery) {\r\n var eventManager = this.eventManager;\r\n var legacyInstances = [];\r\n var idMap = {};\r\n var eventDef;\r\n var i;\r\n if (legacyQuery == null) { // shortcut for removing all\r\n eventManager.removeAllEventDefs(); // persist=true\r\n }\r\n else {\r\n eventManager.getEventInstances().forEach(function (eventInstance) {\r\n legacyInstances.push(eventInstance.toLegacy());\r\n });\r\n legacyInstances = filterLegacyEventInstances(legacyInstances, legacyQuery);\r\n // compute unique IDs\r\n for (i = 0; i < legacyInstances.length; i++) {\r\n eventDef = this.eventManager.getEventDefByUid(legacyInstances[i]._id);\r\n idMap[eventDef.id] = true;\r\n }\r\n eventManager.freeze();\r\n for (i in idMap) { // reuse `i` as an \"id\"\r\n eventManager.removeEventDefsById(i); // persist=true\r\n }\r\n eventManager.thaw();\r\n }\r\n };\r\n // legacyQuery operates on legacy event instance objects\r\n Calendar.prototype.clientEvents = function (legacyQuery) {\r\n var legacyEventInstances = [];\r\n this.eventManager.getEventInstances().forEach(function (eventInstance) {\r\n legacyEventInstances.push(eventInstance.toLegacy());\r\n });\r\n return filterLegacyEventInstances(legacyEventInstances, legacyQuery);\r\n };\r\n Calendar.prototype.updateEvents = function (eventPropsArray) {\r\n this.eventManager.freeze();\r\n for (var i = 0; i < eventPropsArray.length; i++) {\r\n this.updateEvent(eventPropsArray[i]);\r\n }\r\n this.eventManager.thaw();\r\n };\r\n Calendar.prototype.updateEvent = function (eventProps) {\r\n var eventDef = this.eventManager.getEventDefByUid(eventProps._id);\r\n var eventInstance;\r\n var eventDefMutation;\r\n if (eventDef instanceof SingleEventDef_1.default) {\r\n eventInstance = eventDef.buildInstance();\r\n eventDefMutation = EventDefMutation_1.default.createFromRawProps(eventInstance, eventProps, // raw props\r\n null // largeUnit -- who uses it?\r\n );\r\n this.eventManager.mutateEventsWithId(eventDef.id, eventDefMutation); // will release\r\n }\r\n };\r\n // Public Event Sources API\r\n // ------------------------------------------------------------------------------------\r\n Calendar.prototype.getEventSources = function () {\r\n return this.eventManager.otherSources.slice(); // clone\r\n };\r\n Calendar.prototype.getEventSourceById = function (id) {\r\n return this.eventManager.getSourceById(EventSource_1.default.normalizeId(id));\r\n };\r\n Calendar.prototype.addEventSource = function (sourceInput) {\r\n var source = EventSourceParser_1.default.parse(sourceInput, this);\r\n if (source) {\r\n this.eventManager.addSource(source);\r\n }\r\n };\r\n Calendar.prototype.removeEventSources = function (sourceMultiQuery) {\r\n var eventManager = this.eventManager;\r\n var sources;\r\n var i;\r\n if (sourceMultiQuery == null) {\r\n this.eventManager.removeAllSources();\r\n }\r\n else {\r\n sources = eventManager.multiQuerySources(sourceMultiQuery);\r\n eventManager.freeze();\r\n for (i = 0; i < sources.length; i++) {\r\n eventManager.removeSource(sources[i]);\r\n }\r\n eventManager.thaw();\r\n }\r\n };\r\n Calendar.prototype.removeEventSource = function (sourceQuery) {\r\n var eventManager = this.eventManager;\r\n var sources = eventManager.querySources(sourceQuery);\r\n var i;\r\n eventManager.freeze();\r\n for (i = 0; i < sources.length; i++) {\r\n eventManager.removeSource(sources[i]);\r\n }\r\n eventManager.thaw();\r\n };\r\n Calendar.prototype.refetchEventSources = function (sourceMultiQuery) {\r\n var eventManager = this.eventManager;\r\n var sources = eventManager.multiQuerySources(sourceMultiQuery);\r\n var i;\r\n eventManager.freeze();\r\n for (i = 0; i < sources.length; i++) {\r\n eventManager.refetchSource(sources[i]);\r\n }\r\n eventManager.thaw();\r\n };\r\n // not for internal use. use options module directly instead.\r\n Calendar.defaults = options_1.globalDefaults;\r\n Calendar.englishDefaults = options_1.englishDefaults;\r\n Calendar.rtlDefaults = options_1.rtlDefaults;\r\n return Calendar;\r\n}());\r\nexports.default = Calendar;\r\nEmitterMixin_1.default.mixInto(Calendar);\r\nListenerMixin_1.default.mixInto(Calendar);\r\nfunction filterLegacyEventInstances(legacyEventInstances, legacyQuery) {\r\n if (legacyQuery == null) {\r\n return legacyEventInstances;\r\n }\r\n else if ($.isFunction(legacyQuery)) {\r\n return legacyEventInstances.filter(legacyQuery);\r\n }\r\n else { // an event ID\r\n legacyQuery += ''; // normalize to string\r\n return legacyEventInstances.filter(function (legacyEventInstance) {\r\n // soft comparison because id not be normalized to string\r\n // tslint:disable-next-line\r\n return legacyEventInstance.id == legacyQuery ||\r\n legacyEventInstance._id === legacyQuery; // can specify internal id, but must exactly match\r\n });\r\n }\r\n}\r\n\n\n/***/ }),\n/* 233 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar moment = __webpack_require__(0);\r\nvar exportHooks = __webpack_require__(18);\r\nvar util_1 = __webpack_require__(4);\r\nvar moment_ext_1 = __webpack_require__(11);\r\nvar ListenerMixin_1 = __webpack_require__(7);\r\nvar HitDragListener_1 = __webpack_require__(17);\r\nvar SingleEventDef_1 = __webpack_require__(9);\r\nvar EventInstanceGroup_1 = __webpack_require__(20);\r\nvar EventSource_1 = __webpack_require__(6);\r\nvar Interaction_1 = __webpack_require__(14);\r\nvar ExternalDropping = /** @class */ (function (_super) {\r\n tslib_1.__extends(ExternalDropping, _super);\r\n function ExternalDropping() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.isDragging = false; // jqui-dragging an external element? boolean\r\n return _this;\r\n }\r\n /*\r\n component impements:\r\n - eventRangesToEventFootprints\r\n - isEventInstanceGroupAllowed\r\n - isExternalInstanceGroupAllowed\r\n - renderDrag\r\n - unrenderDrag\r\n */\r\n ExternalDropping.prototype.end = function () {\r\n if (this.dragListener) {\r\n this.dragListener.endInteraction();\r\n }\r\n };\r\n ExternalDropping.prototype.bindToDocument = function () {\r\n this.listenTo($(document), {\r\n dragstart: this.handleDragStart,\r\n sortstart: this.handleDragStart // jqui\r\n });\r\n };\r\n ExternalDropping.prototype.unbindFromDocument = function () {\r\n this.stopListeningTo($(document));\r\n };\r\n // Called when a jQuery UI drag is initiated anywhere in the DOM\r\n ExternalDropping.prototype.handleDragStart = function (ev, ui) {\r\n var el;\r\n var accept;\r\n if (this.opt('droppable')) { // only listen if this setting is on\r\n el = $((ui ? ui.item : null) || ev.target);\r\n // Test that the dragged element passes the dropAccept selector or filter function.\r\n // FYI, the default is \"*\" (matches all)\r\n accept = this.opt('dropAccept');\r\n if ($.isFunction(accept) ? accept.call(el[0], el) : el.is(accept)) {\r\n if (!this.isDragging) { // prevent double-listening if fired twice\r\n this.listenToExternalDrag(el, ev, ui);\r\n }\r\n }\r\n }\r\n };\r\n // Called when a jQuery UI drag starts and it needs to be monitored for dropping\r\n ExternalDropping.prototype.listenToExternalDrag = function (el, ev, ui) {\r\n var _this = this;\r\n var component = this.component;\r\n var view = this.view;\r\n var meta = getDraggedElMeta(el); // extra data about event drop, including possible event to create\r\n var singleEventDef; // a null value signals an unsuccessful drag\r\n // listener that tracks mouse movement over date-associated pixel regions\r\n var dragListener = this.dragListener = new HitDragListener_1.default(component, {\r\n interactionStart: function () {\r\n _this.isDragging = true;\r\n },\r\n hitOver: function (hit) {\r\n var isAllowed = true;\r\n var hitFootprint = hit.component.getSafeHitFootprint(hit); // hit might not belong to this grid\r\n var mutatedEventInstanceGroup;\r\n if (hitFootprint) {\r\n singleEventDef = _this.computeExternalDrop(hitFootprint, meta);\r\n if (singleEventDef) {\r\n mutatedEventInstanceGroup = new EventInstanceGroup_1.default(singleEventDef.buildInstances());\r\n isAllowed = meta.eventProps ? // isEvent?\r\n component.isEventInstanceGroupAllowed(mutatedEventInstanceGroup) :\r\n component.isExternalInstanceGroupAllowed(mutatedEventInstanceGroup);\r\n }\r\n else {\r\n isAllowed = false;\r\n }\r\n }\r\n else {\r\n isAllowed = false;\r\n }\r\n if (!isAllowed) {\r\n singleEventDef = null;\r\n util_1.disableCursor();\r\n }\r\n if (singleEventDef) {\r\n component.renderDrag(// called without a seg parameter\r\n component.eventRangesToEventFootprints(mutatedEventInstanceGroup.sliceRenderRanges(component.dateProfile.renderUnzonedRange, view.calendar)));\r\n }\r\n },\r\n hitOut: function () {\r\n singleEventDef = null; // signal unsuccessful\r\n },\r\n hitDone: function () {\r\n util_1.enableCursor();\r\n component.unrenderDrag();\r\n },\r\n interactionEnd: function (ev) {\r\n if (singleEventDef) { // element was dropped on a valid hit\r\n view.reportExternalDrop(singleEventDef, Boolean(meta.eventProps), // isEvent\r\n Boolean(meta.stick), // isSticky\r\n el, ev, ui);\r\n }\r\n _this.isDragging = false;\r\n _this.dragListener = null;\r\n }\r\n });\r\n dragListener.startDrag(ev); // start listening immediately\r\n };\r\n // Given a hit to be dropped upon, and misc data associated with the jqui drag (guaranteed to be a plain object),\r\n // returns the zoned start/end dates for the event that would result from the hypothetical drop. end might be null.\r\n // Returning a null value signals an invalid drop hit.\r\n // DOES NOT consider overlap/constraint.\r\n // Assumes both footprints are non-open-ended.\r\n ExternalDropping.prototype.computeExternalDrop = function (componentFootprint, meta) {\r\n var calendar = this.view.calendar;\r\n var start = moment_ext_1.default.utc(componentFootprint.unzonedRange.startMs).stripZone();\r\n var end;\r\n var eventDef;\r\n if (componentFootprint.isAllDay) {\r\n // if dropped on an all-day span, and element's metadata specified a time, set it\r\n if (meta.startTime) {\r\n start.time(meta.startTime);\r\n }\r\n else {\r\n start.stripTime();\r\n }\r\n }\r\n if (meta.duration) {\r\n end = start.clone().add(meta.duration);\r\n }\r\n start = calendar.applyTimezone(start);\r\n if (end) {\r\n end = calendar.applyTimezone(end);\r\n }\r\n eventDef = SingleEventDef_1.default.parse($.extend({}, meta.eventProps, {\r\n start: start,\r\n end: end\r\n }), new EventSource_1.default(calendar));\r\n return eventDef;\r\n };\r\n return ExternalDropping;\r\n}(Interaction_1.default));\r\nexports.default = ExternalDropping;\r\nListenerMixin_1.default.mixInto(ExternalDropping);\r\n/* External-Dragging-Element Data\r\n----------------------------------------------------------------------------------------------------------------------*/\r\n// Require all HTML5 data-* attributes used by FullCalendar to have this prefix.\r\n// A value of '' will query attributes like data-event. A value of 'fc' will query attributes like data-fc-event.\r\nexportHooks.dataAttrPrefix = '';\r\n// Given a jQuery element that might represent a dragged FullCalendar event, returns an intermediate data structure\r\n// to be used for Event Object creation.\r\n// A defined `.eventProps`, even when empty, indicates that an event should be created.\r\nfunction getDraggedElMeta(el) {\r\n var prefix = exportHooks.dataAttrPrefix;\r\n var eventProps; // properties for creating the event, not related to date/time\r\n var startTime; // a Duration\r\n var duration;\r\n var stick;\r\n if (prefix) {\r\n prefix += '-';\r\n }\r\n eventProps = el.data(prefix + 'event') || null;\r\n if (eventProps) {\r\n if (typeof eventProps === 'object') {\r\n eventProps = $.extend({}, eventProps); // make a copy\r\n }\r\n else { // something like 1 or true. still signal event creation\r\n eventProps = {};\r\n }\r\n // pluck special-cased date/time properties\r\n startTime = eventProps.start;\r\n if (startTime == null) {\r\n startTime = eventProps.time;\r\n } // accept 'time' as well\r\n duration = eventProps.duration;\r\n stick = eventProps.stick;\r\n delete eventProps.start;\r\n delete eventProps.time;\r\n delete eventProps.duration;\r\n delete eventProps.stick;\r\n }\r\n // fallback to standalone attribute values for each of the date/time properties\r\n if (startTime == null) {\r\n startTime = el.data(prefix + 'start');\r\n }\r\n if (startTime == null) {\r\n startTime = el.data(prefix + 'time');\r\n } // accept 'time' as well\r\n if (duration == null) {\r\n duration = el.data(prefix + 'duration');\r\n }\r\n if (stick == null) {\r\n stick = el.data(prefix + 'stick');\r\n }\r\n // massage into correct data types\r\n startTime = startTime != null ? moment.duration(startTime) : null;\r\n duration = duration != null ? moment.duration(duration) : null;\r\n stick = Boolean(stick);\r\n return { eventProps: eventProps, startTime: startTime, duration: duration, stick: stick };\r\n}\r\n\n\n/***/ }),\n/* 234 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar EventDefMutation_1 = __webpack_require__(39);\r\nvar EventDefDateMutation_1 = __webpack_require__(40);\r\nvar HitDragListener_1 = __webpack_require__(17);\r\nvar Interaction_1 = __webpack_require__(14);\r\nvar EventResizing = /** @class */ (function (_super) {\r\n tslib_1.__extends(EventResizing, _super);\r\n /*\r\n component impements:\r\n - bindSegHandlerToEl\r\n - publiclyTrigger\r\n - diffDates\r\n - eventRangesToEventFootprints\r\n - isEventInstanceGroupAllowed\r\n - getSafeHitFootprint\r\n */\r\n function EventResizing(component, eventPointing) {\r\n var _this = _super.call(this, component) || this;\r\n _this.isResizing = false;\r\n _this.eventPointing = eventPointing;\r\n return _this;\r\n }\r\n EventResizing.prototype.end = function () {\r\n if (this.dragListener) {\r\n this.dragListener.endInteraction();\r\n }\r\n };\r\n EventResizing.prototype.bindToEl = function (el) {\r\n var component = this.component;\r\n component.bindSegHandlerToEl(el, 'mousedown', this.handleMouseDown.bind(this));\r\n component.bindSegHandlerToEl(el, 'touchstart', this.handleTouchStart.bind(this));\r\n };\r\n EventResizing.prototype.handleMouseDown = function (seg, ev) {\r\n if (this.component.canStartResize(seg, ev)) {\r\n this.buildDragListener(seg, $(ev.target).is('.fc-start-resizer'))\r\n .startInteraction(ev, { distance: 5 });\r\n }\r\n };\r\n EventResizing.prototype.handleTouchStart = function (seg, ev) {\r\n if (this.component.canStartResize(seg, ev)) {\r\n this.buildDragListener(seg, $(ev.target).is('.fc-start-resizer'))\r\n .startInteraction(ev);\r\n }\r\n };\r\n // Creates a listener that tracks the user as they resize an event segment.\r\n // Generic enough to work with any type of Grid.\r\n EventResizing.prototype.buildDragListener = function (seg, isStart) {\r\n var _this = this;\r\n var component = this.component;\r\n var view = this.view;\r\n var calendar = view.calendar;\r\n var eventManager = calendar.eventManager;\r\n var el = seg.el;\r\n var eventDef = seg.footprint.eventDef;\r\n var eventInstance = seg.footprint.eventInstance;\r\n var isDragging;\r\n var resizeMutation; // zoned event date properties. falsy if invalid resize\r\n // Tracks mouse movement over the *grid's* coordinate map\r\n var dragListener = this.dragListener = new HitDragListener_1.default(component, {\r\n scroll: this.opt('dragScroll'),\r\n subjectEl: el,\r\n interactionStart: function () {\r\n isDragging = false;\r\n },\r\n dragStart: function (ev) {\r\n isDragging = true;\r\n // ensure a mouseout on the manipulated event has been reported\r\n _this.eventPointing.handleMouseout(seg, ev);\r\n _this.segResizeStart(seg, ev);\r\n },\r\n hitOver: function (hit, isOrig, origHit) {\r\n var isAllowed = true;\r\n var origHitFootprint = component.getSafeHitFootprint(origHit);\r\n var hitFootprint = component.getSafeHitFootprint(hit);\r\n var mutatedEventInstanceGroup;\r\n if (origHitFootprint && hitFootprint) {\r\n resizeMutation = isStart ?\r\n _this.computeEventStartResizeMutation(origHitFootprint, hitFootprint, seg.footprint) :\r\n _this.computeEventEndResizeMutation(origHitFootprint, hitFootprint, seg.footprint);\r\n if (resizeMutation) {\r\n mutatedEventInstanceGroup = eventManager.buildMutatedEventInstanceGroup(eventDef.id, resizeMutation);\r\n isAllowed = component.isEventInstanceGroupAllowed(mutatedEventInstanceGroup);\r\n }\r\n else {\r\n isAllowed = false;\r\n }\r\n }\r\n else {\r\n isAllowed = false;\r\n }\r\n if (!isAllowed) {\r\n resizeMutation = null;\r\n util_1.disableCursor();\r\n }\r\n else if (resizeMutation.isEmpty()) {\r\n // no change. (FYI, event dates might have zones)\r\n resizeMutation = null;\r\n }\r\n if (resizeMutation) {\r\n view.hideEventsWithId(seg.footprint.eventDef.id);\r\n view.renderEventResize(component.eventRangesToEventFootprints(mutatedEventInstanceGroup.sliceRenderRanges(component.dateProfile.renderUnzonedRange, calendar)), seg);\r\n }\r\n },\r\n hitOut: function () {\r\n resizeMutation = null;\r\n },\r\n hitDone: function () {\r\n view.unrenderEventResize(seg);\r\n view.showEventsWithId(seg.footprint.eventDef.id);\r\n util_1.enableCursor();\r\n },\r\n interactionEnd: function (ev) {\r\n if (isDragging) {\r\n _this.segResizeStop(seg, ev);\r\n }\r\n if (resizeMutation) { // valid date to resize to?\r\n // no need to re-show original, will rerender all anyways. esp important if eventRenderWait\r\n view.reportEventResize(eventInstance, resizeMutation, el, ev);\r\n }\r\n _this.dragListener = null;\r\n }\r\n });\r\n return dragListener;\r\n };\r\n // Called before event segment resizing starts\r\n EventResizing.prototype.segResizeStart = function (seg, ev) {\r\n this.isResizing = true;\r\n this.component.publiclyTrigger('eventResizeStart', {\r\n context: seg.el[0],\r\n args: [\r\n seg.footprint.getEventLegacy(),\r\n ev,\r\n {},\r\n this.view\r\n ]\r\n });\r\n };\r\n // Called after event segment resizing stops\r\n EventResizing.prototype.segResizeStop = function (seg, ev) {\r\n this.isResizing = false;\r\n this.component.publiclyTrigger('eventResizeStop', {\r\n context: seg.el[0],\r\n args: [\r\n seg.footprint.getEventLegacy(),\r\n ev,\r\n {},\r\n this.view\r\n ]\r\n });\r\n };\r\n // Returns new date-information for an event segment being resized from its start\r\n EventResizing.prototype.computeEventStartResizeMutation = function (startFootprint, endFootprint, origEventFootprint) {\r\n var origRange = origEventFootprint.componentFootprint.unzonedRange;\r\n var startDelta = this.component.diffDates(endFootprint.unzonedRange.getStart(), startFootprint.unzonedRange.getStart());\r\n var dateMutation;\r\n var eventDefMutation;\r\n if (origRange.getStart().add(startDelta) < origRange.getEnd()) {\r\n dateMutation = new EventDefDateMutation_1.default();\r\n dateMutation.setStartDelta(startDelta);\r\n eventDefMutation = new EventDefMutation_1.default();\r\n eventDefMutation.setDateMutation(dateMutation);\r\n return eventDefMutation;\r\n }\r\n return false;\r\n };\r\n // Returns new date-information for an event segment being resized from its end\r\n EventResizing.prototype.computeEventEndResizeMutation = function (startFootprint, endFootprint, origEventFootprint) {\r\n var origRange = origEventFootprint.componentFootprint.unzonedRange;\r\n var endDelta = this.component.diffDates(endFootprint.unzonedRange.getEnd(), startFootprint.unzonedRange.getEnd());\r\n var dateMutation;\r\n var eventDefMutation;\r\n if (origRange.getEnd().add(endDelta) > origRange.getStart()) {\r\n dateMutation = new EventDefDateMutation_1.default();\r\n dateMutation.setEndDelta(endDelta);\r\n eventDefMutation = new EventDefMutation_1.default();\r\n eventDefMutation.setDateMutation(dateMutation);\r\n return eventDefMutation;\r\n }\r\n return false;\r\n };\r\n return EventResizing;\r\n}(Interaction_1.default));\r\nexports.default = EventResizing;\r\n\n\n/***/ }),\n/* 235 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar util_1 = __webpack_require__(4);\r\nvar EventDefMutation_1 = __webpack_require__(39);\r\nvar EventDefDateMutation_1 = __webpack_require__(40);\r\nvar DragListener_1 = __webpack_require__(59);\r\nvar HitDragListener_1 = __webpack_require__(17);\r\nvar MouseFollower_1 = __webpack_require__(226);\r\nvar Interaction_1 = __webpack_require__(14);\r\nvar EventDragging = /** @class */ (function (_super) {\r\n tslib_1.__extends(EventDragging, _super);\r\n /*\r\n component implements:\r\n - bindSegHandlerToEl\r\n - publiclyTrigger\r\n - diffDates\r\n - eventRangesToEventFootprints\r\n - isEventInstanceGroupAllowed\r\n */\r\n function EventDragging(component, eventPointing) {\r\n var _this = _super.call(this, component) || this;\r\n _this.isDragging = false;\r\n _this.eventPointing = eventPointing;\r\n return _this;\r\n }\r\n EventDragging.prototype.end = function () {\r\n if (this.dragListener) {\r\n this.dragListener.endInteraction();\r\n }\r\n };\r\n EventDragging.prototype.getSelectionDelay = function () {\r\n var delay = this.opt('eventLongPressDelay');\r\n if (delay == null) {\r\n delay = this.opt('longPressDelay'); // fallback\r\n }\r\n return delay;\r\n };\r\n EventDragging.prototype.bindToEl = function (el) {\r\n var component = this.component;\r\n component.bindSegHandlerToEl(el, 'mousedown', this.handleMousedown.bind(this));\r\n component.bindSegHandlerToEl(el, 'touchstart', this.handleTouchStart.bind(this));\r\n };\r\n EventDragging.prototype.handleMousedown = function (seg, ev) {\r\n if (!this.component.shouldIgnoreMouse() &&\r\n this.component.canStartDrag(seg, ev)) {\r\n this.buildDragListener(seg).startInteraction(ev, { distance: 5 });\r\n }\r\n };\r\n EventDragging.prototype.handleTouchStart = function (seg, ev) {\r\n var component = this.component;\r\n var settings = {\r\n delay: this.view.isEventDefSelected(seg.footprint.eventDef) ? // already selected?\r\n 0 : this.getSelectionDelay()\r\n };\r\n if (component.canStartDrag(seg, ev)) {\r\n this.buildDragListener(seg).startInteraction(ev, settings);\r\n }\r\n else if (component.canStartSelection(seg, ev)) {\r\n this.buildSelectListener(seg).startInteraction(ev, settings);\r\n }\r\n };\r\n // seg isn't draggable, but let's use a generic DragListener\r\n // simply for the delay, so it can be selected.\r\n // Has side effect of setting/unsetting `dragListener`\r\n EventDragging.prototype.buildSelectListener = function (seg) {\r\n var _this = this;\r\n var view = this.view;\r\n var eventDef = seg.footprint.eventDef;\r\n var eventInstance = seg.footprint.eventInstance; // null for inverse-background events\r\n if (this.dragListener) {\r\n return this.dragListener;\r\n }\r\n var dragListener = this.dragListener = new DragListener_1.default({\r\n dragStart: function (ev) {\r\n if (dragListener.isTouch &&\r\n !view.isEventDefSelected(eventDef) &&\r\n eventInstance) {\r\n // if not previously selected, will fire after a delay. then, select the event\r\n view.selectEventInstance(eventInstance);\r\n }\r\n },\r\n interactionEnd: function (ev) {\r\n _this.dragListener = null;\r\n }\r\n });\r\n return dragListener;\r\n };\r\n // Builds a listener that will track user-dragging on an event segment.\r\n // Generic enough to work with any type of Grid.\r\n // Has side effect of setting/unsetting `dragListener`\r\n EventDragging.prototype.buildDragListener = function (seg) {\r\n var _this = this;\r\n var component = this.component;\r\n var view = this.view;\r\n var calendar = view.calendar;\r\n var eventManager = calendar.eventManager;\r\n var el = seg.el;\r\n var eventDef = seg.footprint.eventDef;\r\n var eventInstance = seg.footprint.eventInstance; // null for inverse-background events\r\n var isDragging;\r\n var mouseFollower; // A clone of the original element that will move with the mouse\r\n var eventDefMutation;\r\n if (this.dragListener) {\r\n return this.dragListener;\r\n }\r\n // Tracks mouse movement over the *view's* coordinate map. Allows dragging and dropping between subcomponents\r\n // of the view.\r\n var dragListener = this.dragListener = new HitDragListener_1.default(view, {\r\n scroll: this.opt('dragScroll'),\r\n subjectEl: el,\r\n subjectCenter: true,\r\n interactionStart: function (ev) {\r\n seg.component = component; // for renderDrag\r\n isDragging = false;\r\n mouseFollower = new MouseFollower_1.default(seg.el, {\r\n additionalClass: 'fc-dragging',\r\n parentEl: view.el,\r\n opacity: dragListener.isTouch ? null : _this.opt('dragOpacity'),\r\n revertDuration: _this.opt('dragRevertDuration'),\r\n zIndex: 2 // one above the .fc-view\r\n });\r\n mouseFollower.hide(); // don't show until we know this is a real drag\r\n mouseFollower.start(ev);\r\n },\r\n dragStart: function (ev) {\r\n if (dragListener.isTouch &&\r\n !view.isEventDefSelected(eventDef) &&\r\n eventInstance) {\r\n // if not previously selected, will fire after a delay. then, select the event\r\n view.selectEventInstance(eventInstance);\r\n }\r\n isDragging = true;\r\n // ensure a mouseout on the manipulated event has been reported\r\n _this.eventPointing.handleMouseout(seg, ev);\r\n _this.segDragStart(seg, ev);\r\n view.hideEventsWithId(seg.footprint.eventDef.id);\r\n },\r\n hitOver: function (hit, isOrig, origHit) {\r\n var isAllowed = true;\r\n var origFootprint;\r\n var footprint;\r\n var mutatedEventInstanceGroup;\r\n // starting hit could be forced (DayGrid.limit)\r\n if (seg.hit) {\r\n origHit = seg.hit;\r\n }\r\n // hit might not belong to this grid, so query origin grid\r\n origFootprint = origHit.component.getSafeHitFootprint(origHit);\r\n footprint = hit.component.getSafeHitFootprint(hit);\r\n if (origFootprint && footprint) {\r\n eventDefMutation = _this.computeEventDropMutation(origFootprint, footprint, eventDef);\r\n if (eventDefMutation) {\r\n mutatedEventInstanceGroup = eventManager.buildMutatedEventInstanceGroup(eventDef.id, eventDefMutation);\r\n isAllowed = component.isEventInstanceGroupAllowed(mutatedEventInstanceGroup);\r\n }\r\n else {\r\n isAllowed = false;\r\n }\r\n }\r\n else {\r\n isAllowed = false;\r\n }\r\n if (!isAllowed) {\r\n eventDefMutation = null;\r\n util_1.disableCursor();\r\n }\r\n // if a valid drop location, have the subclass render a visual indication\r\n if (eventDefMutation &&\r\n view.renderDrag(// truthy if rendered something\r\n component.eventRangesToEventFootprints(mutatedEventInstanceGroup.sliceRenderRanges(component.dateProfile.renderUnzonedRange, calendar)), seg, dragListener.isTouch)) {\r\n mouseFollower.hide(); // if the subclass is already using a mock event \"helper\", hide our own\r\n }\r\n else {\r\n mouseFollower.show(); // otherwise, have the helper follow the mouse (no snapping)\r\n }\r\n if (isOrig) {\r\n // needs to have moved hits to be a valid drop\r\n eventDefMutation = null;\r\n }\r\n },\r\n hitOut: function () {\r\n view.unrenderDrag(seg); // unrender whatever was done in renderDrag\r\n mouseFollower.show(); // show in case we are moving out of all hits\r\n eventDefMutation = null;\r\n },\r\n hitDone: function () {\r\n util_1.enableCursor();\r\n },\r\n interactionEnd: function (ev) {\r\n delete seg.component; // prevent side effects\r\n // do revert animation if hasn't changed. calls a callback when finished (whether animation or not)\r\n mouseFollower.stop(!eventDefMutation, function () {\r\n if (isDragging) {\r\n view.unrenderDrag(seg);\r\n _this.segDragStop(seg, ev);\r\n }\r\n view.showEventsWithId(seg.footprint.eventDef.id);\r\n if (eventDefMutation) {\r\n // no need to re-show original, will rerender all anyways. esp important if eventRenderWait\r\n view.reportEventDrop(eventInstance, eventDefMutation, el, ev);\r\n }\r\n });\r\n _this.dragListener = null;\r\n }\r\n });\r\n return dragListener;\r\n };\r\n // Called before event segment dragging starts\r\n EventDragging.prototype.segDragStart = function (seg, ev) {\r\n this.isDragging = true;\r\n this.component.publiclyTrigger('eventDragStart', {\r\n context: seg.el[0],\r\n args: [\r\n seg.footprint.getEventLegacy(),\r\n ev,\r\n {},\r\n this.view\r\n ]\r\n });\r\n };\r\n // Called after event segment dragging stops\r\n EventDragging.prototype.segDragStop = function (seg, ev) {\r\n this.isDragging = false;\r\n this.component.publiclyTrigger('eventDragStop', {\r\n context: seg.el[0],\r\n args: [\r\n seg.footprint.getEventLegacy(),\r\n ev,\r\n {},\r\n this.view\r\n ]\r\n });\r\n };\r\n // DOES NOT consider overlap/constraint\r\n EventDragging.prototype.computeEventDropMutation = function (startFootprint, endFootprint, eventDef) {\r\n var eventDefMutation = new EventDefMutation_1.default();\r\n eventDefMutation.setDateMutation(this.computeEventDateMutation(startFootprint, endFootprint));\r\n return eventDefMutation;\r\n };\r\n EventDragging.prototype.computeEventDateMutation = function (startFootprint, endFootprint) {\r\n var date0 = startFootprint.unzonedRange.getStart();\r\n var date1 = endFootprint.unzonedRange.getStart();\r\n var clearEnd = false;\r\n var forceTimed = false;\r\n var forceAllDay = false;\r\n var dateDelta;\r\n var dateMutation;\r\n if (startFootprint.isAllDay !== endFootprint.isAllDay) {\r\n clearEnd = true;\r\n if (endFootprint.isAllDay) {\r\n forceAllDay = true;\r\n date0.stripTime();\r\n }\r\n else {\r\n forceTimed = true;\r\n }\r\n }\r\n dateDelta = this.component.diffDates(date1, date0);\r\n dateMutation = new EventDefDateMutation_1.default();\r\n dateMutation.clearEnd = clearEnd;\r\n dateMutation.forceTimed = forceTimed;\r\n dateMutation.forceAllDay = forceAllDay;\r\n dateMutation.setDateDelta(dateDelta);\r\n return dateMutation;\r\n };\r\n return EventDragging;\r\n}(Interaction_1.default));\r\nexports.default = EventDragging;\r\n\n\n/***/ }),\n/* 236 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar util_1 = __webpack_require__(4);\r\nvar HitDragListener_1 = __webpack_require__(17);\r\nvar ComponentFootprint_1 = __webpack_require__(12);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar Interaction_1 = __webpack_require__(14);\r\nvar DateSelecting = /** @class */ (function (_super) {\r\n tslib_1.__extends(DateSelecting, _super);\r\n /*\r\n component must implement:\r\n - bindDateHandlerToEl\r\n - getSafeHitFootprint\r\n - renderHighlight\r\n - unrenderHighlight\r\n */\r\n function DateSelecting(component) {\r\n var _this = _super.call(this, component) || this;\r\n _this.dragListener = _this.buildDragListener();\r\n return _this;\r\n }\r\n DateSelecting.prototype.end = function () {\r\n this.dragListener.endInteraction();\r\n };\r\n DateSelecting.prototype.getDelay = function () {\r\n var delay = this.opt('selectLongPressDelay');\r\n if (delay == null) {\r\n delay = this.opt('longPressDelay'); // fallback\r\n }\r\n return delay;\r\n };\r\n DateSelecting.prototype.bindToEl = function (el) {\r\n var _this = this;\r\n var component = this.component;\r\n var dragListener = this.dragListener;\r\n component.bindDateHandlerToEl(el, 'mousedown', function (ev) {\r\n if (_this.opt('selectable') && !component.shouldIgnoreMouse()) {\r\n dragListener.startInteraction(ev, {\r\n distance: _this.opt('selectMinDistance')\r\n });\r\n }\r\n });\r\n component.bindDateHandlerToEl(el, 'touchstart', function (ev) {\r\n if (_this.opt('selectable') && !component.shouldIgnoreTouch()) {\r\n dragListener.startInteraction(ev, {\r\n delay: _this.getDelay()\r\n });\r\n }\r\n });\r\n util_1.preventSelection(el);\r\n };\r\n // Creates a listener that tracks the user's drag across day elements, for day selecting.\r\n DateSelecting.prototype.buildDragListener = function () {\r\n var _this = this;\r\n var component = this.component;\r\n var selectionFootprint; // null if invalid selection\r\n var dragListener = new HitDragListener_1.default(component, {\r\n scroll: this.opt('dragScroll'),\r\n interactionStart: function () {\r\n selectionFootprint = null;\r\n },\r\n dragStart: function (ev) {\r\n _this.view.unselect(ev); // since we could be rendering a new selection, we want to clear any old one\r\n },\r\n hitOver: function (hit, isOrig, origHit) {\r\n var origHitFootprint;\r\n var hitFootprint;\r\n if (origHit) { // click needs to have started on a hit\r\n origHitFootprint = component.getSafeHitFootprint(origHit);\r\n hitFootprint = component.getSafeHitFootprint(hit);\r\n if (origHitFootprint && hitFootprint) {\r\n selectionFootprint = _this.computeSelection(origHitFootprint, hitFootprint);\r\n }\r\n else {\r\n selectionFootprint = null;\r\n }\r\n if (selectionFootprint) {\r\n component.renderSelectionFootprint(selectionFootprint);\r\n }\r\n else if (selectionFootprint === false) {\r\n util_1.disableCursor();\r\n }\r\n }\r\n },\r\n hitOut: function () {\r\n selectionFootprint = null;\r\n component.unrenderSelection();\r\n },\r\n hitDone: function () {\r\n util_1.enableCursor();\r\n },\r\n interactionEnd: function (ev, isCancelled) {\r\n if (!isCancelled && selectionFootprint) {\r\n // the selection will already have been rendered. just report it\r\n _this.view.reportSelection(selectionFootprint, ev);\r\n }\r\n }\r\n });\r\n return dragListener;\r\n };\r\n // Given the first and last date-spans of a selection, returns another date-span object.\r\n // Subclasses can override and provide additional data in the span object. Will be passed to renderSelectionFootprint().\r\n // Will return false if the selection is invalid and this should be indicated to the user.\r\n // Will return null/undefined if a selection invalid but no error should be reported.\r\n DateSelecting.prototype.computeSelection = function (footprint0, footprint1) {\r\n var wholeFootprint = this.computeSelectionFootprint(footprint0, footprint1);\r\n if (wholeFootprint && !this.isSelectionFootprintAllowed(wholeFootprint)) {\r\n return false;\r\n }\r\n return wholeFootprint;\r\n };\r\n // Given two spans, must return the combination of the two.\r\n // TODO: do this separation of concerns (combining VS validation) for event dnd/resize too.\r\n // Assumes both footprints are non-open-ended.\r\n DateSelecting.prototype.computeSelectionFootprint = function (footprint0, footprint1) {\r\n var ms = [\r\n footprint0.unzonedRange.startMs,\r\n footprint0.unzonedRange.endMs,\r\n footprint1.unzonedRange.startMs,\r\n footprint1.unzonedRange.endMs\r\n ];\r\n ms.sort(util_1.compareNumbers);\r\n return new ComponentFootprint_1.default(new UnzonedRange_1.default(ms[0], ms[3]), footprint0.isAllDay);\r\n };\r\n DateSelecting.prototype.isSelectionFootprintAllowed = function (componentFootprint) {\r\n return this.component.dateProfile.validUnzonedRange.containsRange(componentFootprint.unzonedRange) &&\r\n this.view.calendar.constraints.isSelectionFootprintAllowed(componentFootprint);\r\n };\r\n return DateSelecting;\r\n}(Interaction_1.default));\r\nexports.default = DateSelecting;\r\n\n\n/***/ }),\n/* 237 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar HitDragListener_1 = __webpack_require__(17);\r\nvar Interaction_1 = __webpack_require__(14);\r\nvar DateClicking = /** @class */ (function (_super) {\r\n tslib_1.__extends(DateClicking, _super);\r\n /*\r\n component must implement:\r\n - bindDateHandlerToEl\r\n - getSafeHitFootprint\r\n - getHitEl\r\n */\r\n function DateClicking(component) {\r\n var _this = _super.call(this, component) || this;\r\n _this.dragListener = _this.buildDragListener();\r\n return _this;\r\n }\r\n DateClicking.prototype.end = function () {\r\n this.dragListener.endInteraction();\r\n };\r\n DateClicking.prototype.bindToEl = function (el) {\r\n var component = this.component;\r\n var dragListener = this.dragListener;\r\n component.bindDateHandlerToEl(el, 'mousedown', function (ev) {\r\n if (!component.shouldIgnoreMouse()) {\r\n dragListener.startInteraction(ev);\r\n }\r\n });\r\n component.bindDateHandlerToEl(el, 'touchstart', function (ev) {\r\n if (!component.shouldIgnoreTouch()) {\r\n dragListener.startInteraction(ev);\r\n }\r\n });\r\n };\r\n // Creates a listener that tracks the user's drag across day elements, for day clicking.\r\n DateClicking.prototype.buildDragListener = function () {\r\n var _this = this;\r\n var component = this.component;\r\n var dayClickHit; // null if invalid dayClick\r\n var dragListener = new HitDragListener_1.default(component, {\r\n scroll: this.opt('dragScroll'),\r\n interactionStart: function () {\r\n dayClickHit = dragListener.origHit;\r\n },\r\n hitOver: function (hit, isOrig, origHit) {\r\n // if user dragged to another cell at any point, it can no longer be a dayClick\r\n if (!isOrig) {\r\n dayClickHit = null;\r\n }\r\n },\r\n hitOut: function () {\r\n dayClickHit = null;\r\n },\r\n interactionEnd: function (ev, isCancelled) {\r\n var componentFootprint;\r\n if (!isCancelled && dayClickHit) {\r\n componentFootprint = component.getSafeHitFootprint(dayClickHit);\r\n if (componentFootprint) {\r\n _this.view.triggerDayClick(componentFootprint, component.getHitEl(dayClickHit), ev);\r\n }\r\n }\r\n }\r\n });\r\n // because dragListener won't be called with any time delay, \"dragging\" will begin immediately,\r\n // which will kill any touchmoving/scrolling. Prevent this.\r\n dragListener.shouldCancelTouchScroll = false;\r\n dragListener.scrollAlwaysKills = true;\r\n return dragListener;\r\n };\r\n return DateClicking;\r\n}(Interaction_1.default));\r\nexports.default = DateClicking;\r\n\n\n/***/ }),\n/* 238 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar moment = __webpack_require__(0);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar Scroller_1 = __webpack_require__(41);\r\nvar View_1 = __webpack_require__(43);\r\nvar TimeGrid_1 = __webpack_require__(239);\r\nvar DayGrid_1 = __webpack_require__(66);\r\nvar AGENDA_ALL_DAY_EVENT_LIMIT = 5;\r\nvar agendaTimeGridMethods;\r\nvar agendaDayGridMethods;\r\n/* An abstract class for all agenda-related views. Displays one more columns with time slots running vertically.\r\n----------------------------------------------------------------------------------------------------------------------*/\r\n// Is a manager for the TimeGrid subcomponent and possibly the DayGrid subcomponent (if allDaySlot is on).\r\n// Responsible for managing width/height.\r\nvar AgendaView = /** @class */ (function (_super) {\r\n tslib_1.__extends(AgendaView, _super);\r\n function AgendaView(calendar, viewSpec) {\r\n var _this = _super.call(this, calendar, viewSpec) || this;\r\n _this.usesMinMaxTime = true; // indicates that minTime/maxTime affects rendering\r\n _this.timeGrid = _this.instantiateTimeGrid();\r\n _this.addChild(_this.timeGrid);\r\n if (_this.opt('allDaySlot')) { // should we display the \"all-day\" area?\r\n _this.dayGrid = _this.instantiateDayGrid(); // the all-day subcomponent of this view\r\n _this.addChild(_this.dayGrid);\r\n }\r\n _this.scroller = new Scroller_1.default({\r\n overflowX: 'hidden',\r\n overflowY: 'auto'\r\n });\r\n return _this;\r\n }\r\n // Instantiates the TimeGrid object this view needs. Draws from this.timeGridClass\r\n AgendaView.prototype.instantiateTimeGrid = function () {\r\n var timeGrid = new this.timeGridClass(this);\r\n util_1.copyOwnProps(agendaTimeGridMethods, timeGrid);\r\n return timeGrid;\r\n };\r\n // Instantiates the DayGrid object this view might need. Draws from this.dayGridClass\r\n AgendaView.prototype.instantiateDayGrid = function () {\r\n var dayGrid = new this.dayGridClass(this);\r\n util_1.copyOwnProps(agendaDayGridMethods, dayGrid);\r\n return dayGrid;\r\n };\r\n /* Rendering\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n AgendaView.prototype.renderSkeleton = function () {\r\n var timeGridWrapEl;\r\n var timeGridEl;\r\n this.el.addClass('fc-agenda-view').html(this.renderSkeletonHtml());\r\n this.scroller.render();\r\n timeGridWrapEl = this.scroller.el.addClass('fc-time-grid-container');\r\n timeGridEl = $('<div class=\"fc-time-grid\">').appendTo(timeGridWrapEl);\r\n this.el.find('.fc-body > tr > td').append(timeGridWrapEl);\r\n this.timeGrid.headContainerEl = this.el.find('.fc-head-container');\r\n this.timeGrid.setElement(timeGridEl);\r\n if (this.dayGrid) {\r\n this.dayGrid.setElement(this.el.find('.fc-day-grid'));\r\n // have the day-grid extend it's coordinate area over the <hr> dividing the two grids\r\n this.dayGrid.bottomCoordPadding = this.dayGrid.el.next('hr').outerHeight();\r\n }\r\n };\r\n AgendaView.prototype.unrenderSkeleton = function () {\r\n this.timeGrid.removeElement();\r\n if (this.dayGrid) {\r\n this.dayGrid.removeElement();\r\n }\r\n this.scroller.destroy();\r\n };\r\n // Builds the HTML skeleton for the view.\r\n // The day-grid and time-grid components will render inside containers defined by this HTML.\r\n AgendaView.prototype.renderSkeletonHtml = function () {\r\n var theme = this.calendar.theme;\r\n return '' +\r\n '<table class=\"' + theme.getClass('tableGrid') + '\">' +\r\n (this.opt('columnHeader') ?\r\n '<thead class=\"fc-head\">' +\r\n '<tr>' +\r\n '<td class=\"fc-head-container ' + theme.getClass('widgetHeader') + '\"> </td>' +\r\n '</tr>' +\r\n '</thead>' :\r\n '') +\r\n '<tbody class=\"fc-body\">' +\r\n '<tr>' +\r\n '<td class=\"' + theme.getClass('widgetContent') + '\">' +\r\n (this.dayGrid ?\r\n '<div class=\"fc-day-grid\"></div>' +\r\n '<hr class=\"fc-divider ' + theme.getClass('widgetHeader') + '\"></hr>' :\r\n '') +\r\n '</td>' +\r\n '</tr>' +\r\n '</tbody>' +\r\n '</table>';\r\n };\r\n // Generates an HTML attribute string for setting the width of the axis, if it is known\r\n AgendaView.prototype.axisStyleAttr = function () {\r\n if (this.axisWidth != null) {\r\n return 'style=\"width:' + this.axisWidth + 'px\"';\r\n }\r\n return '';\r\n };\r\n /* Now Indicator\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n AgendaView.prototype.getNowIndicatorUnit = function () {\r\n return this.timeGrid.getNowIndicatorUnit();\r\n };\r\n /* Dimensions\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Adjusts the vertical dimensions of the view to the specified values\r\n AgendaView.prototype.updateSize = function (totalHeight, isAuto, isResize) {\r\n var eventLimit;\r\n var scrollerHeight;\r\n var scrollbarWidths;\r\n _super.prototype.updateSize.call(this, totalHeight, isAuto, isResize);\r\n // make all axis cells line up, and record the width so newly created axis cells will have it\r\n this.axisWidth = util_1.matchCellWidths(this.el.find('.fc-axis'));\r\n // hack to give the view some height prior to timeGrid's columns being rendered\r\n // TODO: separate setting height from scroller VS timeGrid.\r\n if (!this.timeGrid.colEls) {\r\n if (!isAuto) {\r\n scrollerHeight = this.computeScrollerHeight(totalHeight);\r\n this.scroller.setHeight(scrollerHeight);\r\n }\r\n return;\r\n }\r\n // set of fake row elements that must compensate when scroller has scrollbars\r\n var noScrollRowEls = this.el.find('.fc-row:not(.fc-scroller *)');\r\n // reset all dimensions back to the original state\r\n this.timeGrid.bottomRuleEl.hide(); // .show() will be called later if this <hr> is necessary\r\n this.scroller.clear(); // sets height to 'auto' and clears overflow\r\n util_1.uncompensateScroll(noScrollRowEls);\r\n // limit number of events in the all-day area\r\n if (this.dayGrid) {\r\n this.dayGrid.removeSegPopover(); // kill the \"more\" popover if displayed\r\n eventLimit = this.opt('eventLimit');\r\n if (eventLimit && typeof eventLimit !== 'number') {\r\n eventLimit = AGENDA_ALL_DAY_EVENT_LIMIT; // make sure \"auto\" goes to a real number\r\n }\r\n if (eventLimit) {\r\n this.dayGrid.limitRows(eventLimit);\r\n }\r\n }\r\n if (!isAuto) { // should we force dimensions of the scroll container?\r\n scrollerHeight = this.computeScrollerHeight(totalHeight);\r\n this.scroller.setHeight(scrollerHeight);\r\n scrollbarWidths = this.scroller.getScrollbarWidths();\r\n if (scrollbarWidths.left || scrollbarWidths.right) { // using scrollbars?\r\n // make the all-day and header rows lines up\r\n util_1.compensateScroll(noScrollRowEls, scrollbarWidths);\r\n // the scrollbar compensation might have changed text flow, which might affect height, so recalculate\r\n // and reapply the desired height to the scroller.\r\n scrollerHeight = this.computeScrollerHeight(totalHeight);\r\n this.scroller.setHeight(scrollerHeight);\r\n }\r\n // guarantees the same scrollbar widths\r\n this.scroller.lockOverflow(scrollbarWidths);\r\n // if there's any space below the slats, show the horizontal rule.\r\n // this won't cause any new overflow, because lockOverflow already called.\r\n if (this.timeGrid.getTotalSlatHeight() < scrollerHeight) {\r\n this.timeGrid.bottomRuleEl.show();\r\n }\r\n }\r\n };\r\n // given a desired total height of the view, returns what the height of the scroller should be\r\n AgendaView.prototype.computeScrollerHeight = function (totalHeight) {\r\n return totalHeight -\r\n util_1.subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller\r\n };\r\n /* Scroll\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Computes the initial pre-configured scroll state prior to allowing the user to change it\r\n AgendaView.prototype.computeInitialDateScroll = function () {\r\n var scrollTime = moment.duration(this.opt('scrollTime'));\r\n var top = this.timeGrid.computeTimeTop(scrollTime);\r\n // zoom can give weird floating-point values. rather scroll a little bit further\r\n top = Math.ceil(top);\r\n if (top) {\r\n top++; // to overcome top border that slots beyond the first have. looks better\r\n }\r\n return { top: top };\r\n };\r\n AgendaView.prototype.queryDateScroll = function () {\r\n return { top: this.scroller.getScrollTop() };\r\n };\r\n AgendaView.prototype.applyDateScroll = function (scroll) {\r\n if (scroll.top !== undefined) {\r\n this.scroller.setScrollTop(scroll.top);\r\n }\r\n };\r\n /* Hit Areas\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // forward all hit-related method calls to the grids (dayGrid might not be defined)\r\n AgendaView.prototype.getHitFootprint = function (hit) {\r\n // TODO: hit.component is set as a hack to identify where the hit came from\r\n return hit.component.getHitFootprint(hit);\r\n };\r\n AgendaView.prototype.getHitEl = function (hit) {\r\n // TODO: hit.component is set as a hack to identify where the hit came from\r\n return hit.component.getHitEl(hit);\r\n };\r\n /* Event Rendering\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n AgendaView.prototype.executeEventRender = function (eventsPayload) {\r\n var dayEventsPayload = {};\r\n var timedEventsPayload = {};\r\n var id;\r\n var eventInstanceGroup;\r\n // separate the events into all-day and timed\r\n for (id in eventsPayload) {\r\n eventInstanceGroup = eventsPayload[id];\r\n if (eventInstanceGroup.getEventDef().isAllDay()) {\r\n dayEventsPayload[id] = eventInstanceGroup;\r\n }\r\n else {\r\n timedEventsPayload[id] = eventInstanceGroup;\r\n }\r\n }\r\n this.timeGrid.executeEventRender(timedEventsPayload);\r\n if (this.dayGrid) {\r\n this.dayGrid.executeEventRender(dayEventsPayload);\r\n }\r\n };\r\n /* Dragging/Resizing Routing\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // A returned value of `true` signals that a mock \"helper\" event has been rendered.\r\n AgendaView.prototype.renderDrag = function (eventFootprints, seg, isTouch) {\r\n var groups = groupEventFootprintsByAllDay(eventFootprints);\r\n var renderedHelper = false;\r\n renderedHelper = this.timeGrid.renderDrag(groups.timed, seg, isTouch);\r\n if (this.dayGrid) {\r\n renderedHelper = this.dayGrid.renderDrag(groups.allDay, seg, isTouch) || renderedHelper;\r\n }\r\n return renderedHelper;\r\n };\r\n AgendaView.prototype.renderEventResize = function (eventFootprints, seg, isTouch) {\r\n var groups = groupEventFootprintsByAllDay(eventFootprints);\r\n this.timeGrid.renderEventResize(groups.timed, seg, isTouch);\r\n if (this.dayGrid) {\r\n this.dayGrid.renderEventResize(groups.allDay, seg, isTouch);\r\n }\r\n };\r\n /* Selection\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Renders a visual indication of a selection\r\n AgendaView.prototype.renderSelectionFootprint = function (componentFootprint) {\r\n if (!componentFootprint.isAllDay) {\r\n this.timeGrid.renderSelectionFootprint(componentFootprint);\r\n }\r\n else if (this.dayGrid) {\r\n this.dayGrid.renderSelectionFootprint(componentFootprint);\r\n }\r\n };\r\n return AgendaView;\r\n}(View_1.default));\r\nexports.default = AgendaView;\r\nAgendaView.prototype.timeGridClass = TimeGrid_1.default;\r\nAgendaView.prototype.dayGridClass = DayGrid_1.default;\r\n// Will customize the rendering behavior of the AgendaView's timeGrid\r\nagendaTimeGridMethods = {\r\n // Generates the HTML that will go before the day-of week header cells\r\n renderHeadIntroHtml: function () {\r\n var view = this.view;\r\n var calendar = view.calendar;\r\n var weekStart = calendar.msToUtcMoment(this.dateProfile.renderUnzonedRange.startMs, true);\r\n var weekText;\r\n if (this.opt('weekNumbers')) {\r\n weekText = weekStart.format(this.opt('smallWeekFormat'));\r\n return '' +\r\n '<th class=\"fc-axis fc-week-number ' + calendar.theme.getClass('widgetHeader') + '\" ' + view.axisStyleAttr() + '>' +\r\n view.buildGotoAnchorHtml(// aside from link, important for matchCellWidths\r\n { date: weekStart, type: 'week', forceOff: this.colCnt > 1 }, util_1.htmlEscape(weekText) // inner HTML\r\n ) +\r\n '</th>';\r\n }\r\n else {\r\n return '<th class=\"fc-axis ' + calendar.theme.getClass('widgetHeader') + '\" ' + view.axisStyleAttr() + '></th>';\r\n }\r\n },\r\n // Generates the HTML that goes before the bg of the TimeGrid slot area. Long vertical column.\r\n renderBgIntroHtml: function () {\r\n var view = this.view;\r\n return '<td class=\"fc-axis ' + view.calendar.theme.getClass('widgetContent') + '\" ' + view.axisStyleAttr() + '></td>';\r\n },\r\n // Generates the HTML that goes before all other types of cells.\r\n // Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.\r\n renderIntroHtml: function () {\r\n var view = this.view;\r\n return '<td class=\"fc-axis\" ' + view.axisStyleAttr() + '></td>';\r\n }\r\n};\r\n// Will customize the rendering behavior of the AgendaView's dayGrid\r\nagendaDayGridMethods = {\r\n // Generates the HTML that goes before the all-day cells\r\n renderBgIntroHtml: function () {\r\n var view = this.view;\r\n return '' +\r\n '<td class=\"fc-axis ' + view.calendar.theme.getClass('widgetContent') + '\" ' + view.axisStyleAttr() + '>' +\r\n '<span>' + // needed for matchCellWidths\r\n view.getAllDayHtml() +\r\n '</span>' +\r\n '</td>';\r\n },\r\n // Generates the HTML that goes before all other types of cells.\r\n // Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.\r\n renderIntroHtml: function () {\r\n var view = this.view;\r\n return '<td class=\"fc-axis\" ' + view.axisStyleAttr() + '></td>';\r\n }\r\n};\r\nfunction groupEventFootprintsByAllDay(eventFootprints) {\r\n var allDay = [];\r\n var timed = [];\r\n var i;\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n if (eventFootprints[i].componentFootprint.isAllDay) {\r\n allDay.push(eventFootprints[i]);\r\n }\r\n else {\r\n timed.push(eventFootprints[i]);\r\n }\r\n }\r\n return { allDay: allDay, timed: timed };\r\n}\r\n\n\n/***/ }),\n/* 239 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar moment = __webpack_require__(0);\r\nvar util_1 = __webpack_require__(4);\r\nvar InteractiveDateComponent_1 = __webpack_require__(42);\r\nvar BusinessHourRenderer_1 = __webpack_require__(61);\r\nvar StandardInteractionsMixin_1 = __webpack_require__(65);\r\nvar DayTableMixin_1 = __webpack_require__(60);\r\nvar CoordCache_1 = __webpack_require__(58);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar ComponentFootprint_1 = __webpack_require__(12);\r\nvar TimeGridEventRenderer_1 = __webpack_require__(240);\r\nvar TimeGridHelperRenderer_1 = __webpack_require__(241);\r\nvar TimeGridFillRenderer_1 = __webpack_require__(242);\r\n/* A component that renders one or more columns of vertical time slots\r\n----------------------------------------------------------------------------------------------------------------------*/\r\n// We mixin DayTable, even though there is only a single row of days\r\n// potential nice values for the slot-duration and interval-duration\r\n// from largest to smallest\r\nvar AGENDA_STOCK_SUB_DURATIONS = [\r\n { hours: 1 },\r\n { minutes: 30 },\r\n { minutes: 15 },\r\n { seconds: 30 },\r\n { seconds: 15 }\r\n];\r\nvar TimeGrid = /** @class */ (function (_super) {\r\n tslib_1.__extends(TimeGrid, _super);\r\n function TimeGrid(view) {\r\n var _this = _super.call(this, view) || this;\r\n _this.processOptions();\r\n return _this;\r\n }\r\n // Slices up the given span (unzoned start/end with other misc data) into an array of segments\r\n TimeGrid.prototype.componentFootprintToSegs = function (componentFootprint) {\r\n var segs = this.sliceRangeByTimes(componentFootprint.unzonedRange);\r\n var i;\r\n for (i = 0; i < segs.length; i++) {\r\n if (this.isRTL) {\r\n segs[i].col = this.daysPerRow - 1 - segs[i].dayIndex;\r\n }\r\n else {\r\n segs[i].col = segs[i].dayIndex;\r\n }\r\n }\r\n return segs;\r\n };\r\n /* Date Handling\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n TimeGrid.prototype.sliceRangeByTimes = function (unzonedRange) {\r\n var segs = [];\r\n var segRange;\r\n var dayIndex;\r\n for (dayIndex = 0; dayIndex < this.daysPerRow; dayIndex++) {\r\n segRange = unzonedRange.intersect(this.dayRanges[dayIndex]);\r\n if (segRange) {\r\n segs.push({\r\n startMs: segRange.startMs,\r\n endMs: segRange.endMs,\r\n isStart: segRange.isStart,\r\n isEnd: segRange.isEnd,\r\n dayIndex: dayIndex\r\n });\r\n }\r\n }\r\n return segs;\r\n };\r\n /* Options\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Parses various options into properties of this object\r\n TimeGrid.prototype.processOptions = function () {\r\n var slotDuration = this.opt('slotDuration');\r\n var snapDuration = this.opt('snapDuration');\r\n var input;\r\n slotDuration = moment.duration(slotDuration);\r\n snapDuration = snapDuration ? moment.duration(snapDuration) : slotDuration;\r\n this.slotDuration = slotDuration;\r\n this.snapDuration = snapDuration;\r\n this.snapsPerSlot = slotDuration / snapDuration; // TODO: ensure an integer multiple?\r\n // might be an array value (for TimelineView).\r\n // if so, getting the most granular entry (the last one probably).\r\n input = this.opt('slotLabelFormat');\r\n if ($.isArray(input)) {\r\n input = input[input.length - 1];\r\n }\r\n this.labelFormat = input ||\r\n this.opt('smallTimeFormat'); // the computed default\r\n input = this.opt('slotLabelInterval');\r\n this.labelInterval = input ?\r\n moment.duration(input) :\r\n this.computeLabelInterval(slotDuration);\r\n };\r\n // Computes an automatic value for slotLabelInterval\r\n TimeGrid.prototype.computeLabelInterval = function (slotDuration) {\r\n var i;\r\n var labelInterval;\r\n var slotsPerLabel;\r\n // find the smallest stock label interval that results in more than one slots-per-label\r\n for (i = AGENDA_STOCK_SUB_DURATIONS.length - 1; i >= 0; i--) {\r\n labelInterval = moment.duration(AGENDA_STOCK_SUB_DURATIONS[i]);\r\n slotsPerLabel = util_1.divideDurationByDuration(labelInterval, slotDuration);\r\n if (util_1.isInt(slotsPerLabel) && slotsPerLabel > 1) {\r\n return labelInterval;\r\n }\r\n }\r\n return moment.duration(slotDuration); // fall back. clone\r\n };\r\n /* Date Rendering\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n TimeGrid.prototype.renderDates = function (dateProfile) {\r\n this.dateProfile = dateProfile;\r\n this.updateDayTable();\r\n this.renderSlats();\r\n this.renderColumns();\r\n };\r\n TimeGrid.prototype.unrenderDates = function () {\r\n // this.unrenderSlats(); // don't need this because repeated .html() calls clear\r\n this.unrenderColumns();\r\n };\r\n TimeGrid.prototype.renderSkeleton = function () {\r\n var theme = this.view.calendar.theme;\r\n this.el.html('<div class=\"fc-bg\"></div>' +\r\n '<div class=\"fc-slats\"></div>' +\r\n '<hr class=\"fc-divider ' + theme.getClass('widgetHeader') + '\" style=\"display:none\"></hr>');\r\n this.bottomRuleEl = this.el.find('hr');\r\n };\r\n TimeGrid.prototype.renderSlats = function () {\r\n var theme = this.view.calendar.theme;\r\n this.slatContainerEl = this.el.find('> .fc-slats')\r\n .html(// avoids needing ::unrenderSlats()\r\n '<table class=\"' + theme.getClass('tableGrid') + '\">' +\r\n this.renderSlatRowHtml() +\r\n '</table>');\r\n this.slatEls = this.slatContainerEl.find('tr');\r\n this.slatCoordCache = new CoordCache_1.default({\r\n els: this.slatEls,\r\n isVertical: true\r\n });\r\n };\r\n // Generates the HTML for the horizontal \"slats\" that run width-wise. Has a time axis on a side. Depends on RTL.\r\n TimeGrid.prototype.renderSlatRowHtml = function () {\r\n var view = this.view;\r\n var calendar = view.calendar;\r\n var theme = calendar.theme;\r\n var isRTL = this.isRTL;\r\n var dateProfile = this.dateProfile;\r\n var html = '';\r\n var slotTime = moment.duration(+dateProfile.minTime); // wish there was .clone() for durations\r\n var slotIterator = moment.duration(0);\r\n var slotDate; // will be on the view's first day, but we only care about its time\r\n var isLabeled;\r\n var axisHtml;\r\n // Calculate the time for each slot\r\n while (slotTime < dateProfile.maxTime) {\r\n slotDate = calendar.msToUtcMoment(dateProfile.renderUnzonedRange.startMs).time(slotTime);\r\n isLabeled = util_1.isInt(util_1.divideDurationByDuration(slotIterator, this.labelInterval));\r\n axisHtml =\r\n '<td class=\"fc-axis fc-time ' + theme.getClass('widgetContent') + '\" ' + view.axisStyleAttr() + '>' +\r\n (isLabeled ?\r\n '<span>' + // for matchCellWidths\r\n util_1.htmlEscape(slotDate.format(this.labelFormat)) +\r\n '</span>' :\r\n '') +\r\n '</td>';\r\n html +=\r\n '<tr data-time=\"' + slotDate.format('HH:mm:ss') + '\"' +\r\n (isLabeled ? '' : ' class=\"fc-minor\"') +\r\n '>' +\r\n (!isRTL ? axisHtml : '') +\r\n '<td class=\"' + theme.getClass('widgetContent') + '\"></td>' +\r\n (isRTL ? axisHtml : '') +\r\n '</tr>';\r\n slotTime.add(this.slotDuration);\r\n slotIterator.add(this.slotDuration);\r\n }\r\n return html;\r\n };\r\n TimeGrid.prototype.renderColumns = function () {\r\n var dateProfile = this.dateProfile;\r\n var theme = this.view.calendar.theme;\r\n this.dayRanges = this.dayDates.map(function (dayDate) {\r\n return new UnzonedRange_1.default(dayDate.clone().add(dateProfile.minTime), dayDate.clone().add(dateProfile.maxTime));\r\n });\r\n if (this.headContainerEl) {\r\n this.headContainerEl.html(this.renderHeadHtml());\r\n }\r\n this.el.find('> .fc-bg').html('<table class=\"' + theme.getClass('tableGrid') + '\">' +\r\n this.renderBgTrHtml(0) + // row=0\r\n '</table>');\r\n this.colEls = this.el.find('.fc-day, .fc-disabled-day');\r\n this.colCoordCache = new CoordCache_1.default({\r\n els: this.colEls,\r\n isHorizontal: true\r\n });\r\n this.renderContentSkeleton();\r\n };\r\n TimeGrid.prototype.unrenderColumns = function () {\r\n this.unrenderContentSkeleton();\r\n };\r\n /* Content Skeleton\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Renders the DOM that the view's content will live in\r\n TimeGrid.prototype.renderContentSkeleton = function () {\r\n var cellHtml = '';\r\n var i;\r\n var skeletonEl;\r\n for (i = 0; i < this.colCnt; i++) {\r\n cellHtml +=\r\n '<td>' +\r\n '<div class=\"fc-content-col\">' +\r\n '<div class=\"fc-event-container fc-helper-container\"></div>' +\r\n '<div class=\"fc-event-container\"></div>' +\r\n '<div class=\"fc-highlight-container\"></div>' +\r\n '<div class=\"fc-bgevent-container\"></div>' +\r\n '<div class=\"fc-business-container\"></div>' +\r\n '</div>' +\r\n '</td>';\r\n }\r\n skeletonEl = this.contentSkeletonEl = $('<div class=\"fc-content-skeleton\">' +\r\n '<table>' +\r\n '<tr>' + cellHtml + '</tr>' +\r\n '</table>' +\r\n '</div>');\r\n this.colContainerEls = skeletonEl.find('.fc-content-col');\r\n this.helperContainerEls = skeletonEl.find('.fc-helper-container');\r\n this.fgContainerEls = skeletonEl.find('.fc-event-container:not(.fc-helper-container)');\r\n this.bgContainerEls = skeletonEl.find('.fc-bgevent-container');\r\n this.highlightContainerEls = skeletonEl.find('.fc-highlight-container');\r\n this.businessContainerEls = skeletonEl.find('.fc-business-container');\r\n this.bookendCells(skeletonEl.find('tr')); // TODO: do this on string level\r\n this.el.append(skeletonEl);\r\n };\r\n TimeGrid.prototype.unrenderContentSkeleton = function () {\r\n if (this.contentSkeletonEl) { // defensive :(\r\n this.contentSkeletonEl.remove();\r\n this.contentSkeletonEl = null;\r\n this.colContainerEls = null;\r\n this.helperContainerEls = null;\r\n this.fgContainerEls = null;\r\n this.bgContainerEls = null;\r\n this.highlightContainerEls = null;\r\n this.businessContainerEls = null;\r\n }\r\n };\r\n // Given a flat array of segments, return an array of sub-arrays, grouped by each segment's col\r\n TimeGrid.prototype.groupSegsByCol = function (segs) {\r\n var segsByCol = [];\r\n var i;\r\n for (i = 0; i < this.colCnt; i++) {\r\n segsByCol.push([]);\r\n }\r\n for (i = 0; i < segs.length; i++) {\r\n segsByCol[segs[i].col].push(segs[i]);\r\n }\r\n return segsByCol;\r\n };\r\n // Given segments grouped by column, insert the segments' elements into a parallel array of container\r\n // elements, each living within a column.\r\n TimeGrid.prototype.attachSegsByCol = function (segsByCol, containerEls) {\r\n var col;\r\n var segs;\r\n var i;\r\n for (col = 0; col < this.colCnt; col++) { // iterate each column grouping\r\n segs = segsByCol[col];\r\n for (i = 0; i < segs.length; i++) {\r\n containerEls.eq(col).append(segs[i].el);\r\n }\r\n }\r\n };\r\n /* Now Indicator\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n TimeGrid.prototype.getNowIndicatorUnit = function () {\r\n return 'minute'; // will refresh on the minute\r\n };\r\n TimeGrid.prototype.renderNowIndicator = function (date) {\r\n // HACK: if date columns not ready for some reason (scheduler)\r\n if (!this.colContainerEls) {\r\n return;\r\n }\r\n // seg system might be overkill, but it handles scenario where line needs to be rendered\r\n // more than once because of columns with the same date (resources columns for example)\r\n var segs = this.componentFootprintToSegs(new ComponentFootprint_1.default(new UnzonedRange_1.default(date, date.valueOf() + 1), // protect against null range\r\n false // all-day\r\n ));\r\n var top = this.computeDateTop(date, date);\r\n var nodes = [];\r\n var i;\r\n // render lines within the columns\r\n for (i = 0; i < segs.length; i++) {\r\n nodes.push($('<div class=\"fc-now-indicator fc-now-indicator-line\"></div>')\r\n .css('top', top)\r\n .appendTo(this.colContainerEls.eq(segs[i].col))[0]);\r\n }\r\n // render an arrow over the axis\r\n if (segs.length > 0) { // is the current time in view?\r\n nodes.push($('<div class=\"fc-now-indicator fc-now-indicator-arrow\"></div>')\r\n .css('top', top)\r\n .appendTo(this.el.find('.fc-content-skeleton'))[0]);\r\n }\r\n this.nowIndicatorEls = $(nodes);\r\n };\r\n TimeGrid.prototype.unrenderNowIndicator = function () {\r\n if (this.nowIndicatorEls) {\r\n this.nowIndicatorEls.remove();\r\n this.nowIndicatorEls = null;\r\n }\r\n };\r\n /* Coordinates\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n TimeGrid.prototype.updateSize = function (totalHeight, isAuto, isResize) {\r\n _super.prototype.updateSize.call(this, totalHeight, isAuto, isResize);\r\n this.slatCoordCache.build();\r\n if (isResize) {\r\n this.updateSegVerticals([].concat(this.eventRenderer.getSegs(), this.businessSegs || []));\r\n }\r\n };\r\n TimeGrid.prototype.getTotalSlatHeight = function () {\r\n return this.slatContainerEl.outerHeight();\r\n };\r\n // Computes the top coordinate, relative to the bounds of the grid, of the given date.\r\n // `ms` can be a millisecond UTC time OR a UTC moment.\r\n // A `startOfDayDate` must be given for avoiding ambiguity over how to treat midnight.\r\n TimeGrid.prototype.computeDateTop = function (ms, startOfDayDate) {\r\n return this.computeTimeTop(moment.duration(ms - startOfDayDate.clone().stripTime()));\r\n };\r\n // Computes the top coordinate, relative to the bounds of the grid, of the given time (a Duration).\r\n TimeGrid.prototype.computeTimeTop = function (time) {\r\n var len = this.slatEls.length;\r\n var dateProfile = this.dateProfile;\r\n var slatCoverage = (time - dateProfile.minTime) / this.slotDuration; // floating-point value of # of slots covered\r\n var slatIndex;\r\n var slatRemainder;\r\n // compute a floating-point number for how many slats should be progressed through.\r\n // from 0 to number of slats (inclusive)\r\n // constrained because minTime/maxTime might be customized.\r\n slatCoverage = Math.max(0, slatCoverage);\r\n slatCoverage = Math.min(len, slatCoverage);\r\n // an integer index of the furthest whole slat\r\n // from 0 to number slats (*exclusive*, so len-1)\r\n slatIndex = Math.floor(slatCoverage);\r\n slatIndex = Math.min(slatIndex, len - 1);\r\n // how much further through the slatIndex slat (from 0.0-1.0) must be covered in addition.\r\n // could be 1.0 if slatCoverage is covering *all* the slots\r\n slatRemainder = slatCoverage - slatIndex;\r\n return this.slatCoordCache.getTopPosition(slatIndex) +\r\n this.slatCoordCache.getHeight(slatIndex) * slatRemainder;\r\n };\r\n // Refreshes the CSS top/bottom coordinates for each segment element.\r\n // Works when called after initial render, after a window resize/zoom for example.\r\n TimeGrid.prototype.updateSegVerticals = function (segs) {\r\n this.computeSegVerticals(segs);\r\n this.assignSegVerticals(segs);\r\n };\r\n // For each segment in an array, computes and assigns its top and bottom properties\r\n TimeGrid.prototype.computeSegVerticals = function (segs) {\r\n var eventMinHeight = this.opt('agendaEventMinHeight');\r\n var i;\r\n var seg;\r\n var dayDate;\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n dayDate = this.dayDates[seg.dayIndex];\r\n seg.top = this.computeDateTop(seg.startMs, dayDate);\r\n seg.bottom = Math.max(seg.top + eventMinHeight, this.computeDateTop(seg.endMs, dayDate));\r\n }\r\n };\r\n // Given segments that already have their top/bottom properties computed, applies those values to\r\n // the segments' elements.\r\n TimeGrid.prototype.assignSegVerticals = function (segs) {\r\n var i;\r\n var seg;\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n seg.el.css(this.generateSegVerticalCss(seg));\r\n }\r\n };\r\n // Generates an object with CSS properties for the top/bottom coordinates of a segment element\r\n TimeGrid.prototype.generateSegVerticalCss = function (seg) {\r\n return {\r\n top: seg.top,\r\n bottom: -seg.bottom // flipped because needs to be space beyond bottom edge of event container\r\n };\r\n };\r\n /* Hit System\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n TimeGrid.prototype.prepareHits = function () {\r\n this.colCoordCache.build();\r\n this.slatCoordCache.build();\r\n };\r\n TimeGrid.prototype.releaseHits = function () {\r\n this.colCoordCache.clear();\r\n // NOTE: don't clear slatCoordCache because we rely on it for computeTimeTop\r\n };\r\n TimeGrid.prototype.queryHit = function (leftOffset, topOffset) {\r\n var snapsPerSlot = this.snapsPerSlot;\r\n var colCoordCache = this.colCoordCache;\r\n var slatCoordCache = this.slatCoordCache;\r\n if (colCoordCache.isLeftInBounds(leftOffset) && slatCoordCache.isTopInBounds(topOffset)) {\r\n var colIndex = colCoordCache.getHorizontalIndex(leftOffset);\r\n var slatIndex = slatCoordCache.getVerticalIndex(topOffset);\r\n if (colIndex != null && slatIndex != null) {\r\n var slatTop = slatCoordCache.getTopOffset(slatIndex);\r\n var slatHeight = slatCoordCache.getHeight(slatIndex);\r\n var partial = (topOffset - slatTop) / slatHeight; // floating point number between 0 and 1\r\n var localSnapIndex = Math.floor(partial * snapsPerSlot); // the snap # relative to start of slat\r\n var snapIndex = slatIndex * snapsPerSlot + localSnapIndex;\r\n var snapTop = slatTop + (localSnapIndex / snapsPerSlot) * slatHeight;\r\n var snapBottom = slatTop + ((localSnapIndex + 1) / snapsPerSlot) * slatHeight;\r\n return {\r\n col: colIndex,\r\n snap: snapIndex,\r\n component: this,\r\n left: colCoordCache.getLeftOffset(colIndex),\r\n right: colCoordCache.getRightOffset(colIndex),\r\n top: snapTop,\r\n bottom: snapBottom\r\n };\r\n }\r\n }\r\n };\r\n TimeGrid.prototype.getHitFootprint = function (hit) {\r\n var start = this.getCellDate(0, hit.col); // row=0\r\n var time = this.computeSnapTime(hit.snap); // pass in the snap-index\r\n var end;\r\n start.time(time);\r\n end = start.clone().add(this.snapDuration);\r\n return new ComponentFootprint_1.default(new UnzonedRange_1.default(start, end), false // all-day?\r\n );\r\n };\r\n // Given a row number of the grid, representing a \"snap\", returns a time (Duration) from its start-of-day\r\n TimeGrid.prototype.computeSnapTime = function (snapIndex) {\r\n return moment.duration(this.dateProfile.minTime + this.snapDuration * snapIndex);\r\n };\r\n TimeGrid.prototype.getHitEl = function (hit) {\r\n return this.colEls.eq(hit.col);\r\n };\r\n /* Event Drag Visualization\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Renders a visual indication of an event being dragged over the specified date(s).\r\n // A returned value of `true` signals that a mock \"helper\" event has been rendered.\r\n TimeGrid.prototype.renderDrag = function (eventFootprints, seg, isTouch) {\r\n var i;\r\n if (seg) { // if there is event information for this drag, render a helper event\r\n if (eventFootprints.length) {\r\n this.helperRenderer.renderEventDraggingFootprints(eventFootprints, seg, isTouch);\r\n // signal that a helper has been rendered\r\n return true;\r\n }\r\n }\r\n else { // otherwise, just render a highlight\r\n for (i = 0; i < eventFootprints.length; i++) {\r\n this.renderHighlight(eventFootprints[i].componentFootprint);\r\n }\r\n }\r\n };\r\n // Unrenders any visual indication of an event being dragged\r\n TimeGrid.prototype.unrenderDrag = function () {\r\n this.unrenderHighlight();\r\n this.helperRenderer.unrender();\r\n };\r\n /* Event Resize Visualization\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Renders a visual indication of an event being resized\r\n TimeGrid.prototype.renderEventResize = function (eventFootprints, seg, isTouch) {\r\n this.helperRenderer.renderEventResizingFootprints(eventFootprints, seg, isTouch);\r\n };\r\n // Unrenders any visual indication of an event being resized\r\n TimeGrid.prototype.unrenderEventResize = function () {\r\n this.helperRenderer.unrender();\r\n };\r\n /* Selection\r\n ------------------------------------------------------------------------------------------------------------------*/\r\n // Renders a visual indication of a selection. Overrides the default, which was to simply render a highlight.\r\n TimeGrid.prototype.renderSelectionFootprint = function (componentFootprint) {\r\n if (this.opt('selectHelper')) { // this setting signals that a mock helper event should be rendered\r\n this.helperRenderer.renderComponentFootprint(componentFootprint);\r\n }\r\n else {\r\n this.renderHighlight(componentFootprint);\r\n }\r\n };\r\n // Unrenders any visual indication of a selection\r\n TimeGrid.prototype.unrenderSelection = function () {\r\n this.helperRenderer.unrender();\r\n this.unrenderHighlight();\r\n };\r\n return TimeGrid;\r\n}(InteractiveDateComponent_1.default));\r\nexports.default = TimeGrid;\r\nTimeGrid.prototype.eventRendererClass = TimeGridEventRenderer_1.default;\r\nTimeGrid.prototype.businessHourRendererClass = BusinessHourRenderer_1.default;\r\nTimeGrid.prototype.helperRendererClass = TimeGridHelperRenderer_1.default;\r\nTimeGrid.prototype.fillRendererClass = TimeGridFillRenderer_1.default;\r\nStandardInteractionsMixin_1.default.mixInto(TimeGrid);\r\nDayTableMixin_1.default.mixInto(TimeGrid);\r\n\n\n/***/ }),\n/* 240 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar util_1 = __webpack_require__(4);\r\nvar EventRenderer_1 = __webpack_require__(44);\r\n/*\r\nOnly handles foreground segs.\r\nDoes not own rendering. Use for low-level util methods by TimeGrid.\r\n*/\r\nvar TimeGridEventRenderer = /** @class */ (function (_super) {\r\n tslib_1.__extends(TimeGridEventRenderer, _super);\r\n function TimeGridEventRenderer(timeGrid, fillRenderer) {\r\n var _this = _super.call(this, timeGrid, fillRenderer) || this;\r\n _this.timeGrid = timeGrid;\r\n return _this;\r\n }\r\n TimeGridEventRenderer.prototype.renderFgSegs = function (segs) {\r\n this.renderFgSegsIntoContainers(segs, this.timeGrid.fgContainerEls);\r\n };\r\n // Given an array of foreground segments, render a DOM element for each, computes position,\r\n // and attaches to the column inner-container elements.\r\n TimeGridEventRenderer.prototype.renderFgSegsIntoContainers = function (segs, containerEls) {\r\n var segsByCol;\r\n var col;\r\n segsByCol = this.timeGrid.groupSegsByCol(segs);\r\n for (col = 0; col < this.timeGrid.colCnt; col++) {\r\n this.updateFgSegCoords(segsByCol[col]);\r\n }\r\n this.timeGrid.attachSegsByCol(segsByCol, containerEls);\r\n };\r\n TimeGridEventRenderer.prototype.unrenderFgSegs = function () {\r\n if (this.fgSegs) { // hack\r\n this.fgSegs.forEach(function (seg) {\r\n seg.el.remove();\r\n });\r\n }\r\n };\r\n // Computes a default event time formatting string if `timeFormat` is not explicitly defined\r\n TimeGridEventRenderer.prototype.computeEventTimeFormat = function () {\r\n return this.opt('noMeridiemTimeFormat'); // like \"6:30\" (no AM/PM)\r\n };\r\n // Computes a default `displayEventEnd` value if one is not expliclty defined\r\n TimeGridEventRenderer.prototype.computeDisplayEventEnd = function () {\r\n return true;\r\n };\r\n // Renders the HTML for a single event segment's default rendering\r\n TimeGridEventRenderer.prototype.fgSegHtml = function (seg, disableResizing) {\r\n var view = this.view;\r\n var calendar = view.calendar;\r\n var componentFootprint = seg.footprint.componentFootprint;\r\n var isAllDay = componentFootprint.isAllDay;\r\n var eventDef = seg.footprint.eventDef;\r\n var isDraggable = view.isEventDefDraggable(eventDef);\r\n var isResizableFromStart = !disableResizing && seg.isStart && view.isEventDefResizableFromStart(eventDef);\r\n var isResizableFromEnd = !disableResizing && seg.isEnd && view.isEventDefResizableFromEnd(eventDef);\r\n var classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);\r\n var skinCss = util_1.cssToStr(this.getSkinCss(eventDef));\r\n var timeText;\r\n var fullTimeText; // more verbose time text. for the print stylesheet\r\n var startTimeText; // just the start time text\r\n classes.unshift('fc-time-grid-event', 'fc-v-event');\r\n // if the event appears to span more than one day...\r\n if (view.isMultiDayRange(componentFootprint.unzonedRange)) {\r\n // Don't display time text on segments that run entirely through a day.\r\n // That would appear as midnight-midnight and would look dumb.\r\n // Otherwise, display the time text for the *segment's* times (like 6pm-midnight or midnight-10am)\r\n if (seg.isStart || seg.isEnd) {\r\n var zonedStart = calendar.msToMoment(seg.startMs);\r\n var zonedEnd = calendar.msToMoment(seg.endMs);\r\n timeText = this._getTimeText(zonedStart, zonedEnd, isAllDay);\r\n fullTimeText = this._getTimeText(zonedStart, zonedEnd, isAllDay, 'LT');\r\n startTimeText = this._getTimeText(zonedStart, zonedEnd, isAllDay, null, false); // displayEnd=false\r\n }\r\n }\r\n else {\r\n // Display the normal time text for the *event's* times\r\n timeText = this.getTimeText(seg.footprint);\r\n fullTimeText = this.getTimeText(seg.footprint, 'LT');\r\n startTimeText = this.getTimeText(seg.footprint, null, false); // displayEnd=false\r\n }\r\n return '<a class=\"' + classes.join(' ') + '\"' +\r\n (eventDef.url ?\r\n ' href=\"' + util_1.htmlEscape(eventDef.url) + '\"' :\r\n '') +\r\n (skinCss ?\r\n ' style=\"' + skinCss + '\"' :\r\n '') +\r\n '>' +\r\n '<div class=\"fc-content\">' +\r\n (timeText ?\r\n '<div class=\"fc-time\"' +\r\n ' data-start=\"' + util_1.htmlEscape(startTimeText) + '\"' +\r\n ' data-full=\"' + util_1.htmlEscape(fullTimeText) + '\"' +\r\n '>' +\r\n '<span>' + util_1.htmlEscape(timeText) + '</span>' +\r\n '</div>' :\r\n '') +\r\n (eventDef.title ?\r\n '<div class=\"fc-title\">' +\r\n util_1.htmlEscape(eventDef.title) +\r\n '</div>' :\r\n '') +\r\n '</div>' +\r\n '<div class=\"fc-bg\"></div>' +\r\n /* TODO: write CSS for this\r\n (isResizableFromStart ?\r\n '<div class=\"fc-resizer fc-start-resizer\"></div>' :\r\n ''\r\n ) +\r\n */\r\n (isResizableFromEnd ?\r\n '<div class=\"fc-resizer fc-end-resizer\"></div>' :\r\n '') +\r\n '</a>';\r\n };\r\n // Given segments that are assumed to all live in the *same column*,\r\n // compute their verical/horizontal coordinates and assign to their elements.\r\n TimeGridEventRenderer.prototype.updateFgSegCoords = function (segs) {\r\n this.timeGrid.computeSegVerticals(segs); // horizontals relies on this\r\n this.computeFgSegHorizontals(segs); // compute horizontal coordinates, z-index's, and reorder the array\r\n this.timeGrid.assignSegVerticals(segs);\r\n this.assignFgSegHorizontals(segs);\r\n };\r\n // Given an array of segments that are all in the same column, sets the backwardCoord and forwardCoord on each.\r\n // NOTE: Also reorders the given array by date!\r\n TimeGridEventRenderer.prototype.computeFgSegHorizontals = function (segs) {\r\n var levels;\r\n var level0;\r\n var i;\r\n this.sortEventSegs(segs); // order by certain criteria\r\n levels = buildSlotSegLevels(segs);\r\n computeForwardSlotSegs(levels);\r\n if ((level0 = levels[0])) {\r\n for (i = 0; i < level0.length; i++) {\r\n computeSlotSegPressures(level0[i]);\r\n }\r\n for (i = 0; i < level0.length; i++) {\r\n this.computeFgSegForwardBack(level0[i], 0, 0);\r\n }\r\n }\r\n };\r\n // Calculate seg.forwardCoord and seg.backwardCoord for the segment, where both values range\r\n // from 0 to 1. If the calendar is left-to-right, the seg.backwardCoord maps to \"left\" and\r\n // seg.forwardCoord maps to \"right\" (via percentage). Vice-versa if the calendar is right-to-left.\r\n //\r\n // The segment might be part of a \"series\", which means consecutive segments with the same pressure\r\n // who's width is unknown until an edge has been hit. `seriesBackwardPressure` is the number of\r\n // segments behind this one in the current series, and `seriesBackwardCoord` is the starting\r\n // coordinate of the first segment in the series.\r\n TimeGridEventRenderer.prototype.computeFgSegForwardBack = function (seg, seriesBackwardPressure, seriesBackwardCoord) {\r\n var forwardSegs = seg.forwardSegs;\r\n var i;\r\n if (seg.forwardCoord === undefined) { // not already computed\r\n if (!forwardSegs.length) {\r\n // if there are no forward segments, this segment should butt up against the edge\r\n seg.forwardCoord = 1;\r\n }\r\n else {\r\n // sort highest pressure first\r\n this.sortForwardSegs(forwardSegs);\r\n // this segment's forwardCoord will be calculated from the backwardCoord of the\r\n // highest-pressure forward segment.\r\n this.computeFgSegForwardBack(forwardSegs[0], seriesBackwardPressure + 1, seriesBackwardCoord);\r\n seg.forwardCoord = forwardSegs[0].backwardCoord;\r\n }\r\n // calculate the backwardCoord from the forwardCoord. consider the series\r\n seg.backwardCoord = seg.forwardCoord -\r\n (seg.forwardCoord - seriesBackwardCoord) / // available width for series\r\n (seriesBackwardPressure + 1); // # of segments in the series\r\n // use this segment's coordinates to computed the coordinates of the less-pressurized\r\n // forward segments\r\n for (i = 0; i < forwardSegs.length; i++) {\r\n this.computeFgSegForwardBack(forwardSegs[i], 0, seg.forwardCoord);\r\n }\r\n }\r\n };\r\n TimeGridEventRenderer.prototype.sortForwardSegs = function (forwardSegs) {\r\n forwardSegs.sort(util_1.proxy(this, 'compareForwardSegs'));\r\n };\r\n // A cmp function for determining which forward segment to rely on more when computing coordinates.\r\n TimeGridEventRenderer.prototype.compareForwardSegs = function (seg1, seg2) {\r\n // put higher-pressure first\r\n return seg2.forwardPressure - seg1.forwardPressure ||\r\n // put segments that are closer to initial edge first (and favor ones with no coords yet)\r\n (seg1.backwardCoord || 0) - (seg2.backwardCoord || 0) ||\r\n // do normal sorting...\r\n this.compareEventSegs(seg1, seg2);\r\n };\r\n // Given foreground event segments that have already had their position coordinates computed,\r\n // assigns position-related CSS values to their elements.\r\n TimeGridEventRenderer.prototype.assignFgSegHorizontals = function (segs) {\r\n var i;\r\n var seg;\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n seg.el.css(this.generateFgSegHorizontalCss(seg));\r\n // if the event is short that the title will be cut off,\r\n // attach a className that condenses the title into the time area.\r\n if (seg.footprint.eventDef.title && seg.bottom - seg.top < 30) {\r\n seg.el.addClass('fc-short'); // TODO: \"condensed\" is a better name\r\n }\r\n }\r\n };\r\n // Generates an object with CSS properties/values that should be applied to an event segment element.\r\n // Contains important positioning-related properties that should be applied to any event element, customized or not.\r\n TimeGridEventRenderer.prototype.generateFgSegHorizontalCss = function (seg) {\r\n var shouldOverlap = this.opt('slotEventOverlap');\r\n var backwardCoord = seg.backwardCoord; // the left side if LTR. the right side if RTL. floating-point\r\n var forwardCoord = seg.forwardCoord; // the right side if LTR. the left side if RTL. floating-point\r\n var props = this.timeGrid.generateSegVerticalCss(seg); // get top/bottom first\r\n var isRTL = this.timeGrid.isRTL;\r\n var left; // amount of space from left edge, a fraction of the total width\r\n var right; // amount of space from right edge, a fraction of the total width\r\n if (shouldOverlap) {\r\n // double the width, but don't go beyond the maximum forward coordinate (1.0)\r\n forwardCoord = Math.min(1, backwardCoord + (forwardCoord - backwardCoord) * 2);\r\n }\r\n if (isRTL) {\r\n left = 1 - forwardCoord;\r\n right = backwardCoord;\r\n }\r\n else {\r\n left = backwardCoord;\r\n right = 1 - forwardCoord;\r\n }\r\n props.zIndex = seg.level + 1; // convert from 0-base to 1-based\r\n props.left = left * 100 + '%';\r\n props.right = right * 100 + '%';\r\n if (shouldOverlap && seg.forwardPressure) {\r\n // add padding to the edge so that forward stacked events don't cover the resizer's icon\r\n props[isRTL ? 'marginLeft' : 'marginRight'] = 10 * 2; // 10 is a guesstimate of the icon's width\r\n }\r\n return props;\r\n };\r\n return TimeGridEventRenderer;\r\n}(EventRenderer_1.default));\r\nexports.default = TimeGridEventRenderer;\r\n// Builds an array of segments \"levels\". The first level will be the leftmost tier of segments if the calendar is\r\n// left-to-right, or the rightmost if the calendar is right-to-left. Assumes the segments are already ordered by date.\r\nfunction buildSlotSegLevels(segs) {\r\n var levels = [];\r\n var i;\r\n var seg;\r\n var j;\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n // go through all the levels and stop on the first level where there are no collisions\r\n for (j = 0; j < levels.length; j++) {\r\n if (!computeSlotSegCollisions(seg, levels[j]).length) {\r\n break;\r\n }\r\n }\r\n seg.level = j;\r\n (levels[j] || (levels[j] = [])).push(seg);\r\n }\r\n return levels;\r\n}\r\n// For every segment, figure out the other segments that are in subsequent\r\n// levels that also occupy the same vertical space. Accumulate in seg.forwardSegs\r\nfunction computeForwardSlotSegs(levels) {\r\n var i;\r\n var level;\r\n var j;\r\n var seg;\r\n var k;\r\n for (i = 0; i < levels.length; i++) {\r\n level = levels[i];\r\n for (j = 0; j < level.length; j++) {\r\n seg = level[j];\r\n seg.forwardSegs = [];\r\n for (k = i + 1; k < levels.length; k++) {\r\n computeSlotSegCollisions(seg, levels[k], seg.forwardSegs);\r\n }\r\n }\r\n }\r\n}\r\n// Figure out which path forward (via seg.forwardSegs) results in the longest path until\r\n// the furthest edge is reached. The number of segments in this path will be seg.forwardPressure\r\nfunction computeSlotSegPressures(seg) {\r\n var forwardSegs = seg.forwardSegs;\r\n var forwardPressure = 0;\r\n var i;\r\n var forwardSeg;\r\n if (seg.forwardPressure === undefined) { // not already computed\r\n for (i = 0; i < forwardSegs.length; i++) {\r\n forwardSeg = forwardSegs[i];\r\n // figure out the child's maximum forward path\r\n computeSlotSegPressures(forwardSeg);\r\n // either use the existing maximum, or use the child's forward pressure\r\n // plus one (for the forwardSeg itself)\r\n forwardPressure = Math.max(forwardPressure, 1 + forwardSeg.forwardPressure);\r\n }\r\n seg.forwardPressure = forwardPressure;\r\n }\r\n}\r\n// Find all the segments in `otherSegs` that vertically collide with `seg`.\r\n// Append into an optionally-supplied `results` array and return.\r\nfunction computeSlotSegCollisions(seg, otherSegs, results) {\r\n if (results === void 0) { results = []; }\r\n for (var i = 0; i < otherSegs.length; i++) {\r\n if (isSlotSegCollision(seg, otherSegs[i])) {\r\n results.push(otherSegs[i]);\r\n }\r\n }\r\n return results;\r\n}\r\n// Do these segments occupy the same vertical space?\r\nfunction isSlotSegCollision(seg1, seg2) {\r\n return seg1.bottom > seg2.top && seg1.top < seg2.bottom;\r\n}\r\n\n\n/***/ }),\n/* 241 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar HelperRenderer_1 = __webpack_require__(63);\r\nvar TimeGridHelperRenderer = /** @class */ (function (_super) {\r\n tslib_1.__extends(TimeGridHelperRenderer, _super);\r\n function TimeGridHelperRenderer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeGridHelperRenderer.prototype.renderSegs = function (segs, sourceSeg) {\r\n var helperNodes = [];\r\n var i;\r\n var seg;\r\n var sourceEl;\r\n // TODO: not good to call eventRenderer this way\r\n this.eventRenderer.renderFgSegsIntoContainers(segs, this.component.helperContainerEls);\r\n // Try to make the segment that is in the same row as sourceSeg look the same\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n if (sourceSeg && sourceSeg.col === seg.col) {\r\n sourceEl = sourceSeg.el;\r\n seg.el.css({\r\n left: sourceEl.css('left'),\r\n right: sourceEl.css('right'),\r\n 'margin-left': sourceEl.css('margin-left'),\r\n 'margin-right': sourceEl.css('margin-right')\r\n });\r\n }\r\n helperNodes.push(seg.el[0]);\r\n }\r\n return $(helperNodes); // must return the elements rendered\r\n };\r\n return TimeGridHelperRenderer;\r\n}(HelperRenderer_1.default));\r\nexports.default = TimeGridHelperRenderer;\r\n\n\n/***/ }),\n/* 242 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar FillRenderer_1 = __webpack_require__(62);\r\nvar TimeGridFillRenderer = /** @class */ (function (_super) {\r\n tslib_1.__extends(TimeGridFillRenderer, _super);\r\n function TimeGridFillRenderer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TimeGridFillRenderer.prototype.attachSegEls = function (type, segs) {\r\n var timeGrid = this.component;\r\n var containerEls;\r\n // TODO: more efficient lookup\r\n if (type === 'bgEvent') {\r\n containerEls = timeGrid.bgContainerEls;\r\n }\r\n else if (type === 'businessHours') {\r\n containerEls = timeGrid.businessContainerEls;\r\n }\r\n else if (type === 'highlight') {\r\n containerEls = timeGrid.highlightContainerEls;\r\n }\r\n timeGrid.updateSegVerticals(segs);\r\n timeGrid.attachSegsByCol(timeGrid.groupSegsByCol(segs), containerEls);\r\n return segs.map(function (seg) {\r\n return seg.el[0];\r\n });\r\n };\r\n return TimeGridFillRenderer;\r\n}(FillRenderer_1.default));\r\nexports.default = TimeGridFillRenderer;\r\n\n\n/***/ }),\n/* 243 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar EventRenderer_1 = __webpack_require__(44);\r\n/* Event-rendering methods for the DayGrid class\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nvar DayGridEventRenderer = /** @class */ (function (_super) {\r\n tslib_1.__extends(DayGridEventRenderer, _super);\r\n function DayGridEventRenderer(dayGrid, fillRenderer) {\r\n var _this = _super.call(this, dayGrid, fillRenderer) || this;\r\n _this.dayGrid = dayGrid;\r\n return _this;\r\n }\r\n DayGridEventRenderer.prototype.renderBgRanges = function (eventRanges) {\r\n // don't render timed background events\r\n eventRanges = $.grep(eventRanges, function (eventRange) {\r\n return eventRange.eventDef.isAllDay();\r\n });\r\n _super.prototype.renderBgRanges.call(this, eventRanges);\r\n };\r\n // Renders the given foreground event segments onto the grid\r\n DayGridEventRenderer.prototype.renderFgSegs = function (segs) {\r\n var rowStructs = this.rowStructs = this.renderSegRows(segs);\r\n // append to each row's content skeleton\r\n this.dayGrid.rowEls.each(function (i, rowNode) {\r\n $(rowNode).find('.fc-content-skeleton > table').append(rowStructs[i].tbodyEl);\r\n });\r\n };\r\n // Unrenders all currently rendered foreground event segments\r\n DayGridEventRenderer.prototype.unrenderFgSegs = function () {\r\n var rowStructs = this.rowStructs || [];\r\n var rowStruct;\r\n while ((rowStruct = rowStructs.pop())) {\r\n rowStruct.tbodyEl.remove();\r\n }\r\n this.rowStructs = null;\r\n };\r\n // Uses the given events array to generate <tbody> elements that should be appended to each row's content skeleton.\r\n // Returns an array of rowStruct objects (see the bottom of `renderSegRow`).\r\n // PRECONDITION: each segment shoud already have a rendered and assigned `.el`\r\n DayGridEventRenderer.prototype.renderSegRows = function (segs) {\r\n var rowStructs = [];\r\n var segRows;\r\n var row;\r\n segRows = this.groupSegRows(segs); // group into nested arrays\r\n // iterate each row of segment groupings\r\n for (row = 0; row < segRows.length; row++) {\r\n rowStructs.push(this.renderSegRow(row, segRows[row]));\r\n }\r\n return rowStructs;\r\n };\r\n // Given a row # and an array of segments all in the same row, render a <tbody> element, a skeleton that contains\r\n // the segments. Returns object with a bunch of internal data about how the render was calculated.\r\n // NOTE: modifies rowSegs\r\n DayGridEventRenderer.prototype.renderSegRow = function (row, rowSegs) {\r\n var colCnt = this.dayGrid.colCnt;\r\n var segLevels = this.buildSegLevels(rowSegs); // group into sub-arrays of levels\r\n var levelCnt = Math.max(1, segLevels.length); // ensure at least one level\r\n var tbody = $('<tbody>');\r\n var segMatrix = []; // lookup for which segments are rendered into which level+col cells\r\n var cellMatrix = []; // lookup for all <td> elements of the level+col matrix\r\n var loneCellMatrix = []; // lookup for <td> elements that only take up a single column\r\n var i;\r\n var levelSegs;\r\n var col;\r\n var tr;\r\n var j;\r\n var seg;\r\n var td;\r\n // populates empty cells from the current column (`col`) to `endCol`\r\n function emptyCellsUntil(endCol) {\r\n while (col < endCol) {\r\n // try to grab a cell from the level above and extend its rowspan. otherwise, create a fresh cell\r\n td = (loneCellMatrix[i - 1] || [])[col];\r\n if (td) {\r\n td.attr('rowspan', parseInt(td.attr('rowspan') || 1, 10) + 1);\r\n }\r\n else {\r\n td = $('<td>');\r\n tr.append(td);\r\n }\r\n cellMatrix[i][col] = td;\r\n loneCellMatrix[i][col] = td;\r\n col++;\r\n }\r\n }\r\n for (i = 0; i < levelCnt; i++) { // iterate through all levels\r\n levelSegs = segLevels[i];\r\n col = 0;\r\n tr = $('<tr>');\r\n segMatrix.push([]);\r\n cellMatrix.push([]);\r\n loneCellMatrix.push([]);\r\n // levelCnt might be 1 even though there are no actual levels. protect against this.\r\n // this single empty row is useful for styling.\r\n if (levelSegs) {\r\n for (j = 0; j < levelSegs.length; j++) { // iterate through segments in level\r\n seg = levelSegs[j];\r\n emptyCellsUntil(seg.leftCol);\r\n // create a container that occupies or more columns. append the event element.\r\n td = $('<td class=\"fc-event-container\">').append(seg.el);\r\n if (seg.leftCol !== seg.rightCol) {\r\n td.attr('colspan', seg.rightCol - seg.leftCol + 1);\r\n }\r\n else { // a single-column segment\r\n loneCellMatrix[i][col] = td;\r\n }\r\n while (col <= seg.rightCol) {\r\n cellMatrix[i][col] = td;\r\n segMatrix[i][col] = seg;\r\n col++;\r\n }\r\n tr.append(td);\r\n }\r\n }\r\n emptyCellsUntil(colCnt); // finish off the row\r\n this.dayGrid.bookendCells(tr);\r\n tbody.append(tr);\r\n }\r\n return {\r\n row: row,\r\n tbodyEl: tbody,\r\n cellMatrix: cellMatrix,\r\n segMatrix: segMatrix,\r\n segLevels: segLevels,\r\n segs: rowSegs\r\n };\r\n };\r\n // Stacks a flat array of segments, which are all assumed to be in the same row, into subarrays of vertical levels.\r\n // NOTE: modifies segs\r\n DayGridEventRenderer.prototype.buildSegLevels = function (segs) {\r\n var levels = [];\r\n var i;\r\n var seg;\r\n var j;\r\n // Give preference to elements with certain criteria, so they have\r\n // a chance to be closer to the top.\r\n this.sortEventSegs(segs);\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n // loop through levels, starting with the topmost, until the segment doesn't collide with other segments\r\n for (j = 0; j < levels.length; j++) {\r\n if (!isDaySegCollision(seg, levels[j])) {\r\n break;\r\n }\r\n }\r\n // `j` now holds the desired subrow index\r\n seg.level = j;\r\n // create new level array if needed and append segment\r\n (levels[j] || (levels[j] = [])).push(seg);\r\n }\r\n // order segments left-to-right. very important if calendar is RTL\r\n for (j = 0; j < levels.length; j++) {\r\n levels[j].sort(compareDaySegCols);\r\n }\r\n return levels;\r\n };\r\n // Given a flat array of segments, return an array of sub-arrays, grouped by each segment's row\r\n DayGridEventRenderer.prototype.groupSegRows = function (segs) {\r\n var segRows = [];\r\n var i;\r\n for (i = 0; i < this.dayGrid.rowCnt; i++) {\r\n segRows.push([]);\r\n }\r\n for (i = 0; i < segs.length; i++) {\r\n segRows[segs[i].row].push(segs[i]);\r\n }\r\n return segRows;\r\n };\r\n // Computes a default event time formatting string if `timeFormat` is not explicitly defined\r\n DayGridEventRenderer.prototype.computeEventTimeFormat = function () {\r\n return this.opt('extraSmallTimeFormat'); // like \"6p\" or \"6:30p\"\r\n };\r\n // Computes a default `displayEventEnd` value if one is not expliclty defined\r\n DayGridEventRenderer.prototype.computeDisplayEventEnd = function () {\r\n return this.dayGrid.colCnt === 1; // we'll likely have space if there's only one day\r\n };\r\n // Builds the HTML to be used for the default element for an individual segment\r\n DayGridEventRenderer.prototype.fgSegHtml = function (seg, disableResizing) {\r\n var view = this.view;\r\n var eventDef = seg.footprint.eventDef;\r\n var isAllDay = seg.footprint.componentFootprint.isAllDay;\r\n var isDraggable = view.isEventDefDraggable(eventDef);\r\n var isResizableFromStart = !disableResizing && isAllDay &&\r\n seg.isStart && view.isEventDefResizableFromStart(eventDef);\r\n var isResizableFromEnd = !disableResizing && isAllDay &&\r\n seg.isEnd && view.isEventDefResizableFromEnd(eventDef);\r\n var classes = this.getSegClasses(seg, isDraggable, isResizableFromStart || isResizableFromEnd);\r\n var skinCss = util_1.cssToStr(this.getSkinCss(eventDef));\r\n var timeHtml = '';\r\n var timeText;\r\n var titleHtml;\r\n classes.unshift('fc-day-grid-event', 'fc-h-event');\r\n // Only display a timed events time if it is the starting segment\r\n if (seg.isStart) {\r\n timeText = this.getTimeText(seg.footprint);\r\n if (timeText) {\r\n timeHtml = '<span class=\"fc-time\">' + util_1.htmlEscape(timeText) + '</span>';\r\n }\r\n }\r\n titleHtml =\r\n '<span class=\"fc-title\">' +\r\n (util_1.htmlEscape(eventDef.title || '') || ' ') + // we always want one line of height\r\n '</span>';\r\n return '<a class=\"' + classes.join(' ') + '\"' +\r\n (eventDef.url ?\r\n ' href=\"' + util_1.htmlEscape(eventDef.url) + '\"' :\r\n '') +\r\n (skinCss ?\r\n ' style=\"' + skinCss + '\"' :\r\n '') +\r\n '>' +\r\n '<div class=\"fc-content\">' +\r\n (this.dayGrid.isRTL ?\r\n titleHtml + ' ' + timeHtml : // put a natural space in between\r\n timeHtml + ' ' + titleHtml //\r\n ) +\r\n '</div>' +\r\n (isResizableFromStart ?\r\n '<div class=\"fc-resizer fc-start-resizer\"></div>' :\r\n '') +\r\n (isResizableFromEnd ?\r\n '<div class=\"fc-resizer fc-end-resizer\"></div>' :\r\n '') +\r\n '</a>';\r\n };\r\n return DayGridEventRenderer;\r\n}(EventRenderer_1.default));\r\nexports.default = DayGridEventRenderer;\r\n// Computes whether two segments' columns collide. They are assumed to be in the same row.\r\nfunction isDaySegCollision(seg, otherSegs) {\r\n var i;\r\n var otherSeg;\r\n for (i = 0; i < otherSegs.length; i++) {\r\n otherSeg = otherSegs[i];\r\n if (otherSeg.leftCol <= seg.rightCol &&\r\n otherSeg.rightCol >= seg.leftCol) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\n// A cmp function for determining the leftmost event\r\nfunction compareDaySegCols(a, b) {\r\n return a.leftCol - b.leftCol;\r\n}\r\n\n\n/***/ }),\n/* 244 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar HelperRenderer_1 = __webpack_require__(63);\r\nvar DayGridHelperRenderer = /** @class */ (function (_super) {\r\n tslib_1.__extends(DayGridHelperRenderer, _super);\r\n function DayGridHelperRenderer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // Renders a mock \"helper\" event. `sourceSeg` is the associated internal segment object. It can be null.\r\n DayGridHelperRenderer.prototype.renderSegs = function (segs, sourceSeg) {\r\n var helperNodes = [];\r\n var rowStructs;\r\n // TODO: not good to call eventRenderer this way\r\n rowStructs = this.eventRenderer.renderSegRows(segs);\r\n // inject each new event skeleton into each associated row\r\n this.component.rowEls.each(function (row, rowNode) {\r\n var rowEl = $(rowNode); // the .fc-row\r\n var skeletonEl = $('<div class=\"fc-helper-skeleton\"><table></table></div>'); // will be absolutely positioned\r\n var skeletonTopEl;\r\n var skeletonTop;\r\n // If there is an original segment, match the top position. Otherwise, put it at the row's top level\r\n if (sourceSeg && sourceSeg.row === row) {\r\n skeletonTop = sourceSeg.el.position().top;\r\n }\r\n else {\r\n skeletonTopEl = rowEl.find('.fc-content-skeleton tbody');\r\n if (!skeletonTopEl.length) { // when no events\r\n skeletonTopEl = rowEl.find('.fc-content-skeleton table');\r\n }\r\n skeletonTop = skeletonTopEl.position().top;\r\n }\r\n skeletonEl.css('top', skeletonTop)\r\n .find('table')\r\n .append(rowStructs[row].tbodyEl);\r\n rowEl.append(skeletonEl);\r\n helperNodes.push(skeletonEl[0]);\r\n });\r\n return $(helperNodes); // must return the elements rendered\r\n };\r\n return DayGridHelperRenderer;\r\n}(HelperRenderer_1.default));\r\nexports.default = DayGridHelperRenderer;\r\n\n\n/***/ }),\n/* 245 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar FillRenderer_1 = __webpack_require__(62);\r\nvar DayGridFillRenderer = /** @class */ (function (_super) {\r\n tslib_1.__extends(DayGridFillRenderer, _super);\r\n function DayGridFillRenderer() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.fillSegTag = 'td'; // override the default tag name\r\n return _this;\r\n }\r\n DayGridFillRenderer.prototype.attachSegEls = function (type, segs) {\r\n var nodes = [];\r\n var i;\r\n var seg;\r\n var skeletonEl;\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n skeletonEl = this.renderFillRow(type, seg);\r\n this.component.rowEls.eq(seg.row).append(skeletonEl);\r\n nodes.push(skeletonEl[0]);\r\n }\r\n return nodes;\r\n };\r\n // Generates the HTML needed for one row of a fill. Requires the seg's el to be rendered.\r\n DayGridFillRenderer.prototype.renderFillRow = function (type, seg) {\r\n var colCnt = this.component.colCnt;\r\n var startCol = seg.leftCol;\r\n var endCol = seg.rightCol + 1;\r\n var className;\r\n var skeletonEl;\r\n var trEl;\r\n if (type === 'businessHours') {\r\n className = 'bgevent';\r\n }\r\n else {\r\n className = type.toLowerCase();\r\n }\r\n skeletonEl = $('<div class=\"fc-' + className + '-skeleton\">' +\r\n '<table><tr></tr></table>' +\r\n '</div>');\r\n trEl = skeletonEl.find('tr');\r\n if (startCol > 0) {\r\n trEl.append(\r\n // will create (startCol + 1) td's\r\n new Array(startCol + 1).join('<td></td>'));\r\n }\r\n trEl.append(seg.el.attr('colspan', endCol - startCol));\r\n if (endCol < colCnt) {\r\n trEl.append(\r\n // will create (colCnt - endCol) td's\r\n new Array(colCnt - endCol + 1).join('<td></td>'));\r\n }\r\n this.component.bookendCells(trEl);\r\n return skeletonEl;\r\n };\r\n return DayGridFillRenderer;\r\n}(FillRenderer_1.default));\r\nexports.default = DayGridFillRenderer;\r\n\n\n/***/ }),\n/* 246 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar moment = __webpack_require__(0);\r\nvar util_1 = __webpack_require__(4);\r\nvar BasicView_1 = __webpack_require__(67);\r\nvar MonthViewDateProfileGenerator_1 = __webpack_require__(247);\r\n/* A month view with day cells running in rows (one-per-week) and columns\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nvar MonthView = /** @class */ (function (_super) {\r\n tslib_1.__extends(MonthView, _super);\r\n function MonthView() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // Overrides the default BasicView behavior to have special multi-week auto-height logic\r\n MonthView.prototype.setGridHeight = function (height, isAuto) {\r\n // if auto, make the height of each row the height that it would be if there were 6 weeks\r\n if (isAuto) {\r\n height *= this.dayGrid.rowCnt / 6;\r\n }\r\n util_1.distributeHeight(this.dayGrid.rowEls, height, !isAuto); // if auto, don't compensate for height-hogging rows\r\n };\r\n MonthView.prototype.isDateInOtherMonth = function (date, dateProfile) {\r\n return date.month() !== moment.utc(dateProfile.currentUnzonedRange.startMs).month(); // TODO: optimize\r\n };\r\n return MonthView;\r\n}(BasicView_1.default));\r\nexports.default = MonthView;\r\nMonthView.prototype.dateProfileGeneratorClass = MonthViewDateProfileGenerator_1.default;\r\n\n\n/***/ }),\n/* 247 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar BasicViewDateProfileGenerator_1 = __webpack_require__(68);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar MonthViewDateProfileGenerator = /** @class */ (function (_super) {\r\n tslib_1.__extends(MonthViewDateProfileGenerator, _super);\r\n function MonthViewDateProfileGenerator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // Computes the date range that will be rendered.\r\n MonthViewDateProfileGenerator.prototype.buildRenderRange = function (currentUnzonedRange, currentRangeUnit, isRangeAllDay) {\r\n var renderUnzonedRange = _super.prototype.buildRenderRange.call(this, currentUnzonedRange, currentRangeUnit, isRangeAllDay);\r\n var start = this.msToUtcMoment(renderUnzonedRange.startMs, isRangeAllDay);\r\n var end = this.msToUtcMoment(renderUnzonedRange.endMs, isRangeAllDay);\r\n var rowCnt;\r\n // ensure 6 weeks\r\n if (this.opt('fixedWeekCount')) {\r\n rowCnt = Math.ceil(// could be partial weeks due to hiddenDays\r\n end.diff(start, 'weeks', true) // dontRound=true\r\n );\r\n end.add(6 - rowCnt, 'weeks');\r\n }\r\n return new UnzonedRange_1.default(start, end);\r\n };\r\n return MonthViewDateProfileGenerator;\r\n}(BasicViewDateProfileGenerator_1.default));\r\nexports.default = MonthViewDateProfileGenerator;\r\n\n\n/***/ }),\n/* 248 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar UnzonedRange_1 = __webpack_require__(5);\r\nvar View_1 = __webpack_require__(43);\r\nvar Scroller_1 = __webpack_require__(41);\r\nvar ListEventRenderer_1 = __webpack_require__(249);\r\nvar ListEventPointing_1 = __webpack_require__(250);\r\n/*\r\nResponsible for the scroller, and forwarding event-related actions into the \"grid\".\r\n*/\r\nvar ListView = /** @class */ (function (_super) {\r\n tslib_1.__extends(ListView, _super);\r\n function ListView(calendar, viewSpec) {\r\n var _this = _super.call(this, calendar, viewSpec) || this;\r\n _this.segSelector = '.fc-list-item'; // which elements accept event actions\r\n _this.scroller = new Scroller_1.default({\r\n overflowX: 'hidden',\r\n overflowY: 'auto'\r\n });\r\n return _this;\r\n }\r\n ListView.prototype.renderSkeleton = function () {\r\n this.el.addClass('fc-list-view ' +\r\n this.calendar.theme.getClass('listView'));\r\n this.scroller.render();\r\n this.scroller.el.appendTo(this.el);\r\n this.contentEl = this.scroller.scrollEl; // shortcut\r\n };\r\n ListView.prototype.unrenderSkeleton = function () {\r\n this.scroller.destroy(); // will remove the Grid too\r\n };\r\n ListView.prototype.updateSize = function (totalHeight, isAuto, isResize) {\r\n _super.prototype.updateSize.call(this, totalHeight, isAuto, isResize);\r\n this.scroller.clear(); // sets height to 'auto' and clears overflow\r\n if (!isAuto) {\r\n this.scroller.setHeight(this.computeScrollerHeight(totalHeight));\r\n }\r\n };\r\n ListView.prototype.computeScrollerHeight = function (totalHeight) {\r\n return totalHeight -\r\n util_1.subtractInnerElHeight(this.el, this.scroller.el); // everything that's NOT the scroller\r\n };\r\n ListView.prototype.renderDates = function (dateProfile) {\r\n var calendar = this.calendar;\r\n var dayStart = calendar.msToUtcMoment(dateProfile.renderUnzonedRange.startMs, true);\r\n var viewEnd = calendar.msToUtcMoment(dateProfile.renderUnzonedRange.endMs, true);\r\n var dayDates = [];\r\n var dayRanges = [];\r\n while (dayStart < viewEnd) {\r\n dayDates.push(dayStart.clone());\r\n dayRanges.push(new UnzonedRange_1.default(dayStart, dayStart.clone().add(1, 'day')));\r\n dayStart.add(1, 'day');\r\n }\r\n this.dayDates = dayDates;\r\n this.dayRanges = dayRanges;\r\n // all real rendering happens in EventRenderer\r\n };\r\n // slices by day\r\n ListView.prototype.componentFootprintToSegs = function (footprint) {\r\n var dayRanges = this.dayRanges;\r\n var dayIndex;\r\n var segRange;\r\n var seg;\r\n var segs = [];\r\n for (dayIndex = 0; dayIndex < dayRanges.length; dayIndex++) {\r\n segRange = footprint.unzonedRange.intersect(dayRanges[dayIndex]);\r\n if (segRange) {\r\n seg = {\r\n startMs: segRange.startMs,\r\n endMs: segRange.endMs,\r\n isStart: segRange.isStart,\r\n isEnd: segRange.isEnd,\r\n dayIndex: dayIndex\r\n };\r\n segs.push(seg);\r\n // detect when footprint won't go fully into the next day,\r\n // and mutate the latest seg to the be the end.\r\n if (!seg.isEnd && !footprint.isAllDay &&\r\n dayIndex + 1 < dayRanges.length &&\r\n footprint.unzonedRange.endMs < dayRanges[dayIndex + 1].startMs + this.nextDayThreshold) {\r\n seg.endMs = footprint.unzonedRange.endMs;\r\n seg.isEnd = true;\r\n break;\r\n }\r\n }\r\n }\r\n return segs;\r\n };\r\n ListView.prototype.renderEmptyMessage = function () {\r\n this.contentEl.html('<div class=\"fc-list-empty-wrap2\">' + // TODO: try less wraps\r\n '<div class=\"fc-list-empty-wrap1\">' +\r\n '<div class=\"fc-list-empty\">' +\r\n util_1.htmlEscape(this.opt('noEventsMessage')) +\r\n '</div>' +\r\n '</div>' +\r\n '</div>');\r\n };\r\n // render the event segments in the view\r\n ListView.prototype.renderSegList = function (allSegs) {\r\n var segsByDay = this.groupSegsByDay(allSegs); // sparse array\r\n var dayIndex;\r\n var daySegs;\r\n var i;\r\n var tableEl = $('<table class=\"fc-list-table ' + this.calendar.theme.getClass('tableList') + '\"><tbody></tbody></table>');\r\n var tbodyEl = tableEl.find('tbody');\r\n for (dayIndex = 0; dayIndex < segsByDay.length; dayIndex++) {\r\n daySegs = segsByDay[dayIndex];\r\n if (daySegs) { // sparse array, so might be undefined\r\n // append a day header\r\n tbodyEl.append(this.dayHeaderHtml(this.dayDates[dayIndex]));\r\n this.eventRenderer.sortEventSegs(daySegs);\r\n for (i = 0; i < daySegs.length; i++) {\r\n tbodyEl.append(daySegs[i].el); // append event row\r\n }\r\n }\r\n }\r\n this.contentEl.empty().append(tableEl);\r\n };\r\n // Returns a sparse array of arrays, segs grouped by their dayIndex\r\n ListView.prototype.groupSegsByDay = function (segs) {\r\n var segsByDay = []; // sparse array\r\n var i;\r\n var seg;\r\n for (i = 0; i < segs.length; i++) {\r\n seg = segs[i];\r\n (segsByDay[seg.dayIndex] || (segsByDay[seg.dayIndex] = []))\r\n .push(seg);\r\n }\r\n return segsByDay;\r\n };\r\n // generates the HTML for the day headers that live amongst the event rows\r\n ListView.prototype.dayHeaderHtml = function (dayDate) {\r\n var mainFormat = this.opt('listDayFormat');\r\n var altFormat = this.opt('listDayAltFormat');\r\n return '<tr class=\"fc-list-heading\" data-date=\"' + dayDate.format('YYYY-MM-DD') + '\">' +\r\n '<td class=\"' + (this.calendar.theme.getClass('tableListHeading') ||\r\n this.calendar.theme.getClass('widgetHeader')) + '\" colspan=\"3\">' +\r\n (mainFormat ?\r\n this.buildGotoAnchorHtml(dayDate, { 'class': 'fc-list-heading-main' }, util_1.htmlEscape(dayDate.format(mainFormat)) // inner HTML\r\n ) :\r\n '') +\r\n (altFormat ?\r\n this.buildGotoAnchorHtml(dayDate, { 'class': 'fc-list-heading-alt' }, util_1.htmlEscape(dayDate.format(altFormat)) // inner HTML\r\n ) :\r\n '') +\r\n '</td>' +\r\n '</tr>';\r\n };\r\n return ListView;\r\n}(View_1.default));\r\nexports.default = ListView;\r\nListView.prototype.eventRendererClass = ListEventRenderer_1.default;\r\nListView.prototype.eventPointingClass = ListEventPointing_1.default;\r\n\n\n/***/ }),\n/* 249 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar util_1 = __webpack_require__(4);\r\nvar EventRenderer_1 = __webpack_require__(44);\r\nvar ListEventRenderer = /** @class */ (function (_super) {\r\n tslib_1.__extends(ListEventRenderer, _super);\r\n function ListEventRenderer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ListEventRenderer.prototype.renderFgSegs = function (segs) {\r\n if (!segs.length) {\r\n this.component.renderEmptyMessage();\r\n }\r\n else {\r\n this.component.renderSegList(segs);\r\n }\r\n };\r\n // generates the HTML for a single event row\r\n ListEventRenderer.prototype.fgSegHtml = function (seg) {\r\n var view = this.view;\r\n var calendar = view.calendar;\r\n var theme = calendar.theme;\r\n var eventFootprint = seg.footprint;\r\n var eventDef = eventFootprint.eventDef;\r\n var componentFootprint = eventFootprint.componentFootprint;\r\n var url = eventDef.url;\r\n var classes = ['fc-list-item'].concat(this.getClasses(eventDef));\r\n var bgColor = this.getBgColor(eventDef);\r\n var timeHtml;\r\n if (componentFootprint.isAllDay) {\r\n timeHtml = view.getAllDayHtml();\r\n }\r\n else if (view.isMultiDayRange(componentFootprint.unzonedRange)) {\r\n if (seg.isStart || seg.isEnd) { // outer segment that probably lasts part of the day\r\n timeHtml = util_1.htmlEscape(this._getTimeText(calendar.msToMoment(seg.startMs), calendar.msToMoment(seg.endMs), componentFootprint.isAllDay));\r\n }\r\n else { // inner segment that lasts the whole day\r\n timeHtml = view.getAllDayHtml();\r\n }\r\n }\r\n else {\r\n // Display the normal time text for the *event's* times\r\n timeHtml = util_1.htmlEscape(this.getTimeText(eventFootprint));\r\n }\r\n if (url) {\r\n classes.push('fc-has-url');\r\n }\r\n return '<tr class=\"' + classes.join(' ') + '\">' +\r\n (this.displayEventTime ?\r\n '<td class=\"fc-list-item-time ' + theme.getClass('widgetContent') + '\">' +\r\n (timeHtml || '') +\r\n '</td>' :\r\n '') +\r\n '<td class=\"fc-list-item-marker ' + theme.getClass('widgetContent') + '\">' +\r\n '<span class=\"fc-event-dot\"' +\r\n (bgColor ?\r\n ' style=\"background-color:' + bgColor + '\"' :\r\n '') +\r\n '></span>' +\r\n '</td>' +\r\n '<td class=\"fc-list-item-title ' + theme.getClass('widgetContent') + '\">' +\r\n '<a' + (url ? ' href=\"' + util_1.htmlEscape(url) + '\"' : '') + '>' +\r\n util_1.htmlEscape(eventDef.title || '') +\r\n '</a>' +\r\n '</td>' +\r\n '</tr>';\r\n };\r\n // like \"4:00am\"\r\n ListEventRenderer.prototype.computeEventTimeFormat = function () {\r\n return this.opt('mediumTimeFormat');\r\n };\r\n return ListEventRenderer;\r\n}(EventRenderer_1.default));\r\nexports.default = ListEventRenderer;\r\n\n\n/***/ }),\n/* 250 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar EventPointing_1 = __webpack_require__(64);\r\nvar ListEventPointing = /** @class */ (function (_super) {\r\n tslib_1.__extends(ListEventPointing, _super);\r\n function ListEventPointing() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n // for events with a url, the whole <tr> should be clickable,\r\n // but it's impossible to wrap with an <a> tag. simulate this.\r\n ListEventPointing.prototype.handleClick = function (seg, ev) {\r\n var url;\r\n _super.prototype.handleClick.call(this, seg, ev); // might prevent the default action\r\n // not clicking on or within an <a> with an href\r\n if (!$(ev.target).closest('a[href]').length) {\r\n url = seg.footprint.eventDef.url;\r\n if (url && !ev.isDefaultPrevented()) { // jsEvent not cancelled in handler\r\n window.location.href = url; // simulate link click\r\n }\r\n }\r\n };\r\n return ListEventPointing;\r\n}(EventPointing_1.default));\r\nexports.default = ListEventPointing;\r\n\n\n/***/ }),\n/* 251 */,\n/* 252 */,\n/* 253 */,\n/* 254 */,\n/* 255 */,\n/* 256 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar $ = __webpack_require__(3);\r\nvar exportHooks = __webpack_require__(18);\r\nvar util_1 = __webpack_require__(4);\r\nvar Calendar_1 = __webpack_require__(232);\r\n// for intentional side-effects\r\n__webpack_require__(11);\r\n__webpack_require__(49);\r\n__webpack_require__(260);\r\n__webpack_require__(261);\r\n__webpack_require__(264);\r\n__webpack_require__(265);\r\n__webpack_require__(266);\r\n__webpack_require__(267);\r\n$.fullCalendar = exportHooks;\r\n$.fn.fullCalendar = function (options) {\r\n var args = Array.prototype.slice.call(arguments, 1); // for a possible method call\r\n var res = this; // what this function will return (this jQuery object by default)\r\n this.each(function (i, _element) {\r\n var element = $(_element);\r\n var calendar = element.data('fullCalendar'); // get the existing calendar object (if any)\r\n var singleRes; // the returned value of this single method call\r\n // a method call\r\n if (typeof options === 'string') {\r\n if (options === 'getCalendar') {\r\n if (!i) { // first element only\r\n res = calendar;\r\n }\r\n }\r\n else if (options === 'destroy') { // don't warn if no calendar object\r\n if (calendar) {\r\n calendar.destroy();\r\n element.removeData('fullCalendar');\r\n }\r\n }\r\n else if (!calendar) {\r\n util_1.warn('Attempting to call a FullCalendar method on an element with no calendar.');\r\n }\r\n else if ($.isFunction(calendar[options])) {\r\n singleRes = calendar[options].apply(calendar, args);\r\n if (!i) {\r\n res = singleRes; // record the first method call result\r\n }\r\n if (options === 'destroy') { // for the destroy method, must remove Calendar object data\r\n element.removeData('fullCalendar');\r\n }\r\n }\r\n else {\r\n util_1.warn(\"'\" + options + \"' is an unknown FullCalendar method.\");\r\n }\r\n }\r\n else if (!calendar) { // don't initialize twice\r\n calendar = new Calendar_1.default(element, options);\r\n element.data('fullCalendar', calendar);\r\n calendar.render();\r\n }\r\n });\r\n return res;\r\n};\r\nmodule.exports = exportHooks;\r\n\n\n/***/ }),\n/* 257 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\n/* Toolbar with buttons and title\r\n----------------------------------------------------------------------------------------------------------------------*/\r\nvar Toolbar = /** @class */ (function () {\r\n function Toolbar(calendar, toolbarOptions) {\r\n this.el = null; // mirrors local `el`\r\n this.viewsWithButtons = [];\r\n this.calendar = calendar;\r\n this.toolbarOptions = toolbarOptions;\r\n }\r\n // method to update toolbar-specific options, not calendar-wide options\r\n Toolbar.prototype.setToolbarOptions = function (newToolbarOptions) {\r\n this.toolbarOptions = newToolbarOptions;\r\n };\r\n // can be called repeatedly and will rerender\r\n Toolbar.prototype.render = function () {\r\n var sections = this.toolbarOptions.layout;\r\n var el = this.el;\r\n if (sections) {\r\n if (!el) {\r\n el = this.el = $(\"<div class='fc-toolbar \" + this.toolbarOptions.extraClasses + \"'>\");\r\n }\r\n else {\r\n el.empty();\r\n }\r\n el.append(this.renderSection('left'))\r\n .append(this.renderSection('right'))\r\n .append(this.renderSection('center'))\r\n .append('<div class=\"fc-clear\"></div>');\r\n }\r\n else {\r\n this.removeElement();\r\n }\r\n };\r\n Toolbar.prototype.removeElement = function () {\r\n if (this.el) {\r\n this.el.remove();\r\n this.el = null;\r\n }\r\n };\r\n Toolbar.prototype.renderSection = function (position) {\r\n var _this = this;\r\n var calendar = this.calendar;\r\n var theme = calendar.theme;\r\n var optionsManager = calendar.optionsManager;\r\n var viewSpecManager = calendar.viewSpecManager;\r\n var sectionEl = $('<div class=\"fc-' + position + '\">');\r\n var buttonStr = this.toolbarOptions.layout[position];\r\n var calendarCustomButtons = optionsManager.get('customButtons') || {};\r\n var calendarButtonTextOverrides = optionsManager.overrides.buttonText || {};\r\n var calendarButtonText = optionsManager.get('buttonText') || {};\r\n if (buttonStr) {\r\n $.each(buttonStr.split(' '), function (i, buttonGroupStr) {\r\n var groupChildren = $();\r\n var isOnlyButtons = true;\r\n var groupEl;\r\n $.each(buttonGroupStr.split(','), function (j, buttonName) {\r\n var customButtonProps;\r\n var viewSpec;\r\n var buttonClick;\r\n var buttonIcon; // only one of these will be set\r\n var buttonText; // \"\r\n var buttonInnerHtml;\r\n var buttonClasses;\r\n var buttonEl;\r\n var buttonAriaAttr;\r\n if (buttonName === 'title') {\r\n groupChildren = groupChildren.add($('<h2> </h2>')); // we always want it to take up height\r\n isOnlyButtons = false;\r\n }\r\n else {\r\n if ((customButtonProps = calendarCustomButtons[buttonName])) {\r\n buttonClick = function (ev) {\r\n if (customButtonProps.click) {\r\n customButtonProps.click.call(buttonEl[0], ev);\r\n }\r\n };\r\n (buttonIcon = theme.getCustomButtonIconClass(customButtonProps)) ||\r\n (buttonIcon = theme.getIconClass(buttonName)) ||\r\n (buttonText = customButtonProps.text);\r\n }\r\n else if ((viewSpec = viewSpecManager.getViewSpec(buttonName))) {\r\n _this.viewsWithButtons.push(buttonName);\r\n buttonClick = function () {\r\n calendar.changeView(buttonName);\r\n };\r\n (buttonText = viewSpec.buttonTextOverride) ||\r\n (buttonIcon = theme.getIconClass(buttonName)) ||\r\n (buttonText = viewSpec.buttonTextDefault);\r\n }\r\n else if (calendar[buttonName]) { // a calendar method\r\n buttonClick = function () {\r\n calendar[buttonName]();\r\n };\r\n (buttonText = calendarButtonTextOverrides[buttonName]) ||\r\n (buttonIcon = theme.getIconClass(buttonName)) ||\r\n (buttonText = calendarButtonText[buttonName]);\r\n // ^ everything else is considered default\r\n }\r\n if (buttonClick) {\r\n buttonClasses = [\r\n 'fc-' + buttonName + '-button',\r\n theme.getClass('button'),\r\n theme.getClass('stateDefault')\r\n ];\r\n if (buttonText) {\r\n buttonInnerHtml = util_1.htmlEscape(buttonText);\r\n buttonAriaAttr = '';\r\n }\r\n else if (buttonIcon) {\r\n buttonInnerHtml = \"<span class='\" + buttonIcon + \"'></span>\";\r\n buttonAriaAttr = ' aria-label=\"' + buttonName + '\"';\r\n }\r\n buttonEl = $(// type=\"button\" so that it doesn't submit a form\r\n '<button type=\"button\" class=\"' + buttonClasses.join(' ') + '\"' +\r\n buttonAriaAttr +\r\n '>' + buttonInnerHtml + '</button>')\r\n .click(function (ev) {\r\n // don't process clicks for disabled buttons\r\n if (!buttonEl.hasClass(theme.getClass('stateDisabled'))) {\r\n buttonClick(ev);\r\n // after the click action, if the button becomes the \"active\" tab, or disabled,\r\n // it should never have a hover class, so remove it now.\r\n if (buttonEl.hasClass(theme.getClass('stateActive')) ||\r\n buttonEl.hasClass(theme.getClass('stateDisabled'))) {\r\n buttonEl.removeClass(theme.getClass('stateHover'));\r\n }\r\n }\r\n })\r\n .mousedown(function () {\r\n // the *down* effect (mouse pressed in).\r\n // only on buttons that are not the \"active\" tab, or disabled\r\n buttonEl\r\n .not('.' + theme.getClass('stateActive'))\r\n .not('.' + theme.getClass('stateDisabled'))\r\n .addClass(theme.getClass('stateDown'));\r\n })\r\n .mouseup(function () {\r\n // undo the *down* effect\r\n buttonEl.removeClass(theme.getClass('stateDown'));\r\n })\r\n .hover(function () {\r\n // the *hover* effect.\r\n // only on buttons that are not the \"active\" tab, or disabled\r\n buttonEl\r\n .not('.' + theme.getClass('stateActive'))\r\n .not('.' + theme.getClass('stateDisabled'))\r\n .addClass(theme.getClass('stateHover'));\r\n }, function () {\r\n // undo the *hover* effect\r\n buttonEl\r\n .removeClass(theme.getClass('stateHover'))\r\n .removeClass(theme.getClass('stateDown')); // if mouseleave happens before mouseup\r\n });\r\n groupChildren = groupChildren.add(buttonEl);\r\n }\r\n }\r\n });\r\n if (isOnlyButtons) {\r\n groupChildren\r\n .first().addClass(theme.getClass('cornerLeft')).end()\r\n .last().addClass(theme.getClass('cornerRight')).end();\r\n }\r\n if (groupChildren.length > 1) {\r\n groupEl = $('<div>');\r\n if (isOnlyButtons) {\r\n groupEl.addClass(theme.getClass('buttonGroup'));\r\n }\r\n groupEl.append(groupChildren);\r\n sectionEl.append(groupEl);\r\n }\r\n else {\r\n sectionEl.append(groupChildren); // 1 or 0 children\r\n }\r\n });\r\n }\r\n return sectionEl;\r\n };\r\n Toolbar.prototype.updateTitle = function (text) {\r\n if (this.el) {\r\n this.el.find('h2').text(text);\r\n }\r\n };\r\n Toolbar.prototype.activateButton = function (buttonName) {\r\n if (this.el) {\r\n this.el.find('.fc-' + buttonName + '-button')\r\n .addClass(this.calendar.theme.getClass('stateActive'));\r\n }\r\n };\r\n Toolbar.prototype.deactivateButton = function (buttonName) {\r\n if (this.el) {\r\n this.el.find('.fc-' + buttonName + '-button')\r\n .removeClass(this.calendar.theme.getClass('stateActive'));\r\n }\r\n };\r\n Toolbar.prototype.disableButton = function (buttonName) {\r\n if (this.el) {\r\n this.el.find('.fc-' + buttonName + '-button')\r\n .prop('disabled', true)\r\n .addClass(this.calendar.theme.getClass('stateDisabled'));\r\n }\r\n };\r\n Toolbar.prototype.enableButton = function (buttonName) {\r\n if (this.el) {\r\n this.el.find('.fc-' + buttonName + '-button')\r\n .prop('disabled', false)\r\n .removeClass(this.calendar.theme.getClass('stateDisabled'));\r\n }\r\n };\r\n Toolbar.prototype.getViewsWithButtons = function () {\r\n return this.viewsWithButtons;\r\n };\r\n return Toolbar;\r\n}());\r\nexports.default = Toolbar;\r\n\n\n/***/ }),\n/* 258 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar $ = __webpack_require__(3);\r\nvar util_1 = __webpack_require__(4);\r\nvar options_1 = __webpack_require__(33);\r\nvar locale_1 = __webpack_require__(32);\r\nvar Model_1 = __webpack_require__(51);\r\nvar OptionsManager = /** @class */ (function (_super) {\r\n tslib_1.__extends(OptionsManager, _super);\r\n function OptionsManager(_calendar, overrides) {\r\n var _this = _super.call(this) || this;\r\n _this._calendar = _calendar;\r\n _this.overrides = $.extend({}, overrides); // make a copy\r\n _this.dynamicOverrides = {};\r\n _this.compute();\r\n return _this;\r\n }\r\n OptionsManager.prototype.add = function (newOptionHash) {\r\n var optionCnt = 0;\r\n var optionName;\r\n this.recordOverrides(newOptionHash); // will trigger this model's watchers\r\n for (optionName in newOptionHash) {\r\n optionCnt++;\r\n }\r\n // special-case handling of single option change.\r\n // if only one option change, `optionName` will be its name.\r\n if (optionCnt === 1) {\r\n if (optionName === 'height' || optionName === 'contentHeight' || optionName === 'aspectRatio') {\r\n this._calendar.updateViewSize(true); // isResize=true\r\n return;\r\n }\r\n else if (optionName === 'defaultDate') {\r\n return; // can't change date this way. use gotoDate instead\r\n }\r\n else if (optionName === 'businessHours') {\r\n return; // this model already reacts to this\r\n }\r\n else if (/^(event|select)(Overlap|Constraint|Allow)$/.test(optionName)) {\r\n return; // doesn't affect rendering. only interactions.\r\n }\r\n else if (optionName === 'timezone') {\r\n this._calendar.view.flash('initialEvents');\r\n return;\r\n }\r\n }\r\n // catch-all. rerender the header and footer and rebuild/rerender the current view\r\n this._calendar.renderHeader();\r\n this._calendar.renderFooter();\r\n // even non-current views will be affected by this option change. do before rerender\r\n // TODO: detangle\r\n this._calendar.viewsByType = {};\r\n this._calendar.reinitView();\r\n };\r\n // Computes the flattened options hash for the calendar and assigns to `this.options`.\r\n // Assumes this.overrides and this.dynamicOverrides have already been initialized.\r\n OptionsManager.prototype.compute = function () {\r\n var locale;\r\n var localeDefaults;\r\n var isRTL;\r\n var dirDefaults;\r\n var rawOptions;\r\n locale = util_1.firstDefined(// explicit locale option given?\r\n this.dynamicOverrides.locale, this.overrides.locale);\r\n localeDefaults = locale_1.localeOptionHash[locale];\r\n if (!localeDefaults) { // explicit locale option not given or invalid?\r\n locale = options_1.globalDefaults.locale;\r\n localeDefaults = locale_1.localeOptionHash[locale] || {};\r\n }\r\n isRTL = util_1.firstDefined(// based on options computed so far, is direction RTL?\r\n this.dynamicOverrides.isRTL, this.overrides.isRTL, localeDefaults.isRTL, options_1.globalDefaults.isRTL);\r\n dirDefaults = isRTL ? options_1.rtlDefaults : {};\r\n this.dirDefaults = dirDefaults;\r\n this.localeDefaults = localeDefaults;\r\n rawOptions = options_1.mergeOptions([\r\n options_1.globalDefaults,\r\n dirDefaults,\r\n localeDefaults,\r\n this.overrides,\r\n this.dynamicOverrides\r\n ]);\r\n locale_1.populateInstanceComputableOptions(rawOptions); // fill in gaps with computed options\r\n this.reset(rawOptions);\r\n };\r\n // stores the new options internally, but does not rerender anything.\r\n OptionsManager.prototype.recordOverrides = function (newOptionHash) {\r\n var optionName;\r\n for (optionName in newOptionHash) {\r\n this.dynamicOverrides[optionName] = newOptionHash[optionName];\r\n }\r\n this._calendar.viewSpecManager.clearCache(); // the dynamic override invalidates the options in this cache, so just clear it\r\n this.compute(); // this.options needs to be recomputed after the dynamic override\r\n };\r\n return OptionsManager;\r\n}(Model_1.default));\r\nexports.default = OptionsManager;\r\n\n\n/***/ }),\n/* 259 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar moment = __webpack_require__(0);\r\nvar $ = __webpack_require__(3);\r\nvar ViewRegistry_1 = __webpack_require__(24);\r\nvar util_1 = __webpack_require__(4);\r\nvar options_1 = __webpack_require__(33);\r\nvar locale_1 = __webpack_require__(32);\r\nvar ViewSpecManager = /** @class */ (function () {\r\n function ViewSpecManager(optionsManager, _calendar) {\r\n this.optionsManager = optionsManager;\r\n this._calendar = _calendar;\r\n this.clearCache();\r\n }\r\n ViewSpecManager.prototype.clearCache = function () {\r\n this.viewSpecCache = {};\r\n };\r\n // Gets information about how to create a view. Will use a cache.\r\n ViewSpecManager.prototype.getViewSpec = function (viewType) {\r\n var cache = this.viewSpecCache;\r\n return cache[viewType] || (cache[viewType] = this.buildViewSpec(viewType));\r\n };\r\n // Given a duration singular unit, like \"week\" or \"day\", finds a matching view spec.\r\n // Preference is given to views that have corresponding buttons.\r\n ViewSpecManager.prototype.getUnitViewSpec = function (unit) {\r\n var viewTypes;\r\n var i;\r\n var spec;\r\n if ($.inArray(unit, util_1.unitsDesc) !== -1) {\r\n // put views that have buttons first. there will be duplicates, but oh well\r\n viewTypes = this._calendar.header.getViewsWithButtons(); // TODO: include footer as well?\r\n $.each(ViewRegistry_1.viewHash, function (viewType) {\r\n viewTypes.push(viewType);\r\n });\r\n for (i = 0; i < viewTypes.length; i++) {\r\n spec = this.getViewSpec(viewTypes[i]);\r\n if (spec) {\r\n if (spec.singleUnit === unit) {\r\n return spec;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n // Builds an object with information on how to create a given view\r\n ViewSpecManager.prototype.buildViewSpec = function (requestedViewType) {\r\n var viewOverrides = this.optionsManager.overrides.views || {};\r\n var specChain = []; // for the view. lowest to highest priority\r\n var defaultsChain = []; // for the view. lowest to highest priority\r\n var overridesChain = []; // for the view. lowest to highest priority\r\n var viewType = requestedViewType;\r\n var spec; // for the view\r\n var overrides; // for the view\r\n var durationInput;\r\n var duration;\r\n var unit;\r\n // iterate from the specific view definition to a more general one until we hit an actual View class\r\n while (viewType) {\r\n spec = ViewRegistry_1.viewHash[viewType];\r\n overrides = viewOverrides[viewType];\r\n viewType = null; // clear. might repopulate for another iteration\r\n if (typeof spec === 'function') { // TODO: deprecate\r\n spec = { 'class': spec };\r\n }\r\n if (spec) {\r\n specChain.unshift(spec);\r\n defaultsChain.unshift(spec.defaults || {});\r\n durationInput = durationInput || spec.duration;\r\n viewType = viewType || spec.type;\r\n }\r\n if (overrides) {\r\n overridesChain.unshift(overrides); // view-specific option hashes have options at zero-level\r\n durationInput = durationInput || overrides.duration;\r\n viewType = viewType || overrides.type;\r\n }\r\n }\r\n spec = util_1.mergeProps(specChain);\r\n spec.type = requestedViewType;\r\n if (!spec['class']) {\r\n return false;\r\n }\r\n // fall back to top-level `duration` option\r\n durationInput = durationInput ||\r\n this.optionsManager.dynamicOverrides.duration ||\r\n this.optionsManager.overrides.duration;\r\n if (durationInput) {\r\n duration = moment.duration(durationInput);\r\n if (duration.valueOf()) { // valid?\r\n unit = util_1.computeDurationGreatestUnit(duration, durationInput);\r\n spec.duration = duration;\r\n spec.durationUnit = unit;\r\n // view is a single-unit duration, like \"week\" or \"day\"\r\n // incorporate options for this. lowest priority\r\n if (duration.as(unit) === 1) {\r\n spec.singleUnit = unit;\r\n overridesChain.unshift(viewOverrides[unit] || {});\r\n }\r\n }\r\n }\r\n spec.defaults = options_1.mergeOptions(defaultsChain);\r\n spec.overrides = options_1.mergeOptions(overridesChain);\r\n this.buildViewSpecOptions(spec);\r\n this.buildViewSpecButtonText(spec, requestedViewType);\r\n return spec;\r\n };\r\n // Builds and assigns a view spec's options object from its already-assigned defaults and overrides\r\n ViewSpecManager.prototype.buildViewSpecOptions = function (spec) {\r\n var optionsManager = this.optionsManager;\r\n spec.options = options_1.mergeOptions([\r\n options_1.globalDefaults,\r\n spec.defaults,\r\n optionsManager.dirDefaults,\r\n optionsManager.localeDefaults,\r\n optionsManager.overrides,\r\n spec.overrides,\r\n optionsManager.dynamicOverrides // dynamically set via setter. highest precedence\r\n ]);\r\n locale_1.populateInstanceComputableOptions(spec.options);\r\n };\r\n // Computes and assigns a view spec's buttonText-related options\r\n ViewSpecManager.prototype.buildViewSpecButtonText = function (spec, requestedViewType) {\r\n var optionsManager = this.optionsManager;\r\n // given an options object with a possible `buttonText` hash, lookup the buttonText for the\r\n // requested view, falling back to a generic unit entry like \"week\" or \"day\"\r\n function queryButtonText(options) {\r\n var buttonText = options.buttonText || {};\r\n return buttonText[requestedViewType] ||\r\n // view can decide to look up a certain key\r\n (spec.buttonTextKey ? buttonText[spec.buttonTextKey] : null) ||\r\n // a key like \"month\"\r\n (spec.singleUnit ? buttonText[spec.singleUnit] : null);\r\n }\r\n // highest to lowest priority\r\n spec.buttonTextOverride =\r\n queryButtonText(optionsManager.dynamicOverrides) ||\r\n queryButtonText(optionsManager.overrides) || // constructor-specified buttonText lookup hash takes precedence\r\n spec.overrides.buttonText; // `buttonText` for view-specific options is a string\r\n // highest to lowest priority. mirrors buildViewSpecOptions\r\n spec.buttonTextDefault =\r\n queryButtonText(optionsManager.localeDefaults) ||\r\n queryButtonText(optionsManager.dirDefaults) ||\r\n spec.defaults.buttonText || // a single string. from ViewSubclass.defaults\r\n queryButtonText(options_1.globalDefaults) ||\r\n (spec.duration ? this._calendar.humanizeDuration(spec.duration) : null) || // like \"3 days\"\r\n requestedViewType; // fall back to given view name\r\n };\r\n return ViewSpecManager;\r\n}());\r\nexports.default = ViewSpecManager;\r\n\n\n/***/ }),\n/* 260 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar EventSourceParser_1 = __webpack_require__(38);\r\nvar ArrayEventSource_1 = __webpack_require__(56);\r\nvar FuncEventSource_1 = __webpack_require__(223);\r\nvar JsonFeedEventSource_1 = __webpack_require__(224);\r\nEventSourceParser_1.default.registerClass(ArrayEventSource_1.default);\r\nEventSourceParser_1.default.registerClass(FuncEventSource_1.default);\r\nEventSourceParser_1.default.registerClass(JsonFeedEventSource_1.default);\r\n\n\n/***/ }),\n/* 261 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ThemeRegistry_1 = __webpack_require__(57);\r\nvar StandardTheme_1 = __webpack_require__(221);\r\nvar JqueryUiTheme_1 = __webpack_require__(222);\r\nvar Bootstrap3Theme_1 = __webpack_require__(262);\r\nvar Bootstrap4Theme_1 = __webpack_require__(263);\r\nThemeRegistry_1.defineThemeSystem('standard', StandardTheme_1.default);\r\nThemeRegistry_1.defineThemeSystem('jquery-ui', JqueryUiTheme_1.default);\r\nThemeRegistry_1.defineThemeSystem('bootstrap3', Bootstrap3Theme_1.default);\r\nThemeRegistry_1.defineThemeSystem('bootstrap4', Bootstrap4Theme_1.default);\r\n\n\n/***/ }),\n/* 262 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar Theme_1 = __webpack_require__(22);\r\nvar Bootstrap3Theme = /** @class */ (function (_super) {\r\n tslib_1.__extends(Bootstrap3Theme, _super);\r\n function Bootstrap3Theme() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return Bootstrap3Theme;\r\n}(Theme_1.default));\r\nexports.default = Bootstrap3Theme;\r\nBootstrap3Theme.prototype.classes = {\r\n widget: 'fc-bootstrap3',\r\n tableGrid: 'table-bordered',\r\n tableList: 'table',\r\n tableListHeading: 'active',\r\n buttonGroup: 'btn-group',\r\n button: 'btn btn-default',\r\n stateActive: 'active',\r\n stateDisabled: 'disabled',\r\n today: 'alert alert-info',\r\n popover: 'panel panel-default',\r\n popoverHeader: 'panel-heading',\r\n popoverContent: 'panel-body',\r\n // day grid\r\n // for left/right border color when border is inset from edges (all-day in agenda view)\r\n // avoid `panel` class b/c don't want margins/radius. only border color.\r\n headerRow: 'panel-default',\r\n dayRow: 'panel-default',\r\n // list view\r\n listView: 'panel panel-default'\r\n};\r\nBootstrap3Theme.prototype.baseIconClass = 'glyphicon';\r\nBootstrap3Theme.prototype.iconClasses = {\r\n close: 'glyphicon-remove',\r\n prev: 'glyphicon-chevron-left',\r\n next: 'glyphicon-chevron-right',\r\n prevYear: 'glyphicon-backward',\r\n nextYear: 'glyphicon-forward'\r\n};\r\nBootstrap3Theme.prototype.iconOverrideOption = 'bootstrapGlyphicons';\r\nBootstrap3Theme.prototype.iconOverrideCustomButtonOption = 'bootstrapGlyphicon';\r\nBootstrap3Theme.prototype.iconOverridePrefix = 'glyphicon-';\r\n\n\n/***/ }),\n/* 263 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar tslib_1 = __webpack_require__(2);\r\nvar Theme_1 = __webpack_require__(22);\r\nvar Bootstrap4Theme = /** @class */ (function (_super) {\r\n tslib_1.__extends(Bootstrap4Theme, _super);\r\n function Bootstrap4Theme() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n return Bootstrap4Theme;\r\n}(Theme_1.default));\r\nexports.default = Bootstrap4Theme;\r\nBootstrap4Theme.prototype.classes = {\r\n widget: 'fc-bootstrap4',\r\n tableGrid: 'table-bordered',\r\n tableList: 'table',\r\n tableListHeading: 'table-active',\r\n buttonGroup: 'btn-group',\r\n button: 'btn btn-primary',\r\n stateActive: 'active',\r\n stateDisabled: 'disabled',\r\n today: 'alert alert-info',\r\n popover: 'card card-primary',\r\n popoverHeader: 'card-header',\r\n popoverContent: 'card-body',\r\n // day grid\r\n // for left/right border color when border is inset from edges (all-day in agenda view)\r\n // avoid `table` class b/c don't want margins/padding/structure. only border color.\r\n headerRow: 'table-bordered',\r\n dayRow: 'table-bordered',\r\n // list view\r\n listView: 'card card-primary'\r\n};\r\nBootstrap4Theme.prototype.baseIconClass = 'fa';\r\nBootstrap4Theme.prototype.iconClasses = {\r\n close: 'fa-times',\r\n prev: 'fa-chevron-left',\r\n next: 'fa-chevron-right',\r\n prevYear: 'fa-angle-double-left',\r\n nextYear: 'fa-angle-double-right'\r\n};\r\nBootstrap4Theme.prototype.iconOverrideOption = 'bootstrapFontAwesome';\r\nBootstrap4Theme.prototype.iconOverrideCustomButtonOption = 'bootstrapFontAwesome';\r\nBootstrap4Theme.prototype.iconOverridePrefix = 'fa-';\r\n\n\n/***/ }),\n/* 264 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ViewRegistry_1 = __webpack_require__(24);\r\nvar BasicView_1 = __webpack_require__(67);\r\nvar MonthView_1 = __webpack_require__(246);\r\nViewRegistry_1.defineView('basic', {\r\n 'class': BasicView_1.default\r\n});\r\nViewRegistry_1.defineView('basicDay', {\r\n type: 'basic',\r\n duration: { days: 1 }\r\n});\r\nViewRegistry_1.defineView('basicWeek', {\r\n type: 'basic',\r\n duration: { weeks: 1 }\r\n});\r\nViewRegistry_1.defineView('month', {\r\n 'class': MonthView_1.default,\r\n duration: { months: 1 },\r\n defaults: {\r\n fixedWeekCount: true\r\n }\r\n});\r\n\n\n/***/ }),\n/* 265 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ViewRegistry_1 = __webpack_require__(24);\r\nvar AgendaView_1 = __webpack_require__(238);\r\nViewRegistry_1.defineView('agenda', {\r\n 'class': AgendaView_1.default,\r\n defaults: {\r\n allDaySlot: true,\r\n slotDuration: '00:30:00',\r\n slotEventOverlap: true // a bad name. confused with overlap/constraint system\r\n }\r\n});\r\nViewRegistry_1.defineView('agendaDay', {\r\n type: 'agenda',\r\n duration: { days: 1 }\r\n});\r\nViewRegistry_1.defineView('agendaWeek', {\r\n type: 'agenda',\r\n duration: { weeks: 1 }\r\n});\r\n\n\n/***/ }),\n/* 266 */\n/***/ (function(module, exports, __webpack_require__) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ViewRegistry_1 = __webpack_require__(24);\r\nvar ListView_1 = __webpack_require__(248);\r\nViewRegistry_1.defineView('list', {\r\n 'class': ListView_1.default,\r\n buttonTextKey: 'list',\r\n defaults: {\r\n buttonText: 'list',\r\n listDayFormat: 'LL',\r\n noEventsMessage: 'No events to display'\r\n }\r\n});\r\nViewRegistry_1.defineView('listDay', {\r\n type: 'list',\r\n duration: { days: 1 },\r\n defaults: {\r\n listDayFormat: 'dddd' // day-of-week is all we need. full date is probably in header\r\n }\r\n});\r\nViewRegistry_1.defineView('listWeek', {\r\n type: 'list',\r\n duration: { weeks: 1 },\r\n defaults: {\r\n listDayFormat: 'dddd',\r\n listDayAltFormat: 'LL'\r\n }\r\n});\r\nViewRegistry_1.defineView('listMonth', {\r\n type: 'list',\r\n duration: { month: 1 },\r\n defaults: {\r\n listDayAltFormat: 'dddd' // day-of-week is nice-to-have\r\n }\r\n});\r\nViewRegistry_1.defineView('listYear', {\r\n type: 'list',\r\n duration: { year: 1 },\r\n defaults: {\r\n listDayAltFormat: 'dddd' // day-of-week is nice-to-have\r\n }\r\n});\r\n\n\n/***/ }),\n/* 267 */\n/***/ (function(module, exports) {\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\n\n/***/ })\n/******/ ]);\n});","var card=function(r){var e={};function t(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return r[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}return t.m=r,t.c=e,t.d=function(r,e,a){t.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:a})},t.r=function(r){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(r,\"__esModule\",{value:!0})},t.t=function(r,e){if(1&e&&(r=t(r)),8&e)return r;if(4&e&&\"object\"==typeof r&&r&&r.__esModule)return r;var a=Object.create(null);if(t.r(a),Object.defineProperty(a,\"default\",{enumerable:!0,value:r}),2&e&&\"string\"!=typeof r)for(var n in r)t.d(a,n,function(e){return r[e]}.bind(null,n));return a},t.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(e,\"a\",e),e},t.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},t.p=\"\",t(t.s=5)}([function(r,e,t){\"use strict\";var a=t(4),n=t.n(a)()((function(r){return r[1]}));n.push([r.i,'.jp-card.jp-card-safari.jp-card-identified .jp-card-front:before,.jp-card.jp-card-safari.jp-card-identified .jp-card-back:before{background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 1px, rgba(255,255,255,0) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.03) 4px),repeating-linear-gradient(90deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(210deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),-webkit-linear-gradient(-245deg, rgba(255,255,255,0) 50%,rgba(255,255,255,0.2) 70%,rgba(255,255,255,0) 90%);background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 1px, rgba(255,255,255,0) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.03) 4px),repeating-linear-gradient(90deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(210deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),linear-gradient(-25deg, rgba(255,255,255,0) 50%,rgba(255,255,255,0.2) 70%,rgba(255,255,255,0) 90%)}.jp-card.jp-card-ie-10.jp-card-flipped,.jp-card.jp-card-ie-11.jp-card-flipped{-webkit-transform:0deg;-moz-transform:0deg;-ms-transform:0deg;-o-transform:0deg;transform:0deg}.jp-card.jp-card-ie-10.jp-card-flipped .jp-card-front,.jp-card.jp-card-ie-11.jp-card-flipped .jp-card-front{-webkit-transform:rotateY(0deg);-moz-transform:rotateY(0deg);-ms-transform:rotateY(0deg);-o-transform:rotateY(0deg);transform:rotateY(0deg)}.jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back,.jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back{-webkit-transform:rotateY(0deg);-moz-transform:rotateY(0deg);-ms-transform:rotateY(0deg);-o-transform:rotateY(0deg);transform:rotateY(0deg)}.jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back:after,.jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back:after{left:18%}.jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back .jp-card-cvc,.jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back .jp-card-cvc{-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg);-ms-transform:rotateY(180deg);-o-transform:rotateY(180deg);transform:rotateY(180deg);left:5%}.jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back .jp-card-shiny,.jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back .jp-card-shiny{left:84%}.jp-card.jp-card-ie-10.jp-card-flipped .jp-card-back .jp-card-shiny:after,.jp-card.jp-card-ie-11.jp-card-flipped .jp-card-back .jp-card-shiny:after{left:-480%;-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg);-ms-transform:rotateY(180deg);-o-transform:rotateY(180deg);transform:rotateY(180deg)}.jp-card.jp-card-ie-10.jp-card-amex .jp-card-back,.jp-card.jp-card-ie-11.jp-card-amex .jp-card-back{display:none}.jp-card-logo{height:36px;width:60px;font-style:italic}.jp-card-logo,.jp-card-logo:before,.jp-card-logo:after{box-sizing:border-box}.jp-card-logo.jp-card-amex{text-transform:uppercase;font-size:4px;font-weight:bold;color:white;background-image:repeating-radial-gradient(circle at center, #fff 1px, #999 2px);background-image:repeating-radial-gradient(circle at center, #fff 1px, #999 2px);border:1px solid #EEE}.jp-card-logo.jp-card-amex:before,.jp-card-logo.jp-card-amex:after{width:28px;display:block;position:absolute;left:16px}.jp-card-logo.jp-card-amex:before{height:28px;content:\"american\";top:3px;text-align:left;padding-left:2px;padding-top:11px;background:#267AC3}.jp-card-logo.jp-card-amex:after{content:\"express\";bottom:11px;text-align:right;padding-right:2px}.jp-card.jp-card-amex.jp-card-flipped{-webkit-transform:none;-moz-transform:none;-ms-transform:none;-o-transform:none;transform:none}.jp-card.jp-card-amex.jp-card-identified .jp-card-front:before,.jp-card.jp-card-amex.jp-card-identified .jp-card-back:before{background-color:#108168}.jp-card.jp-card-amex.jp-card-identified .jp-card-front .jp-card-logo.jp-card-amex{opacity:1}.jp-card.jp-card-amex.jp-card-identified .jp-card-front .jp-card-cvc{visibility:visible}.jp-card.jp-card-amex.jp-card-identified .jp-card-front:after{opacity:1}.jp-card-logo.jp-card-discover{background:#f60;color:#111;text-transform:uppercase;font-style:normal;font-weight:bold;font-size:10px;text-align:center;overflow:hidden;z-index:1;padding-top:9px;letter-spacing:.03em;border:1px solid #EEE}.jp-card-logo.jp-card-discover:before,.jp-card-logo.jp-card-discover:after{content:\" \";display:block;position:absolute}.jp-card-logo.jp-card-discover:before{background:white;width:200px;height:200px;border-radius:200px;bottom:-5%;right:-80%;z-index:-1}.jp-card-logo.jp-card-discover:after{width:8px;height:8px;border-radius:4px;top:10px;left:27px;background-color:#f60;background-image:-webkit-radial-gradient(#f60,#fff);background-image:radial-gradient( #f60,#fff);content:\"network\";font-size:4px;line-height:24px;text-indent:-7px}.jp-card .jp-card-front .jp-card-logo.jp-card-discover{right:12%;top:18%}.jp-card.jp-card-discover.jp-card-identified .jp-card-front:before,.jp-card.jp-card-discover.jp-card-identified .jp-card-back:before{background-color:#86B8CF}.jp-card.jp-card-discover.jp-card-identified .jp-card-logo.jp-card-discover{opacity:1}.jp-card.jp-card-discover.jp-card-identified .jp-card-front:after{-webkit-transition:400ms;-moz-transition:400ms;transition:400ms;content:\" \";display:block;background-color:#f60;background-image:-webkit-linear-gradient(#f60,#ffa366,#f60);background-image:linear-gradient(#f60,#ffa366,#f60);height:50px;width:50px;border-radius:25px;position:absolute;left:100%;top:15%;margin-left:-25px;box-shadow:inset 1px 1px 3px 1px rgba(0,0,0,0.5)}.jp-card-logo.jp-card-unionpay{width:60px;display:block;height:40px;background:#e21836;-webkit-transform:skew(-15deg);-moz-transform:skew(20deg);-o-transform:skew(20deg);border-radius:5px;font-size:10px;z-index:1;line-height:33px;color:#fff;text-align:center;font-family:\"Sans-serif\", \"Microsoft Yahei\", \"\\\\5FAE\\\\8F6F\\\\96C5\\\\9ED1\", \"Hiragino Sans\", \"Gulim\", \"\\\\5B8B\\\\4F53\";font-weight:bold}.jp-card-logo.jp-card-unionpay:after,.jp-card-logo.jp-card-unionpay:before{display:block;margin:0 auto;position:absolute;height:40px;top:0;z-index:-1}.jp-card-logo.jp-card-unionpay:before{content:\" \";width:28px;background:#00447c;left:14px;border-top-left-radius:5px;border-bottom-left-radius:5px}.jp-card-logo.jp-card-unionpay:after{content:\"银联\";width:26px;background:#007b84;left:34px;border-radius:5px;font-size:10px;line-height:54px;text-indent:-17px}.jp-card.jp-card-unionpay.jp-card-identified .jp-card-back:before,.jp-card.jp-card-unionpay.jp-card-identified .jp-card-front:before{background-color:#987c00}.jp-card.jp-card-unionpay.jp-card-identified .jp-card-logo.jp-card-unionpay{opacity:1}.jp-card-logo.jp-card-visa{text-transform:uppercase;color:white;text-align:center;font-weight:bold;font-size:24px;line-height:18px;margin-top:5px}.jp-card-logo.jp-card-visa:before,.jp-card-logo.jp-card-visa:after{content:\" \";display:block;width:100%;height:25%}.jp-card-logo.jp-card-visa:before{position:absolute;left:-4px;width:0;height:0;border-style:solid;border-width:0 12px 6px 0;border-color:transparent #ffffff transparent transparent}.jp-card.jp-card-visa.jp-card-identified .jp-card-front:before,.jp-card.jp-card-visa.jp-card-identified .jp-card-back:before{background-color:#191278}.jp-card.jp-card-visa.jp-card-identified .jp-card-logo.jp-card-visa{opacity:1;box-shadow:none}.jp-card-logo.jp-card-visaelectron{background:white;text-transform:uppercase;color:#1A1876;text-align:center;font-weight:bold;font-size:15px;line-height:18px}.jp-card-logo.jp-card-visaelectron:before,.jp-card-logo.jp-card-visaelectron:after{content:\" \";display:block;width:100%;height:25%}.jp-card-logo.jp-card-visaelectron:before{background:#1A1876}.jp-card-logo.jp-card-visaelectron:after{background:#E79800}.jp-card-logo.jp-card-visaelectron .elec{float:right;font-family:arial;font-size:9px;margin-right:1px;margin-top:-5px;text-transform:none}.jp-card.jp-card-visaelectron.jp-card-identified .jp-card-front:before,.jp-card.jp-card-visaelectron.jp-card-identified .jp-card-back:before{background-color:#191278}.jp-card.jp-card-visaelectron.jp-card-identified .jp-card-logo.jp-card-visaelectron{opacity:1}.jp-card-logo.jp-card-mastercard{color:white;font-style:normal;text-transform:lowercase;font-weight:bold;text-align:center;font-size:9px;line-height:84px;z-index:1;text-shadow:1px 1px rgba(0,0,0,0.6)}.jp-card-logo.jp-card-mastercard:before,.jp-card-logo.jp-card-mastercard:after{content:\" \";display:block;width:36px;top:0;position:absolute;height:36px;border-radius:18px}.jp-card-logo.jp-card-mastercard:before{left:0;background:#EB001B;z-index:-1;opacity:0.9}.jp-card-logo.jp-card-mastercard:after{right:0;background:#FF5F00;z-index:-2}.jp-card.jp-card-mastercard.jp-card-identified .jp-card-front .jp-card-logo.jp-card-mastercard,.jp-card.jp-card-mastercard.jp-card-identified .jp-card-back .jp-card-logo.jp-card-mastercard{box-shadow:none}.jp-card.jp-card-mastercard.jp-card-identified .jp-card-front:before,.jp-card.jp-card-mastercard.jp-card-identified .jp-card-back:before{background-color:#0061A8}.jp-card.jp-card-mastercard.jp-card-identified .jp-card-logo.jp-card-mastercard{opacity:1}.jp-card-logo.jp-card-maestro{color:white;font-style:normal;text-transform:lowercase;font-weight:bold;text-align:center;font-size:14px;line-height:84px;z-index:1;text-shadow:1px 1px rgba(0,0,0,0.6)}.jp-card-logo.jp-card-maestro:before,.jp-card-logo.jp-card-maestro:after{content:\" \";display:block;width:36px;top:0;position:absolute;height:36px;border-radius:18px}.jp-card-logo.jp-card-maestro:before{left:0;background:#EB001B;z-index:-2}.jp-card-logo.jp-card-maestro:after{right:0;background:#00A2E5;z-index:-1;opacity:0.8}.jp-card.jp-card-maestro.jp-card-identified .jp-card-front .jp-card-logo.jp-card-maestro,.jp-card.jp-card-maestro.jp-card-identified .jp-card-back .jp-card-logo.jp-card-maestro{box-shadow:none}.jp-card.jp-card-maestro.jp-card-identified .jp-card-front:before,.jp-card.jp-card-maestro.jp-card-identified .jp-card-back:before{background-color:#0B2C5F}.jp-card.jp-card-maestro.jp-card-identified .jp-card-logo.jp-card-maestro{opacity:1}.jp-card-logo.jp-card-dankort{width:60px;height:36px;padding:3px;border-radius:8px;border:#000 1px solid;background-color:#fff}.jp-card-logo.jp-card-dankort .dk{position:relative;width:100%;height:100%;overflow:hidden}.jp-card-logo.jp-card-dankort .dk:before{background-color:#ED1C24;content:\\'\\';position:absolute;width:100%;height:100%;display:block;border-radius:6px}.jp-card-logo.jp-card-dankort .dk:after{content:\\'\\';position:absolute;top:50%;margin-top:-7.7px;right:0;width:0;height:0;border-style:solid;border-width:7px 7px 10px 0;border-color:transparent #ED1C24 transparent transparent;z-index:1}.jp-card-logo.jp-card-dankort .d,.jp-card-logo.jp-card-dankort .k{position:absolute;top:50%;width:50%;display:block;height:15.4px;margin-top:-7.7px;background:white}.jp-card-logo.jp-card-dankort .d{left:0;border-radius:0 8px 10px 0}.jp-card-logo.jp-card-dankort .d:before{content:\\'\\';position:absolute;top:50%;left:50%;display:block;background:#ED1C24;border-radius:2px 4px 6px 0px;height:5px;width:7px;margin:-3px 0 0 -4px}.jp-card-logo.jp-card-dankort .k{right:0}.jp-card-logo.jp-card-dankort .k:before,.jp-card-logo.jp-card-dankort .k:after{content:\\'\\';position:absolute;right:50%;width:0;height:0;border-style:solid;margin-right:-1px}.jp-card-logo.jp-card-dankort .k:before{top:0;border-width:8px 5px 0 0;border-color:#ED1C24 transparent transparent transparent}.jp-card-logo.jp-card-dankort .k:after{bottom:0;border-width:0 5px 8px 0;border-color:transparent transparent #ED1C24 transparent}.jp-card.jp-card-dankort.jp-card-identified .jp-card-front:before,.jp-card.jp-card-dankort.jp-card-identified .jp-card-back:before{background-color:#0055C7}.jp-card.jp-card-dankort.jp-card-identified .jp-card-logo.jp-card-dankort{opacity:1}.jp-card-logo.jp-card-elo{height:50px;width:50px;border-radius:100%;background:black;color:white;text-align:center;text-transform:lowercase;font-size:21px;font-style:normal;letter-spacing:1px;font-weight:bold;padding-top:13px}.jp-card-logo.jp-card-elo .e,.jp-card-logo.jp-card-elo .l,.jp-card-logo.jp-card-elo .o{display:inline-block;position:relative}.jp-card-logo.jp-card-elo .e{-webkit-transform:rotate(-15deg);-moz-transform:rotate(-15deg);-ms-transform:rotate(-15deg);-o-transform:rotate(-15deg);transform:rotate(-15deg)}.jp-card-logo.jp-card-elo .o{position:relative;display:inline-block;width:12px;height:12px;right:0;top:7px;border-radius:100%;background-image:-webkit-linear-gradient( #ff0 50%,red 50%);background-image:linear-gradient( #ff0 50%,red 50%);-webkit-transform:rotate(40deg);-moz-transform:rotate(40deg);-ms-transform:rotate(40deg);-o-transform:rotate(40deg);transform:rotate(40deg);text-indent:-9999px}.jp-card-logo.jp-card-elo .o:before{content:\"\";position:absolute;width:49%;height:49%;background:black;border-radius:100%;text-indent:-99999px;top:25%;left:25%}.jp-card.jp-card-elo.jp-card-identified .jp-card-front:before,.jp-card.jp-card-elo.jp-card-identified .jp-card-back:before{background-color:#6F6969}.jp-card.jp-card-elo.jp-card-identified .jp-card-logo.jp-card-elo{opacity:1}.jp-card-logo.jp-card-jcb{border-radius:5px 0px 5px 0px;-moz-border-radius:5px 0px 5px 0px;-webkit-border-radius:5px 0px 5px 0px;background-color:white;font-style:normal;color:white;width:50px;padding:2px 0 0 2px}.jp-card-logo.jp-card-jcb>div{width:15px;margin-right:1px;display:inline-block;text-align:center;text-shadow:1px 1px rgba(0,0,0,0.6);border-radius:5px 0px 5px 0px;-moz-border-radius:5px 0px 5px 0px;-webkit-border-radius:5px 0px 5px 0px}.jp-card-logo.jp-card-jcb>div:before,.jp-card-logo.jp-card-jcb>div:after{content:\" \";display:block;height:8px}.jp-card-logo.jp-card-jcb>div.j{background-color:#000063;background-image:-webkit-linear-gradient(left, #000063,#008cff);background-image:linear-gradient(to right,#000063,#008cff)}.jp-card-logo.jp-card-jcb>div.c{background-color:#630000;background-image:-webkit-linear-gradient(left, #630000,#ff008d);background-image:linear-gradient(to right,#630000,#ff008d)}.jp-card-logo.jp-card-jcb>div.b{background-color:#006300;background-image:-webkit-linear-gradient(left, #006300,lime);background-image:linear-gradient(to right,#006300,lime)}.jp-card.jp-card-jcb.jp-card-identified .jp-card-front:before,.jp-card.jp-card-jcb.jp-card-identified .jp-card-back:before{background-color:#CB8000}.jp-card.jp-card-jcb.jp-card-identified .jp-card-logo.jp-card-jcb{opacity:1;box-shadow:none}.jp-card-logo.jp-card-dinersclub{font-family:serif;height:40px;width:100px;color:white;font-size:17px;font-style:normal;letter-spacing:1px}.jp-card-logo.jp-card-dinersclub::before,.jp-card-logo.jp-card-dinersclub::after{display:block;position:relative}.jp-card-logo.jp-card-dinersclub::before{content:\\'Diners Club\\'}.jp-card-logo.jp-card-dinersclub::after{content:\\'International\\';text-transform:uppercase;font-size:0.6em}.jp-card.jp-card-dinersclub .jp-card-front .jp-card-logo{box-shadow:none !important}.jp-card.jp-card-dinersclub.jp-card-identified .jp-card-front:before,.jp-card.jp-card-dinersclub.jp-card-identified .jp-card-back:before{background-color:#999}.jp-card.jp-card-dinersclub.jp-card-identified .jp-card-logo.jp-card-dinersclub{opacity:1}.jp-card-logo.jp-card-hipercard{height:20px;width:100px;color:white;font-size:21px;font-style:italic;font-weight:bold}.jp-card-logo.jp-card-hipercard::before,.jp-card-logo.jp-card-hipercard::after{display:block;position:relative}.jp-card.jp-card-hipercard.jp-card-identified .jp-card-front:before,.jp-card.jp-card-hipercard.jp-card-identified .jp-card-back:before{background-color:#770304}.jp-card.jp-card-hipercard.jp-card-identified .jp-card-logo.jp-card-hipercard{opacity:1;box-shadow:none}.jp-card-logo.jp-card-troy{text-transform:lowercase;color:#fff;text-align:center;font-weight:700;font-size:24px;line-height:18px;margin-top:5px}.jp-card-logo.jp-card-troy:before,.jp-card-logo.jp-card-troy:after{content:\\\\\"\\\\\";display:block;width:26%;height:6%;background:#22b8c3;right:32%;top:24%;position:absolute;transform:rotate(105deg)}.jp-card.jp-card-troy.jp-card-identified .jp-card-front:before,.jp-card.jp-card-troy.jp-card-identified .jp-card-back:before{background-color:#01adba}.jp-card.jp-card-troy.jp-card-identified .jp-card-logo.jp-card-troy{opacity:1;box-shadow:none}.jp-card-container{-webkit-perspective:1000px;-moz-perspective:1000px;perspective:1000px;width:350px;max-width:100%;height:200px;margin:auto;z-index:1;position:relative}.jp-card{font-family:\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:1;position:relative;width:100%;height:100%;min-width:315px;border-radius:10px;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-ms-transform-style:preserve-3d;-o-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition:all 400ms linear;-moz-transition:all 400ms linear;transition:all 400ms linear}.jp-card>*,.jp-card>*:after,.jp-card>*:before{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}.jp-card.jp-card-flipped{-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg);-ms-transform:rotateY(180deg);-o-transform:rotateY(180deg);transform:rotateY(180deg)}.jp-card .jp-card-back,.jp-card .jp-card-front{-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-ms-transform-style:preserve-3d;-o-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transition:all 400ms linear;-moz-transition:all 400ms linear;transition:all 400ms linear;width:100%;height:100%;position:absolute;top:0;left:0;overflow:hidden;border-radius:10px;background:#ddd}.jp-card .jp-card-back:before,.jp-card .jp-card-front:before{content:\" \";display:block;position:absolute;width:100%;height:100%;top:0;left:0;opacity:0;border-radius:10px;-webkit-transition:all 400ms ease;-moz-transition:all 400ms ease;transition:all 400ms ease}.jp-card .jp-card-back:after,.jp-card .jp-card-front:after{content:\" \";display:block}.jp-card .jp-card-back .jp-card-display,.jp-card .jp-card-front .jp-card-display{color:#fff;font-weight:normal;opacity:0.5;-webkit-transition:opacity 400ms linear;-moz-transition:opacity 400ms linear;transition:opacity 400ms linear}.jp-card .jp-card-back .jp-card-display.jp-card-focused,.jp-card .jp-card-front .jp-card-display.jp-card-focused{opacity:1;font-weight:700}.jp-card .jp-card-back .jp-card-cvc,.jp-card .jp-card-front .jp-card-cvc{font-family:\"Bitstream Vera Sans Mono\",Consolas,Courier,monospace;font-size:14px}.jp-card .jp-card-back .jp-card-shiny,.jp-card .jp-card-front .jp-card-shiny{width:50px;height:35px;border-radius:5px;background:#ccc;position:relative}.jp-card .jp-card-back .jp-card-shiny:before,.jp-card .jp-card-front .jp-card-shiny:before{content:\" \";display:block;width:70%;height:60%;border-top-right-radius:5px;border-bottom-right-radius:5px;background:#d9d9d9;position:absolute;top:20%}.jp-card .jp-card-front .jp-card-logo{position:absolute;opacity:0;right:5%;top:8%;-webkit-transition:400ms;-moz-transition:400ms;transition:400ms}.jp-card .jp-card-front .jp-card-lower{width:80%;position:absolute;left:10%;bottom:30px}@media only screen and (max-width: 480px){.jp-card .jp-card-front .jp-card-lower{width:90%;left:5%}}.jp-card .jp-card-front .jp-card-lower .jp-card-cvc{visibility:hidden;float:right;position:relative;bottom:5px}.jp-card .jp-card-front .jp-card-lower .jp-card-number{font-family:\"Bitstream Vera Sans Mono\",Consolas,Courier,monospace;font-size:24px;clear:both;margin-bottom:30px}.jp-card .jp-card-front .jp-card-lower .jp-card-expiry{font-family:\"Bitstream Vera Sans Mono\",Consolas,Courier,monospace;letter-spacing:0;position:relative;float:right;width:25%}.jp-card .jp-card-front .jp-card-lower .jp-card-expiry:after,.jp-card .jp-card-front .jp-card-lower .jp-card-expiry:before{font-family:\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:bold;font-size:7px;white-space:pre;display:block;opacity:0.5}.jp-card .jp-card-front .jp-card-lower .jp-card-expiry:before{content:attr(data-before);margin-bottom:2px;font-size:7px;text-transform:uppercase}.jp-card .jp-card-front .jp-card-lower .jp-card-expiry:after{position:absolute;content:attr(data-after);text-align:right;right:100%;margin-right:5px;margin-top:2px;bottom:0}.jp-card .jp-card-front .jp-card-lower .jp-card-name{text-transform:uppercase;font-family:\"Bitstream Vera Sans Mono\",Consolas,Courier,monospace;font-size:20px;max-height:45px;position:absolute;bottom:0;width:190px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:horizontal;overflow:hidden;text-overflow:ellipsis}.jp-card .jp-card-back{-webkit-transform:rotateY(180deg);-moz-transform:rotateY(180deg);-ms-transform:rotateY(180deg);-o-transform:rotateY(180deg);transform:rotateY(180deg)}.jp-card .jp-card-back .jp-card-bar{background-color:#444;background-image:-webkit-linear-gradient(#444,#333);background-image:linear-gradient(#444,#333);width:100%;height:20%;position:absolute;top:10%}.jp-card .jp-card-back:after{content:\" \";display:block;background-color:#fff;background-image:-webkit-linear-gradient(#fff,#fff);background-image:linear-gradient(#fff,#fff);width:80%;height:16%;position:absolute;top:40%;left:2%}.jp-card .jp-card-back .jp-card-cvc{position:absolute;top:40%;left:85%;-webkit-transition-delay:600ms;-moz-transition-delay:600ms;transition-delay:600ms}.jp-card .jp-card-back .jp-card-shiny{position:absolute;top:66%;left:2%}.jp-card .jp-card-back .jp-card-shiny:after{content:\"This card has been issued by Jesse Pollak and is licensed for anyone to use anywhere for free. It comes with no warranty. For support issues, please visit: github.com/jessepollak/card.\";position:absolute;left:120%;top:5%;color:white;font-size:7px;width:230px;opacity:0.5}.jp-card.jp-card-identified{box-shadow:0 0 20px rgba(0,0,0,0.3)}.jp-card.jp-card-identified .jp-card-back,.jp-card.jp-card-identified .jp-card-front{background-color:#000;background-color:rgba(0,0,0,0.5)}.jp-card.jp-card-identified .jp-card-back:before,.jp-card.jp-card-identified .jp-card-front:before{-webkit-transition:all 400ms ease;-moz-transition:all 400ms ease;transition:all 400ms ease;background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 1px, rgba(255,255,255,0) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.03) 4px),repeating-linear-gradient(90deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(210deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-radial-gradient(circle at 30% 30%, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-radial-gradient(circle at 70% 70%, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-radial-gradient(circle at 90% 20%, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-radial-gradient(circle at 15% 80%, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),-webkit-linear-gradient(-245deg, rgba(255,255,255,0) 50%,rgba(255,255,255,0.2) 70%,rgba(255,255,255,0) 90%);background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 1px, rgba(255,255,255,0) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.03) 4px),repeating-linear-gradient(90deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(210deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-radial-gradient(circle at 30% 30%, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-radial-gradient(circle at 70% 70%, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-radial-gradient(circle at 90% 20%, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-radial-gradient(circle at 15% 80%, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),linear-gradient(-25deg, rgba(255,255,255,0) 50%,rgba(255,255,255,0.2) 70%,rgba(255,255,255,0) 90%);opacity:1}.jp-card.jp-card-identified .jp-card-back .jp-card-logo,.jp-card.jp-card-identified .jp-card-front .jp-card-logo{box-shadow:0 0 0 2px rgba(255,255,255,0.3)}.jp-card.jp-card-identified.no-radial-gradient .jp-card-back:before,.jp-card.jp-card-identified.no-radial-gradient .jp-card-front:before{background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 1px, rgba(255,255,255,0) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.03) 4px),repeating-linear-gradient(90deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(210deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),-webkit-linear-gradient(-245deg, rgba(255,255,255,0) 50%,rgba(255,255,255,0.2) 70%,rgba(255,255,255,0) 90%);background-image:repeating-linear-gradient(45deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 1px, rgba(255,255,255,0) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.03) 4px),repeating-linear-gradient(90deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),repeating-linear-gradient(210deg, rgba(255,255,255,0) 1px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.04) 3px, rgba(255,255,255,0.05) 4px),linear-gradient(-25deg, rgba(255,255,255,0) 50%,rgba(255,255,255,0.2) 70%,rgba(255,255,255,0) 90%)}@media (max-width: 450px){.card-wrapper{max-width:80vw;width:100%;margin:20px auto;overflow-x:hidden}.card-wrapper>.jp-card-container{transform:scale(0.625);transform-origin:left center}}\\n',\"\"]),e.a=n},function(r,e){var t;t=function(){return this}();try{t=t||new Function(\"return this\")()}catch(r){\"object\"==typeof window&&(t=window)}r.exports=t},function(r,e){(function(){var e,t,a;(e=function(r){return e.isDOMElement(r)?r:document.querySelectorAll(r)}).isDOMElement=function(r){return r&&null!=r.nodeName},a=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,e.trim=function(r){return null===r?\"\":(r+\"\").replace(a,\"\")},t=/\\r/g,e.val=function(r,e){var a;return arguments.length>1?r.value=e:\"string\"==typeof(a=r.value)?a.replace(t,\"\"):null===a?\"\":a},e.preventDefault=function(r){if(\"function\"!=typeof r.preventDefault)return r.returnValue=!1,!1;r.preventDefault()},e.normalizeEvent=function(r){var t;return null==(r={which:null!=(t=r).which?t.which:void 0,target:t.target||t.srcElement,preventDefault:function(){return e.preventDefault(t)},originalEvent:t,data:t.data||t.detail}).which&&(r.which=null!=t.charCode?t.charCode:t.keyCode),r},e.on=function(r,t,a){var n,o,i,d,c,p,l,s;if(r.length)for(o=0,d=r.length;o<d;o++)n=r[o],e.on(n,t,a);else{if(!t.match(\" \"))return l=a,a=function(r){return r=e.normalizeEvent(r),l(r)},r.addEventListener?r.addEventListener(t,a,!1):r.attachEvent?(t=\"on\"+t,r.attachEvent(t,a)):void(r[\"on\"+t]=a);for(i=0,c=(s=t.split(\" \")).length;i<c;i++)p=s[i],e.on(r,p,a)}},e.addClass=function(r,t){var a;return r.length?function(){var n,o,i;for(i=[],n=0,o=r.length;n<o;n++)a=r[n],i.push(e.addClass(a,t));return i}():r.classList?r.classList.add(t):r.className+=\" \"+t},e.hasClass=function(r,t){var a,n,o,i;if(r.length){for(n=!0,o=0,i=r.length;o<i;o++)a=r[o],n=n&&e.hasClass(a,t);return n}return r.classList?r.classList.contains(t):new RegExp(\"(^| )\"+t+\"( |$)\",\"gi\").test(r.className)},e.removeClass=function(r,t){var a,n,o,i,d,c;if(r.length)return function(){var a,o,i;for(i=[],a=0,o=r.length;a<o;a++)n=r[a],i.push(e.removeClass(n,t));return i}();if(r.classList){for(c=[],o=0,i=(d=t.split(\" \")).length;o<i;o++)a=d[o],c.push(r.classList.remove(a));return c}return r.className=r.className.replace(new RegExp(\"(^|\\\\b)\"+t.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \")},e.toggleClass=function(r,t,a){var n;return r.length?function(){var o,i,d;for(d=[],o=0,i=r.length;o<i;o++)n=r[o],d.push(e.toggleClass(n,t,a));return d}():a?e.hasClass(r,t)?void 0:e.addClass(r,t):e.removeClass(r,t)},e.append=function(r,t){var a;return r.length?function(){var n,o,i;for(i=[],n=0,o=r.length;n<o;n++)a=r[n],i.push(e.append(a,t));return i}():r.insertAdjacentHTML(\"beforeend\",t)},e.find=function(r,e){return(r instanceof NodeList||r instanceof Array)&&(r=r[0]),r.querySelectorAll(e)},e.trigger=function(r,e,t){var a,n;try{n=new CustomEvent(e,{detail:t})}catch(a){a,(n=document.createEvent(\"CustomEvent\")).initCustomEvent?n.initCustomEvent(e,!0,!0,t):n.initEvent(e,!0,!0,t)}return r.dispatchEvent(n)},r.exports=e}).call(this)},function(r,e,t){\"use strict\";var a,n=function(){return void 0===a&&(a=Boolean(window&&document&&document.all&&!window.atob)),a},o=function(){var r={};return function(e){if(void 0===r[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(r){t=null}r[e]=t}return r[e]}}(),i=[];function d(r){for(var e=-1,t=0;t<i.length;t++)if(i[t].identifier===r){e=t;break}return e}function c(r,e){for(var t={},a=[],n=0;n<r.length;n++){var o=r[n],c=e.base?o[0]+e.base:o[0],p=t[c]||0,l=\"\".concat(c,\" \").concat(p);t[c]=p+1;var s=d(l),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==s?(i[s].references++,i[s].updater(f)):i.push({identifier:l,updater:b(f,e),references:1}),a.push(l)}return a}function p(r){var e=document.createElement(\"style\"),a=r.attributes||{};if(void 0===a.nonce){var n=t.nc;n&&(a.nonce=n)}if(Object.keys(a).forEach((function(r){e.setAttribute(r,a[r])})),\"function\"==typeof r.insert)r.insert(e);else{var i=o(r.insert||\"head\");if(!i)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");i.appendChild(e)}return e}var l,s=(l=[],function(r,e){return l[r]=e,l.filter(Boolean).join(\"\\n\")});function f(r,e,t,a){var n=t?\"\":a.media?\"@media \".concat(a.media,\" {\").concat(a.css,\"}\"):a.css;if(r.styleSheet)r.styleSheet.cssText=s(e,n);else{var o=document.createTextNode(n),i=r.childNodes;i[e]&&r.removeChild(i[e]),i.length?r.insertBefore(o,i[e]):r.appendChild(o)}}function g(r,e,t){var a=t.css,n=t.media,o=t.sourceMap;if(n?r.setAttribute(\"media\",n):r.removeAttribute(\"media\"),o&&\"undefined\"!=typeof btoa&&(a+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o)))),\" */\")),r.styleSheet)r.styleSheet.cssText=a;else{for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(document.createTextNode(a))}}var u=null,j=0;function b(r,e){var t,a,n;if(e.singleton){var o=j++;t=u||(u=p(e)),a=f.bind(null,t,o,!1),n=f.bind(null,t,o,!0)}else t=p(e),a=g.bind(null,t,e),n=function(){!function(r){if(null===r.parentNode)return!1;r.parentNode.removeChild(r)}(t)};return a(r),function(e){if(e){if(e.css===r.css&&e.media===r.media&&e.sourceMap===r.sourceMap)return;a(r=e)}else n()}}r.exports=function(r,e){(e=e||{}).singleton||\"boolean\"==typeof e.singleton||(e.singleton=n());var t=c(r=r||[],e);return function(r){if(r=r||[],\"[object Array]\"===Object.prototype.toString.call(r)){for(var a=0;a<t.length;a++){var n=d(t[a]);i[n].references--}for(var o=c(r,e),p=0;p<t.length;p++){var l=d(t[p]);0===i[l].references&&(i[l].updater(),i.splice(l,1))}t=o}}}},function(r,e,t){\"use strict\";r.exports=function(r){var e=[];return e.toString=function(){return this.map((function(e){var t=r(e);return e[2]?\"@media \".concat(e[2],\" {\").concat(t,\"}\"):t})).join(\"\")},e.i=function(r,t,a){\"string\"==typeof r&&(r=[[null,r,\"\"]]);var n={};if(a)for(var o=0;o<this.length;o++){var i=this[o][0];null!=i&&(n[i]=!0)}for(var d=0;d<r.length;d++){var c=[].concat(r[d]);a&&n[c[0]]||(t&&(c[2]?c[2]=\"\".concat(t,\" and \").concat(c[2]):c[2]=t),e.push(c))}},e}},function(r,e,t){(function(e){var a,n,o;t(6),n=t(2),t(7),o=t(10),a=function(){var r,e;function t(r){var e,t,a;this.maskCardNumber=(e=this.maskCardNumber,t=this,function(){return e.apply(t,arguments)}),this.options=o(!0,this.defaults,r),this.options.form?(this.$el=n(this.options.form),this.options.container?(this.$container=n(this.options.container),(a=n.isDOMElement(this.$container)?this.$container:this.$container[0]).getAttribute(this.initializedDataAttr)||(a.setAttribute(this.initializedDataAttr,!0),this.render(),this.attachHandlers(),this.handleInitialPlaceholders())):console.log(\"Please provide a container\")):console.log(\"Please provide a form\")}return t.prototype.initializedDataAttr=\"data-jp-card-initialized\",t.prototype.cardTemplate='<div class=\"jp-card-container\"><div class=\"jp-card\"><div class=\"jp-card-front\"><div class=\"jp-card-logo jp-card-elo\"><div class=\"e\">e</div><div class=\"l\">l</div><div class=\"o\">o</div></div><div class=\"jp-card-logo jp-card-visa\">Visa</div><div class=\"jp-card-logo jp-card-visaelectron\">Visa<div class=\"elec\">Electron</div></div><div class=\"jp-card-logo jp-card-mastercard\">Mastercard</div><div class=\"jp-card-logo jp-card-maestro\">Maestro</div><div class=\"jp-card-logo jp-card-amex\"></div><div class=\"jp-card-logo jp-card-discover\">discover</div><div class=\"jp-card-logo jp-card-unionpay\">UnionPay</div><div class=\"jp-card-logo jp-card-dinersclub\"></div><div class=\"jp-card-logo jp-card-hipercard\">Hipercard</div><div class=\"jp-card-logo jp-card-troy\">troy</div><div class=\"jp-card-logo jp-card-dankort\"><div class=\"dk\"><div class=\"d\"></div><div class=\"k\"></div></div></div><div class=\"jp-card-logo jp-card-jcb\"><div class=\"j\">J</div><div class=\"c\">C</div><div class=\"b\">B</div></div><div class=\"jp-card-lower\"><div class=\"jp-card-shiny\"></div><div class=\"jp-card-cvc jp-card-display\">{{cvc}}</div><div class=\"jp-card-number jp-card-display\">{{number}}</div><div class=\"jp-card-name jp-card-display\">{{name}}</div><div class=\"jp-card-expiry jp-card-display\" data-before=\"{{monthYear}}\" data-after=\"{{validDate}}\">{{expiry}}</div></div></div><div class=\"jp-card-back\"><div class=\"jp-card-bar\"></div><div class=\"jp-card-cvc jp-card-display\">{{cvc}}</div><div class=\"jp-card-shiny\"></div></div></div></div>',t.prototype.template=function(r,e){return r.replace(/\\{\\{(.*?)\\}\\}/g,(function(r,t,a){return e[t]}))},t.prototype.cardTypes=[\"jp-card-amex\",\"jp-card-dankort\",\"jp-card-dinersclub\",\"jp-card-discover\",\"jp-card-unionpay\",\"jp-card-jcb\",\"jp-card-laser\",\"jp-card-maestro\",\"jp-card-mastercard\",\"jp-card-troy\",\"jp-card-unionpay\",\"jp-card-visa\",\"jp-card-visaelectron\",\"jp-card-elo\",\"jp-card-hipercard\"],t.prototype.defaults={formatting:!0,formSelectors:{numberInput:'input[name=\"number\"]',expiryInput:'input[name=\"expiry\"]',cvcInput:'input[name=\"cvc\"]',nameInput:'input[name=\"name\"]'},cardSelectors:{cardContainer:\".jp-card-container\",card:\".jp-card\",numberDisplay:\".jp-card-number\",expiryDisplay:\".jp-card-expiry\",cvcDisplay:\".jp-card-cvc\",nameDisplay:\".jp-card-name\"},messages:{validDate:\"valid\\nthru\",monthYear:\"month/year\"},placeholders:{number:\"•••• •••• •••• ••••\",cvc:\"•••\",expiry:\"••/••\",name:\"Full Name\"},masks:{cardNumber:!1},classes:{valid:\"jp-card-valid\",invalid:\"jp-card-invalid\"},debug:!1},t.prototype.render=function(){var r,e,t,a,i,d,c,p;for(t in n.append(this.$container,this.template(this.cardTemplate,o({},this.options.messages,this.options.placeholders))),i=this.options.cardSelectors)c=i[t],this[\"$\"+t]=n.find(this.$container,c);for(t in d=this.options.formSelectors)c=d[t],c=this.options[t]?this.options[t]:c,!(a=n.find(this.$el,c)).length&&this.options.debug&&console.error(\"Card can't find a \"+t+\" in your form.\"),this[\"$\"+t]=a;if(this.options.formatting&&(Payment.formatCardNumber(this.$numberInput),Payment.formatCardCVC(this.$cvcInput),Payment.formatCardExpiry(this.$expiryInput)),this.options.width&&(r=n(this.options.cardSelectors.cardContainer)[0],e=parseInt(r.clientWidth||window.getComputedStyle(r).width),r.style.transform=\"scale(\"+this.options.width/e+\")\"),(\"undefined\"!=typeof navigator&&null!==navigator?navigator.userAgent:void 0)&&-1!==(p=navigator.userAgent.toLowerCase()).indexOf(\"safari\")&&-1===p.indexOf(\"chrome\")&&n.addClass(this.$card,\"jp-card-safari\"),/MSIE 10\\./i.test(navigator.userAgent)&&n.addClass(this.$card,\"jp-card-ie-10\"),/rv:11.0/i.test(navigator.userAgent))return n.addClass(this.$card,\"jp-card-ie-11\")},t.prototype.attachHandlers=function(){var e,t;return t=[this.validToggler(\"cardNumber\")],this.options.masks.cardNumber&&t.push(this.maskCardNumber),r(this.$numberInput,this.$numberDisplay,{fill:!1,filters:t}),n.on(this.$numberInput,\"payment.cardType\",this.handle(\"setCardType\")),(e=[function(r){return 1===r.length&&\"0\"===r[0]?\"\":r.replace(/(\\s+)/g,\"\")}]).push(this.validToggler(\"cardExpiry\")),r(this.$expiryInput,this.$expiryDisplay,{join:function(r){return 2===r[0].length||r[1]?\"/\":\"\"},filters:e}),r(this.$cvcInput,this.$cvcDisplay,{filters:this.validToggler(\"cardCVC\")}),n.on(this.$cvcInput,\"focus\",this.handle(\"flipCard\")),n.on(this.$cvcInput,\"blur\",this.handle(\"unflipCard\")),r(this.$nameInput,this.$nameDisplay,{fill:!1,filters:this.validToggler(\"cardHolderName\"),join:\" \"})},t.prototype.handleInitialPlaceholders=function(){var r,e,t,a;for(e in a=[],t=this.options.formSelectors)t[e],(r=this[\"$\"+e])instanceof NodeList&&(r=r[0]),n.val(r)?(n.trigger(r,\"paste\"),a.push(function(r){return setTimeout((function(){return n.trigger(r,\"keyup\")}))}(r))):a.push(void 0);return a},t.prototype.handle=function(r){return e=this,function(t){var a;return(a=Array.prototype.slice.call(arguments)).unshift(t.target),e.handlers[r].apply(e,a)};var e},t.prototype.validToggler=function(r){var e,t;return\"cardExpiry\"===r?e=function(r){var e;return e=Payment.fns.cardExpiryVal(r),Payment.fns.validateCardExpiry(e.month,e.year)}:\"cardCVC\"===r?(t=this,e=function(r){return Payment.fns.validateCardCVC(r,t.cardType)}):\"cardNumber\"===r?e=function(r){return Payment.fns.validateCardNumber(r)}:\"cardHolderName\"===r&&(e=function(r){return\"\"!==r}),function(r){return function(t,a,n){var o;return o=e(t),r.toggleValidClass(a,o),r.toggleValidClass(n,o),t}}(this)},t.prototype.toggleValidClass=function(r,e){return n.toggleClass(r,this.options.classes.valid,e),n.toggleClass(r,this.options.classes.invalid,!e)},t.prototype.maskCardNumber=function(r,e,t){var a,n;return a=this.options.masks.cardNumber,(n=r.split(\" \")).length>=3?(n.forEach((function(r,e){if(e!==n.length-1)return n[e]=n[e].replace(/\\d/g,a)})),n.join(\" \")):r.replace(/\\d/g,a)},t.prototype.handlers={setCardType:function(r,e){var t,a;if(t=e.data,a=new CustomEvent(\"card-type-changed\",{detail:e.data}),document.dispatchEvent(a),!n.hasClass(this.$card,t))return n.removeClass(this.$card,\"jp-card-unknown\"),n.removeClass(this.$card,this.cardTypes.join(\" \")),n.addClass(this.$card,\"jp-card-\"+t),n.toggleClass(this.$card,\"jp-card-identified\",\"unknown\"!==t),this.cardType=t},flipCard:function(){return n.addClass(this.$card,\"jp-card-flipped\")},unflipCard:function(){return n.removeClass(this.$card,\"jp-card-flipped\")}},r=function(r,t,a){var o,i,d;return null==a&&(a={}),a.fill=a.fill||!1,a.filters=a.filters||[],a.filters instanceof Array||(a.filters=[a.filters]),a.join=a.join||\"\",\"function\"!=typeof a.join&&(o=a.join,a.join=function(){return o}),d=function(){var r,e,a;for(a=[],r=0,e=t.length;r<e;r++)i=t[r],a.push(i.textContent);return a}(),e(r,t,d,a),n.on(r,\"focus\",(function(){return n.addClass(t,\"jp-card-focused\")})),n.on(r,\"blur\",(function(){return n.removeClass(t,\"jp-card-focused\")})),n.on(r,\"keyup change paste\",(function(n){return e(r,t,d,a)})),r},e=function(r,e,t,a){var o,i,d,c,p,l,s,f,g,u,j,b;for(b=function(){var e,t,a;for(a=[],e=0,t=r.length;e<t;e++)o=r[e],a.push(n.val(o));return a}(),c=a.join(b),(b=b.join(c))===c&&(b=\"\"),d=0,l=(u=a.filters).length;d<l;d++)b=(0,u[d])(b,r,e);for(j=[],i=p=0,s=e.length;p<s;i=++p)f=e[i],g=a.fill?b+t[i].substring(b.length):b||t[i],j.push(f.textContent=g);return j},t.prototype.getCardType=function(){return Payment.fns.cardType(this.$numberInput[0].value)||\"unknown\"},t}(),r.exports=a,e.Card=a}).call(this,t(1))},function(r,e,t){\"use strict\";t.r(e);var a=t(3),n=t.n(a),o=t(0),i={insert:\"head\",singleton:!1};n()(o.a,i);e.default=o.a.locals||{}},function(r,e,t){(function(){var e,a,n,o,i,d,c,p,l,s,f,g,u,j,b,h,m,v,x,y,k,w,C,E,z,$,N=[].indexOf||function(r){for(var e=0,t=this.length;e<t;e++)if(e in this&&this[e]===r)return e;return-1};b=t(8)(),a=t(2),i=[{type:\"amex\",pattern:/^3[47]/,format:/(\\d{1,4})(\\d{1,6})?(\\d{1,5})?/,length:[15],cvcLength:[4],luhn:!0},{type:\"dankort\",pattern:/^5019/,format:c=/(\\d{1,4})/g,length:[16],cvcLength:[3],luhn:!0},{type:\"dinersclub\",pattern:/^(36|38|30[0-5])/,format:/(\\d{1,4})(\\d{1,6})?(\\d{1,4})?/,length:[14],cvcLength:[3],luhn:!0},{type:\"discover\",pattern:/^(6011|65|64[4-9]|622)/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:\"elo\",pattern:/^401178|^401179|^431274|^438935|^451416|^457393|^457631|^457632|^504175|^627780|^636297|^636369|^636368|^(506699|5067[0-6]\\d|50677[0-8])|^(50900\\d|5090[1-9]\\d|509[1-9]\\d{2})|^65003[1-3]|^(65003[5-9]|65004\\d|65005[0-1])|^(65040[5-9]|6504[1-3]\\d)|^(65048[5-9]|65049\\d|6505[0-2]\\d|65053[0-8])|^(65054[1-9]|6505[5-8]\\d|65059[0-8])|^(65070\\d|65071[0-8])|^65072[0-7]|^(65090[1-9]|65091\\d|650920)|^(65165[2-9]|6516[6-7]\\d)|^(65500\\d|65501\\d)|^(65502[1-9]|6550[3-4]\\d|65505[0-8])|^(65092[1-9]|65097[0-8])/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:\"hipercard\",pattern:/^(384100|384140|384160|606282|637095|637568|60(?!11))/,format:c,length:[14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:\"jcb\",pattern:/^(308[8-9]|309[0-3]|3094[0]{4}|309[6-9]|310[0-2]|311[2-9]|3120|315[8-9]|333[7-9]|334[0-9]|35)/,format:c,length:[16,19],cvcLength:[3],luhn:!0},{type:\"laser\",pattern:/^(6706|6771|6709)/,format:c,length:[16,17,18,19],cvcLength:[3],luhn:!0},{type:\"maestro\",pattern:/^(50|5[6-9]|6007|6220|6304|6703|6708|6759|676[1-3])/,format:c,length:[12,13,14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:\"mastercard\",pattern:/^(5[1-5]|677189)|^(222[1-9]|2[3-6]\\d{2}|27[0-1]\\d|2720)/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:\"mir\",pattern:/^220[0-4][0-9][0-9]\\d{10}$/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:\"troy\",pattern:/^9792/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:\"unionpay\",pattern:/^62/,format:c,length:[16,17,18,19],cvcLength:[3],luhn:!1},{type:\"visaelectron\",pattern:/^4(026|17500|405|508|844|91[37])/,format:c,length:[16],cvcLength:[3],luhn:!0},{type:\"visa\",pattern:/^4/,format:c,length:[13,16],cvcLength:[3],luhn:!0}],n=function(r){var e,t,a,n,o;for(r=(r+\"\").replace(/\\D/g,\"\"),t=void 0,a=0,n=i.length;a<n;a++)e=i[a],(o=r.match(e.pattern))&&(!t||o[0].length>t[1][0].length)&&(t=[e,o]);return t&&t[0]},o=function(r){var e,t,a;for(t=0,a=i.length;t<a;t++)if((e=i[t]).type===r)return e},m=function(r){var e,t,a,n,o,i;for(o=!0,i=0,a=0,n=(t=(r+\"\").split(\"\").reverse()).length;a<n;a++)e=t[a],e=parseInt(e,10),(o=!o)&&(e*=2),e>9&&(e-=9),i+=e;return i%10==0},h=function(r){var e;try{if(null!=r.selectionStart&&r.selectionStart!==r.selectionEnd)return!0;if(null!=(\"undefined\"!=typeof document&&null!==document&&null!=(e=document.selection)?e.createRange:void 0)&&document.selection.createRange().text)return!0}catch(r){r}return!1},v=function(r){return setTimeout((function(){var t,n;return t=r.target,n=a.val(t),n=e.fns.formatCardNumber(n),d(t,n),a.trigger(t,\"change\")}))},s=function(r){return function(e){var t,o,i,d,c,p,l,s,f,g,u;if(e.which>0?(o=String.fromCharCode(e.which),u=a.val(e.target)+o):(o=e.data,u=a.val(e.target)),/^\\d+$/.test(o)){for(s=e.target,t=n(u),p=u.replace(/\\D/g,\"\").length,g=[16],t&&(g=t.length),r&&(g=g.filter((function(e){return e<=r}))),i=d=0,c=g.length;d<c;i=++d)if(!(p>=(f=g[i])&&g[i+1])&&p>=f)return;if(!h(s))return l=t&&\"amex\"===t.type?/^(\\d{4}|\\d{4}\\s\\d{6})$/:/(?:^|\\s)(\\d{4})$/,u=u.substring(0,u.length-1),l.test(u)?(e.preventDefault(),a.val(s,u+\" \"+o),a.trigger(s,\"change\")):void 0}}},p=function(r){var e,t;if(e=r.target,t=a.val(e),!r.meta&&8===r.which&&!h(e))return/\\d\\s$/.test(t)?(r.preventDefault(),a.val(e,t.replace(/\\d\\s$/,\"\")),a.trigger(e,\"change\")):/\\s\\d?$/.test(t)?(r.preventDefault(),a.val(e,t.replace(/\\s\\d?$/,\"\")),a.trigger(e,\"change\")):void 0},f=function(r){var e,t,n;if(t=r.target,r.which>0?(e=String.fromCharCode(r.which),n=a.val(t)+e):(e=r.data,n=a.val(t)),/^\\d+$/.test(e))return/^\\d$/.test(n)&&\"0\"!==n&&\"1\"!==n?(r.preventDefault(),a.val(t,\"0\"+n+\" / \"),a.trigger(t,\"change\")):/^\\d\\d$/.test(n)?(r.preventDefault(),a.val(t,n+\" / \"),a.trigger(t,\"change\")):void 0},j=function(r){var e,t,n;if(e=String.fromCharCode(r.which),/^\\d+$/.test(e))return t=r.target,n=a.val(t)+e,/^\\d$/.test(n)&&\"0\"!==n&&\"1\"!==n?(r.preventDefault(),a.val(t,\"0\"+n),a.trigger(t,\"change\")):/^\\d\\d$/.test(n)?(r.preventDefault(),a.val(t,\"\"+n),a.trigger(t,\"change\")):void 0},g=function(r){var e,t,n;if(e=String.fromCharCode(r.which),/^\\d+$/.test(e))return t=r.target,n=a.val(t),/^\\d\\d$/.test(n)?(a.val(t,n+\" / \"),a.trigger(t,\"change\")):void 0},u=function(r){var e,t;if(\"/\"===String.fromCharCode(r.which))return e=r.target,t=a.val(e),/^\\d$/.test(t)&&\"0\"!==t?(a.val(e,\"0\"+t+\" / \"),a.trigger(e,\"change\")):void 0},l=function(r){var e,t;if(!r.metaKey&&(e=r.target,t=a.val(e),8===r.which&&!h(e)))return/\\d(\\s|\\/)+$/.test(t)?(r.preventDefault(),a.val(e,t.replace(/\\d(\\s|\\/)*$/,\"\")),a.trigger(e,\"change\")):/\\s\\/\\s?\\d?$/.test(t)?(r.preventDefault(),a.val(e,t.replace(/\\s\\/\\s?\\d?$/,\"\")),a.trigger(e,\"change\")):void 0},E=function(r){var e;return!(!r.metaKey&&!r.ctrlKey)||(32===r.which?r.preventDefault():0===r.which||(r.which<33||(e=String.fromCharCode(r.which),/[\\d\\s]/.test(e)?void 0:r.preventDefault())))},y=function(r){return function(e){var t,o,i,d,c;if(d=e.target,o=String.fromCharCode(e.which),/^\\d+$/.test(o)&&!h(d))return c=(a.val(d)+o).replace(/\\D/g,\"\"),i=16,(t=n(c))&&(i=t.length[t.length.length-1]),r&&(i=Math.min(i,r)),c.length<=i?void 0:e.preventDefault()}},w=function(r,e){var t,n;if(n=r.target,t=String.fromCharCode(r.which),/^\\d+$/.test(t)&&!h(n))return(a.val(n)+t).replace(/\\D/g,\"\").length>e?r.preventDefault():void 0},k=function(r){return w(r,6)},C=function(r){return w(r,2)},z=function(r){return w(r,4)},x=function(r){var e,t;if(t=r.target,e=String.fromCharCode(r.which),/^\\d+$/.test(e)&&!h(t))return(a.val(t)+e).length<=4?void 0:r.preventDefault()},$=function(r){var t,n,o,d,c;if(d=r.target,c=a.val(d),o=e.fns.cardType(c)||\"unknown\",!a.hasClass(d,o))return t=function(){var r,e,t;for(t=[],r=0,e=i.length;r<e;r++)n=i[r],t.push(n.type);return t}(),a.removeClass(d,\"unknown\"),a.removeClass(d,t.join(\" \")),a.addClass(d,o),a.toggleClass(d,\"identified\",\"unknown\"!==o),a.trigger(d,\"payment.cardType\",o)},d=function(r,e){var t;if(t=r.selectionEnd,a.val(r,e),t)return r.selectionEnd=t},e=function(){function r(){}return r.J=a,r.fns={cardExpiryVal:function(r){var e,t,a;return e=(t=(r=r.replace(/\\s/g,\"\")).split(\"/\",2))[0],2===(null!=(a=t[1])?a.length:void 0)&&/^\\d+$/.test(a)&&(a=(new Date).getFullYear().toString().slice(0,2)+a),{month:e=parseInt(e,10),year:a=parseInt(a,10)}},validateCardNumber:function(r){var e,t;return r=(r+\"\").replace(/\\s+|-/g,\"\"),!!/^\\d+$/.test(r)&&(!!(e=n(r))&&(t=r.length,N.call(e.length,t)>=0&&(!1===e.luhn||m(r))))},validateCardExpiry:function(e,t){var n,o,i,d;return\"object\"==typeof e&&\"month\"in e?(e=(i=e).month,t=i.year):\"string\"==typeof e&&N.call(e,\"/\")>=0&&(e=(d=r.fns.cardExpiryVal(e)).month,t=d.year),!(!e||!t)&&(e=a.trim(e),t=a.trim(t),!!/^\\d+$/.test(e)&&(!!/^\\d+$/.test(t)&&(!!((e=parseInt(e,10))&&e<=12)&&(2===t.length&&(t=(new Date).getFullYear().toString().slice(0,2)+t),o=new Date(t,e),n=new Date,o.setMonth(o.getMonth()-1),o.setMonth(o.getMonth()+1,1),o>n))))},validateCardCVC:function(r,e){var t,n;return r=a.trim(r),!!/^\\d+$/.test(r)&&(e&&o(e)?(t=r.length,N.call(null!=(n=o(e))?n.cvcLength:void 0,t)>=0):r.length>=3&&r.length<=4)},cardType:function(r){var e;return r&&(null!=(e=n(r))?e.type:void 0)||null},formatCardNumber:function(r){var e,t,a,o;return(e=n(r))?(o=e.length[e.length.length-1],r=(r=r.replace(/\\D/g,\"\")).slice(0,o),e.format.global?null!=(a=r.match(e.format))?a.join(\" \"):void 0:null!=(t=e.format.exec(r))?(t.shift(),(t=t.filter((function(r){return r}))).join(\" \")):void 0):r}},r.restrictNumeric=function(r){return a.on(r,\"keypress\",E),a.on(r,\"input\",E)},r.cardExpiryVal=function(e){return r.fns.cardExpiryVal(a.val(e))},r.formatCardCVC=function(e){return r.restrictNumeric(e),a.on(e,\"keypress\",x),a.on(e,\"input\",x),e},r.formatCardExpiry=function(e){var t,n;return r.restrictNumeric(e),e.length&&2===e.length?(t=e[0],n=e[1],this.formatCardExpiryMultiple(t,n)):(a.on(e,\"keypress\",k),a.on(e,\"keypress\",f),a.on(e,\"keypress\",u),a.on(e,\"keypress\",g),a.on(e,\"keydown\",l),a.on(e,\"input\",f)),e},r.formatCardExpiryMultiple=function(r,e){return a.on(r,\"keypress\",C),a.on(r,\"keypress\",j),a.on(r,\"input\",j),a.on(e,\"keypress\",z),a.on(e,\"input\",z)},r.formatCardNumber=function(e,t){return r.restrictNumeric(e),a.on(e,\"keypress\",y(t)),a.on(e,\"keypress\",s(t)),a.on(e,\"keydown\",p),a.on(e,\"keyup blur\",$),a.on(e,\"blur\",s(t)),a.on(e,\"paste\",v),a.on(e,\"input\",s(t)),e},r.getCardArray=function(){return i},r.setCardArray=function(r){return i=r,!0},r.addToCardArray=function(r){return i.push(r)},r.removeFromCardArray=function(r){var e;for(e in i)i[e].type===r&&i.splice(e,1);return!0},r}(),r.exports=e,b.Payment=e}).call(this)},function(r,e,t){\"use strict\";(function(e){var a=t(9);r.exports=function(){return\"object\"==typeof e&&e&&e.Math===Math&&e.Array===Array?e:a}}).call(this,t(1))},function(r,e,t){\"use strict\";\"undefined\"!=typeof self?r.exports=self:\"undefined\"!=typeof window?r.exports=window:r.exports=Function(\"return this\")()},function(r,e,t){\"use strict\";r.exports=t(11)},function(r,e,t){\"use strict\";\n/*!\n * node.extend\n * Copyright 2011, John Resig\n * Dual licensed under the MIT or GPL Version 2 licenses.\n * http://jquery.org/license\n *\n * @fileoverview\n * Port of jQuery.extend that actually works on node.js\n */var a=t(12),n=t(13),o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,d=function(r,e,t){o&&\"__proto__\"===e?o(r,e,{enumerable:!0,configurable:!0,value:t,writable:!0}):r[e]=t},c=function(r,e){if(\"__proto__\"===e){if(!n(r,e))return;if(i)return i(r,e).value}return r[e]};r.exports=function r(){var e,t,n,o,i,p,l=arguments[0]||{},s=1,f=arguments.length,g=!1;for(\"boolean\"==typeof l&&(g=l,l=arguments[1]||{},s=2),\"object\"==typeof l||a.fn(l)||(l={});s<f;s++)if(null!=(e=arguments[s]))for(t in\"string\"==typeof e&&(e=e.split(\"\")),e)n=c(l,t),l!==(o=c(e,t))&&(g&&o&&(a.hash(o)||(i=a.array(o)))?(i?(i=!1,p=n&&a.array(n)?n:[]):p=n&&a.hash(n)?n:{},d(l,t,r(g,p,o))):void 0!==o&&d(l,t,o));return l}},function(r,e,t){\"use strict\";\n/**!\n * is\n * the definitive JavaScript type testing library\n *\n * @copyright 2013-2014 Enrico Marino / Jordan Harband\n * @license MIT\n */var a,n,o=Object.prototype,i=o.hasOwnProperty,d=o.toString;\"function\"==typeof Symbol&&(a=Symbol.prototype.valueOf),\"function\"==typeof BigInt&&(n=BigInt.prototype.valueOf);var c=function(r){return r!=r},p={boolean:1,number:1,string:1,undefined:1},l=/^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$/,s=/^[A-Fa-f0-9]+$/,f={};f.a=f.type=function(r,e){return typeof r===e},f.defined=function(r){return void 0!==r},f.empty=function(r){var e,t=d.call(r);if(\"[object Array]\"===t||\"[object Arguments]\"===t||\"[object String]\"===t)return 0===r.length;if(\"[object Object]\"===t){for(e in r)if(i.call(r,e))return!1;return!0}return!r},f.equal=function(r,e){if(r===e)return!0;var t,a=d.call(r);if(a!==d.call(e))return!1;if(\"[object Object]\"===a){for(t in r)if(!f.equal(r[t],e[t])||!(t in e))return!1;for(t in e)if(!f.equal(r[t],e[t])||!(t in r))return!1;return!0}if(\"[object Array]\"===a){if((t=r.length)!==e.length)return!1;for(;t--;)if(!f.equal(r[t],e[t]))return!1;return!0}return\"[object Function]\"===a?r.prototype===e.prototype:\"[object Date]\"===a&&r.getTime()===e.getTime()},f.hosted=function(r,e){var t=typeof e[r];return\"object\"===t?!!e[r]:!p[t]},f.instance=f.instanceof=function(r,e){return r instanceof e},f.nil=f.null=function(r){return null===r},f.undef=f.undefined=function(r){return void 0===r},f.args=f.arguments=function(r){var e=\"[object Arguments]\"===d.call(r),t=!f.array(r)&&f.arraylike(r)&&f.object(r)&&f.fn(r.callee);return e||t},f.array=Array.isArray||function(r){return\"[object Array]\"===d.call(r)},f.args.empty=function(r){return f.args(r)&&0===r.length},f.array.empty=function(r){return f.array(r)&&0===r.length},f.arraylike=function(r){return!!r&&!f.bool(r)&&i.call(r,\"length\")&&isFinite(r.length)&&f.number(r.length)&&r.length>=0},f.bool=f.boolean=function(r){return\"[object Boolean]\"===d.call(r)},f.false=function(r){return f.bool(r)&&!1===Boolean(Number(r))},f.true=function(r){return f.bool(r)&&!0===Boolean(Number(r))},f.date=function(r){return\"[object Date]\"===d.call(r)},f.date.valid=function(r){return f.date(r)&&!isNaN(Number(r))},f.element=function(r){return void 0!==r&&\"undefined\"!=typeof HTMLElement&&r instanceof HTMLElement&&1===r.nodeType},f.error=function(r){return\"[object Error]\"===d.call(r)},f.fn=f.function=function(r){if(\"undefined\"!=typeof window&&r===window.alert)return!0;var e=d.call(r);return\"[object Function]\"===e||\"[object GeneratorFunction]\"===e||\"[object AsyncFunction]\"===e},f.number=function(r){return\"[object Number]\"===d.call(r)},f.infinite=function(r){return r===1/0||r===-1/0},f.decimal=function(r){return f.number(r)&&!c(r)&&!f.infinite(r)&&r%1!=0},f.divisibleBy=function(r,e){var t=f.infinite(r),a=f.infinite(e),n=f.number(r)&&!c(r)&&f.number(e)&&!c(e)&&0!==e;return t||a||n&&r%e==0},f.integer=f.int=function(r){return f.number(r)&&!c(r)&&r%1==0},f.maximum=function(r,e){if(c(r))throw new TypeError(\"NaN is not a valid value\");if(!f.arraylike(e))throw new TypeError(\"second argument must be array-like\");for(var t=e.length;--t>=0;)if(r<e[t])return!1;return!0},f.minimum=function(r,e){if(c(r))throw new TypeError(\"NaN is not a valid value\");if(!f.arraylike(e))throw new TypeError(\"second argument must be array-like\");for(var t=e.length;--t>=0;)if(r>e[t])return!1;return!0},f.nan=function(r){return!f.number(r)||r!=r},f.even=function(r){return f.infinite(r)||f.number(r)&&r==r&&r%2==0},f.odd=function(r){return f.infinite(r)||f.number(r)&&r==r&&r%2!=0},f.ge=function(r,e){if(c(r)||c(e))throw new TypeError(\"NaN is not a valid value\");return!f.infinite(r)&&!f.infinite(e)&&r>=e},f.gt=function(r,e){if(c(r)||c(e))throw new TypeError(\"NaN is not a valid value\");return!f.infinite(r)&&!f.infinite(e)&&r>e},f.le=function(r,e){if(c(r)||c(e))throw new TypeError(\"NaN is not a valid value\");return!f.infinite(r)&&!f.infinite(e)&&r<=e},f.lt=function(r,e){if(c(r)||c(e))throw new TypeError(\"NaN is not a valid value\");return!f.infinite(r)&&!f.infinite(e)&&r<e},f.within=function(r,e,t){if(c(r)||c(e)||c(t))throw new TypeError(\"NaN is not a valid value\");if(!f.number(r)||!f.number(e)||!f.number(t))throw new TypeError(\"all arguments must be numbers\");return f.infinite(r)||f.infinite(e)||f.infinite(t)||r>=e&&r<=t},f.object=function(r){return\"[object Object]\"===d.call(r)},f.primitive=function(r){return!r||!(\"object\"==typeof r||f.object(r)||f.fn(r)||f.array(r))},f.hash=function(r){return f.object(r)&&r.constructor===Object&&!r.nodeType&&!r.setInterval},f.regexp=function(r){return\"[object RegExp]\"===d.call(r)},f.string=function(r){return\"[object String]\"===d.call(r)},f.base64=function(r){return f.string(r)&&(!r.length||l.test(r))},f.hex=function(r){return f.string(r)&&(!r.length||s.test(r))},f.symbol=function(r){return\"function\"==typeof Symbol&&\"[object Symbol]\"===d.call(r)&&\"symbol\"==typeof a.call(r)},f.bigint=function(r){return\"function\"==typeof BigInt&&\"[object BigInt]\"===d.call(r)&&\"bigint\"==typeof n.call(r)},r.exports=f},function(r,e,t){\"use strict\";var a=t(14);r.exports=a.call(Function.call,Object.prototype.hasOwnProperty)},function(r,e,t){\"use strict\";var a=t(15);r.exports=Function.prototype.bind||a},function(r,e,t){\"use strict\";var a=\"Function.prototype.bind called on incompatible \",n=Array.prototype.slice,o=Object.prototype.toString;r.exports=function(r){var e=this;if(\"function\"!=typeof e||\"[object Function]\"!==o.call(e))throw new TypeError(a+e);for(var t,i=n.call(arguments,1),d=function(){if(this instanceof t){var a=e.apply(this,i.concat(n.call(arguments)));return Object(a)===a?a:this}return e.apply(r,i.concat(n.call(arguments)))},c=Math.max(0,e.length-i.length),p=[],l=0;l<c;l++)p.push(\"$\"+l);if(t=Function(\"binder\",\"return function (\"+p.join(\",\")+\"){ return binder.apply(this,arguments); }\")(d),e.prototype){var s=function(){};s.prototype=e.prototype,t.prototype=new s,s.prototype=null}return t}}]);","/* \n @package NOTY - Dependency-free notification library \n @version version: 3.2.0-beta \n @contributors https://github.com/needim/noty/graphs/contributors \n @documentation Examples and Documentation - https://ned.im/noty \n @license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php \n*/\n\n!function(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(\"Noty\",[],e):\"object\"==typeof exports?exports.Noty=e():t.Noty=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,\"a\",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p=\"\",e(e.s=6)}([function(t,e,n){\"use strict\";function o(t,e,n){var o=void 0;if(!n){for(o in e)if(e.hasOwnProperty(o)&&e[o]===t)return!0}else for(o in e)if(e.hasOwnProperty(o)&&e[o]===t)return!0;return!1}function i(t){t=t||window.event,void 0!==t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",e=\"noty_\"+t+\"_\";return e+=\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return(\"x\"===t?e:3&e|8).toString(16)})}function s(t){var e=t.offsetHeight,n=window.getComputedStyle(t);return e+=parseInt(n.marginTop)+parseInt(n.marginBottom)}function u(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e=e.split(\" \");for(var i=0;i<e.length;i++)document.addEventListener?t.addEventListener(e[i],n,o):document.attachEvent&&t.attachEvent(\"on\"+e[i],n)}function a(t,e){return(\"string\"==typeof t?t:f(t)).indexOf(\" \"+e+\" \")>=0}function c(t,e){var n=f(t),o=n+e;a(n,e)||(t.className=o.substring(1))}function l(t,e){var n=f(t),o=void 0;a(t,e)&&(o=n.replace(\" \"+e+\" \",\" \"),t.className=o.substring(1,o.length-1))}function d(t){t.parentNode&&t.parentNode.removeChild(t)}function f(t){return(\" \"+(t&&t.className||\"\")+\" \").replace(/\\s+/gi,\" \")}function h(){function t(){b.PageHidden=document[s],o()}function e(){b.PageHidden=!0,o()}function n(){b.PageHidden=!1,o()}function o(){b.PageHidden?i():r()}function i(){setTimeout(function(){Object.keys(b.Store).forEach(function(t){b.Store.hasOwnProperty(t)&&b.Store[t].options.visibilityControl&&b.Store[t].stop()})},100)}function r(){setTimeout(function(){Object.keys(b.Store).forEach(function(t){b.Store.hasOwnProperty(t)&&b.Store[t].options.visibilityControl&&b.Store[t].resume()}),b.queueRenderAll()},100)}var s=void 0,a=void 0;void 0!==document.hidden?(s=\"hidden\",a=\"visibilitychange\"):void 0!==document.msHidden?(s=\"msHidden\",a=\"msvisibilitychange\"):void 0!==document.webkitHidden&&(s=\"webkitHidden\",a=\"webkitvisibilitychange\"),a&&u(document,a,t),u(window,\"blur\",e),u(window,\"focus\",n)}function p(t){if(t.hasSound){var e=document.createElement(\"audio\");t.options.sounds.sources.forEach(function(t){var n=document.createElement(\"source\");n.src=t,n.type=\"audio/\"+m(t),e.appendChild(n)}),t.barDom?t.barDom.appendChild(e):document.querySelector(\"body\").appendChild(e),e.volume=t.options.sounds.volume,t.soundPlayed||(e.play(),t.soundPlayed=!0),e.onended=function(){d(e)}}}function m(t){return t.match(/\\.([^.]+)$/)[1]}Object.defineProperty(e,\"__esModule\",{value:!0}),e.css=e.deepExtend=e.animationEndEvents=void 0;var v=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t};e.inArray=o,e.stopPropagation=i,e.generateID=r,e.outerHeight=s,e.addListener=u,e.hasClass=a,e.addClass=c,e.removeClass=l,e.remove=d,e.classList=f,e.visibilityChangeFlow=h,e.createAudioElements=p;var y=n(1),b=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(y);e.animationEndEvents=\"webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend\",e.deepExtend=function t(e){e=e||{};for(var n=1;n<arguments.length;n++){var o=arguments[n];if(o)for(var i in o)o.hasOwnProperty(i)&&(Array.isArray(o[i])?e[i]=o[i]:\"object\"===v(o[i])&&null!==o[i]?e[i]=t(e[i],o[i]):e[i]=o[i])}return e},e.css=function(){function t(t){return t.replace(/^-ms-/,\"ms-\").replace(/-([\\da-z])/gi,function(t,e){return e.toUpperCase()})}function e(t){var e=document.body.style;if(t in e)return t;for(var n=i.length,o=t.charAt(0).toUpperCase()+t.slice(1),r=void 0;n--;)if((r=i[n]+o)in e)return r;return t}function n(n){return n=t(n),r[n]||(r[n]=e(n))}function o(t,e,o){e=n(e),t.style[e]=o}var i=[\"Webkit\",\"O\",\"Moz\",\"ms\"],r={};return function(t,e){var n=arguments,i=void 0,r=void 0;if(2===n.length)for(i in e)e.hasOwnProperty(i)&&void 0!==(r=e[i])&&e.hasOwnProperty(i)&&o(t,i,r);else o(t,n[1],n[2])}}()},function(t,e,n){\"use strict\";function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"global\",e=0,n=x;return E.hasOwnProperty(t)&&(n=E[t].maxVisible,Object.keys(P).forEach(function(n){P[n].options.queue!==t||P[n].closed||e++})),{current:e,maxVisible:n}}function i(t){E.hasOwnProperty(t.options.queue)||(E[t.options.queue]={maxVisible:x,queue:[]}),E[t.options.queue].queue.push(t)}function r(t){if(E.hasOwnProperty(t.options.queue)){var e=[];Object.keys(E[t.options.queue].queue).forEach(function(n){E[t.options.queue].queue[n].id!==t.id&&e.push(E[t.options.queue].queue[n])}),E[t.options.queue].queue=e}}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"global\";if(E.hasOwnProperty(t)){var e=E[t].queue.shift();e&&e.show()}}function u(){Object.keys(E).forEach(function(t){s(t)})}function a(t){var e=k.generateID(\"ghost\"),n=document.createElement(\"div\");n.setAttribute(\"id\",e),k.css(n,{height:k.outerHeight(t.barDom)+\"px\"}),t.barDom.insertAdjacentHTML(\"afterend\",n.outerHTML),k.remove(t.barDom),n=document.getElementById(e),k.addClass(n,\"noty_fix_effects_height\"),k.addListener(n,k.animationEndEvents,function(){k.remove(n)})}function c(t){m(t);var e='<div class=\"noty_body\">'+t.options.text+\"</div>\"+d(t)+'<div class=\"noty_progressbar\"></div>';t.barDom=document.createElement(\"div\"),t.barDom.setAttribute(\"id\",t.id),k.addClass(t.barDom,\"noty_bar noty_type__\"+t.options.type+\" noty_theme__\"+t.options.theme),t.barDom.innerHTML=e,b(t,\"onTemplate\")}function l(t){return!(!t.options.buttons||!Object.keys(t.options.buttons).length)}function d(t){if(l(t)){var e=document.createElement(\"div\");return k.addClass(e,\"noty_buttons\"),Object.keys(t.options.buttons).forEach(function(n){e.appendChild(t.options.buttons[n].dom)}),t.options.buttons.forEach(function(t){e.appendChild(t.dom)}),e.outerHTML}return\"\"}function f(t){t.options.modal&&(0===C&&p(),e.DocModalCount=C+=1)}function h(t){if(t.options.modal&&C>0&&(e.DocModalCount=C-=1,C<=0)){var n=document.querySelector(\".noty_modal\");n&&(k.removeClass(n,\"noty_modal_open\"),k.addClass(n,\"noty_modal_close\"),k.addListener(n,k.animationEndEvents,function(){k.remove(n)}))}}function p(){var t=document.querySelector(\"body\"),e=document.createElement(\"div\");k.addClass(e,\"noty_modal\"),t.insertBefore(e,t.firstChild),k.addClass(e,\"noty_modal_open\"),k.addListener(e,k.animationEndEvents,function(){k.removeClass(e,\"noty_modal_open\")})}function m(t){if(t.options.container)return void(t.layoutDom=document.querySelector(t.options.container));var e=\"noty_layout__\"+t.options.layout;t.layoutDom=document.querySelector(\"div#\"+e),t.layoutDom||(t.layoutDom=document.createElement(\"div\"),t.layoutDom.setAttribute(\"id\",e),t.layoutDom.setAttribute(\"role\",\"alert\"),t.layoutDom.setAttribute(\"aria-live\",\"polite\"),k.addClass(t.layoutDom,\"noty_layout\"),document.querySelector(\"body\").appendChild(t.layoutDom))}function v(t){t.options.timeout&&(t.options.progressBar&&t.progressDom&&k.css(t.progressDom,{transition:\"width \"+t.options.timeout+\"ms linear\",width:\"0%\"}),clearTimeout(t.closeTimer),t.closeTimer=setTimeout(function(){t.close()},t.options.timeout))}function y(t){t.options.timeout&&t.closeTimer&&(clearTimeout(t.closeTimer),t.closeTimer=-1,t.options.progressBar&&t.progressDom&&k.css(t.progressDom,{transition:\"width 0ms linear\",width:\"100%\"}))}function b(t,e){t.listeners.hasOwnProperty(e)&&t.listeners[e].forEach(function(e){\"function\"==typeof e&&e.apply(t)})}function w(t){b(t,\"afterShow\"),v(t),k.addListener(t.barDom,\"mouseenter\",function(){y(t)}),k.addListener(t.barDom,\"mouseleave\",function(){v(t)})}function g(t){delete P[t.id],t.closing=!1,b(t,\"afterClose\"),k.remove(t.barDom),0!==t.layoutDom.querySelectorAll(\".noty_bar\").length||t.options.container||k.remove(t.layoutDom),(k.inArray(\"docVisible\",t.options.titleCount.conditions)||k.inArray(\"docHidden\",t.options.titleCount.conditions))&&D.decrement(),s(t.options.queue)}Object.defineProperty(e,\"__esModule\",{value:!0}),e.Defaults=e.Store=e.Queues=e.DefaultMaxVisible=e.docTitle=e.DocModalCount=e.PageHidden=void 0,e.getQueueCounts=o,e.addToQueue=i,e.removeFromQueue=r,e.queueRender=s,e.queueRenderAll=u,e.ghostFix=a,e.build=c,e.hasButtons=l,e.handleModal=f,e.handleModalClose=h,e.queueClose=v,e.dequeueClose=y,e.fire=b,e.openFlow=w,e.closeFlow=g;var _=n(0),k=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(_),C=(e.PageHidden=!1,e.DocModalCount=0),S={originalTitle:null,count:0,changed:!1,timer:-1},D=e.docTitle={increment:function(){S.count++,D._update()},decrement:function(){if(--S.count<=0)return void D._clear();D._update()},_update:function(){var t=document.title;S.changed?document.title=\"(\"+S.count+\") \"+S.originalTitle:(S.originalTitle=t,document.title=\"(\"+S.count+\") \"+t,S.changed=!0)},_clear:function(){S.changed&&(S.count=0,document.title=S.originalTitle,S.changed=!1)}},x=e.DefaultMaxVisible=5,E=e.Queues={global:{maxVisible:x,queue:[]}},P=e.Store={};e.Defaults={type:\"alert\",layout:\"topRight\",theme:\"mint\",text:\"\",timeout:!1,progressBar:!0,closeWith:[\"click\"],animation:{open:\"noty_effects_open\",close:\"noty_effects_close\"},id:!1,force:!1,killer:!1,queue:\"global\",container:!1,buttons:[],callbacks:{beforeShow:null,onShow:null,afterShow:null,onClose:null,afterClose:null,onClick:null,onHover:null,onTemplate:null},sounds:{sources:[],volume:1,conditions:[]},titleCount:{conditions:[]},modal:!1,visibilityControl:!1}},function(t,e,n){\"use strict\";function o(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}Object.defineProperty(e,\"__esModule\",{value:!0}),e.NotyButton=void 0;var i=n(0),r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i);e.NotyButton=function t(e,n,i){var s=this,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return o(this,t),this.dom=document.createElement(\"button\"),this.dom.innerHTML=e,this.id=u.id=u.id||r.generateID(\"button\"),this.cb=i,Object.keys(u).forEach(function(t){s.dom.setAttribute(t,u[t])}),r.addClass(this.dom,n||\"noty_btn\"),this}},function(t,e,n){\"use strict\";function o(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}Object.defineProperty(e,\"__esModule\",{value:!0});var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,\"value\"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();e.Push=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"/service-worker.js\";return o(this,t),this.subData={},this.workerPath=e,this.listeners={onPermissionGranted:[],onPermissionDenied:[],onSubscriptionSuccess:[],onSubscriptionCancel:[],onWorkerError:[],onWorkerSuccess:[],onWorkerNotSupported:[]},this}return i(t,[{key:\"on\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return\"function\"==typeof e&&this.listeners.hasOwnProperty(t)&&this.listeners[t].push(e),this}},{key:\"fire\",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.listeners.hasOwnProperty(t)&&this.listeners[t].forEach(function(t){\"function\"==typeof t&&t.apply(e,n)})}},{key:\"create\",value:function(){console.log(\"NOT IMPLEMENTED YET\")}},{key:\"isSupported\",value:function(){var t=!1;try{t=window.Notification||window.webkitNotifications||navigator.mozNotification||window.external&&void 0!==window.external.msIsSiteMode()}catch(t){}return t}},{key:\"getPermissionStatus\",value:function(){var t=\"default\";if(window.Notification&&window.Notification.permissionLevel)t=window.Notification.permissionLevel;else if(window.webkitNotifications&&window.webkitNotifications.checkPermission)switch(window.webkitNotifications.checkPermission()){case 1:t=\"default\";break;case 0:t=\"granted\";break;default:t=\"denied\"}else window.Notification&&window.Notification.permission?t=window.Notification.permission:navigator.mozNotification?t=\"granted\":window.external&&void 0!==window.external.msIsSiteMode()&&(t=window.external.msIsSiteMode()?\"granted\":\"default\");return t.toString().toLowerCase()}},{key:\"getEndpoint\",value:function(t){var e=t.endpoint,n=t.subscriptionId;return n&&-1===e.indexOf(n)&&(e+=\"/\"+n),e}},{key:\"isSWRegistered\",value:function(){try{return\"activated\"===navigator.serviceWorker.controller.state}catch(t){return!1}}},{key:\"unregisterWorker\",value:function(){var t=this;\"serviceWorker\"in navigator&&navigator.serviceWorker.getRegistrations().then(function(e){var n=!0,o=!1,i=void 0;try{for(var r,s=e[Symbol.iterator]();!(n=(r=s.next()).done);n=!0){r.value.unregister(),t.fire(\"onSubscriptionCancel\")}}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}})}},{key:\"requestSubscription\",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this,o=this.getPermissionStatus(),i=function(o){\"granted\"===o?(t.fire(\"onPermissionGranted\"),\"serviceWorker\"in navigator?navigator.serviceWorker.register(t.workerPath).then(function(){navigator.serviceWorker.ready.then(function(t){n.fire(\"onWorkerSuccess\"),t.pushManager.subscribe({userVisibleOnly:e}).then(function(t){var e=t.getKey(\"p256dh\"),o=t.getKey(\"auth\");n.subData={endpoint:n.getEndpoint(t),p256dh:e?window.btoa(String.fromCharCode.apply(null,new Uint8Array(e))):null,auth:o?window.btoa(String.fromCharCode.apply(null,new Uint8Array(o))):null},n.fire(\"onSubscriptionSuccess\",[n.subData])}).catch(function(t){n.fire(\"onWorkerError\",[t])})})}):n.fire(\"onWorkerNotSupported\")):\"denied\"===o&&(t.fire(\"onPermissionDenied\"),t.unregisterWorker())};\"default\"===o?window.Notification&&window.Notification.requestPermission?window.Notification.requestPermission(i):window.webkitNotifications&&window.webkitNotifications.checkPermission&&window.webkitNotifications.requestPermission(i):i(o)}}]),t}()},function(t,e,n){(function(e,o){/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version 4.1.1\n */\n!function(e,n){t.exports=n()}(0,function(){\"use strict\";function t(t){var e=typeof t;return null!==t&&(\"object\"===e||\"function\"===e)}function i(t){return\"function\"==typeof t}function r(t){z=t}function s(t){U=t}function u(){return void 0!==R?function(){R(c)}:a()}function a(){var t=setTimeout;return function(){return t(c,1)}}function c(){for(var t=0;t<I;t+=2){(0,X[t])(X[t+1]),X[t]=void 0,X[t+1]=void 0}I=0}function l(t,e){var n=arguments,o=this,i=new this.constructor(f);void 0===i[tt]&&A(i);var r=o._state;return r?function(){var t=n[r-1];U(function(){return P(r,i,t,o._result)})}():S(o,i,t,e),i}function d(t){var e=this;if(t&&\"object\"==typeof t&&t.constructor===e)return t;var n=new e(f);return g(n,t),n}function f(){}function h(){return new TypeError(\"You cannot resolve a promise with itself\")}function p(){return new TypeError(\"A promises callback cannot return that same promise.\")}function m(t){try{return t.then}catch(t){return it.error=t,it}}function v(t,e,n,o){try{t.call(e,n,o)}catch(t){return t}}function y(t,e,n){U(function(t){var o=!1,i=v(n,e,function(n){o||(o=!0,e!==n?g(t,n):k(t,n))},function(e){o||(o=!0,C(t,e))},\"Settle: \"+(t._label||\" unknown promise\"));!o&&i&&(o=!0,C(t,i))},t)}function b(t,e){e._state===nt?k(t,e._result):e._state===ot?C(t,e._result):S(e,void 0,function(e){return g(t,e)},function(e){return C(t,e)})}function w(t,e,n){e.constructor===t.constructor&&n===l&&e.constructor.resolve===d?b(t,e):n===it?(C(t,it.error),it.error=null):void 0===n?k(t,e):i(n)?y(t,e,n):k(t,e)}function g(e,n){e===n?C(e,h()):t(n)?w(e,n,m(n)):k(e,n)}function _(t){t._onerror&&t._onerror(t._result),D(t)}function k(t,e){t._state===et&&(t._result=e,t._state=nt,0!==t._subscribers.length&&U(D,t))}function C(t,e){t._state===et&&(t._state=ot,t._result=e,U(_,t))}function S(t,e,n,o){var i=t._subscribers,r=i.length;t._onerror=null,i[r]=e,i[r+nt]=n,i[r+ot]=o,0===r&&t._state&&U(D,t)}function D(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var o=void 0,i=void 0,r=t._result,s=0;s<e.length;s+=3)o=e[s],i=e[s+n],o?P(n,o,i,r):i(r);t._subscribers.length=0}}function x(){this.error=null}function E(t,e){try{return t(e)}catch(t){return rt.error=t,rt}}function P(t,e,n,o){var r=i(n),s=void 0,u=void 0,a=void 0,c=void 0;if(r){if(s=E(n,o),s===rt?(c=!0,u=s.error,s.error=null):a=!0,e===s)return void C(e,p())}else s=o,a=!0;e._state!==et||(r&&a?g(e,s):c?C(e,u):t===nt?k(e,s):t===ot&&C(e,s))}function T(t,e){try{e(function(e){g(t,e)},function(e){C(t,e)})}catch(e){C(t,e)}}function O(){return st++}function A(t){t[tt]=st++,t._state=void 0,t._result=void 0,t._subscribers=[]}function M(t,e){this._instanceConstructor=t,this.promise=new t(f),this.promise[tt]||A(this.promise),F(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?k(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&k(this.promise,this._result))):C(this.promise,q())}function q(){return new Error(\"Array Methods must be provided an Array\")}function j(t){return new M(this,t).promise}function N(t){var e=this;return new e(F(t)?function(n,o){for(var i=t.length,r=0;r<i;r++)e.resolve(t[r]).then(n,o)}:function(t,e){return e(new TypeError(\"You must pass an array to race.\"))})}function L(t){var e=this,n=new e(f);return C(n,t),n}function H(){throw new TypeError(\"You must pass a resolver function as the first argument to the promise constructor\")}function W(){throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\")}function Q(t){this[tt]=O(),this._result=this._state=void 0,this._subscribers=[],f!==t&&(\"function\"!=typeof t&&H(),this instanceof Q?T(this,t):W())}function V(){var t=void 0;if(void 0!==o)t=o;else if(\"undefined\"!=typeof self)t=self;else try{t=Function(\"return this\")()}catch(t){throw new Error(\"polyfill failed because global object is unavailable in this environment\")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if(\"[object Promise]\"===n&&!e.cast)return}t.Promise=Q}var B=void 0;B=Array.isArray?Array.isArray:function(t){return\"[object Array]\"===Object.prototype.toString.call(t)};var F=B,I=0,R=void 0,z=void 0,U=function(t,e){X[I]=t,X[I+1]=e,2===(I+=2)&&(z?z(c):Z())},Y=\"undefined\"!=typeof window?window:void 0,K=Y||{},G=K.MutationObserver||K.WebKitMutationObserver,$=\"undefined\"==typeof self&&void 0!==e&&\"[object process]\"==={}.toString.call(e),J=\"undefined\"!=typeof Uint8ClampedArray&&\"undefined\"!=typeof importScripts&&\"undefined\"!=typeof MessageChannel,X=new Array(1e3),Z=void 0;Z=$?function(){return function(){return e.nextTick(c)}}():G?function(){var t=0,e=new G(c),n=document.createTextNode(\"\");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}():J?function(){var t=new MessageChannel;return t.port1.onmessage=c,function(){return t.port2.postMessage(0)}}():void 0===Y?function(){try{var t=n(9);return R=t.runOnLoop||t.runOnContext,u()}catch(t){return a()}}():a();var tt=Math.random().toString(36).substring(16),et=void 0,nt=1,ot=2,it=new x,rt=new x,st=0;return M.prototype._enumerate=function(t){for(var e=0;this._state===et&&e<t.length;e++)this._eachEntry(t[e],e)},M.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,o=n.resolve;if(o===d){var i=m(t);if(i===l&&t._state!==et)this._settledAt(t._state,e,t._result);else if(\"function\"!=typeof i)this._remaining--,this._result[e]=t;else if(n===Q){var r=new n(f);w(r,t,i),this._willSettleAt(r,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(o(t),e)},M.prototype._settledAt=function(t,e,n){var o=this.promise;o._state===et&&(this._remaining--,t===ot?C(o,n):this._result[e]=n),0===this._remaining&&k(o,this._result)},M.prototype._willSettleAt=function(t,e){var n=this;S(t,void 0,function(t){return n._settledAt(nt,e,t)},function(t){return n._settledAt(ot,e,t)})},Q.all=j,Q.race=N,Q.resolve=d,Q.reject=L,Q._setScheduler=r,Q._setAsap=s,Q._asap=U,Q.prototype={constructor:Q,then:l,catch:function(t){return this.then(null,t)}},Q.polyfill=V,Q.Promise=Q,Q})}).call(e,n(7),n(8))},function(t,e){},function(t,e,n){\"use strict\";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}Object.defineProperty(e,\"__esModule\",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,\"value\"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();n(5);var s=n(4),u=function(t){return t&&t.__esModule?t:{default:t}}(s),a=n(0),c=o(a),l=n(1),d=o(l),f=n(2),h=n(3),p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i(this,t),this.options=c.deepExtend({},d.Defaults,e),d.Store[this.options.id]?d.Store[this.options.id]:(this.id=this.options.id||c.generateID(\"bar\"),this.closeTimer=-1,this.barDom=null,this.layoutDom=null,this.progressDom=null,this.showing=!1,this.shown=!1,this.closed=!1,this.closing=!1,this.killable=this.options.timeout||this.options.closeWith.length>0,this.hasSound=this.options.sounds.sources.length>0,this.soundPlayed=!1,this.listeners={beforeShow:[],onShow:[],afterShow:[],onClose:[],afterClose:[],onClick:[],onHover:[],onTemplate:[]},this.promises={show:null,close:null},this.on(\"beforeShow\",this.options.callbacks.beforeShow),this.on(\"onShow\",this.options.callbacks.onShow),this.on(\"afterShow\",this.options.callbacks.afterShow),this.on(\"onClose\",this.options.callbacks.onClose),this.on(\"afterClose\",this.options.callbacks.afterClose),this.on(\"onClick\",this.options.callbacks.onClick),this.on(\"onHover\",this.options.callbacks.onHover),this.on(\"onTemplate\",this.options.callbacks.onTemplate),this)}return r(t,[{key:\"on\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return\"function\"==typeof e&&this.listeners.hasOwnProperty(t)&&this.listeners[t].push(e),this}},{key:\"show\",value:function(){var e=this;if(this.showing||this.shown)return this;!0===this.options.killer?t.closeAll():\"string\"==typeof this.options.killer&&t.closeAll(this.options.killer);var n=d.getQueueCounts(this.options.queue);if(n.current>=n.maxVisible||d.PageHidden&&this.options.visibilityControl)return d.addToQueue(this),d.PageHidden&&this.hasSound&&c.inArray(\"docHidden\",this.options.sounds.conditions)&&c.createAudioElements(this),d.PageHidden&&c.inArray(\"docHidden\",this.options.titleCount.conditions)&&d.docTitle.increment(),this;if(d.Store[this.id]=this,d.fire(this,\"beforeShow\"),this.showing=!0,this.closing)return this.showing=!1,this;if(d.build(this),d.handleModal(this),this.options.force?this.layoutDom.insertBefore(this.barDom,this.layoutDom.firstChild):this.layoutDom.appendChild(this.barDom),this.hasSound&&!this.soundPlayed&&c.inArray(\"docVisible\",this.options.sounds.conditions)&&c.createAudioElements(this),c.inArray(\"docVisible\",this.options.titleCount.conditions)&&d.docTitle.increment(),this.shown=!0,this.closed=!1,d.hasButtons(this)&&Object.keys(this.options.buttons).forEach(function(t){var n=e.barDom.querySelector(\"#\"+e.options.buttons[t].id);c.addListener(n,\"click\",function(n){c.stopPropagation(n),e.options.buttons[t].cb(e)})}),this.progressDom=this.barDom.querySelector(\".noty_progressbar\"),c.inArray(\"click\",this.options.closeWith)&&(c.addClass(this.barDom,\"noty_close_with_click\"),c.addListener(this.barDom,\"click\",function(t){c.stopPropagation(t),d.fire(e,\"onClick\"),e.close()},!1)),c.addListener(this.barDom,\"mouseenter\",function(){d.fire(e,\"onHover\")},!1),this.options.timeout&&c.addClass(this.barDom,\"noty_has_timeout\"),this.options.progressBar&&c.addClass(this.barDom,\"noty_has_progressbar\"),c.inArray(\"button\",this.options.closeWith)){c.addClass(this.barDom,\"noty_close_with_button\");var o=document.createElement(\"div\");c.addClass(o,\"noty_close_button\"),o.innerHTML=\"×\",this.barDom.appendChild(o),c.addListener(o,\"click\",function(t){c.stopPropagation(t),e.close()},!1)}return d.fire(this,\"onShow\"),null===this.options.animation.open?this.promises.show=new u.default(function(t){t()}):\"function\"==typeof this.options.animation.open?this.promises.show=new u.default(this.options.animation.open.bind(this)):(c.addClass(this.barDom,this.options.animation.open),this.promises.show=new u.default(function(t){c.addListener(e.barDom,c.animationEndEvents,function(){c.removeClass(e.barDom,e.options.animation.open),t()})})),this.promises.show.then(function(){var t=e;setTimeout(function(){d.openFlow(t)},100)}),this}},{key:\"stop\",value:function(){return d.dequeueClose(this),this}},{key:\"resume\",value:function(){return d.queueClose(this),this}},{key:\"setTimeout\",value:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){if(this.stop(),this.options.timeout=t,this.barDom){this.options.timeout?c.addClass(this.barDom,\"noty_has_timeout\"):c.removeClass(this.barDom,\"noty_has_timeout\");var e=this;setTimeout(function(){e.resume()},100)}return this})},{key:\"setText\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.barDom&&(this.barDom.querySelector(\".noty_body\").innerHTML=t),e&&(this.options.text=t),this}},{key:\"setType\",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.barDom){c.classList(this.barDom).split(\" \").forEach(function(t){\"noty_type__\"===t.substring(0,11)&&c.removeClass(e.barDom,t)}),c.addClass(this.barDom,\"noty_type__\"+t)}return n&&(this.options.type=t),this}},{key:\"setTheme\",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.barDom){c.classList(this.barDom).split(\" \").forEach(function(t){\"noty_theme__\"===t.substring(0,12)&&c.removeClass(e.barDom,t)}),c.addClass(this.barDom,\"noty_theme__\"+t)}return n&&(this.options.theme=t),this}},{key:\"close\",value:function(){var t=this;return this.closed?this:this.shown?(d.fire(this,\"onClose\"),this.closing=!0,null===this.options.animation.close||!1===this.options.animation.close?this.promises.close=new u.default(function(t){t()}):\"function\"==typeof this.options.animation.close?this.promises.close=new u.default(this.options.animation.close.bind(this)):(c.addClass(this.barDom,this.options.animation.close),this.promises.close=new u.default(function(e){c.addListener(t.barDom,c.animationEndEvents,function(){t.options.force?c.remove(t.barDom):d.ghostFix(t),e()})})),this.promises.close.then(function(){d.closeFlow(t),d.handleModalClose(t)}),this.closed=!0,this):(d.removeFromQueue(this),this)}}],[{key:\"closeAll\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object.keys(d.Store).forEach(function(e){t?d.Store[e].options.queue===t&&d.Store[e].killable&&d.Store[e].close():d.Store[e].killable&&d.Store[e].close()}),this}},{key:\"clearQueue\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"global\";return d.Queues.hasOwnProperty(t)&&(d.Queues[t].queue=[]),this}},{key:\"overrideDefaults\",value:function(t){return d.Defaults=c.deepExtend({},d.Defaults,t),this}},{key:\"setMaxVisible\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d.DefaultMaxVisible,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"global\";return d.Queues.hasOwnProperty(e)||(d.Queues[e]={maxVisible:t,queue:[]}),d.Queues[e].maxVisible=t,this}},{key:\"button\",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new f.NotyButton(t,e,n,o)}},{key:\"version\",value:function(){return\"3.2.0-beta\"}},{key:\"Push\",value:function(t){return new h.Push(t)}},{key:\"Queues\",get:function(){return d.Queues}},{key:\"PageHidden\",get:function(){return d.PageHidden}}]),t}();e.default=p,\"undefined\"!=typeof window&&c.visibilityChangeFlow(),t.exports=e.default},function(t,e){function n(){throw new Error(\"setTimeout has not been defined\")}function o(){throw new Error(\"clearTimeout has not been defined\")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function r(t){if(d===clearTimeout)return clearTimeout(t);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function s(){m&&h&&(m=!1,h.length?p=h.concat(p):v=-1,p.length&&u())}function u(){if(!m){var t=i(s);m=!0;for(var e=p.length;e;){for(h=p,p=[];++v<e;)h&&h[v].run();v=-1,e=p.length}h=null,m=!1,r(t)}}function a(t,e){this.fun=t,this.array=e}function c(){}var l,d,f=t.exports={};!function(){try{l=\"function\"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{d=\"function\"==typeof clearTimeout?clearTimeout:o}catch(t){d=o}}();var h,p=[],m=!1,v=-1;f.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];p.push(new a(t,e)),1!==p.length||m||i(u)},a.prototype.run=function(){this.fun.apply(null,this.array)},f.title=\"browser\",f.browser=!0,f.env={},f.argv=[],f.version=\"\",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(t){return[]},f.binding=function(t){throw new Error(\"process.binding is not supported\")},f.cwd=function(){return\"/\"},f.chdir=function(t){throw new Error(\"process.chdir is not supported\")},f.umask=function(){return 0}},function(t,e){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(t){\"object\"==typeof window&&(n=window)}t.exports=n},function(t,e){}])});\n//# sourceMappingURL=noty.min.js.map","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 5);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar randomFromSeed = __webpack_require__(10);\n\nvar ORIGINAL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-';\nvar alphabet;\nvar previousSeed;\n\nvar shuffled;\n\nfunction reset() {\n shuffled = false;\n}\n\nfunction setCharacters(_alphabet_) {\n if (!_alphabet_) {\n if (alphabet !== ORIGINAL) {\n alphabet = ORIGINAL;\n reset();\n }\n return;\n }\n\n if (_alphabet_ === alphabet) {\n return;\n }\n\n if (_alphabet_.length !== ORIGINAL.length) {\n throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. You submitted ' + _alphabet_.length + ' characters: ' + _alphabet_);\n }\n\n var unique = _alphabet_.split('').filter(function(item, ind, arr){\n return ind !== arr.lastIndexOf(item);\n });\n\n if (unique.length) {\n throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. These characters were not unique: ' + unique.join(', '));\n }\n\n alphabet = _alphabet_;\n reset();\n}\n\nfunction characters(_alphabet_) {\n setCharacters(_alphabet_);\n return alphabet;\n}\n\nfunction setSeed(seed) {\n randomFromSeed.seed(seed);\n if (previousSeed !== seed) {\n reset();\n previousSeed = seed;\n }\n}\n\nfunction shuffle() {\n if (!alphabet) {\n setCharacters(ORIGINAL);\n }\n\n var sourceArray = alphabet.split('');\n var targetArray = [];\n var r = randomFromSeed.nextValue();\n var characterIndex;\n\n while (sourceArray.length > 0) {\n r = randomFromSeed.nextValue();\n characterIndex = Math.floor(r * sourceArray.length);\n targetArray.push(sourceArray.splice(characterIndex, 1)[0]);\n }\n return targetArray.join('');\n}\n\nfunction getShuffled() {\n if (shuffled) {\n return shuffled;\n }\n shuffled = shuffle();\n return shuffled;\n}\n\n/**\n * lookup shuffled letter\n * @param index\n * @returns {string}\n */\nfunction lookup(index) {\n var alphabetShuffled = getShuffled();\n return alphabetShuffled[index];\n}\n\nmodule.exports = {\n characters: characters,\n seed: setSeed,\n lookup: lookup,\n shuffled: getShuffled\n};\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.Toasted = exports.Extender = undefined;\n\nvar _toast = __webpack_require__(6);\n\nvar _toast2 = _interopRequireDefault(_toast);\n\nvar _animations = __webpack_require__(2);\n\nvar _animations2 = _interopRequireDefault(_animations);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar uuid = __webpack_require__(3);\n\n\n// add Object.assign Polyfill\n__webpack_require__(16).polyfill();\n\n/**\r\n * Allows Toasted to be Extended\r\n *\r\n */\nvar Extender = exports.Extender = function () {\n\n\treturn {\n\t\thook: {\n\t\t\toptions: [],\n\t\t\tactions: []\n\t\t},\n\t\trun: function run(name, callback) {\n\n\t\t\tif (!Array.isArray(this.hook[name])) {\n\t\t\t\tconsole.warn(\"[toasted] : hook not found\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.hook[name].forEach(function (hook) {\n\n\t\t\t\t// check if it is a function\n\t\t\t\tif (!hook && typeof hook !== 'function') return;\n\n\t\t\t\tcallback && callback(hook);\n\t\t\t});\n\t\t},\n\t\tutils: {\n\t\t\twarn: function warn(message) {\n\t\t\t\tconsole.warn('[toasted] : ' + message);\n\t\t\t}\n\t\t}\n\t};\n}();\n\n/**\r\n * Toast\r\n * core instance of toast\r\n *\r\n * @param _options\r\n * @returns {Toasted}\r\n * @constructor\r\n */\nvar Toasted = exports.Toasted = function Toasted(_options) {\n\tvar _this = this;\n\n\tif (!_options) _options = {};\n\n\t/**\r\n * Unique id of the toast\r\n */\n\tthis.id = uuid.generate();\n\n\t/**\r\n * Shared Options of the Toast\r\n */\n\tthis.options = _options;\n\n\t/**\r\n * Shared Toasts list\r\n */\n\tthis.global = {};\n\n\t/**\r\n * All Registered Groups\r\n */\n\tthis.groups = [];\n\n\t/**\r\n * All Registered Toasts\r\n */\n\tthis.toasts = [];\n\n\t/**\r\n * Create New Group of Toasts\r\n *\r\n * @param o\r\n */\n\tthis.group = function (o) {\n\n\t\tif (!o) o = {};\n\n\t\tif (!o.globalToasts) {\n\t\t\to.globalToasts = {};\n\t\t}\n\n\t\t// share parents global toasts\n\t\tObject.assign(o.globalToasts, _this.global);\n\n\t\t// tell parent about the group\n\t\tvar group = new Toasted(o);\n\t\t_this.groups.push(group);\n\n\t\treturn group;\n\t};\n\n\t/**\r\n * Base Toast Show Function\r\n *\r\n * @param message\r\n * @param options\r\n * @returns {*}\r\n * @private\r\n */\n\tvar _show = function _show(message, options) {\n\n\t\t// clone the global options\n\t\tvar _options = Object.assign({}, _this.options);\n\n\t\t// merge the cached global options with options\n\t\tObject.assign(_options, options);\n\n\t\tvar toast = new _toast2.default(_this);\n\t\treturn toast.create(message, _options);\n\t};\n\n\t/**\r\n *\r\n */\n\tvar initiateCustomToasts = function initiateCustomToasts() {\n\n\t\tvar customToasts = _this.options.globalToasts;\n\n\t\t// this will initiate toast for the custom toast.\n\t\tvar initiate = function initiate(message, options) {\n\n\t\t\t// check if passed option is a available method if so call it.\n\t\t\tif (typeof options === 'string' && _this[options]) {\n\t\t\t\treturn _this[options].apply(_this, [message, {}]);\n\t\t\t}\n\n\t\t\t// or else create a new toast with passed options.\n\t\t\treturn _show(message, options);\n\t\t};\n\n\t\tif (customToasts) {\n\n\t\t\t_this.global = {};\n\n\t\t\tObject.keys(customToasts).forEach(function (key) {\n\n\t\t\t\t// register the custom toast events to the Toast.custom property\n\t\t\t\t_this.global[key] = function () {\n\t\t\t\t\tvar payload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n\n\t\t\t\t\t// return the it in order to expose the Toast methods\n\t\t\t\t\treturn customToasts[key].apply(null, [payload, initiate]);\n\t\t\t\t};\n\t\t\t});\n\t\t}\n\t};\n\n\t/**\r\n * Register a Global Toast\r\n *\r\n * @param name\r\n * @param message\r\n * @param options\r\n */\n\tthis.register = function (name, message, options) {\n\t\toptions = options || {};\n\n\t\t!_this.options.globalToasts ? _this.options.globalToasts = {} : null;\n\n\t\t_this.options.globalToasts[name] = function (payload, initiate) {\n\n\t\t\tif (typeof message === 'function') {\n\t\t\t\tmessage = message(payload);\n\t\t\t}\n\n\t\t\treturn initiate(message, options);\n\t\t};\n\n\t\tinitiateCustomToasts();\n\t};\n\n\t/**\r\n * Show a Simple Toast\r\n *\r\n * @param message\r\n * @param options\r\n * @returns {*}\r\n */\n\tthis.show = function (message, options) {\n\t\treturn _show(message, options);\n\t};\n\n\t/**\r\n * Show a Toast with Success Style\r\n *\r\n * @param message\r\n * @param options\r\n * @returns {*}\r\n */\n\tthis.success = function (message, options) {\n\t\toptions = options || {};\n\t\toptions.type = \"success\";\n\t\treturn _show(message, options);\n\t};\n\n\t/**\r\n * Show a Toast with Info Style\r\n *\r\n * @param message\r\n * @param options\r\n * @returns {*}\r\n */\n\tthis.info = function (message, options) {\n\t\toptions = options || {};\n\t\toptions.type = \"info\";\n\t\treturn _show(message, options);\n\t};\n\n\t/**\r\n * Show a Toast with Error Style\r\n *\r\n * @param message\r\n * @param options\r\n * @returns {*}\r\n */\n\tthis.error = function (message, options) {\n\t\toptions = options || {};\n\t\toptions.type = \"error\";\n\t\treturn _show(message, options);\n\t};\n\n\t/**\r\n * Clear All Toasts\r\n *\r\n * @returns {boolean}\r\n */\n\tthis.clear = function () {\n\n\t\tvar toasts = _this.toasts;\n\t\tvar last = toasts.slice(-1)[0];\n\n\t\t// start vanishing from the bottom if toasts are on top\n\t\tif (last && last.options.position.includes('top')) {\n\t\t\ttoasts = toasts.reverse();\n\t\t}\n\n\t\t_animations2.default.clearAnimation(toasts);\n\t\t_this.toasts = [];\n\t};\n\n\t/**\r\n * Initiate custom toasts\r\n */\n\tinitiateCustomToasts();\n\n\treturn this;\n};\n\nexports.default = { Toasted: Toasted, Extender: Extender };\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _animejs = __webpack_require__(8);\n\nvar _animejs2 = _interopRequireDefault(_animejs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar duration = 300;\n\nexports.default = {\n animateIn: function animateIn(el) {\n (0, _animejs2.default)({\n targets: el,\n translateY: '-35px',\n opacity: 1,\n duration: duration,\n easing: 'easeOutCubic'\n });\n },\n animateOut: function animateOut(el, onComplete) {\n (0, _animejs2.default)({\n targets: el,\n opacity: 0,\n marginTop: '-40px',\n duration: duration,\n easing: 'easeOutExpo',\n complete: onComplete\n });\n },\n animateReset: function animateReset(el) {\n (0, _animejs2.default)({\n targets: el,\n left: 0,\n opacity: 1,\n duration: duration,\n easing: 'easeOutExpo'\n });\n },\n animatePanning: function animatePanning(el, left, opacity) {\n (0, _animejs2.default)({\n targets: el,\n duration: 10,\n easing: 'easeOutQuad',\n left: left,\n opacity: opacity\n });\n },\n animatePanEnd: function animatePanEnd(el, onComplete) {\n (0, _animejs2.default)({\n targets: el,\n opacity: 0,\n duration: duration,\n easing: 'easeOutExpo',\n complete: onComplete\n });\n },\n clearAnimation: function clearAnimation(toasts) {\n\n var timeline = _animejs2.default.timeline();\n\n toasts.forEach(function (t) {\n timeline.add({\n targets: t.el,\n opacity: 0,\n right: '-40px',\n duration: 300,\n offset: '-=150',\n easing: 'easeOutExpo',\n complete: function complete() {\n t.destroy();\n }\n });\n });\n }\n};\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nmodule.exports = __webpack_require__(9);\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar randomByte = __webpack_require__(11);\n\nfunction encode(lookup, number) {\n var loopCounter = 0;\n var done;\n\n var str = '';\n\n while (!done) {\n str = str + lookup( ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() );\n done = number < (Math.pow(16, loopCounter + 1 ) );\n loopCounter++;\n }\n return str;\n}\n\nmodule.exports = encode;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nvar __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _toasted = __webpack_require__(1);\n\n_toasted.Toasted.extend = _toasted.Extender.hook;\n_toasted.Toasted.utils = _toasted.Extender.utils;\n\n(function (root, factory) {\n\tif (true) {\n\t\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {\n\t\t\treturn root.Toasted = factory();\n\t\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\t} else if ((typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) === \"object\" && module.exports) {\n\t\tmodule.exports = root.Toasted = factory();\n\t} else {\n\t\troot.Toasted = factory();\n\t}\n})(window, function () {\n\treturn _toasted.Toasted;\n});\n\nexports.default = _toasted.Toasted;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports.Toast = undefined;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _hammerjs = __webpack_require__(7);\n\nvar _hammerjs2 = _interopRequireDefault(_hammerjs);\n\nvar _toasted = __webpack_require__(1);\n\nvar _animations = __webpack_require__(2);\n\nvar _animations2 = _interopRequireDefault(_animations);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar uuid = __webpack_require__(3);\n\nvar Toast = exports.Toast = function Toast(instance) {\n\tvar _this = this;\n\n\t/**\r\n * Compiled options of the toast\r\n */\n\tthis.options = {};\n\n\t/**\r\n * Unique id for the toast\r\n */\n\tthis.id = uuid.generate();\n\n\t/**\r\n * Toast Html Element\r\n *\r\n * @type {null|Element}\r\n */\n\tthis.toast = null;\n\n\t/**\r\n * Check if Initialized the toast\r\n *\r\n * @type {boolean}\r\n */\n\tvar initialized = false;\n\n\tvar constructor = function constructor() {\n\t\tinstance.toasts.push(_this);\n\t};\n\tconstructor();\n\n\t/**\r\n * Create Toast\r\n *\r\n * @param message\r\n * @param options\r\n * @returns {Toast}\r\n */\n\tthis.create = function (message, options) {\n\n\t\tif (!message || initialized) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions = setOptions(options);\n\t\tvar container = getContainer();\n\n\t\t_this.toast = document.createElement('div');\n\t\t_this.toast.classList.add('toasted');\n\n\t\t// add classes\n\t\tif (options.className) {\n\t\t\toptions.className.forEach(function (className) {\n\t\t\t\t_this.toast.classList.add(className);\n\t\t\t});\n\t\t}\n\n\t\t// Append the Message\n\t\tappendMessage(message);\n\n\t\t// add the touch events of the toast\n\t\taddTouchEvents();\n\n\t\t// add material icon if available\n\t\tcreateIcon();\n\n\t\t// append the actions\n\t\tappendActions();\n\n\t\t// append the toasts\n\t\tcontainer.appendChild(_this.toast);\n\n\t\t// animate toast\n\t\t_animations2.default.animateIn(_this.toast);\n\n\t\t// set its duration\n\t\tsetDuration();\n\n\t\t// TODO : remove this later, this is here to backward compatibility\n\t\t_this.el = _this.toast;\n\n\t\t// Let Instance know the toast is initialized\n\t\tinitialized = true;\n\n\t\treturn _this;\n\t};\n\n\t/**\r\n * Append Message to the Toast\r\n *\r\n * @param message\r\n */\n\tvar appendMessage = function appendMessage(message) {\n\n\t\tif (!message) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If type of parameter is HTML Element\n\t\tif ((typeof HTMLElement === 'undefined' ? 'undefined' : _typeof(HTMLElement)) === \"object\" ? message instanceof HTMLElement : message && (typeof message === 'undefined' ? 'undefined' : _typeof(message)) === \"object\" && message !== null && message.nodeType === 1 && typeof message.nodeName === \"string\") {\n\t\t\t_this.toast.appendChild(message);\n\t\t} else {\n\t\t\t// Insert as text;\n\t\t\t_this.toast.innerHTML = message;\n\t\t}\n\t};\n\n\t/**\r\n * Get the Toast Container\r\n *\r\n * @returns {Element}\r\n */\n\tvar getContainer = function getContainer() {\n\n\t\tvar container = document.getElementById(instance.id);\n\n\t\tif (container === null) {\n\t\t\tcontainer = document.createElement('div');\n\t\t\tcontainer.id = instance.id;\n\t\t\tdocument.body.appendChild(container);\n\t\t}\n\n\t\t// check if the container classes has changed if so update it\n\t\tif (container.className !== _this.options.containerClass.join(' ')) {\n\t\t\tcontainer.className = \"\";\n\t\t\t_this.options.containerClass.forEach(function (className) {\n\t\t\t\tcontainer.classList.add(className);\n\t\t\t});\n\t\t}\n\n\t\treturn container;\n\t};\n\n\t/**\r\n * Parse and Set Toast Options\r\n *\r\n * @param options\r\n * @returns {*}\r\n */\n\tvar setOptions = function setOptions(options) {\n\n\t\t// toast position\n\t\toptions.position = options.position || \"top-right\";\n\n\t\t// toast duration\n\t\toptions.duration = options.duration || null;\n\n\t\t// get action name\n\t\toptions.action = options.action || null;\n\n\t\t// check if the fullWidth is enabled\n\t\toptions.fullWidth = options.fullWidth || false;\n\n\t\t// check if the toast needs to be fitted in the screen (no margin gap between screen)\n\t\toptions.fitToScreen = options.fitToScreen || null;\n\n\t\t// class name to be added on the toast\n\t\toptions.className = options.className || null;\n\n\t\t// class name to be added on the toast container\n\t\toptions.containerClass = options.containerClass || null;\n\n\t\t// get icon name\n\t\toptions.icon = options.icon || null;\n\n\t\t// normal type will allow the basic color\n\t\toptions.type = options.type || \"default\";\n\n\t\t// normal type will allow the basic color\n\t\toptions.theme = options.theme || \"material\";\n\n\t\t// normal type will allow the basic color\n\t\toptions.color = options.color || null;\n\n\t\t// get icon color\n\t\toptions.iconColor = options.iconColor || null;\n\n\t\t// complete call back of the toast\n\t\toptions.onComplete = options.onComplete || null;\n\n\t\t// TODO : closeOnSwipe, singleton, iconPack\n\n\t\t/* transform options */\n\n\t\t// toast class\n\t\tif (options.className && typeof options.className === \"string\") {\n\t\t\toptions.className = options.className.split(' ');\n\t\t}\n\n\t\tif (!options.className) {\n\t\t\toptions.className = [];\n\t\t}\n\n\t\toptions.theme && options.className.push(options.theme.trim());\n\t\toptions.type && options.className.push(options.type);\n\n\t\t// toast container class\n\t\tif (options.containerClass && typeof options.containerClass === \"string\") {\n\t\t\toptions.containerClass = options.containerClass.split(' ');\n\t\t}\n\n\t\tif (!options.containerClass) {\n\t\t\toptions.containerClass = [];\n\t\t}\n\n\t\toptions.position && options.containerClass.push(options.position.trim());\n\t\toptions.fullWidth && options.containerClass.push('full-width');\n\t\toptions.fitToScreen && options.containerClass.push('fit-to-screen');\n\n\t\t// add toasted container class to top\n\t\toptions.containerClass.unshift('toasted-container');\n\n\t\t// HOOK : options\n\t\t_toasted.Extender.run(\"options\", function (hook) {\n\t\t\treturn hook(options, _this.options);\n\t\t});\n\n\t\t_this.options = options;\n\t\treturn options;\n\t};\n\n\t/**\r\n * Add Hammer Touch events to the Toast\r\n */\n\tvar addTouchEvents = function addTouchEvents() {\n\n\t\tvar toast = _this.toast;\n\n\t\t// Bind hammer\n\t\tvar hammerHandler = new _hammerjs2.default(toast, { prevent_default: false });\n\t\thammerHandler.on('pan', function (e) {\n\t\t\tvar deltaX = e.deltaX;\n\t\t\tvar activationDistance = 80;\n\n\t\t\t// Change toast state\n\t\t\tif (!toast.classList.contains('panning')) {\n\t\t\t\ttoast.classList.add('panning');\n\t\t\t}\n\n\t\t\tvar opacityPercent = 1 - Math.abs(deltaX / activationDistance);\n\t\t\tif (opacityPercent < 0) opacityPercent = 0;\n\n\t\t\t_animations2.default.animatePanning(toast, deltaX, opacityPercent);\n\t\t});\n\n\t\thammerHandler.on('panend', function (e) {\n\t\t\tvar deltaX = e.deltaX;\n\t\t\tvar activationDistance = 80;\n\n\t\t\t// If toast dragged past activation point\n\t\t\tif (Math.abs(deltaX) > activationDistance) {\n\n\t\t\t\t_animations2.default.animatePanEnd(toast, function () {\n\t\t\t\t\tif (typeof _this.options.onComplete === \"function\") {\n\t\t\t\t\t\t_this.options.onComplete();\n\t\t\t\t\t}\n\n\t\t\t\t\t_this.destroy();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\ttoast.classList.remove('panning');\n\t\t\t\t// Put toast back into original position\n\t\t\t\t_animations2.default.animateReset(toast);\n\t\t\t}\n\t\t});\n\t};\n\n\tvar createIcon = function createIcon() {\n\n\t\tvar options = _this.options;\n\n\t\t// add material icon if available\n\t\tif (options.icon) {\n\n\t\t\tvar iel = document.createElement('i');\n\t\t\tiel.classList.add('material-icons');\n\n\t\t\t// add color to the icon. priority : icon.color > option.color > theme\n\t\t\tiel.style.color = options.icon.color ? options.icon.color : options.color;\n\n\t\t\tif (options.icon.after && options.icon.name) {\n\t\t\t\tiel.textContent = options.icon.name;\n\t\t\t\tiel.classList.add('after');\n\t\t\t\t_this.toast.appendChild(iel);\n\t\t\t} else if (options.icon.name) {\n\t\t\t\tiel.textContent = options.icon.name;\n\t\t\t\t_this.toast.insertBefore(iel, _this.toast.firstChild);\n\t\t\t} else {\n\t\t\t\tiel.textContent = options.icon;\n\t\t\t\t_this.toast.insertBefore(iel, _this.toast.firstChild);\n\t\t\t}\n\t\t}\n\t};\n\n\t/**\r\n * Create Actions to the toast\r\n *\r\n * @param action\r\n * @returns {*}\r\n */\n\tvar createAction = function createAction(action) {\n\n\t\tif (!action) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar el = document.createElement('a');\n\n\t\t// add color to icon\n\t\tel.style.color = action.color ? action.color : _this.options.color;\n\n\t\tel.classList.add('action');\n\n\t\tif (action.text) {\n\t\t\tel.text = action.text;\n\t\t}\n\n\t\tif (action.href) {\n\t\t\tel.href = action.href;\n\t\t}\n\n\t\tif (action.icon) {\n\n\t\t\t// add icon class to style it\n\t\t\tel.classList.add('icon');\n\n\t\t\t// create icon element\n\t\t\tvar iel = document.createElement('i');\n\t\t\tiel.classList.add('material-icons');\n\t\t\tiel.textContent = action.icon;\n\n\t\t\t// append it to the button\n\t\t\tel.appendChild(iel);\n\t\t}\n\n\t\tif (action.class) {\n\n\t\t\tswitch (_typeof(action.class)) {\n\t\t\t\tcase 'string':\n\t\t\t\t\taction.class.split(' ').forEach(function (className) {\n\t\t\t\t\t\tel.classList.add(className);\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'array':\n\t\t\t\t\taction.class.forEach(function (className) {\n\t\t\t\t\t\tel.classList.add(className);\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tif (action.onClick && typeof action.onClick === 'function') {\n\t\t\tel.addEventListener('click', function (e) {\n\n\t\t\t\tif (action.onClick) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\taction.onClick(e, _this);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t// HOOK : actions\n\t\t_toasted.Extender.run(\"actions\", function (hook) {\n\t\t\treturn hook(el, action, _this, instance);\n\t\t});\n\n\t\treturn el;\n\t};\n\n\t/**\r\n * Append actions to the toast\r\n */\n\tvar appendActions = function appendActions() {\n\n\t\tvar options = _this.options;\n\t\tvar hasActions = false;\n\n\t\tvar actionWrapper = document.createElement('span');\n\t\tactionWrapper.classList.add('actions-wrapper');\n\n\t\t// create and append actions\n\t\tif (Array.isArray(options.action)) {\n\t\t\toptions.action.forEach(function (action) {\n\t\t\t\tvar el = createAction(action);\n\t\t\t\tif (el) {\n\t\t\t\t\tactionWrapper.appendChild(el);\n\t\t\t\t\thasActions = true;\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (_typeof(options.action) === 'object') {\n\t\t\tvar action = createAction(options.action);\n\t\t\tif (action) {\n\t\t\t\tactionWrapper.appendChild(action);\n\t\t\t\thasActions = true;\n\t\t\t}\n\t\t}\n\n\t\tif (hasActions) _this.toast.appendChild(actionWrapper);\n\t};\n\n\t/**\r\n * Set Toast duration to fade away\r\n */\n\tvar setDuration = function setDuration() {\n\n\t\t// Allows timer to be pause while being panned\n\t\tvar timeLeft = _this.options.duration;\n\t\tvar counterInterval = void 0;\n\t\tif (timeLeft !== null) {\n\t\t\tcounterInterval = setInterval(function () {\n\t\t\t\tif (_this.toast.parentNode === null) window.clearInterval(counterInterval);\n\n\t\t\t\t// If toast is not being dragged, decrease its time remaining\n\t\t\t\tif (!_this.toast.classList.contains('panning')) {\n\t\t\t\t\ttimeLeft -= 20;\n\t\t\t\t}\n\n\t\t\t\tif (timeLeft <= 0) {\n\t\t\t\t\t// Animate toast out\n\n\t\t\t\t\t_animations2.default.animateOut(_this.toast, function () {\n\t\t\t\t\t\t// Call the optional callback\n\t\t\t\t\t\tif (typeof _this.options.onComplete === \"function\") _this.options.onComplete();\n\n\t\t\t\t\t\t// Remove toast after it times out\n\t\t\t\t\t\t_this.destroy();\n\t\t\t\t\t});\n\n\t\t\t\t\twindow.clearInterval(counterInterval);\n\t\t\t\t}\n\t\t\t}, 20);\n\t\t}\n\t};\n\n\t/**\r\n * Change Text of the Toast\r\n *\r\n * @param message\r\n * @returns {Toast}\r\n */\n\tthis.text = function (message) {\n\t\tappendMessage(message);\n\t\treturn _this;\n\t};\n\n\t/**\r\n * Delete the Toast with Animation and Delay\r\n *\r\n * @param delay\r\n * @returns {boolean}\r\n */\n\tthis.delete = function () {\n\t\tvar delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 300;\n\n\n\t\tsetTimeout(function () {\n\t\t\t_animations2.default.animateOut(_this.toast, function () {\n\t\t\t\t_this.destroy();\n\t\t\t});\n\t\t}, delay);\n\n\t\treturn true;\n\t};\n\n\t/**\r\n * Destroy the Toast and Unregister from Instance\r\n */\n\tthis.destroy = function () {\n\n\t\tinstance.toasts = instance.toasts.filter(function (t) {\n\t\t\treturn t.id !== _this.id;\n\t\t});\n\n\t\tif (_this.toast.parentNode) _this.toast.parentNode.removeChild(_this.toast);\n\t};\n\n\t/**\r\n * @deprecated since 0.0.11\r\n * @param delay\r\n */\n\tthis.goAway = function (delay) {\n\t\treturn _this.delete(delay);\n\t};\n\n\t/**\r\n * @deprecated since 0.0.11\r\n * @type {*}\r\n */\n\tthis.el = this.toast;\n\n\treturn this;\n};\n\nexports.default = Toast;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n(function(window, document, exportName, undefined) {\n 'use strict';\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = document.createElement('div');\n\nvar TYPE_FUNCTION = 'function';\n\nvar round = Math.round;\nvar abs = Math.abs;\nvar now = Date.now;\n\n/**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\nfunction setTimeoutContext(fn, timeout, context) {\n return setTimeout(bindFn(fn, context), timeout);\n}\n\n/**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n\n/**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n return function() {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.<anonymous>\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n var log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nvar extend = deprecate(function extend(dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nvar merge = deprecate(function merge(dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nfunction inherit(child, base, properties) {\n var baseP = base.prototype,\n childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n\n/**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nfunction boolOrFn(val, args) {\n if (typeof val == TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n\n/**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\nfunction ifUndefined(val1, val2) {\n return (val1 === undefined) ? val2 : val1;\n}\n\n/**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node == parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\n/**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n\n/**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function sortUniqueArray(a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\n/**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nfunction prefixed(obj, property) {\n var prefix, prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n\n var i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n\n/**\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\n\nvar COMPUTE_INTERVAL = 25;\n\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\n\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\n\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nfunction Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n}\n\nInput.prototype = {\n /**\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler: function() { },\n\n /**\n * bind the events\n */\n init: function() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n },\n\n /**\n * unbind the events\n */\n destroy: function() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n};\n\n/**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nfunction createInputInstance(manager) {\n var Type;\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n\n/**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput;\n var firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n var target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center;\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input,\n deltaTime = input.timeStamp - last.timeStamp,\n velocity, velocityX, velocityY, direction;\n\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nfunction getCenter(pointers) {\n var pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0, y = 0, i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\n/**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * Mouse events input\n * @constructor\n * @extends Input\n */\nfunction MouseInput() {\n this.evEl = MOUSE_ELEMENT_EVENTS;\n this.evWin = MOUSE_WINDOW_EVENTS;\n\n this.pressed = false; // mousedown state\n\n Input.apply(this, arguments);\n}\n\ninherit(MouseInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function MEhandler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n});\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * Pointer events input\n * @constructor\n * @extends Input\n */\nfunction PointerEventInput() {\n this.evEl = POINTER_ELEMENT_EVENTS;\n this.evWin = POINTER_WINDOW_EVENTS;\n\n Input.apply(this, arguments);\n\n this.store = (this.manager.session.pointerEvents = []);\n}\n\ninherit(PointerEventInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function PEhandler(ev) {\n var store = this.store;\n var removePointer = false;\n\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n var isTouch = (pointerType == INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n var storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n});\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Touch events input\n * @constructor\n * @extends Input\n */\nfunction SingleTouchInput() {\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n this.started = false;\n\n Input.apply(this, arguments);\n}\n\ninherit(SingleTouchInput, Input, {\n handler: function TEhandler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nfunction TouchInput() {\n this.evTarget = TOUCH_TARGET_EVENTS;\n this.targetIds = {};\n\n Input.apply(this, arguments);\n}\n\ninherit(TouchInput, Input, {\n handler: function MTEhandler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i,\n targetTouches,\n changedTouches = toArray(ev.changedTouches),\n changedTargetTouches = [],\n target = this.target;\n\n // get target touches from touches\n targetTouches = allTouches.filter(function(touch) {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n\n/**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction TouchMouseInput() {\n Input.apply(this, arguments);\n\n var handler = bindFn(this.handler, this);\n this.touch = new TouchInput(this.manager, handler);\n this.mouse = new MouseInput(this.manager, handler);\n\n this.primaryTouch = null;\n this.lastTouches = [];\n}\n\ninherit(TouchMouseInput, Input, {\n /**\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n handler: function TMEhandler(manager, inputEvent, inputData) {\n var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\n isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n }\n\n // when we're in a touch event, record touches to de-dupe synthetic mouse event\n if (isTouch) {\n recordTouches.call(this, inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n return;\n }\n\n this.callback(manager, inputEvent, inputData);\n },\n\n /**\n * remove the event listeners\n */\n destroy: function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n }\n});\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction setLastTouch(eventData) {\n var touch = eventData.changedPointers[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {x: touch.clientX, y: touch.clientY};\n this.lastTouches.push(lastTouch);\n var lts = this.lastTouches;\n var removeLastTouch = function() {\n var i = lts.indexOf(lastTouch);\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n return false;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\n// magical touchAction value\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\n/**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nfunction TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n}\n\nTouchAction.prototype = {\n /**\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set: function(value) {\n // find out the touch-action by the event handlers\n if (value == TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n },\n\n /**\n * just re-set the touchAction value\n */\n update: function() {\n this.set(this.manager.options.touchAction);\n },\n\n /**\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute: function() {\n var actions = [];\n each(this.manager.recognizers, function(recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n },\n\n /**\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults: function(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n //do not prevent defaults if this is a tap gesture\n\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n },\n\n /**\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc: function(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n};\n\n/**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n var touchMap = {};\n var cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\n/**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nfunction Recognizer(options) {\n this.options = assign({}, this.defaults, options || {});\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.options.enable = ifUndefined(this.options.enable, true);\n\n this.state = STATE_POSSIBLE;\n\n this.simultaneous = {};\n this.requireFail = [];\n}\n\nRecognizer.prototype = {\n /**\n * @virtual\n * @type {Object}\n */\n defaults: {},\n\n /**\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set: function(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n },\n\n /**\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n },\n\n /**\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n },\n\n /**\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n },\n\n /**\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n },\n\n /**\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures: function() {\n return this.requireFail.length > 0;\n },\n\n /**\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith: function(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n },\n\n /**\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit: function(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n },\n\n /**\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit: function(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n },\n\n /**\n * can we emit?\n * @returns {boolean}\n */\n canEmit: function() {\n var i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n },\n\n /**\n * update the recognizer\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n },\n\n /**\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {Const} STATE\n */\n process: function(inputData) { }, // jshint ignore:line\n\n /**\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction: function() { },\n\n /**\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset: function() { }\n};\n\n/**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n\n/**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\nfunction directionStr(direction) {\n if (direction == DIRECTION_DOWN) {\n return 'down';\n } else if (direction == DIRECTION_UP) {\n return 'up';\n } else if (direction == DIRECTION_LEFT) {\n return 'left';\n } else if (direction == DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n\n/**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n\n/**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nfunction AttrRecognizer() {\n Recognizer.apply(this, arguments);\n}\n\ninherit(AttrRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof AttrRecognizer\n */\n defaults: {\n /**\n * @type {Number}\n * @default 1\n */\n pointers: 1\n },\n\n /**\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest: function(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n },\n\n /**\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process: function(input) {\n var state = this.state;\n var eventType = input.eventType;\n\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n});\n\n/**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PanRecognizer() {\n AttrRecognizer.apply(this, arguments);\n\n this.pX = null;\n this.pY = null;\n}\n\ninherit(PanRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PanRecognizer\n */\n defaults: {\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n },\n\n getTouchAction: function() {\n var direction = this.options.direction;\n var actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n },\n\n directionTest: function(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x != this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y != this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n },\n\n attrTest: function(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) &&\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n },\n\n emit: function(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PinchRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(PinchRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'pinch',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n },\n\n emit: function(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nfunction PressRecognizer() {\n Recognizer.apply(this, arguments);\n\n this._timer = null;\n this._input = null;\n}\n\ninherit(PressRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PressRecognizer\n */\n defaults: {\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9 // a minimal movement is ok, but keep it low\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_AUTO];\n },\n\n process: function(input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time, this);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(this.options.event + 'up', input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction RotateRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(RotateRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof RotateRecognizer\n */\n defaults: {\n event: 'rotate',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n});\n\n/**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction SwipeRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(SwipeRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof SwipeRecognizer\n */\n defaults: {\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n },\n\n getTouchAction: function() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n },\n\n attrTest: function(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return this._super.attrTest.call(this, input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers == this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n },\n\n emit: function(input) {\n var direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n});\n\n/**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nfunction TapRecognizer() {\n Recognizer.apply(this, arguments);\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n}\n\ninherit(TapRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10 // a multi-tap can be a bit off the initial position\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_MANIPULATION];\n },\n\n process: function(input) {\n var options = this.options;\n\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType != INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n var tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval, this);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n },\n\n failTimeout: function() {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_FAILED;\n }, this.options.interval, this);\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function() {\n if (this.state == STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Hammer(element, options) {\n options = options || {};\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n return new Manager(element, options);\n}\n\n/**\n * @const {string}\n */\nHammer.VERSION = '2.0.7';\n\n/**\n * default settings\n * @namespace\n */\nHammer.defaults = {\n /**\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {enable: false}],\n [PinchRecognizer, {enable: false}, ['rotate']],\n [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\n [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\n [TapRecognizer],\n [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\n [PressRecognizer]\n ],\n\n /**\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: 'none',\n\n /**\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: 'none',\n\n /**\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: 'none',\n\n /**\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: 'none',\n\n /**\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: 'none',\n\n /**\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: 'rgba(0,0,0,0)'\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n\n/**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Manager(element, options) {\n this.options = assign({}, Hammer.defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, function(item) {\n var recognizer = this.add(new (item[0])(item[1]));\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n}\n\nManager.prototype = {\n /**\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n set: function(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n },\n\n /**\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n stop: function(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n },\n\n /**\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n var session = this.session;\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n var recognizer;\n var recognizers = this.recognizers;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n var curRecognizer = session.curRecognizer;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n curRecognizer = session.curRecognizer = null;\n }\n\n var i = 0;\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer == curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n curRecognizer = session.curRecognizer = recognizer;\n }\n i++;\n }\n },\n\n /**\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n get: function(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event == recognizer) {\n return recognizers[i];\n }\n }\n return null;\n },\n\n /**\n * add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n add: function(recognizer) {\n if (invokeArrayArg(recognizer, 'add', this)) {\n return this;\n }\n\n // remove existing\n var existing = this.get(recognizer.options.event);\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n },\n\n /**\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n remove: function(recognizer) {\n if (invokeArrayArg(recognizer, 'remove', this)) {\n return this;\n }\n\n recognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, recognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n },\n\n /**\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n on: function(events, handler) {\n if (events === undefined) {\n return;\n }\n if (handler === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n },\n\n /**\n * unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n off: function(events, handler) {\n if (events === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n },\n\n /**\n * emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n emit: function(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n var handlers = this.handlers[event] && this.handlers[event].slice();\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function() {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n },\n\n /**\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n destroy: function() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n};\n\n/**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n if (!element.style) {\n return;\n }\n var prop;\n each(manager.options.cssProps, function(value, name) {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || '';\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent('Event');\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\nassign(Hammer, {\n INPUT_START: INPUT_START,\n INPUT_MOVE: INPUT_MOVE,\n INPUT_END: INPUT_END,\n INPUT_CANCEL: INPUT_CANCEL,\n\n STATE_POSSIBLE: STATE_POSSIBLE,\n STATE_BEGAN: STATE_BEGAN,\n STATE_CHANGED: STATE_CHANGED,\n STATE_ENDED: STATE_ENDED,\n STATE_RECOGNIZED: STATE_RECOGNIZED,\n STATE_CANCELLED: STATE_CANCELLED,\n STATE_FAILED: STATE_FAILED,\n\n DIRECTION_NONE: DIRECTION_NONE,\n DIRECTION_LEFT: DIRECTION_LEFT,\n DIRECTION_RIGHT: DIRECTION_RIGHT,\n DIRECTION_UP: DIRECTION_UP,\n DIRECTION_DOWN: DIRECTION_DOWN,\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n DIRECTION_ALL: DIRECTION_ALL,\n\n Manager: Manager,\n Input: Input,\n TouchAction: TouchAction,\n\n TouchInput: TouchInput,\n MouseInput: MouseInput,\n PointerEventInput: PointerEventInput,\n TouchMouseInput: TouchMouseInput,\n SingleTouchInput: SingleTouchInput,\n\n Recognizer: Recognizer,\n AttrRecognizer: AttrRecognizer,\n Tap: TapRecognizer,\n Pan: PanRecognizer,\n Swipe: SwipeRecognizer,\n Pinch: PinchRecognizer,\n Rotate: RotateRecognizer,\n Press: PressRecognizer,\n\n on: addEventListeners,\n off: removeEventListeners,\n each: each,\n merge: merge,\n extend: extend,\n assign: assign,\n inherit: inherit,\n bindFn: bindFn,\n prefixed: prefixed\n});\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n// style loader but by script tag, not by the loader.\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\nfreeGlobal.Hammer = Hammer;\n\nif (true) {\n !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {\n return Hammer;\n }.call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n} else if (typeof module != 'undefined' && module.exports) {\n module.exports = Hammer;\n} else {\n window[exportName] = Hammer;\n}\n\n})(window, document, 'Hammer');\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\n 2017 Julian Garnier\n Released under the MIT license\n*/\nvar $jscomp$this=this;\n(function(v,p){ true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (p),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):\"object\"===typeof module&&module.exports?module.exports=p():v.anime=p()})(this,function(){function v(a){if(!g.col(a))try{return document.querySelectorAll(a)}catch(b){}}function p(a){return a.reduce(function(a,d){return a.concat(g.arr(d)?p(d):d)},[])}function w(a){if(g.arr(a))return a;g.str(a)&&(a=v(a)||a);return a instanceof NodeList||a instanceof HTMLCollection?[].slice.call(a):[a]}function F(a,b){return a.some(function(a){return a===b})}\nfunction A(a){var b={},d;for(d in a)b[d]=a[d];return b}function G(a,b){var d=A(a),c;for(c in a)d[c]=b.hasOwnProperty(c)?b[c]:a[c];return d}function B(a,b){var d=A(a),c;for(c in b)d[c]=g.und(a[c])?b[c]:a[c];return d}function S(a){a=a.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i,function(a,b,d,h){return b+b+d+d+h+h});var b=/^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(a);a=parseInt(b[1],16);var d=parseInt(b[2],16),b=parseInt(b[3],16);return\"rgb(\"+a+\",\"+d+\",\"+b+\")\"}function T(a){function b(a,b,c){0>\nc&&(c+=1);1<c&&--c;return c<1/6?a+6*(b-a)*c:.5>c?b:c<2/3?a+(b-a)*(2/3-c)*6:a}var d=/hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.exec(a);a=parseInt(d[1])/360;var c=parseInt(d[2])/100,d=parseInt(d[3])/100;if(0==c)c=d=a=d;else{var e=.5>d?d*(1+c):d+c-d*c,l=2*d-e,c=b(l,e,a+1/3),d=b(l,e,a);a=b(l,e,a-1/3)}return\"rgb(\"+255*c+\",\"+255*d+\",\"+255*a+\")\"}function x(a){if(a=/([\\+\\-]?[0-9#\\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw|vh|deg|rad|turn)?/.exec(a))return a[2]}function U(a){if(-1<a.indexOf(\"translate\"))return\"px\";\nif(-1<a.indexOf(\"rotate\")||-1<a.indexOf(\"skew\"))return\"deg\"}function H(a,b){return g.fnc(a)?a(b.target,b.id,b.total):a}function C(a,b){if(b in a.style)return getComputedStyle(a).getPropertyValue(b.replace(/([a-z])([A-Z])/g,\"$1-$2\").toLowerCase())||\"0\"}function I(a,b){if(g.dom(a)&&F(V,b))return\"transform\";if(g.dom(a)&&(a.getAttribute(b)||g.svg(a)&&a[b]))return\"attribute\";if(g.dom(a)&&\"transform\"!==b&&C(a,b))return\"css\";if(null!=a[b])return\"object\"}function W(a,b){var d=U(b),d=-1<b.indexOf(\"scale\")?\n1:0+d;a=a.style.transform;if(!a)return d;for(var c=[],e=[],l=[],h=/(\\w+)\\((.+?)\\)/g;c=h.exec(a);)e.push(c[1]),l.push(c[2]);a=l.filter(function(a,c){return e[c]===b});return a.length?a[0]:d}function J(a,b){switch(I(a,b)){case \"transform\":return W(a,b);case \"css\":return C(a,b);case \"attribute\":return a.getAttribute(b)}return a[b]||0}function K(a,b){var d=/^(\\*=|\\+=|-=)/.exec(a);if(!d)return a;b=parseFloat(b);a=parseFloat(a.replace(d[0],\"\"));switch(d[0][0]){case \"+\":return b+a;case \"-\":return b-a;case \"*\":return b*\na}}function D(a){return g.obj(a)&&a.hasOwnProperty(\"totalLength\")}function X(a,b){function d(c){c=void 0===c?0:c;return a.el.getPointAtLength(1<=b+c?b+c:0)}var c=d(),e=d(-1),l=d(1);switch(a.property){case \"x\":return c.x;case \"y\":return c.y;case \"angle\":return 180*Math.atan2(l.y-e.y,l.x-e.x)/Math.PI}}function L(a,b){var d=/-?\\d*\\.?\\d+/g;a=D(a)?a.totalLength:a;if(g.col(a))b=g.rgb(a)?a:g.hex(a)?S(a):g.hsl(a)?T(a):void 0;else{var c=x(a);a=c?a.substr(0,a.length-c.length):a;b=b?a+b:a}b+=\"\";return{original:b,\nnumbers:b.match(d)?b.match(d).map(Number):[0],strings:b.split(d)}}function Y(a,b){return b.reduce(function(b,c,e){return b+a[e-1]+c})}function M(a){return(a?p(g.arr(a)?a.map(w):w(a)):[]).filter(function(a,d,c){return c.indexOf(a)===d})}function Z(a){var b=M(a);return b.map(function(a,c){return{target:a,id:c,total:b.length}})}function aa(a,b){var d=A(b);if(g.arr(a)){var c=a.length;2!==c||g.obj(a[0])?g.fnc(b.duration)||(d.duration=b.duration/c):a={value:a}}return w(a).map(function(a,c){c=c?0:b.delay;\na=g.obj(a)&&!D(a)?a:{value:a};g.und(a.delay)&&(a.delay=c);return a}).map(function(a){return B(a,d)})}function ba(a,b){var d={},c;for(c in a){var e=H(a[c],b);g.arr(e)&&(e=e.map(function(a){return H(a,b)}),1===e.length&&(e=e[0]));d[c]=e}d.duration=parseFloat(d.duration);d.delay=parseFloat(d.delay);return d}function ca(a){return g.arr(a)?y.apply(this,a):N[a]}function da(a,b){var d;return a.tweens.map(function(c){c=ba(c,b);var e=c.value,l=J(b.target,a.name),h=d?d.to.original:l,h=g.arr(e)?e[0]:h,m=K(g.arr(e)?\ne[1]:e,h),l=x(m)||x(h)||x(l);c.isPath=D(e);c.from=L(h,l);c.to=L(m,l);c.start=d?d.end:a.offset;c.end=c.start+c.delay+c.duration;c.easing=ca(c.easing);c.elasticity=(1E3-Math.min(Math.max(c.elasticity,1),999))/1E3;g.col(c.from.original)&&(c.round=1);return d=c})}function ea(a,b){return p(a.map(function(a){return b.map(function(b){var c=I(a.target,b.name);if(c){var d=da(b,a);b={type:c,property:b.name,animatable:a,tweens:d,duration:d[d.length-1].end,delay:d[0].delay}}else b=void 0;return b})})).filter(function(a){return!g.und(a)})}\nfunction O(a,b,d){var c=\"delay\"===a?Math.min:Math.max;return b.length?c.apply(Math,b.map(function(b){return b[a]})):d[a]}function fa(a){var b=G(ga,a),d=G(ha,a),c=Z(a.targets),e=[],g=B(b,d),h;for(h in a)g.hasOwnProperty(h)||\"targets\"===h||e.push({name:h,offset:g.offset,tweens:aa(a[h],d)});a=ea(c,e);return B(b,{children:[],animatables:c,animations:a,duration:O(\"duration\",a,d),delay:O(\"delay\",a,d)})}function n(a){function b(){return window.Promise&&new Promise(function(a){return Q=a})}function d(a){return f.reversed?\nf.duration-a:a}function c(a){for(var b=0,c={},d=f.animations,e={};b<d.length;){var g=d[b],h=g.animatable,m=g.tweens;e.tween=m.filter(function(b){return a<b.end})[0]||m[m.length-1];e.isPath$1=e.tween.isPath;e.round=e.tween.round;e.eased=e.tween.easing(Math.min(Math.max(a-e.tween.start-e.tween.delay,0),e.tween.duration)/e.tween.duration,e.tween.elasticity);m=Y(e.tween.to.numbers.map(function(a){return function(b,c){c=a.isPath$1?0:a.tween.from.numbers[c];b=c+a.eased*(b-c);a.isPath$1&&(b=X(a.tween.value,\nb));a.round&&(b=Math.round(b*a.round)/a.round);return b}}(e)),e.tween.to.strings);ia[g.type](h.target,g.property,m,c,h.id);g.currentValue=m;b++;e={isPath$1:e.isPath$1,tween:e.tween,eased:e.eased,round:e.round}}if(c)for(var k in c)E||(E=C(document.body,\"transform\")?\"transform\":\"-webkit-transform\"),f.animatables[k].target.style[E]=c[k].join(\" \");f.currentTime=a;f.progress=a/f.duration*100}function e(a){if(f[a])f[a](f)}function g(){f.remaining&&!0!==f.remaining&&f.remaining--}function h(a){var h=f.duration,\nl=f.offset,n=f.delay,P=f.currentTime,q=f.reversed,r=d(a),r=Math.min(Math.max(r,0),h);if(f.children){var p=f.children;if(r>=f.currentTime)for(var u=0;u<p.length;u++)p[u].seek(r);else for(u=p.length;u--;)p[u].seek(r)}r>l&&r<h?(c(r),!f.began&&r>=n&&(f.began=!0,e(\"begin\")),e(\"run\")):(r<=l&&0!==P&&(c(0),q&&g()),r>=h&&P!==h&&(c(h),q||g()));a>=h&&(f.remaining?(t=m,\"alternate\"===f.direction&&(f.reversed=!f.reversed)):(f.pause(),\"Promise\"in window&&(Q(),R=b()),f.completed||(f.completed=!0,e(\"complete\"))),\nk=0);e(\"update\")}a=void 0===a?{}:a;var m,t,k=0,Q=null,R=b(),f=fa(a);f.reset=function(){var a=f.direction,b=f.loop;f.currentTime=0;f.progress=0;f.paused=!0;f.began=!1;f.completed=!1;f.reversed=\"reverse\"===a;f.remaining=\"alternate\"===a&&1===b?2:b;for(a=f.children.length;a--;)b=f.children[a],b.seek(b.offset),b.reset()};f.tick=function(a){m=a;t||(t=m);h((k+m-t)*n.speed)};f.seek=function(a){h(d(a))};f.pause=function(){var a=q.indexOf(f);-1<a&&q.splice(a,1);f.paused=!0};f.play=function(){f.paused&&(f.paused=\n!1,t=0,k=d(f.currentTime),q.push(f),z||ja())};f.reverse=function(){f.reversed=!f.reversed;t=0;k=d(f.currentTime)};f.restart=function(){f.pause();f.reset();f.play()};f.finished=R;f.reset();f.autoplay&&f.play();return f}var ga={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:\"normal\",autoplay:!0,offset:0},ha={duration:1E3,delay:0,easing:\"easeOutElastic\",elasticity:500,round:0},V=\"translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY\".split(\" \"),\nE,g={arr:function(a){return Array.isArray(a)},obj:function(a){return-1<Object.prototype.toString.call(a).indexOf(\"Object\")},svg:function(a){return a instanceof SVGElement},dom:function(a){return a.nodeType||g.svg(a)},str:function(a){return\"string\"===typeof a},fnc:function(a){return\"function\"===typeof a},und:function(a){return\"undefined\"===typeof a},hex:function(a){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)},rgb:function(a){return/^rgb/.test(a)},hsl:function(a){return/^hsl/.test(a)},col:function(a){return g.hex(a)||\ng.rgb(a)||g.hsl(a)}},y=function(){function a(a,d,c){return(((1-3*c+3*d)*a+(3*c-6*d))*a+3*d)*a}return function(b,d,c,e){if(0<=b&&1>=b&&0<=c&&1>=c){var g=new Float32Array(11);if(b!==d||c!==e)for(var h=0;11>h;++h)g[h]=a(.1*h,b,c);return function(h){if(b===d&&c===e)return h;if(0===h)return 0;if(1===h)return 1;for(var m=0,k=1;10!==k&&g[k]<=h;++k)m+=.1;--k;var k=m+(h-g[k])/(g[k+1]-g[k])*.1,l=3*(1-3*c+3*b)*k*k+2*(3*c-6*b)*k+3*b;if(.001<=l){for(m=0;4>m;++m){l=3*(1-3*c+3*b)*k*k+2*(3*c-6*b)*k+3*b;if(0===l)break;\nvar n=a(k,b,c)-h,k=k-n/l}h=k}else if(0===l)h=k;else{var k=m,m=m+.1,f=0;do n=k+(m-k)/2,l=a(n,b,c)-h,0<l?m=n:k=n;while(1e-7<Math.abs(l)&&10>++f);h=n}return a(h,d,e)}}}}(),N=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var b=\"Quad Cubic Quart Quint Sine Expo Circ Back Elastic\".split(\" \"),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,\n.335],[.6,-.28,.735,.045],a],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},c={linear:y(.25,.25,.75,.75)},e={},l;for(l in d)e.type=l,d[e.type].forEach(function(a){return function(d,\ne){c[\"ease\"+a.type+b[e]]=g.fnc(d)?d:y.apply($jscomp$this,d)}}(e)),e={type:e.type};return c}(),ia={css:function(a,b,d){return a.style[b]=d},attribute:function(a,b,d){return a.setAttribute(b,d)},object:function(a,b,d){return a[b]=d},transform:function(a,b,d,c,e){c[e]||(c[e]=[]);c[e].push(b+\"(\"+d+\")\")}},q=[],z=0,ja=function(){function a(){z=requestAnimationFrame(b)}function b(b){var c=q.length;if(c){for(var d=0;d<c;)q[d]&&q[d].tick(b),d++;a()}else cancelAnimationFrame(z),z=0}return a}();n.version=\"2.0.2\";\nn.speed=1;n.running=q;n.remove=function(a){a=M(a);for(var b=q.length;b--;)for(var d=q[b],c=d.animations,e=c.length;e--;)F(a,c[e].animatable.target)&&(c.splice(e,1),c.length||d.pause())};n.getValue=J;n.path=function(a,b){var d=g.str(a)?v(a)[0]:a,c=b||100;return function(a){return{el:d,property:a,totalLength:d.getTotalLength()*(c/100)}}};n.setDashoffset=function(a){var b=a.getTotalLength();a.setAttribute(\"stroke-dasharray\",b);return b};n.bezier=y;n.easings=N;n.timeline=function(a){var b=n(a);b.pause();\nb.duration=0;b.add=function(a){b.children.forEach(function(a){a.began=!0;a.completed=!0});w(a).forEach(function(a){var c=b.duration,d=a.offset;a.autoplay=!1;a.offset=g.und(d)?c:K(d,c);b.seek(a.offset);a=n(a);a.duration>c&&(b.duration=a.duration);a.began=!0;b.children.push(a)});b.reset();b.seek(0);b.autoplay&&b.restart();return b};return b};n.random=function(a,b){return Math.floor(Math.random()*(b-a+1))+a};return n});\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar alphabet = __webpack_require__(0);\nvar encode = __webpack_require__(4);\nvar decode = __webpack_require__(12);\nvar build = __webpack_require__(13);\nvar isValid = __webpack_require__(14);\n\n// if you are using cluster or multiple servers use this to make each instance\n// has a unique value for worker\n// Note: I don't know if this is automatically set when using third\n// party cluster solutions such as pm2.\nvar clusterWorkerId = __webpack_require__(15) || 0;\n\n/**\n * Set the seed.\n * Highly recommended if you don't want people to try to figure out your id schema.\n * exposed as shortid.seed(int)\n * @param seed Integer value to seed the random alphabet. ALWAYS USE THE SAME SEED or you might get overlaps.\n */\nfunction seed(seedValue) {\n alphabet.seed(seedValue);\n return module.exports;\n}\n\n/**\n * Set the cluster worker or machine id\n * exposed as shortid.worker(int)\n * @param workerId worker must be positive integer. Number less than 16 is recommended.\n * returns shortid module so it can be chained.\n */\nfunction worker(workerId) {\n clusterWorkerId = workerId;\n return module.exports;\n}\n\n/**\n *\n * sets new characters to use in the alphabet\n * returns the shuffled alphabet\n */\nfunction characters(newCharacters) {\n if (newCharacters !== undefined) {\n alphabet.characters(newCharacters);\n }\n\n return alphabet.shuffled();\n}\n\n/**\n * Generate unique id\n * Returns string id\n */\nfunction generate() {\n return build(clusterWorkerId);\n}\n\n// Export all other functions as properties of the generate function\nmodule.exports = generate;\nmodule.exports.generate = generate;\nmodule.exports.seed = seed;\nmodule.exports.worker = worker;\nmodule.exports.characters = characters;\nmodule.exports.decode = decode;\nmodule.exports.isValid = isValid;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// Found this seed-based random generator somewhere\n// Based on The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu)\n\nvar seed = 1;\n\n/**\n * return a random number based on a seed\n * @param seed\n * @returns {number}\n */\nfunction getNextValue() {\n seed = (seed * 9301 + 49297) % 233280;\n return seed/(233280.0);\n}\n\nfunction setSeed(_seed_) {\n seed = _seed_;\n}\n\nmodule.exports = {\n nextValue: getNextValue,\n seed: setSeed\n};\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar crypto = typeof window === 'object' && (window.crypto || window.msCrypto); // IE 11 uses window.msCrypto\n\nfunction randomByte() {\n if (!crypto || !crypto.getRandomValues) {\n return Math.floor(Math.random() * 256) & 0x30;\n }\n var dest = new Uint8Array(1);\n crypto.getRandomValues(dest);\n return dest[0] & 0x30;\n}\n\nmodule.exports = randomByte;\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar alphabet = __webpack_require__(0);\n\n/**\n * Decode the id to get the version and worker\n * Mainly for debugging and testing.\n * @param id - the shortid-generated id.\n */\nfunction decode(id) {\n var characters = alphabet.shuffled();\n return {\n version: characters.indexOf(id.substr(0, 1)) & 0x0f,\n worker: characters.indexOf(id.substr(1, 1)) & 0x0f\n };\n}\n\nmodule.exports = decode;\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar encode = __webpack_require__(4);\nvar alphabet = __webpack_require__(0);\n\n// Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness.\n// This number should be updated every year or so to keep the generated id short.\n// To regenerate `new Date() - 0` and bump the version. Always bump the version!\nvar REDUCE_TIME = 1459707606518;\n\n// don't change unless we change the algos or REDUCE_TIME\n// must be an integer and less than 16\nvar version = 6;\n\n// Counter is used when shortid is called multiple times in one second.\nvar counter;\n\n// Remember the last time shortid was called in case counter is needed.\nvar previousSeconds;\n\n/**\n * Generate unique id\n * Returns string id\n */\nfunction build(clusterWorkerId) {\n\n var str = '';\n\n var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001);\n\n if (seconds === previousSeconds) {\n counter++;\n } else {\n counter = 0;\n previousSeconds = seconds;\n }\n\n str = str + encode(alphabet.lookup, version);\n str = str + encode(alphabet.lookup, clusterWorkerId);\n if (counter > 0) {\n str = str + encode(alphabet.lookup, counter);\n }\n str = str + encode(alphabet.lookup, seconds);\n\n return str;\n}\n\nmodule.exports = build;\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar alphabet = __webpack_require__(0);\n\nfunction isShortId(id) {\n if (!id || typeof id !== 'string' || id.length < 6 ) {\n return false;\n }\n\n var characters = alphabet.characters();\n var len = id.length;\n for(var i = 0; i < len;i++) {\n if (characters.indexOf(id[i]) === -1) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = isShortId;\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = 0;\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Code refactored from Mozilla Developer Network:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n */\n\n\n\nfunction assign(target, firstSource) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert first argument to object');\n }\n\n var to = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var nextSource = arguments[i];\n if (nextSource === undefined || nextSource === null) {\n continue;\n }\n\n var keysArray = Object.keys(Object(nextSource));\n for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {\n var nextKey = keysArray[nextIndex];\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n return to;\n}\n\nfunction polyfill() {\n if (!Object.assign) {\n Object.defineProperty(Object, 'assign', {\n enumerable: false,\n configurable: true,\n writable: true,\n value: assign\n });\n }\n}\n\nmodule.exports = {\n assign: assign,\n polyfill: polyfill\n};\n\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=toasted.js.map","!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{var t;t=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:this,t.pasteImage=e()}}(function(){return function e(t,n,i){function r(o,a){if(!n[o]){if(!t[o]){var c=\"function\"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);var p=new Error(\"Cannot find module '\"+o+\"'\");throw p.code=\"MODULE_NOT_FOUND\",p}var h=n[o]={exports:{}};t[o][0].call(h.exports,function(e){var n=t[o][1][e];return r(n?n:e)},h,h.exports,e,t,n,i)}return n[o].exports}for(var s=\"function\"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,t){\"use strict\";t.exports=e(\"./scripts\")},{\"./scripts\":4}],2:[function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return\"function\"==typeof e}function r(e){return\"number\"==typeof e}function s(e){return\"object\"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!r(e)||0>e||isNaN(e))throw TypeError(\"n must be a positive number\");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,r,a,c,p;if(this._events||(this._events={}),\"error\"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var h=new Error('Uncaught, unspecified \"error\" event. ('+t+\")\");throw h.context=t,h}if(n=this._events[e],o(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(s(n))for(a=Array.prototype.slice.call(arguments,1),p=n.slice(),r=p.length,c=0;r>c;c++)p[c].apply(this,a);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError(\"listener must be a function\");return this._events||(this._events={}),this._events.newListener&&this.emit(\"newListener\",e,i(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[e].length),\"function\"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError(\"listener must be a function\");var r=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,r,o,a;if(!i(t))throw TypeError(\"listener must be a function\");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit(\"removeListener\",e,t);else if(s(n)){for(a=o;a-->0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit(\"removeListener\",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)\"removeListener\"!==t&&this.removeAllListeners(t);return this.removeAllListeners(\"removeListener\"),this._events={},this}if(n=this._events[e],i(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],3:[function(e,t){t.exports=\"function\"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],4:[function(e,t){\"use strict\";var n=e(\"inherits\"),i=e(\"events\"),r=function(){this._initialized=!1,this._wrapEmitterFns()};n(r,i.EventEmitter),r.prototype._wrapEmitterFns=function(){var e=this,t=[\"on\",\"once\"];t.forEach(function(t){r.prototype[t]=function(){return e._initialized||e._init(),i.EventEmitter.prototype[t].apply(e,arguments)}})},r.prototype._clipboardSupported=function(){return window.Clipboard},r.prototype._pasteCatcherFocus=function(){this._pasteCatcher.focus()},r.prototype._listenForClick=function(){var e=this;document.addEventListener(\"click\",function(){e._pasteCatcherFocus()})},r.prototype._createPasteCatcherIfNeeded=function(){this._clipboardSupported()||(this._pasteCatcher=document.createElement(\"div\"),this._pasteCatcher.setAttribute(\"contenteditable\",\"\"),this._pasteCatcher.style.opacity=0,this._pasteCatcher.style.position=\"absolute\",document.body.appendChild(this._pasteCatcher),this._pasteCatcher.focus(),this._listenForClick())},r.prototype._listenForPaste=function(){var e=this;window.addEventListener(\"paste\",function(t){e._pasteHandler(t)})},r.prototype._init=function(){this._createPasteCatcherIfNeeded(),this._listenForPaste(),this._initialized=!0},r.prototype._checkInputOnNextTick=function(){var e=this;setTimeout(function(){e._checkInput()},1)},r.prototype._pasteHandler=function(e){if(this.emit(\"pasting-image\",e),e.clipboardData&&e.clipboardData.items){for(var t=e.clipboardData.items,n=0;n<t.length;n++)if(-1!==t[n].type.indexOf(\"image\")){var i=t[n].getAsFile(),r=this._getURLObj(),s=r.createObjectURL(i);this._createImage(s)}}else this._checkInputOnNextTick()},r.prototype._getURLObj=function(){return window.URL||window.webkitURL},r.prototype._checkInput=function(){var e=this._pasteCatcher.childNodes[0];this._pasteCatcher.innerHTML=\"\",e&&\"IMG\"===e.tagName&&this._createImage(e.src)},r.prototype._createImage=function(e){var t=this,n=new Image;n.onload=function(){t.emit(\"paste-image\",n)},n.src=e},t.exports=new r},{events:2,inherits:3}]},{},[1])(1)});","/*\n* jQuery.ajaxQueue - A queue for ajax requests\n*\n* (c) 2011 Corey Frang\n* Dual licensed under the MIT and GPL licenses.\n*\n* Requires jQuery 1.5+\n*/\n(function($) {\n\n // jQuery on an empty object, we are going to use this as our Queue\n var ajaxQueue = $({});\n\n $.ajaxQueue = function( ajaxOpts, onfail, onalways ) {\n var jqXHR,\n dfd = $.Deferred(),\n promise = dfd.promise();\n\n // queue our ajax request\n ajaxQueue.queue( doRequest );\n\n // add the abort method\n promise.abort = function( statusText ) {\n\n // proxy abort to the jqXHR if it is active\n if ( jqXHR ) {\n return jqXHR.abort( statusText );\n }\n\n // if there wasn't already a jqXHR we need to remove from queue\n var queue = ajaxQueue.queue(),\n index = $.inArray( doRequest, queue );\n\n if ( index > -1 ) {\n queue.splice( index, 1 );\n }\n\n // and then reject the deferred\n dfd.rejectWith( ajaxOpts.context || ajaxOpts,\n [ promise, statusText, \"\" ] );\n\n return promise;\n };\n\n // run the actual query\n function doRequest( next ) {\n jqXHR = $.ajax( ajaxOpts )\n .done( dfd.resolve )\n .fail( function(jqXHR, textStatus, error) { onfail(jqXHR, textStatus, error); dfd.reject} )\n .always(onalways)\n .then( next, next );\n }\n\n return promise;\n };\n\n })(jQuery);\n","/*!\n * Validator v0.11.9 for Bootstrap 3, by @1000hz\n * Copyright 2017 Cina Saffary\n * Licensed under http://opensource.org/licenses/MIT\n *\n * https://github.com/1000hz/bootstrap-validator\n */\n\n+function ($) {\n 'use strict';\n\n // VALIDATOR CLASS DEFINITION\n // ==========================\n\n function getValue($el) {\n return $el.is('[type=\"checkbox\"]') ? $el.prop('checked') :\n $el.is('[type=\"radio\"]') ? !!$('[name=\"' + $el.attr('name') + '\"]:checked').length :\n $el.is('select[multiple]') ? ($el.val() || []).length :\n $el.val()\n }\n\n var Validator = function (element, options) {\n this.options = options\n this.validators = $.extend({}, Validator.VALIDATORS, options.custom)\n this.$element = $(element)\n this.$btn = $('button[type=\"submit\"], input[type=\"submit\"]')\n .filter('[form=\"' + this.$element.attr('id') + '\"]')\n .add(this.$element.find('input[type=\"submit\"], button[type=\"submit\"]'))\n\n this.update()\n\n this.$element.on('input.bs.validator change.bs.validator focusout.bs.validator', $.proxy(this.onInput, this))\n this.$element.on('submit.bs.validator', $.proxy(this.onSubmit, this))\n this.$element.on('reset.bs.validator', $.proxy(this.reset, this))\n\n this.$element.find('[data-match]').each(function () {\n var $this = $(this)\n var target = $this.attr('data-match')\n\n $(target).on('input.bs.validator', function (e) {\n getValue($this) && $this.trigger('input.bs.validator')\n })\n })\n\n // run validators for fields with values, but don't clobber server-side errors\n this.$inputs.filter(function () {\n return getValue($(this)) && !$(this).closest('.has-error').length\n }).trigger('focusout')\n\n this.$element.attr('novalidate', true) // disable automatic native validation\n }\n\n Validator.VERSION = '0.11.9'\n\n Validator.INPUT_SELECTOR = ':input:not([type=\"hidden\"], [type=\"submit\"], [type=\"reset\"], button)'\n\n Validator.FOCUS_OFFSET = 20\n\n Validator.DEFAULTS = {\n delay: 500,\n html: false,\n disable: true,\n focus: true,\n custom: {},\n errors: {\n match: 'Does not match',\n minlength: 'Not long enough'\n },\n feedback: {\n success: 'glyphicon-ok',\n error: 'glyphicon-remove'\n }\n }\n\n Validator.VALIDATORS = {\n 'native': function ($el) {\n var el = $el[0]\n if (el.checkValidity) {\n return !el.checkValidity() && !el.validity.valid && (el.validationMessage || \"error!\")\n }\n },\n 'match': function ($el) {\n var target = $el.attr('data-match')\n return $el.val() !== $(target).val() && Validator.DEFAULTS.errors.match\n },\n 'minlength': function ($el) {\n var minlength = $el.attr('data-minlength')\n return $el.val().length < minlength && Validator.DEFAULTS.errors.minlength\n }\n }\n\n Validator.prototype.update = function () {\n var self = this\n\n this.$inputs = this.$element.find(Validator.INPUT_SELECTOR)\n .add(this.$element.find('[data-validate=\"true\"]'))\n .not(this.$element.find('[data-validate=\"false\"]')\n .each(function () { self.clearErrors($(this)) })\n )\n\n this.toggleSubmit()\n\n return this\n }\n\n Validator.prototype.onInput = function (e) {\n var self = this\n var $el = $(e.target)\n var deferErrors = e.type !== 'focusout'\n\n if (!this.$inputs.is($el)) return\n\n this.validateInput($el, deferErrors).done(function () {\n self.toggleSubmit()\n })\n }\n\n Validator.prototype.validateInput = function ($el, deferErrors) {\n var value = getValue($el)\n var prevErrors = $el.data('bs.validator.errors')\n\n if ($el.is('[type=\"radio\"]')) $el = this.$element.find('input[name=\"' + $el.attr('name') + '\"]')\n\n var e = $.Event('validate.bs.validator', {relatedTarget: $el[0]})\n this.$element.trigger(e)\n if (e.isDefaultPrevented()) return\n\n var self = this\n\n return this.runValidators($el).done(function (errors) {\n $el.data('bs.validator.errors', errors)\n\n errors.length\n ? deferErrors ? self.defer($el, self.showErrors) : self.showErrors($el)\n : self.clearErrors($el)\n\n if (!prevErrors || errors.toString() !== prevErrors.toString()) {\n e = errors.length\n ? $.Event('invalid.bs.validator', {relatedTarget: $el[0], detail: errors})\n : $.Event('valid.bs.validator', {relatedTarget: $el[0], detail: prevErrors})\n\n self.$element.trigger(e)\n }\n\n self.toggleSubmit()\n\n self.$element.trigger($.Event('validated.bs.validator', {relatedTarget: $el[0]}))\n })\n }\n\n\n Validator.prototype.runValidators = function ($el) {\n var errors = []\n var deferred = $.Deferred()\n\n $el.data('bs.validator.deferred') && $el.data('bs.validator.deferred').reject()\n $el.data('bs.validator.deferred', deferred)\n\n function getValidatorSpecificError(key) {\n return $el.attr('data-' + key + '-error')\n }\n\n function getValidityStateError() {\n var validity = $el[0].validity\n return validity.typeMismatch ? $el.attr('data-type-error')\n : validity.patternMismatch ? $el.attr('data-pattern-error')\n : validity.stepMismatch ? $el.attr('data-step-error')\n : validity.rangeOverflow ? $el.attr('data-max-error')\n : validity.rangeUnderflow ? $el.attr('data-min-error')\n : validity.valueMissing ? $el.attr('data-required-error')\n : null\n }\n\n function getGenericError() {\n return $el.attr('data-error')\n }\n\n function getErrorMessage(key) {\n return getValidatorSpecificError(key)\n || getValidityStateError()\n || getGenericError()\n }\n\n $.each(this.validators, $.proxy(function (key, validator) {\n var error = null\n if ((getValue($el) || $el.attr('required')) &&\n ($el.attr('data-' + key) !== undefined || key == 'native') &&\n (error = validator.call(this, $el))) {\n error = getErrorMessage(key) || error\n !~errors.indexOf(error) && errors.push(error)\n }\n }, this))\n\n if (!errors.length && getValue($el) && $el.attr('data-remote')) {\n this.defer($el, function () {\n var data = {}\n data[$el.attr('name')] = getValue($el)\n $.ajaxQueue({\n url: $el.attr('data-remote'),\n data: data,\n type: 'POST',\n success: function(data) {\n }\n }, function (jqXHR, textStatus, error) {\n errors.push(getErrorMessage('remote') || jqXHR.responseText);\n }, function () {\n deferred.resolve(errors);\n });\n })\n } else deferred.resolve(errors)\n\n return deferred.promise()\n }\n\n Validator.prototype.validate = function () {\n var self = this\n\n $.when(this.$inputs.map(function (el) {\n return self.validateInput($(this), false)\n })).then(function () {\n self.toggleSubmit()\n self.focusError()\n })\n\n return this\n }\n\n Validator.prototype.focusError = function () {\n if (!this.options.focus) return\n\n var $input = this.$element.find(\".has-error :input:first\")\n if ($input.length === 0) return\n\n $('html, body').animate({scrollTop: $input.offset().top - Validator.FOCUS_OFFSET}, 250)\n $input.focus()\n }\n\n Validator.prototype.showErrors = function ($el) {\n var method = this.options.html ? 'html' : 'text'\n var errors = $el.data('bs.validator.errors')\n var $group = $el.closest('.form-group')\n var $block = $group.find('.help-block.with-errors')\n var $feedback = $group.find('.form-control-feedback')\n\n if (!errors.length) return\n\n errors = $('<ul/>')\n .addClass('list-unstyled')\n .append($.map(errors, function (error) { return $('<li/>')[method](error) }))\n\n $block.data('bs.validator.originalContent') === undefined && $block.data('bs.validator.originalContent', $block.html())\n $block.empty().append(errors)\n $group.addClass('has-error has-danger')\n\n $group.hasClass('has-feedback')\n && $feedback.removeClass(this.options.feedback.success)\n && $feedback.addClass(this.options.feedback.error)\n && $group.removeClass('has-success')\n }\n\n Validator.prototype.clearErrors = function ($el) {\n var $group = $el.closest('.form-group')\n var $block = $group.find('.help-block.with-errors')\n var $feedback = $group.find('.form-control-feedback')\n\n $block.html($block.data('bs.validator.originalContent'))\n $group.removeClass('has-error has-danger has-success')\n\n $group.hasClass('has-feedback')\n && $feedback.removeClass(this.options.feedback.error)\n && $feedback.removeClass(this.options.feedback.success)\n && getValue($el)\n && $feedback.addClass(this.options.feedback.success)\n && $group.addClass('has-success')\n }\n\n Validator.prototype.hasErrors = function () {\n function fieldErrors() {\n return !!($(this).data('bs.validator.errors') || []).length\n }\n\n return !!this.$inputs.filter(fieldErrors).length\n }\n\n Validator.prototype.isIncomplete = function () {\n function fieldIncomplete() {\n var value = getValue($(this))\n\t if ($(this).is(':hidden')) {\n\t\t // Only limit the field if it is visible to the user\n\t\t return false\n\t }\n return !(typeof value == \"string\" ? $.trim(value) : value)\n }\n\n return !!this.$inputs.filter('[required]').filter(fieldIncomplete).length\n }\n\n Validator.prototype.onSubmit = function (e) {\n this.validate()\n if (this.isIncomplete() || this.hasErrors()) e.preventDefault()\n }\n\n Validator.prototype.toggleSubmit = function () {\n if (!this.options.disable) return\n this.$btn.toggleClass('disabled', this.isIncomplete() || this.hasErrors())\n }\n\n Validator.prototype.defer = function ($el, callback) {\n callback = $.proxy(callback, this, $el)\n if (!this.options.delay) return callback()\n window.clearTimeout($el.data('bs.validator.timeout'))\n $el.data('bs.validator.timeout', window.setTimeout(callback, this.options.delay))\n }\n\n Validator.prototype.reset = function () {\n this.$element.find('.form-control-feedback')\n .removeClass(this.options.feedback.error)\n .removeClass(this.options.feedback.success)\n\n this.$inputs\n .removeData(['bs.validator.errors', 'bs.validator.deferred'])\n .each(function () {\n var $this = $(this)\n var timeout = $this.data('bs.validator.timeout')\n window.clearTimeout(timeout) && $this.removeData('bs.validator.timeout')\n })\n\n this.$element.find('.help-block.with-errors')\n .each(function () {\n var $this = $(this)\n var originalContent = $this.data('bs.validator.originalContent')\n\n $this\n .removeData('bs.validator.originalContent')\n .html(originalContent)\n })\n\n this.$btn.removeClass('disabled')\n\n this.$element.find('.has-error, .has-danger, .has-success').removeClass('has-error has-danger has-success')\n\n return this\n }\n\n Validator.prototype.destroy = function () {\n this.reset()\n\n this.$element\n .removeAttr('novalidate')\n .removeData('bs.validator')\n .off('.bs.validator')\n\n this.$inputs\n .off('.bs.validator')\n\n this.options = null\n this.validators = null\n this.$element = null\n this.$btn = null\n this.$inputs = null\n\n return this\n }\n\n // VALIDATOR PLUGIN DEFINITION\n // ===========================\n\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var options = $.extend({}, Validator.DEFAULTS, $this.data(), typeof option == 'object' && option)\n var data = $this.data('bs.validator')\n\n if (!data && option == 'destroy') return\n if (!data) $this.data('bs.validator', (data = new Validator(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.validator\n\n $.fn.validator = Plugin\n $.fn.validator.Constructor = Validator\n\n\n // VALIDATOR NO CONFLICT\n // =====================\n\n $.fn.validator.noConflict = function () {\n $.fn.validator = old\n return this\n }\n\n\n // VALIDATOR DATA-API\n // ==================\n\n $(window).on('load', function () {\n $('form[data-toggle=\"validator\"]').each(function () {\n var $form = $(this)\n Plugin.call($form, $form.data())\n })\n })\n\n}(jQuery);\n","// http://daviseford.com/bootstrap-loading-bars-on-buttons\r\n(function ($) {\r\n\r\n\t// Creating a number of jQuery plugins that you can use to\r\n\t// initialize and control the progress meters.\r\n\r\n\t$.fn.progressInitialize = function () {\r\n\r\n\t\t// This function creates the necessary markup for the progress meter\r\n\t\t// and sets up a few event listeners.\r\n\r\n\t\t// Loop through all the buttons:\r\n\r\n\t\treturn this.each(function () {\r\n\r\n\t\t\tvar button = $(this),\r\n\t\t\t\t\tprogress = 0;\r\n\r\n\t\t\t// Extract the data attributes into the options object.\r\n\t\t\t// If they are missing, they will receive default values.\r\n\r\n\t\t\tvar options = $.extend({\r\n\t\t\t\ttype: 'background-bar',\r\n\t\t\t\tloading: 'Updating Calendar',\r\n\t\t\t\tfinished: 'Done Updating!'\r\n\t\t\t}, button.data());\r\n\r\n\t\t\t// Add the data attributes if they are missing from the element.\r\n\t\t\t// They are used by our CSS code to show the messages\r\n\t\t\t//button.attr({'data-loading': options.loading, 'data-finished': options.finished});\r\n\r\n\t\t\t// Add the needed markup for the progress bar to the button\r\n\t\t\tvar bar = $('<span class=\"tz-bar ' + options.type + '\">').appendTo(button);\r\n\r\n\t\t\t// The progress event tells the button to update the progress bar\r\n\t\t\tbutton.on('progress', function (e, val, absolute, finish) {\r\n\r\n\t\t\t\tif (!button.hasClass('in-progress')) {\r\n\r\n\t\t\t\t\t// This is the first progress event for the button (or the\r\n\t\t\t\t\t// first after it has finished in a previous run). Re-initialize\r\n\t\t\t\t\t// the progress and remove some classes that may be left.\r\n\r\n\t\t\t\t\tbar.show();\r\n\t\t\t\t\tprogress = 0;\r\n\t\t\t\t\tbutton.removeClass('finished').addClass('in-progress')\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// val, absolute and finish are event data passed by the progressIncrement\r\n\t\t\t\t// and progressSet methods that you can see near the end of this file.\r\n\r\n\t\t\t\tif (absolute) {\r\n\t\t\t\t\tprogress = val;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprogress += val;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (progress >= 100) {\r\n\t\t\t\t\tprogress = 100;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (finish) {\r\n\r\n\t\t\t\t\tbutton.removeClass('in-progress').addClass('finished');\r\n\r\n\t\t\t\t\tbar.delay(500).fadeOut(function () {\r\n\r\n\t\t\t\t\t\t// Trigger the custom progress-finish event\r\n\t\t\t\t\t\tbutton.trigger('progress-finish');\r\n\t\t\t\t\t\tsetProgress(0);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsetProgress(progress);\r\n\t\t\t});\r\n\r\n\t\t\tfunction setProgress(percentage) {\r\n\t\t\t\tbar.filter('.background-horizontal,.background-bar').width(percentage + '%');\r\n\t\t\t\tbar.filter('.background-vertical').height(percentage + '%');\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t};\r\n\r\n\t// progressStart simulates activity on the progress meter. Call it first,\r\n\t// if the progress is going to take a long time to finish.\r\n\r\n\t$.fn.progressStart = function () {\r\n\r\n\t\tvar button = this.first(),\r\n\t\t\t\tlast_progress = new Date().getTime();\r\n\r\n\t\tif (button.hasClass('in-progress')) {\r\n\t\t\t// Don't start it a second time!\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tbutton.on('progress', function () {\r\n\t\t\tlast_progress = new Date().getTime();\r\n\t\t});\r\n\r\n\t\t// Every half a second check whether the progress\r\n\t\t// has been incremented in the last two seconds\r\n\r\n\t\tvar interval = window.setInterval(function () {\r\n\r\n\t\t\tif (new Date().getTime() > 2000 + last_progress) {\r\n\r\n\t\t\t\t// There has been no activity for two seconds. Increment the progress\r\n\t\t\t\t// bar a little bit to show that something is happening\r\n\r\n\t\t\t\tbutton.progressIncrement(5);\r\n\t\t\t}\r\n\r\n\t\t}, 500);\r\n\r\n\t\tbutton.on('progress-finish', function () {\r\n\t\t\twindow.clearInterval(interval);\r\n\t\t});\r\n\r\n\t\treturn button.progressIncrement(10);\r\n\t};\r\n\r\n\t$.fn.progressFinish = function () {\r\n\t\treturn this.first().progressSet(100);\r\n\t};\r\n\r\n\t$.fn.progressIncrement = function (val) {\r\n\r\n\t\tval = val || 10;\r\n\r\n\t\tvar button = this.first();\r\n\r\n\t\tbutton.trigger('progress', [val]);\r\n\r\n\t\treturn this;\r\n\t};\r\n\r\n\t$.fn.progressSet = function (val) {\r\n\t\tval = val || 10;\r\n\r\n\t\tvar finish = false;\r\n\t\tif (val >= 100) {\r\n\t\t\tfinish = true;\r\n\t\t}\r\n\r\n\t\treturn this.first().trigger('progress', [val, true, finish]);\r\n\t};\r\n\r\n\t// This function creates a progress meter that\r\n\t// finishes in a specified amount of time.\r\n\r\n\t$.fn.progressTimed = function (seconds, cb) {\r\n\r\n\t\tvar button = this.first(),\r\n\t\t\t\tbar = button.find('.tz-bar');\r\n\r\n\t\tif (button.is('.in-progress')) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// Set a transition declaration for the duration of the meter.\r\n\t\t// CSS will do the job of animating the progress bar for us.\r\n\r\n\t\tbar.css('transition', seconds + 's linear');\r\n\t\tbutton.progressSet(99);\r\n\r\n\t\twindow.setTimeout(function () {\r\n\t\t\tbar.css('transition', '');\r\n\t\t\tbutton.progressFinish();\r\n\r\n\t\t\tif ($.isFunction(cb)) {\r\n\t\t\t\tcb();\r\n\t\t\t}\r\n\r\n\t\t}, seconds * 1000);\r\n\t};\r\n\r\n})(jQuery);\r\n","/*\n * jQuery canvasResize plugin\n * \n * Version: 1.2.0 \n * Date (d/m/y): 02/10/12\n * Update (d/m/y): 14/05/13\n * Original author: @gokercebeci \n * Licensed under the MIT license\n * - This plugin working with jquery.exif.js \n * (It's under the MPL License http://www.nihilogic.dk/licenses/mpl-license.txt)\n * Demo: http://ios6-image-resize.gokercebeci.com/\n * \n * - I fixed iOS6 Safari's image file rendering issue for large size image (over mega-pixel)\n * using few functions from https://github.com/stomita/ios-imagefile-megapixel\n * (detectSubsampling, )\n * And fixed orientation issue by edited http://blog.nihilogic.dk/2008/05/jquery-exif-data-plugin.html\n * Thanks, Shinichi Tomita and Jacob Seidelin\n */\n\n(function($) {\n var pluginName = 'canvasResize',\n methods = {\n newsize: function(w, h, W, H, C) {\n var c = C ? 'h' : '';\n if ((W && w > W) || (H && h > H)) {\n var r = w / h;\n if ((r >= 1 || H === 0) && W && !C) {\n w = W;\n h = (W / r) >> 0;\n } else if (C && r <= (W / H)) {\n w = W;\n h = (W / r) >> 0;\n c = 'w';\n } else {\n w = (H * r) >> 0;\n h = H;\n }\n }\n return {\n 'width': w,\n 'height': h,\n 'cropped': c\n };\n },\n dataURLtoBlob: function(data) {\n var mimeString = data.split(',')[0].split(':')[1].split(';')[0];\n var byteString = atob(data.split(',')[1]);\n var ab = new ArrayBuffer(byteString.length);\n var ia = new Uint8Array(ab);\n for (var i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n var bb = (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder);\n if (bb) {\n // console.log('BlobBuilder'); \n bb = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder)();\n bb.append(ab);\n return bb.getBlob(mimeString);\n } else {\n // console.log('Blob'); \n bb = new Blob([ab], {\n 'type': (mimeString)\n });\n return bb;\n }\n },\n /**\n * Detect subsampling in loaded image.\n * In iOS, larger images than 2M pixels may be subsampled in rendering.\n */\n detectSubsampling: function(img) {\n var iw = img.width, ih = img.height;\n if (iw * ih > 1048576) { // subsampling may happen over megapixel image\n var canvas = document.createElement('canvas');\n canvas.width = canvas.height = 1;\n var ctx = canvas.getContext('2d');\n ctx.drawImage(img, -iw + 1, 0);\n // subsampled image becomes half smaller in rendering size.\n // check alpha channel value to confirm image is covering edge pixel or not.\n // if alpha value is 0 image is not covering, hence subsampled.\n return ctx.getImageData(0, 0, 1, 1).data[3] === 0;\n } else {\n return false;\n }\n },\n /**\n * Update the orientation according to the specified rotation angle\n */\n rotate: function(orientation, angle) {\n var o = {\n // nothing\n 1: {90: 6, 180: 3, 270: 8},\n // horizontal flip\n 2: {90: 7, 180: 4, 270: 5},\n // 180 rotate left\n 3: {90: 8, 180: 1, 270: 6},\n // vertical flip\n 4: {90: 5, 180: 2, 270: 7},\n // vertical flip + 90 rotate right\n 5: {90: 2, 180: 7, 270: 4},\n // 90 rotate right\n 6: {90: 3, 180: 8, 270: 1},\n // horizontal flip + 90 rotate right\n 7: {90: 4, 180: 5, 270: 2},\n // 90 rotate left\n 8: {90: 1, 180: 6, 270: 3}\n };\n return o[orientation][angle] ? o[orientation][angle] : orientation;\n },\n /**\n * Transform canvas coordination according to specified frame size and orientation\n * Orientation value is from EXIF tag\n */\n transformCoordinate: function(canvas, width, height, orientation) {\n //console.log(width, height);\n switch (orientation) {\n case 5:\n case 6:\n case 7:\n case 8:\n canvas.width = height;\n canvas.height = width;\n break;\n default:\n canvas.width = width;\n canvas.height = height;\n }\n var ctx = canvas.getContext('2d');\n switch (orientation) {\n case 1:\n // nothing\n break;\n case 2:\n // horizontal flip\n ctx.translate(width, 0);\n ctx.scale(-1, 1);\n break;\n case 3:\n // 180 rotate left\n ctx.translate(width, height);\n ctx.rotate(Math.PI);\n break;\n case 4:\n // vertical flip\n ctx.translate(0, height);\n ctx.scale(1, -1);\n break;\n case 5:\n // vertical flip + 90 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.scale(1, -1);\n break;\n case 6:\n // 90 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.translate(0, -height);\n break;\n case 7:\n // horizontal flip + 90 rotate right\n ctx.rotate(0.5 * Math.PI);\n ctx.translate(width, -height);\n ctx.scale(-1, 1);\n break;\n case 8:\n // 90 rotate left\n ctx.rotate(-0.5 * Math.PI);\n ctx.translate(-width, 0);\n break;\n default:\n break;\n }\n },\n /**\n * Detecting vertical squash in loaded image.\n * Fixes a bug which squash image vertically while drawing into canvas for some images.\n */\n detectVerticalSquash: function(img, iw, ih) {\n var canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = ih;\n var ctx = canvas.getContext('2d');\n ctx.drawImage(img, 0, 0);\n var data = ctx.getImageData(0, 0, 1, ih).data;\n // search image edge pixel position in case it is squashed vertically.\n var sy = 0;\n var ey = ih;\n var py = ih;\n while (py > sy) {\n var alpha = data[(py - 1) * 4 + 3];\n if (alpha === 0) {\n ey = py;\n } else {\n sy = py;\n }\n py = (ey + sy) >> 1;\n }\n var ratio = py / ih;\n return ratio === 0 ? 1 : ratio;\n },\n callback: function(d) {\n return d;\n }\n },\n defaults = {\n width: 300,\n height: 0,\n crop: false,\n quality: 80,\n 'callback': methods.callback\n };\n function Plugin(file, options) {\n this.file = file;\n this.options = $.extend({}, defaults, options);\n this._defaults = defaults;\n this._name = pluginName;\n this.init();\n }\n Plugin.prototype = {\n init: function() {\n //this.options.init(this);\n var $this = this;\n var file = this.file;\n\n var reader = new FileReader();\n reader.onloadend = function(e) {\n var dataURL = e.target.result;\n var img = new Image();\n img.onload = function(e) {\n // Read Orientation Data in EXIF\n $(img).exifLoadFromDataURL(function() {\n var orientation = $(img).exif('Orientation')[0] || 1;\n orientation = methods.rotate(orientation, $this.options.rotate);\n\n // CW or CCW ? replace width and height\n var size = (orientation >= 5 && orientation <= 8)\n ? methods.newsize(img.height, img.width, $this.options.width, $this.options.height, $this.options.crop)\n : methods.newsize(img.width, img.height, $this.options.width, $this.options.height, $this.options.crop);\n\n var iw = img.width, ih = img.height;\n var width = size.width, height = size.height;\n\n //console.log(iw, ih, size.width, size.height, orientation);\n\n var canvas = document.createElement(\"canvas\");\n var ctx = canvas.getContext(\"2d\");\n ctx.save();\n methods.transformCoordinate(canvas, width, height, orientation);\n\n // over image size\n if (methods.detectSubsampling(img)) {\n iw /= 2;\n ih /= 2;\n }\n var d = 1024; // size of tiling canvas\n var tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = tmpCanvas.height = d;\n var tmpCtx = tmpCanvas.getContext('2d');\n var vertSquashRatio = methods.detectVerticalSquash(img, iw, ih);\n var sy = 0;\n while (sy < ih) {\n var sh = sy + d > ih ? ih - sy : d;\n var sx = 0;\n while (sx < iw) {\n var sw = sx + d > iw ? iw - sx : d;\n tmpCtx.clearRect(0, 0, d, d);\n tmpCtx.drawImage(img, -sx, -sy);\n var dx = Math.floor(sx * width / iw);\n var dw = Math.ceil(sw * width / iw);\n var dy = Math.floor(sy * height / ih / vertSquashRatio);\n var dh = Math.ceil(sh * height / ih / vertSquashRatio);\n ctx.drawImage(tmpCanvas, 0, 0, sw, sh, dx, dy, dw, dh);\n sx += d;\n }\n sy += d;\n }\n ctx.restore();\n tmpCanvas = tmpCtx = null;\n\n // if cropped or rotated width and height data replacing issue \n var newcanvas = document.createElement('canvas');\n newcanvas.width = size.cropped === 'h' ? height : width;\n newcanvas.height = size.cropped === 'w' ? width : height;\n var x = size.cropped === 'h' ? (height - width) * .5 : 0;\n var y = size.cropped === 'w' ? (width - height) * .5 : 0;\n newctx = newcanvas.getContext('2d');\n newctx.drawImage(canvas, x, y, width, height);\n\n if (file.type === \"image/png\") {\n var data = newcanvas.toDataURL(file.type);\n } else {\n var data = newcanvas.toDataURL(\"image/jpeg\", ($this.options.quality * .01));\n }\n\n // CALLBACK\n $this.options.callback(data, width, height);\n\n });\n };\n img.src = dataURL;\n // =====================================================\n };\n reader.readAsDataURL(file);\n\n }\n };\n $[pluginName] = function(file, options) {\n if (typeof file === 'string')\n return methods[file](options);\n else\n new Plugin(file, options);\n };\n\n})(jQuery);","\r\n/*\r\n * Javascript EXIF Reader - jQuery plugin 0.1.3\r\n * Copyright (c) 2008 Jacob Seidelin, cupboy@gmail.com, http://blog.nihilogic.dk/\r\n * Licensed under the MPL License [http://www.nihilogic.dk/licenses/mpl-license.txt]\r\n */\r\n\r\n/*\r\n * I added three functions for read EXIF from dataURL\r\n * - getImageDataFromDataURL\r\n * - getDataFromDataURL\r\n * - jQuery.fn.exifLoadFromDataURL\r\n * \r\n * http://orientation.gokercebeci.com \r\n * @gokercebeci\r\n */\r\n\r\n(function() {\r\n\r\n\r\n var BinaryFile = function(strData, iDataOffset, iDataLength) {\r\n var data = strData;\r\n var dataOffset = iDataOffset || 0;\r\n var dataLength = 0;\r\n\r\n this.getRawData = function() {\r\n return data;\r\n }\r\n\r\n if (typeof strData == \"string\") {\r\n dataLength = iDataLength || data.length;\r\n\r\n this.getByteAt = function(iOffset) {\r\n return data.charCodeAt(iOffset + dataOffset) & 0xFF;\r\n }\r\n } else if (typeof strData == \"unknown\") {\r\n dataLength = iDataLength || IEBinary_getLength(data);\r\n\r\n this.getByteAt = function(iOffset) {\r\n return IEBinary_getByteAt(data, iOffset + dataOffset);\r\n }\r\n }\r\n\r\n this.getLength = function() {\r\n return dataLength;\r\n }\r\n\r\n this.getSByteAt = function(iOffset) {\r\n var iByte = this.getByteAt(iOffset);\r\n if (iByte > 127)\r\n return iByte - 256;\r\n else\r\n return iByte;\r\n }\r\n\r\n this.getShortAt = function(iOffset, bBigEndian) {\r\n var iShort = bBigEndian ?\r\n (this.getByteAt(iOffset) << 8) + this.getByteAt(iOffset + 1)\r\n : (this.getByteAt(iOffset + 1) << 8) + this.getByteAt(iOffset)\r\n if (iShort < 0)\r\n iShort += 65536;\r\n return iShort;\r\n }\r\n this.getSShortAt = function(iOffset, bBigEndian) {\r\n var iUShort = this.getShortAt(iOffset, bBigEndian);\r\n if (iUShort > 32767)\r\n return iUShort - 65536;\r\n else\r\n return iUShort;\r\n }\r\n this.getLongAt = function(iOffset, bBigEndian) {\r\n var iByte1 = this.getByteAt(iOffset),\r\n iByte2 = this.getByteAt(iOffset + 1),\r\n iByte3 = this.getByteAt(iOffset + 2),\r\n iByte4 = this.getByteAt(iOffset + 3);\r\n\r\n var iLong = bBigEndian ?\r\n (((((iByte1 << 8) + iByte2) << 8) + iByte3) << 8) + iByte4\r\n : (((((iByte4 << 8) + iByte3) << 8) + iByte2) << 8) + iByte1;\r\n if (iLong < 0)\r\n iLong += 4294967296;\r\n return iLong;\r\n }\r\n this.getSLongAt = function(iOffset, bBigEndian) {\r\n var iULong = this.getLongAt(iOffset, bBigEndian);\r\n if (iULong > 2147483647)\r\n return iULong - 4294967296;\r\n else\r\n return iULong;\r\n }\r\n this.getStringAt = function(iOffset, iLength) {\r\n var aStr = [];\r\n for (var i = iOffset, j = 0; i < iOffset + iLength; i++, j++) {\r\n aStr[j] = String.fromCharCode(this.getByteAt(i));\r\n }\r\n return aStr.join(\"\");\r\n }\r\n\r\n this.getCharAt = function(iOffset) {\r\n return String.fromCharCode(this.getByteAt(iOffset));\r\n }\r\n this.toBase64 = function() {\r\n return window.btoa(data);\r\n }\r\n this.fromBase64 = function(strBase64) {\r\n data = window.atob(strBase64);\r\n }\r\n }\r\n\r\n\r\n var BinaryAjax = (function() {\r\n\r\n function createRequest() {\r\n var oHTTP = null;\r\n if (window.XMLHttpRequest) {\r\n oHTTP = new XMLHttpRequest();\r\n } else if (window.ActiveXObject) {\r\n oHTTP = new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n }\r\n return oHTTP;\r\n }\r\n\r\n function getHead(strURL, fncCallback, fncError) {\r\n var oHTTP = createRequest();\r\n if (oHTTP) {\r\n if (fncCallback) {\r\n if (typeof(oHTTP.onload) != \"undefined\") {\r\n oHTTP.onload = function() {\r\n if (oHTTP.status == \"200\") {\r\n fncCallback(this);\r\n } else {\r\n if (fncError)\r\n fncError();\r\n }\r\n oHTTP = null;\r\n };\r\n } else {\r\n oHTTP.onreadystatechange = function() {\r\n if (oHTTP.readyState == 4) {\r\n if (oHTTP.status == \"200\") {\r\n fncCallback(this);\r\n } else {\r\n if (fncError)\r\n fncError();\r\n }\r\n oHTTP = null;\r\n }\r\n };\r\n }\r\n }\r\n oHTTP.open(\"HEAD\", strURL, true);\r\n oHTTP.send(null);\r\n } else {\r\n if (fncError)\r\n fncError();\r\n }\r\n }\r\n\r\n function sendRequest(strURL, fncCallback, fncError, aRange, bAcceptRanges, iFileSize) {\r\n var oHTTP = createRequest();\r\n if (oHTTP) {\r\n\r\n var iDataOffset = 0;\r\n if (aRange && !bAcceptRanges) {\r\n iDataOffset = aRange[0];\r\n }\r\n var iDataLen = 0;\r\n if (aRange) {\r\n iDataLen = aRange[1] - aRange[0] + 1;\r\n }\r\n\r\n if (fncCallback) {\r\n if (typeof(oHTTP.onload) != \"undefined\") {\r\n oHTTP.onload = function() {\r\n\r\n if (oHTTP.status == \"200\" || oHTTP.status == \"206\" || oHTTP.status == \"0\") {\r\n this.binaryResponse = new BinaryFile(this.responseText, iDataOffset, iDataLen);\r\n this.fileSize = iFileSize || this.getResponseHeader(\"Content-Length\");\r\n fncCallback(this);\r\n } else {\r\n if (fncError)\r\n fncError();\r\n }\r\n oHTTP = null;\r\n };\r\n } else {\r\n oHTTP.onreadystatechange = function() {\r\n if (oHTTP.readyState == 4) {\r\n if (oHTTP.status == \"200\" || oHTTP.status == \"206\" || oHTTP.status == \"0\") {\r\n this.binaryResponse = new BinaryFile(oHTTP.responseBody, iDataOffset, iDataLen);\r\n this.fileSize = iFileSize || this.getResponseHeader(\"Content-Length\");\r\n fncCallback(this);\r\n } else {\r\n if (fncError)\r\n fncError();\r\n }\r\n oHTTP = null;\r\n }\r\n };\r\n }\r\n }\r\n oHTTP.open(\"GET\", strURL, true);\r\n\r\n if (oHTTP.overrideMimeType)\r\n oHTTP.overrideMimeType('text/plain; charset=x-user-defined');\r\n\r\n if (aRange && bAcceptRanges) {\r\n oHTTP.setRequestHeader(\"Range\", \"bytes=\" + aRange[0] + \"-\" + aRange[1]);\r\n }\r\n\r\n oHTTP.setRequestHeader(\"If-Modified-Since\", \"Sat, 1 Jan 1970 00:00:00 GMT\");\r\n\r\n oHTTP.send(null);\r\n } else {\r\n if (fncError)\r\n fncError();\r\n }\r\n }\r\n\r\n return function(strURL, fncCallback, fncError, aRange) {\r\n\r\n if (aRange) {\r\n getHead(\r\n strURL,\r\n function(oHTTP) {\r\n var iLength = parseInt(oHTTP.getResponseHeader(\"Content-Length\"), 10);\r\n var strAcceptRanges = oHTTP.getResponseHeader(\"Accept-Ranges\");\r\n\r\n var iStart, iEnd;\r\n iStart = aRange[0];\r\n if (aRange[0] < 0)\r\n iStart += iLength;\r\n iEnd = iStart + aRange[1] - 1;\r\n\r\n sendRequest(strURL, fncCallback, fncError, [iStart, iEnd], (strAcceptRanges == \"bytes\"), iLength);\r\n }\r\n );\r\n\r\n } else {\r\n sendRequest(strURL, fncCallback, fncError);\r\n }\r\n }\r\n\r\n }());\r\n\r\n\r\n document.write(\r\n \"<script type='text/vbscript'>\\r\\n\"\r\n + \"Function IEBinary_getByteAt(strBinary, iOffset)\\r\\n\"\r\n + \"\tIEBinary_getByteAt = AscB(MidB(strBinary,iOffset+1,1))\\r\\n\"\r\n + \"End Function\\r\\n\"\r\n + \"Function IEBinary_getLength(strBinary)\\r\\n\"\r\n + \"\tIEBinary_getLength = LenB(strBinary)\\r\\n\"\r\n + \"End Function\\r\\n\"\r\n + \"</script>\\r\\n\"\r\n );\r\n\r\n\r\n var EXIF = {};\r\n\r\n (function() {\r\n\r\n var bDebug = false;\r\n\r\n EXIF.Tags = {\r\n\r\n // version tags\r\n 0x9000: \"ExifVersion\", // EXIF version\r\n 0xA000: \"FlashpixVersion\", // Flashpix format version\r\n\r\n // colorspace tags\r\n 0xA001: \"ColorSpace\", // Color space information tag\r\n\r\n // image configuration\r\n 0xA002: \"PixelXDimension\", // Valid width of meaningful image\r\n 0xA003: \"PixelYDimension\", // Valid height of meaningful image\r\n 0x9101: \"ComponentsConfiguration\", // Information about channels\r\n 0x9102: \"CompressedBitsPerPixel\", // Compressed bits per pixel\r\n\r\n // user information\r\n 0x927C: \"MakerNote\", // Any desired information written by the manufacturer\r\n 0x9286: \"UserComment\", // Comments by user\r\n\r\n // related file\r\n 0xA004: \"RelatedSoundFile\", // Name of related sound file\r\n\r\n // date and time\r\n 0x9003: \"DateTimeOriginal\", // Date and time when the original image was generated\r\n 0x9004: \"DateTimeDigitized\", // Date and time when the image was stored digitally\r\n 0x9290: \"SubsecTime\", // Fractions of seconds for DateTime\r\n 0x9291: \"SubsecTimeOriginal\", // Fractions of seconds for DateTimeOriginal\r\n 0x9292: \"SubsecTimeDigitized\", // Fractions of seconds for DateTimeDigitized\r\n\r\n // picture-taking conditions\r\n 0x829A: \"ExposureTime\", // Exposure time (in seconds)\r\n 0x829D: \"FNumber\", // F number\r\n 0x8822: \"ExposureProgram\", // Exposure program\r\n 0x8824: \"SpectralSensitivity\", // Spectral sensitivity\r\n 0x8827: \"ISOSpeedRatings\", // ISO speed rating\r\n 0x8828: \"OECF\", // Optoelectric conversion factor\r\n 0x9201: \"ShutterSpeedValue\", // Shutter speed\r\n 0x9202: \"ApertureValue\", // Lens aperture\r\n 0x9203: \"BrightnessValue\", // Value of brightness\r\n 0x9204: \"ExposureBias\", // Exposure bias\r\n 0x9205: \"MaxApertureValue\", // Smallest F number of lens\r\n 0x9206: \"SubjectDistance\", // Distance to subject in meters\r\n 0x9207: \"MeteringMode\", // Metering mode\r\n 0x9208: \"LightSource\", // Kind of light source\r\n 0x9209: \"Flash\", // Flash status\r\n 0x9214: \"SubjectArea\", // Location and area of main subject\r\n 0x920A: \"FocalLength\", // Focal length of the lens in mm\r\n 0xA20B: \"FlashEnergy\", // Strobe energy in BCPS\r\n 0xA20C: \"SpatialFrequencyResponse\", // \r\n 0xA20E: \"FocalPlaneXResolution\", // Number of pixels in width direction per FocalPlaneResolutionUnit\r\n 0xA20F: \"FocalPlaneYResolution\", // Number of pixels in height direction per FocalPlaneResolutionUnit\r\n 0xA210: \"FocalPlaneResolutionUnit\", // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution\r\n 0xA214: \"SubjectLocation\", // Location of subject in image\r\n 0xA215: \"ExposureIndex\", // Exposure index selected on camera\r\n 0xA217: \"SensingMethod\", // Image sensor type\r\n 0xA300: \"FileSource\", // Image source (3 == DSC)\r\n 0xA301: \"SceneType\", // Scene type (1 == directly photographed)\r\n 0xA302: \"CFAPattern\", // Color filter array geometric pattern\r\n 0xA401: \"CustomRendered\", // Special processing\r\n 0xA402: \"ExposureMode\", // Exposure mode\r\n 0xA403: \"WhiteBalance\", // 1 = auto white balance, 2 = manual\r\n 0xA404: \"DigitalZoomRation\", // Digital zoom ratio\r\n 0xA405: \"FocalLengthIn35mmFilm\", // Equivalent foacl length assuming 35mm film camera (in mm)\r\n 0xA406: \"SceneCaptureType\", // Type of scene\r\n 0xA407: \"GainControl\", // Degree of overall image gain adjustment\r\n 0xA408: \"Contrast\", // Direction of contrast processing applied by camera\r\n 0xA409: \"Saturation\", // Direction of saturation processing applied by camera\r\n 0xA40A: \"Sharpness\", // Direction of sharpness processing applied by camera\r\n 0xA40B: \"DeviceSettingDescription\", // \r\n 0xA40C: \"SubjectDistanceRange\", // Distance to subject\r\n\r\n // other tags\r\n 0xA005: \"InteroperabilityIFDPointer\",\r\n 0xA420: \"ImageUniqueID\"\t\t// Identifier assigned uniquely to each image\r\n };\r\n\r\n EXIF.TiffTags = {\r\n 0x0100: \"ImageWidth\",\r\n 0x0101: \"ImageHeight\",\r\n 0x8769: \"ExifIFDPointer\",\r\n 0x8825: \"GPSInfoIFDPointer\",\r\n 0xA005: \"InteroperabilityIFDPointer\",\r\n 0x0102: \"BitsPerSample\",\r\n 0x0103: \"Compression\",\r\n 0x0106: \"PhotometricInterpretation\",\r\n 0x0112: \"Orientation\",\r\n 0x0115: \"SamplesPerPixel\",\r\n 0x011C: \"PlanarConfiguration\",\r\n 0x0212: \"YCbCrSubSampling\",\r\n 0x0213: \"YCbCrPositioning\",\r\n 0x011A: \"XResolution\",\r\n 0x011B: \"YResolution\",\r\n 0x0128: \"ResolutionUnit\",\r\n 0x0111: \"StripOffsets\",\r\n 0x0116: \"RowsPerStrip\",\r\n 0x0117: \"StripByteCounts\",\r\n 0x0201: \"JPEGInterchangeFormat\",\r\n 0x0202: \"JPEGInterchangeFormatLength\",\r\n 0x012D: \"TransferFunction\",\r\n 0x013E: \"WhitePoint\",\r\n 0x013F: \"PrimaryChromaticities\",\r\n 0x0211: \"YCbCrCoefficients\",\r\n 0x0214: \"ReferenceBlackWhite\",\r\n 0x0132: \"DateTime\",\r\n 0x010E: \"ImageDescription\",\r\n 0x010F: \"Make\",\r\n 0x0110: \"Model\",\r\n 0x0131: \"Software\",\r\n 0x013B: \"Artist\",\r\n 0x8298: \"Copyright\"\r\n }\r\n\r\n EXIF.GPSTags = {\r\n 0x0000: \"GPSVersionID\",\r\n 0x0001: \"GPSLatitudeRef\",\r\n 0x0002: \"GPSLatitude\",\r\n 0x0003: \"GPSLongitudeRef\",\r\n 0x0004: \"GPSLongitude\",\r\n 0x0005: \"GPSAltitudeRef\",\r\n 0x0006: \"GPSAltitude\",\r\n 0x0007: \"GPSTimeStamp\",\r\n 0x0008: \"GPSSatellites\",\r\n 0x0009: \"GPSStatus\",\r\n 0x000A: \"GPSMeasureMode\",\r\n 0x000B: \"GPSDOP\",\r\n 0x000C: \"GPSSpeedRef\",\r\n 0x000D: \"GPSSpeed\",\r\n 0x000E: \"GPSTrackRef\",\r\n 0x000F: \"GPSTrack\",\r\n 0x0010: \"GPSImgDirectionRef\",\r\n 0x0011: \"GPSImgDirection\",\r\n 0x0012: \"GPSMapDatum\",\r\n 0x0013: \"GPSDestLatitudeRef\",\r\n 0x0014: \"GPSDestLatitude\",\r\n 0x0015: \"GPSDestLongitudeRef\",\r\n 0x0016: \"GPSDestLongitude\",\r\n 0x0017: \"GPSDestBearingRef\",\r\n 0x0018: \"GPSDestBearing\",\r\n 0x0019: \"GPSDestDistanceRef\",\r\n 0x001A: \"GPSDestDistance\",\r\n 0x001B: \"GPSProcessingMethod\",\r\n 0x001C: \"GPSAreaInformation\",\r\n 0x001D: \"GPSDateStamp\",\r\n 0x001E: \"GPSDifferential\"\r\n }\r\n\r\n EXIF.StringValues = {\r\n ExposureProgram: {\r\n 0: \"Not defined\",\r\n 1: \"Manual\",\r\n 2: \"Normal program\",\r\n 3: \"Aperture priority\",\r\n 4: \"Shutter priority\",\r\n 5: \"Creative program\",\r\n 6: \"Action program\",\r\n 7: \"Portrait mode\",\r\n 8: \"Landscape mode\"\r\n },\r\n MeteringMode: {\r\n 0: \"Unknown\",\r\n 1: \"Average\",\r\n 2: \"CenterWeightedAverage\",\r\n 3: \"Spot\",\r\n 4: \"MultiSpot\",\r\n 5: \"Pattern\",\r\n 6: \"Partial\",\r\n 255: \"Other\"\r\n },\r\n LightSource: {\r\n 0: \"Unknown\",\r\n 1: \"Daylight\",\r\n 2: \"Fluorescent\",\r\n 3: \"Tungsten (incandescent light)\",\r\n 4: \"Flash\",\r\n 9: \"Fine weather\",\r\n 10: \"Cloudy weather\",\r\n 11: \"Shade\",\r\n 12: \"Daylight fluorescent (D 5700 - 7100K)\",\r\n 13: \"Day white fluorescent (N 4600 - 5400K)\",\r\n 14: \"Cool white fluorescent (W 3900 - 4500K)\",\r\n 15: \"White fluorescent (WW 3200 - 3700K)\",\r\n 17: \"Standard light A\",\r\n 18: \"Standard light B\",\r\n 19: \"Standard light C\",\r\n 20: \"D55\",\r\n 21: \"D65\",\r\n 22: \"D75\",\r\n 23: \"D50\",\r\n 24: \"ISO studio tungsten\",\r\n 255: \"Other\"\r\n },\r\n Flash: {\r\n 0x0000: \"Flash did not fire\",\r\n 0x0001: \"Flash fired\",\r\n 0x0005: \"Strobe return light not detected\",\r\n 0x0007: \"Strobe return light detected\",\r\n 0x0009: \"Flash fired, compulsory flash mode\",\r\n 0x000D: \"Flash fired, compulsory flash mode, return light not detected\",\r\n 0x000F: \"Flash fired, compulsory flash mode, return light detected\",\r\n 0x0010: \"Flash did not fire, compulsory flash mode\",\r\n 0x0018: \"Flash did not fire, auto mode\",\r\n 0x0019: \"Flash fired, auto mode\",\r\n 0x001D: \"Flash fired, auto mode, return light not detected\",\r\n 0x001F: \"Flash fired, auto mode, return light detected\",\r\n 0x0020: \"No flash function\",\r\n 0x0041: \"Flash fired, red-eye reduction mode\",\r\n 0x0045: \"Flash fired, red-eye reduction mode, return light not detected\",\r\n 0x0047: \"Flash fired, red-eye reduction mode, return light detected\",\r\n 0x0049: \"Flash fired, compulsory flash mode, red-eye reduction mode\",\r\n 0x004D: \"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected\",\r\n 0x004F: \"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected\",\r\n 0x0059: \"Flash fired, auto mode, red-eye reduction mode\",\r\n 0x005D: \"Flash fired, auto mode, return light not detected, red-eye reduction mode\",\r\n 0x005F: \"Flash fired, auto mode, return light detected, red-eye reduction mode\"\r\n },\r\n SensingMethod: {\r\n 1: \"Not defined\",\r\n 2: \"One-chip color area sensor\",\r\n 3: \"Two-chip color area sensor\",\r\n 4: \"Three-chip color area sensor\",\r\n 5: \"Color sequential area sensor\",\r\n 7: \"Trilinear sensor\",\r\n 8: \"Color sequential linear sensor\"\r\n },\r\n SceneCaptureType: {\r\n 0: \"Standard\",\r\n 1: \"Landscape\",\r\n 2: \"Portrait\",\r\n 3: \"Night scene\"\r\n },\r\n SceneType: {\r\n 1: \"Directly photographed\"\r\n },\r\n CustomRendered: {\r\n 0: \"Normal process\",\r\n 1: \"Custom process\"\r\n },\r\n WhiteBalance: {\r\n 0: \"Auto white balance\",\r\n 1: \"Manual white balance\"\r\n },\r\n GainControl: {\r\n 0: \"None\",\r\n 1: \"Low gain up\",\r\n 2: \"High gain up\",\r\n 3: \"Low gain down\",\r\n 4: \"High gain down\"\r\n },\r\n Contrast: {\r\n 0: \"Normal\",\r\n 1: \"Soft\",\r\n 2: \"Hard\"\r\n },\r\n Saturation: {\r\n 0: \"Normal\",\r\n 1: \"Low saturation\",\r\n 2: \"High saturation\"\r\n },\r\n Sharpness: {\r\n 0: \"Normal\",\r\n 1: \"Soft\",\r\n 2: \"Hard\"\r\n },\r\n SubjectDistanceRange: {\r\n 0: \"Unknown\",\r\n 1: \"Macro\",\r\n 2: \"Close view\",\r\n 3: \"Distant view\"\r\n },\r\n FileSource: {\r\n 3: \"DSC\"\r\n },\r\n Components: {\r\n 0: \"\",\r\n 1: \"Y\",\r\n 2: \"Cb\",\r\n 3: \"Cr\",\r\n 4: \"R\",\r\n 5: \"G\",\r\n 6: \"B\"\r\n }\r\n }\r\n\r\n function addEvent(oElement, strEvent, fncHandler)\r\n {\r\n if (oElement.addEventListener) {\r\n oElement.addEventListener(strEvent, fncHandler, false);\r\n } else if (oElement.attachEvent) {\r\n oElement.attachEvent(\"on\" + strEvent, fncHandler);\r\n }\r\n }\r\n\r\n\r\n function imageHasData(oImg)\r\n {\r\n return !!(oImg.exifdata);\r\n }\r\n\r\n function getImageData(oImg, fncCallback)\r\n {\r\n BinaryAjax(\r\n oImg.src,\r\n function(oHTTP) {\r\n console.log('BINARY', oHTTP.binaryResponse);\r\n var oEXIF = findEXIFinJPEG(oHTTP.binaryResponse);\r\n oImg.exifdata = oEXIF || {};\r\n if (fncCallback)\r\n fncCallback();\r\n }\r\n )\r\n }\r\n\r\n function getImageDataFromDataURL(oImg, fncCallback)\r\n {\r\n var byteString = atob(oImg.src.split(',')[1]);\r\n var f = new BinaryFile(byteString, 0, byteString.length)\r\n var oEXIF = findEXIFinJPEG(f);\r\n oImg.exifdata = oEXIF || {};\r\n if (fncCallback)\r\n fncCallback();\r\n }\r\n\r\n function findEXIFinJPEG(oFile) {\r\n var aMarkers = [];\r\n\r\n if (oFile.getByteAt(0) != 0xFF || oFile.getByteAt(1) != 0xD8) {\r\n return false; // not a valid jpeg\r\n }\r\n\r\n var iOffset = 2;\r\n var iLength = oFile.getLength();\r\n while (iOffset < iLength) {\r\n if (oFile.getByteAt(iOffset) != 0xFF) {\r\n if (bDebug)\r\n console.log(\"Not a valid marker at offset \" + iOffset + \", found: \" + oFile.getByteAt(iOffset));\r\n return false; // not a valid marker, something is wrong\r\n }\r\n\r\n var iMarker = oFile.getByteAt(iOffset + 1);\r\n\r\n // we could implement handling for other markers here, \r\n // but we're only looking for 0xFFE1 for EXIF data\r\n\r\n if (iMarker == 22400) {\r\n if (bDebug)\r\n console.log(\"Found 0xFFE1 marker\");\r\n return readEXIFData(oFile, iOffset + 4, oFile.getShortAt(iOffset + 2, true) - 2);\r\n iOffset += 2 + oFile.getShortAt(iOffset + 2, true);\r\n\r\n } else if (iMarker == 225) {\r\n // 0xE1 = Application-specific 1 (for EXIF)\r\n if (bDebug)\r\n console.log(\"Found 0xFFE1 marker\");\r\n return readEXIFData(oFile, iOffset + 4, oFile.getShortAt(iOffset + 2, true) - 2);\r\n\r\n } else {\r\n iOffset += 2 + oFile.getShortAt(iOffset + 2, true);\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n function readTags(oFile, iTIFFStart, iDirStart, oStrings, bBigEnd)\r\n {\r\n var iEntries = oFile.getShortAt(iDirStart, bBigEnd);\r\n var oTags = {};\r\n for (var i = 0; i < iEntries; i++) {\r\n var iEntryOffset = iDirStart + i * 12 + 2;\r\n var strTag = oStrings[oFile.getShortAt(iEntryOffset, bBigEnd)];\r\n if (!strTag && bDebug)\r\n console.log(\"Unknown tag: \" + oFile.getShortAt(iEntryOffset, bBigEnd));\r\n oTags[strTag] = readTagValue(oFile, iEntryOffset, iTIFFStart, iDirStart, bBigEnd);\r\n }\r\n return oTags;\r\n }\r\n\r\n\r\n function readTagValue(oFile, iEntryOffset, iTIFFStart, iDirStart, bBigEnd)\r\n {\r\n var iType = oFile.getShortAt(iEntryOffset + 2, bBigEnd);\r\n var iNumValues = oFile.getLongAt(iEntryOffset + 4, bBigEnd);\r\n var iValueOffset = oFile.getLongAt(iEntryOffset + 8, bBigEnd) + iTIFFStart;\r\n\r\n switch (iType) {\r\n case 1: // byte, 8-bit unsigned int\r\n case 7: // undefined, 8-bit byte, value depending on field\r\n if (iNumValues == 1) {\r\n return oFile.getByteAt(iEntryOffset + 8, bBigEnd);\r\n } else {\r\n var iValOffset = iNumValues > 4 ? iValueOffset : (iEntryOffset + 8);\r\n var aVals = [];\r\n for (var n = 0; n < iNumValues; n++) {\r\n aVals[n] = oFile.getByteAt(iValOffset + n);\r\n }\r\n return aVals;\r\n }\r\n break;\r\n\r\n case 2: // ascii, 8-bit byte\r\n var iStringOffset = iNumValues > 4 ? iValueOffset : (iEntryOffset + 8);\r\n return oFile.getStringAt(iStringOffset, iNumValues - 1);\r\n break;\r\n\r\n case 3: // short, 16 bit int\r\n if (iNumValues == 1) {\r\n return oFile.getShortAt(iEntryOffset + 8, bBigEnd);\r\n } else {\r\n var iValOffset = iNumValues > 2 ? iValueOffset : (iEntryOffset + 8);\r\n var aVals = [];\r\n for (var n = 0; n < iNumValues; n++) {\r\n aVals[n] = oFile.getShortAt(iValOffset + 2 * n, bBigEnd);\r\n }\r\n return aVals;\r\n }\r\n break;\r\n\r\n case 4: // long, 32 bit int\r\n if (iNumValues == 1) {\r\n return oFile.getLongAt(iEntryOffset + 8, bBigEnd);\r\n } else {\r\n var aVals = [];\r\n for (var n = 0; n < iNumValues; n++) {\r\n aVals[n] = oFile.getLongAt(iValueOffset + 4 * n, bBigEnd);\r\n }\r\n return aVals;\r\n }\r\n break;\r\n case 5:\t// rational = two long values, first is numerator, second is denominator\r\n if (iNumValues == 1) {\r\n return oFile.getLongAt(iValueOffset, bBigEnd) / oFile.getLongAt(iValueOffset + 4, bBigEnd);\r\n } else {\r\n var aVals = [];\r\n for (var n = 0; n < iNumValues; n++) {\r\n aVals[n] = oFile.getLongAt(iValueOffset + 8 * n, bBigEnd) / oFile.getLongAt(iValueOffset + 4 + 8 * n, bBigEnd);\r\n }\r\n return aVals;\r\n }\r\n break;\r\n case 9: // slong, 32 bit signed int\r\n if (iNumValues == 1) {\r\n return oFile.getSLongAt(iEntryOffset + 8, bBigEnd);\r\n } else {\r\n var aVals = [];\r\n for (var n = 0; n < iNumValues; n++) {\r\n aVals[n] = oFile.getSLongAt(iValueOffset + 4 * n, bBigEnd);\r\n }\r\n return aVals;\r\n }\r\n break;\r\n case 10: // signed rational, two slongs, first is numerator, second is denominator\r\n if (iNumValues == 1) {\r\n return oFile.getSLongAt(iValueOffset, bBigEnd) / oFile.getSLongAt(iValueOffset + 4, bBigEnd);\r\n } else {\r\n var aVals = [];\r\n for (var n = 0; n < iNumValues; n++) {\r\n aVals[n] = oFile.getSLongAt(iValueOffset + 8 * n, bBigEnd) / oFile.getSLongAt(iValueOffset + 4 + 8 * n, bBigEnd);\r\n }\r\n return aVals;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n\r\n function readEXIFData(oFile, iStart, iLength)\r\n {\r\n if (oFile.getStringAt(iStart, 4) != \"Exif\") {\r\n if (bDebug)\r\n console.log(\"Not valid EXIF data! \" + oFile.getStringAt(iStart, 4));\r\n return false;\r\n }\r\n\r\n var bBigEnd;\r\n\r\n var iTIFFOffset = iStart + 6;\r\n\r\n // test for TIFF validity and endianness\r\n if (oFile.getShortAt(iTIFFOffset) == 0x4949) {\r\n bBigEnd = false;\r\n } else if (oFile.getShortAt(iTIFFOffset) == 0x4D4D) {\r\n bBigEnd = true;\r\n } else {\r\n if (bDebug)\r\n console.log(\"Not valid TIFF data! (no 0x4949 or 0x4D4D)\");\r\n return false;\r\n }\r\n\r\n if (oFile.getShortAt(iTIFFOffset + 2, bBigEnd) != 0x002A) {\r\n if (bDebug)\r\n console.log(\"Not valid TIFF data! (no 0x002A)\");\r\n return false;\r\n }\r\n\r\n if (oFile.getLongAt(iTIFFOffset + 4, bBigEnd) != 0x00000008) {\r\n if (bDebug)\r\n console.log(\"Not valid TIFF data! (First offset not 8)\", oFile.getShortAt(iTIFFOffset + 4, bBigEnd));\r\n return false;\r\n }\r\n\r\n var oTags = readTags(oFile, iTIFFOffset, iTIFFOffset + 8, EXIF.TiffTags, bBigEnd);\r\n\r\n if (oTags.ExifIFDPointer) {\r\n var oEXIFTags = readTags(oFile, iTIFFOffset, iTIFFOffset + oTags.ExifIFDPointer, EXIF.Tags, bBigEnd);\r\n for (var strTag in oEXIFTags) {\r\n switch (strTag) {\r\n case \"LightSource\" :\r\n case \"Flash\" :\r\n case \"MeteringMode\" :\r\n case \"ExposureProgram\" :\r\n case \"SensingMethod\" :\r\n case \"SceneCaptureType\" :\r\n case \"SceneType\" :\r\n case \"CustomRendered\" :\r\n case \"WhiteBalance\" :\r\n case \"GainControl\" :\r\n case \"Contrast\" :\r\n case \"Saturation\" :\r\n case \"Sharpness\" :\r\n case \"SubjectDistanceRange\" :\r\n case \"FileSource\" :\r\n oEXIFTags[strTag] = EXIF.StringValues[strTag][oEXIFTags[strTag]];\r\n break;\r\n\r\n case \"ExifVersion\" :\r\n case \"FlashpixVersion\" :\r\n oEXIFTags[strTag] = String.fromCharCode(oEXIFTags[strTag][0], oEXIFTags[strTag][1], oEXIFTags[strTag][2], oEXIFTags[strTag][3]);\r\n break;\r\n\r\n case \"ComponentsConfiguration\" :\r\n oEXIFTags[strTag] =\r\n EXIF.StringValues.Components[oEXIFTags[strTag][0]]\r\n + EXIF.StringValues.Components[oEXIFTags[strTag][1]]\r\n + EXIF.StringValues.Components[oEXIFTags[strTag][2]]\r\n + EXIF.StringValues.Components[oEXIFTags[strTag][3]];\r\n break;\r\n }\r\n oTags[strTag] = oEXIFTags[strTag];\r\n }\r\n }\r\n\r\n if (oTags.GPSInfoIFDPointer) {\r\n var oGPSTags = readTags(oFile, iTIFFOffset, iTIFFOffset + oTags.GPSInfoIFDPointer, EXIF.GPSTags, bBigEnd);\r\n for (var strTag in oGPSTags) {\r\n switch (strTag) {\r\n case \"GPSVersionID\" :\r\n oGPSTags[strTag] = oGPSTags[strTag][0]\r\n + \".\" + oGPSTags[strTag][1]\r\n + \".\" + oGPSTags[strTag][2]\r\n + \".\" + oGPSTags[strTag][3];\r\n break;\r\n }\r\n oTags[strTag] = oGPSTags[strTag];\r\n }\r\n }\r\n\r\n return oTags;\r\n }\r\n\r\n\r\n EXIF.getData = function(oImg, fncCallback)\r\n {\r\n if (!oImg.complete)\r\n return false;\r\n if (!imageHasData(oImg)) {\r\n getImageData(oImg, fncCallback);\r\n } else {\r\n if (fncCallback)\r\n fncCallback();\r\n }\r\n return true;\r\n }\r\n\r\n EXIF.getDataFromDataURL = function(oImg, fncCallback)\r\n {\r\n if (!oImg.complete)\r\n return false;\r\n if (!imageHasData(oImg)) {\r\n getImageDataFromDataURL(oImg, fncCallback);\r\n } else {\r\n if (fncCallback)\r\n fncCallback();\r\n }\r\n return true;\r\n }\r\n\r\n EXIF.getTag = function(oImg, strTag)\r\n {\r\n if (!imageHasData(oImg))\r\n return;\r\n return oImg.exifdata[strTag];\r\n }\r\n\r\n EXIF.getAllTags = function(oImg)\r\n {\r\n if (!imageHasData(oImg))\r\n return {};\r\n var oData = oImg.exifdata;\r\n var oAllTags = {};\r\n for (var a in oData) {\r\n if (oData.hasOwnProperty(a)) {\r\n oAllTags[a] = oData[a];\r\n }\r\n }\r\n return oAllTags;\r\n }\r\n\r\n EXIF.pretty = function(oImg)\r\n {\r\n if (!imageHasData(oImg))\r\n return \"\";\r\n var oData = oImg.exifdata;\r\n var strPretty = \"\";\r\n for (var a in oData) {\r\n if (oData.hasOwnProperty(a)) {\r\n if (typeof oData[a] == \"object\") {\r\n strPretty += a + \" : [\" + oData[a].length + \" values]\\r\\n\";\r\n } else {\r\n strPretty += a + \" : \" + oData[a] + \"\\r\\n\";\r\n }\r\n }\r\n }\r\n return strPretty;\r\n }\r\n\r\n EXIF.readFromBinaryFile = function(oFile) {\r\n return findEXIFinJPEG(oFile);\r\n }\r\n\r\n function loadAllImages()\r\n {\r\n var aImages = document.getElementsByTagName(\"img\");\r\n for (var i = 0; i < aImages.length; i++) {\r\n if (aImages[i].getAttribute(\"exif\") == \"true\") {\r\n if (!aImages[i].complete) {\r\n addEvent(aImages[i], \"load\",\r\n function() {\r\n EXIF.getData(this);\r\n }\r\n );\r\n } else {\r\n EXIF.getData(aImages[i]);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // automatically load exif data for all images with exif=true when doc is ready\r\n jQuery(document).ready(loadAllImages);\r\n\r\n // load data for images manually\r\n jQuery.fn.exifLoad = function(fncCallback) {\r\n return this.each(function() {\r\n EXIF.getData(this, fncCallback)\r\n });\r\n }\r\n\r\n // load data for images manually\r\n jQuery.fn.exifLoadFromDataURL = function(fncCallback) {\r\n return this.each(function() {\r\n EXIF.getDataFromDataURL(this, fncCallback)\r\n return true;\r\n });\r\n }\r\n\r\n jQuery.fn.exif = function(strTag) {\r\n var aStrings = [];\r\n this.each(function() {\r\n aStrings.push(EXIF.getTag(this, strTag));\r\n });\r\n return aStrings;\r\n }\r\n\r\n jQuery.fn.exifAll = function() {\r\n var aStrings = [];\r\n this.each(function() {\r\n aStrings.push(EXIF.getAllTags(this));\r\n });\r\n return aStrings;\r\n }\r\n\r\n jQuery.fn.exifPretty = function() {\r\n var aStrings = [];\r\n this.each(function() {\r\n aStrings.push(EXIF.pretty(this));\r\n });\r\n return aStrings;\r\n }\r\n\r\n\r\n })();\r\n\r\n\r\n})();\r\n","/* jQuery Wiggle - http://www.class.pm/files/jquery/jquery.wiggle/demo/ */\n/*\n\tfunction wiggleForOneSecond(el) {\n\t\tel.wiggle('start', {\n\t\t\tdelay: 20\n\t\t});\n\t\tsetTimeout(function () {\n\t\t\tel.wiggle('stop');\n\t\t}, 200);\n\t}\n\n\tsetInterval(function () {\n\t\twiggleForOneSecond($('.wiggle'));\n\t}, 10000);\n */\n(function ($) {\n\t$.fn.wiggle = function (method, options) {\n\t\toptions = $.extend({\n\t\t\tdegrees: ['2', '4', '2', '0', '-2', '-4', '-2', '0'], /* Movement Measurements */\n\t\t\tdelay: 30, /* Wiggle Speed */\n\t\t\tmultiplier: 1, /* Size of the movement */\n\t\t\tlimit: null,\n\t\t\trandomStart: true,\n\t\t\tonWiggle: function (o) {},\n\t\t\tonWiggleStart: function (o) {},\n\t\t\tonWiggleStop: function (o) {}\n\t\t}, options);\n\t\tvar methods = {\n\t\t\twiggle: function (o, step) {\n\t\t\t\tif (step === undefined) {\n\t\t\t\t\tstep = options.randomStart ? Math.floor(Math.random() * options.degrees.length) : 0;\n\t\t\t\t}\n\t\t\t\tif (!$(o).hasClass('wiggling')) {\n\t\t\t\t\t$(o).addClass('wiggling');\n\t\t\t\t}\n\t\t\t\tvar degree = options.degrees[step] * options.multiplier;\n\t\t\t\t$(o).css({\n\t\t\t\t\t'-webkit-transform': 'rotate(' + degree + 'deg)',\n\t\t\t\t\t'-moz-transform': 'rotate(' + degree + 'deg)',\n\t\t\t\t\t'-o-transform': 'rotate(' + degree + 'deg)',\n\t\t\t\t\t'-sand-transform': 'rotate(' + degree + 'deg)',\n\t\t\t\t\t'transform': 'rotate(' + degree + 'deg)'\n\t\t\t\t});\n\t\t\t\tif (step === (options.degrees.length - 1)) {\n\t\t\t\t\tstep = 0;\n\t\t\t\t\tif ($(o).data('wiggles') === undefined) {\n\t\t\t\t\t\t$(o).data('wiggles', 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$(o).data('wiggles', $(o).data('wiggles') + 1);\n\t\t\t\t\t}\n\t\t\t\t\toptions.onWiggle(o);\n\t\t\t\t}\n\t\t\t\tif (options.limit && $(o).data('wiggles') === options.limit) {\n\t\t\t\t\treturn methods.stop(o);\n\t\t\t\t}\n\t\t\t\to.timeout = setTimeout(function () {\n\t\t\t\t\tmethods.wiggle(o, step + 1);\n\t\t\t\t}, options.delay);\n\t\t\t},\n\t\t\tstop: function (o) {\n\t\t\t\t$(o).data('wiggles', 0);\n\t\t\t\t$(o).css({\n\t\t\t\t\t'-webkit-transform': 'rotate(0deg)',\n\t\t\t\t\t'-moz-transform': 'rotate(0deg)',\n\t\t\t\t\t'-o-transform': 'rotate(0deg)',\n\t\t\t\t\t'-sand-transform': 'rotate(0deg)',\n\t\t\t\t\t'transform': 'rotate(0deg)'\n\t\t\t\t});\n\t\t\t\tif ($(o).hasClass('wiggling')) {\n\t\t\t\t\t$(o).removeClass('wiggling');\n\t\t\t\t}\n\t\t\t\tclearTimeout(o.timeout);\n\t\t\t\to.timeout = null;\n\t\t\t\toptions.onWiggleStop(o);\n\t\t\t},\n\t\t\tisWiggling: function (o) {\n\t\t\t\treturn !o.timeout ? false : true;\n\t\t\t}\n\t\t};\n\t\tif (method === 'isWiggling' && this.length === 1) {\n\t\t\treturn methods.isWiggling(this[0]);\n\t\t}\n\t\tthis.each(function () {\n\t\t\tif ((method === 'start' || method === undefined) && !this.timeout) {\n\t\t\t\tmethods.wiggle(this);\n\t\t\t\toptions.onWiggleStart(this);\n\t\t\t} else if (method === 'stop') {\n\t\t\t\tmethods.stop(this);\n\t\t\t}\n\t\t});\n\t\treturn this;\n\t};\n})(jQuery);","(function () {\n var use_webp = window.canUseWebP || null;\n var use_avif = window.canUseAVIF || null;\n function testWebP(callback) {\n var webP = new Image();\n webP.onload = webP.onerror = function () {\n callback(webP.height == 2);\n };\n webP.src = 'data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA';\n }\n function testAVIF(callback) {\n var avif = new Image();\n avif.onload = avif.onerror = function () {\n callback(avif.height == 1);\n };\n avif.src = 'data:image/avif;base64,AAAAHGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZgAAAPBtZXRhAAAAAAAAAChoZGxyAAAAAAAAAABwaWN0AAAAAAAAAAAAAAAAbGliYXZpZgAAAAAOcGl0bQAAAAAAAQAAAB5pbG9jAAAAAEQAAAEAAQAAAAEAAAEUAAAAFQAAAChpaW5mAAAAAAABAAAAGmluZmUCAAAAAAEAAGF2MDFDb2xvcgAAAABoaXBycAAAAElpcGNvAAAAFGlzcGUAAAAAAAAAAQAAAAEAAAAOcGl4aQAAAAABCAAAAAxhdjFDgQAcAAAAABNjb2xybmNseAABAAEAAQAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB1tZGF0EgAKBxgADlgICAkyCB/xgAAghQm0'\n }\n function atStartup() {\n testWebP(function (canSupport) {\n use_webp = canSupport\n window.canUseWebP = use_webp\n });\n testAVIF(function (canSupport) {\n use_avif = canSupport\n window.canUseAVIF = use_avif\n });\n }\n registerListener('load', atStartup);\n\n setInterval(lazyLoad, 500);\n var lazy = [];\n\n function lazyLoad() {\n if (use_webp === null) {\n atStartup();\n return;\n }\n lazy = document.getElementsByClassName('coglazy');\n if (use_avif) {\n for (var i = 0; i < lazy.length; i++) {\n if (lazy[i].getAttribute('data-avif')) {\n lazy[i].setAttribute('data-src', lazy[i].getAttribute('data-avif'));\n lazy[i].removeAttribute('data-avif');\n }\n }\n } else if (use_webp) {\n for (var i = 0; i < lazy.length; i++) {\n if (lazy[i].getAttribute('data-webp')) {\n lazy[i].setAttribute('data-src', lazy[i].getAttribute('data-webp'));\n lazy[i].removeAttribute('data-webp');\n }\n }\n }\n var replaced_placeholder = false\n for (var i = 0; i < lazy.length; i++) {\n if (lazy[i].getAttribute('coglazyplaceholder')) {\n continue\n }\n if (lazy[i].getAttribute('data-src')) {\n lazy[i].src = lazy[i].getAttribute('data-src');\n lazy[i].setAttribute('coglazyplaceholder', '1')\n }\n replaced_placeholder = true\n }\n if (replaced_placeholder) {\n // Allow the preloaded image to load\n return;\n }\n for (var i = 0; i < lazy.length; i++) {\n if (lazy[i].getAttribute('coglazydone')) {\n continue\n }\n if (isInViewport(lazy[i])) {\n if (lazy[i].getAttribute('data-src')) {\n var srcurl = lazy[i].getAttribute('data-src');\n var filename = srcurl.split('/').pop();\n var width = Math.floor(lazy[i].clientWidth * window.devicePixelRatio);\n var height = Math.floor(lazy[i].clientHeight * window.devicePixelRatio);\n\n lazy[i].src = srcurl.replace(filename, '') + width + 'x' + height + ':' + filename;\n lazy[i].removeAttribute('data-src');\n }\n lazy[i].setAttribute('coglazydone', '1')\n }\n }\n }\n\n function isInViewport(el) {\n var rect = el.getBoundingClientRect();\n var screenheight = window.innerHeight || document.documentElement.clientHeight\n var screenwidth = window.innerWidth || document.documentElement.clientWidth\n // Increase height to pre-load on scroll\n screenheight += 200\n return (\n rect.bottom >= 0 &&\n rect.right >= 0 &&\n rect.top <= screenheight &&\n rect.left <= screenwidth\n );\n }\n\n function registerListener(event, func) {\n if (window.addEventListener) {\n window.addEventListener(event, func)\n } else {\n window.attachEvent('on' + event, func)\n }\n }\n})();\n","// Replace loading.gif with appropriate image\nfunction replaceloadinggif(el) {\n if (el.attr('data-changed') != 1) {\n // Fetch image url\n var alttag = el.attr('alt')\n $.getJSON('/cms/cognito/widget/imgSrc', {\n code: alttag,\n }, function (data) {\n if (data.url) {\n el.attr('src', data.url)\n }\n })\n el.attr('data-changed', 1)\n }\n}\n\n/**\n * Save a draft from an update or create\n * @param object formelement The jQuery form element\n * @param string namespace Namespace url name\n * @param string model Model url name\n * @param object parameters List of create item parameters, e.g. for creating related items\n * @param boolean forced Autosave = 0, Force draft save = 1\n */\nfunction cgsavedraft(formelement, namespace, model, parameters, forced) {\n if (!formelement.length) {\n // Must be trying to save draft on a form that has been closed\n return\n }\n formelement.find('.savedraftbtn i').removeClass('fa-save')\n formelement.find('.savedraftbtn i').addClass('fa-spin fa-spinner')\n\n // Ensure HTML editors are up to date\n if (typeof (CKEDITOR) !== 'undefined') {\n for (instance in CKEDITOR.instances) {\n CKEDITOR.instances[instance].updateElement()\n }\n }\n\n $.post('/cms/' + namespace + '/' + model + '/savedraft', {\n parameters: parameters,\n force: forced,\n data: formelement.serialize(),\n }, function (data) {\n formelement.find('.savedraftbtn i').removeClass('fa-spin fa-spinner')\n formelement.find('.savedraftbtn i').addClass('fa-save')\n if (data.success) {\n new Noty({\n timeout: 1000,\n theme: 'semanticui',\n type: 'success',\n text: 'Draft Saved',\n }).show()\n }\n })\n}\n\n$(document).ready(function () {\n $('body').on('click', '.collapsed-box [data-widget=\"collapse\"]', function () {\n $(this).closest('.collapsed-box').find('.box-body').toggle()\n return false\n })\n /* All create and update forms get submitted via ajax */\n $('body').on('submit', '.ajaxform', function () {\n var submitbutton = $('input[type=submit][clicked=true]')\n if (submitbutton.hasClass('disabled')) {\n return false\n }\n submitbutton.remove()\n var formdata = $(this).serialize()\n formdata += '&' + submitbutton.attr('name') + '=' + submitbutton.val()\n var url = $(this).attr('action')\n var container = $(this).closest('.cognito-ajax-wrapper')\n var dialogid = $(this).closest('.cognito-ajax-dialog').attr('id')\n var thisdialog = false\n $.each(BootstrapDialog.dialogs, function (id, dialog) {\n if (dialogid === id) {\n thisdialog = dialog\n }\n })\n $.post(url, { data: formdata }, function (result) {\n $('.dataTable thead').trigger('dblclick')\n $('.refresh_on_ajax_save').trigger('dblclick')\n $('.ajaxnestedset').trigger('ajaxreload')\n if (result.body) {\n container.html(result.body)\n }\n else if (result.redirect) {\n if (thisdialog) {\n thisdialog.close()\n $.get('/cms/clearflash')\n }\n else {\n window.location = result.redirect\n }\n }\n else if (result.ajaxload) {\n container.load(result.ajaxload, function () {\n window.scrollTo(0, 0)\n })\n }\n else {\n container.html(result)\n }\n })\n container.html('<div class=\"spincenter\"><i class=\"fa fa-spin fa-spinner\"></i></div>')\n return false\n })\n\n /* Cancel button */\n $('body').on('click', '.ajaxform .cancel-close', function () {\n var dialogid = $(this).closest('.cognito-ajax-dialog').attr('id')\n var thisdialog = false\n $.each(BootstrapDialog.dialogs, function (id, dialog) {\n if (dialogid === id) {\n thisdialog = dialog\n }\n })\n if (thisdialog) {\n thisdialog.close()\n $.get('/cms/clearflash')\n }\n else {\n // Go back to the admin screen\n var ref = window.location.href\n var updatepos = ref.search('/update/')\n var createpos = ref.search('/create')\n var stringlength = ref.length\n var newloc = ''\n if (updatepos > 0) {\n newloc = ref.substr(0, updatepos)\n }\n else if ((createpos > 0) && ((stringlength - createpos) === 7)) {\n newloc = ref.substr(0, createpos)\n }\n if (newloc === '') {\n window.history.back()\n }\n else {\n window.location = newloc\n }\n }\n })\n\n $('body').on('click', 'form input[type=submit]', function () {\n $('input[type=submit]', $(this).parents('form')).removeAttr('clicked')\n $(this).attr('clicked', 'true')\n })\n\n function newdialog(href) {\n var hrefarr = href.split('?')\n var hreflb = hrefarr[0] + '/lb'\n if (hrefarr[1]) {\n hreflb += '?' + hrefarr[1]\n }\n BootstrapDialog.show({\n cssClass: 'cognito-ajax-dialog',\n size: BootstrapDialog.SIZE_WIDE,\n closeByBackdrop: false,\n closeByKeyboard: false,\n message: $('<div></div>').load(hreflb),\n })\n }\n\n $('body').on('click', '.modal-content a.nolightbox', function () {\n window.location = $(this).attr('href')\n return false\n })\n\n $('body').on('click', 'a.lightbox', function () {\n newdialog($(this).attr('href'))\n return false\n })\n\n $('body').on('click', '.dataTables_paginate a', function () {\n // Disable loading pagination links in a dialog\n return false\n })\n\n $('body').on('click', '.dataTable a', function () {\n // Open in new window if requested\n if ($(this).attr('target')) {\n return true\n }\n // Unless it has the nolightbox class\n if ($(this).hasClass('nolightbox')) {\n return true\n }\n\n // Otherwise open in a dialog\n if ($(this).closest('.cognito-ajax-wrapper').length) {\n newdialog($(this).attr('href'))\n return false\n }\n })\n\n // Fix datatable sizing in hidden tabs\n $('body').on('shown.bs.tab', 'a[data-toggle=\"tab\"]', function () {\n $($.fn.dataTable.tables(true)).DataTable()\n .columns.adjust()\n })\n\n /* Select 2 */\n $('.selectize').selectize()\n\n $('.chzn-select').chosen({ allow_single_deselect: true })\n $('.select2-select').select2()\n\n $('.dashboardwidget').each(function () {\n var height = $(this).attr('data-scroll-height')\n if (height) {\n $(this).find('.box-body').slimScroll({\n height: height,\n touchScrollStep: 50,\n })\n }\n })\n\n /* Avoid enter to submit forms */\n $(document).on('keypress', ':input:not(textarea)', function (event) {\n return event.keyCode != 13\n })\n\n /* All links inside bootstrap dialogs to load inside the dialog */\n $(document).on('click', '.bootstrap-dialog-message a', function () {\n // Except if they have the noajax class\n if ($(this).hasClass('noajax')) {\n return true\n }\n // Or is a chosen select\n if ($(this).hasClass('chosen-single')) {\n return true\n }\n // Or the target is set\n if ($(this).attr('target')) {\n return true\n }\n // Or inside a ckeditor\n if ($(this).parents('.cke').length) {\n return true\n }\n // Or inside a form builder\n if ($(this).parents('.formbuilder').length) {\n return true\n }\n var link = $(this).attr('href')\n if ($(this).hasClass('needs-lb')) {\n var hrefarr = link.split('?')\n var hreflb = hrefarr[0] + '/lb'\n if (hrefarr[1]) {\n hreflb += '?' + hrefarr[1]\n }\n link = hreflb\n }\n var container = $(this).closest('.bootstrap-dialog-message-content')\n if (!container.length) {\n container = $(this).closest('.bootstrap-dialog-message')\n }\n container.html('<div class=\"spincenter\"><i class=\"fa fa-spin fa-spinner\"></i></div>')\n var dialogid = $(this).closest('.cognito-ajax-dialog').attr('id')\n var thisdialog = false\n $.each(BootstrapDialog.dialogs, function (id, dialog) {\n if (dialogid === id) {\n thisdialog = dialog\n }\n })\n $.get(link, function (result) {\n $('.dataTable thead').trigger('dblclick')\n $('.refresh_on_ajax_save').trigger('dblclick')\n $('.ajaxnestedset').trigger('ajaxreload')\n if (result.body) {\n container.html(result.body)\n }\n else if (result.redirect) {\n if (thisdialog) {\n thisdialog.close()\n $.get('/cms/clearflash')\n }\n else {\n window.location = result.redirect\n }\n }\n else if (result.ajaxload) {\n container.load(result.ajaxload, function () {\n window.scrollTo(0, 0)\n })\n }\n else {\n container.html(result)\n }\n })\n return false\n })\n\n // Handle ALL checkboxes\n $(document).on('click', '.cognito_checkbox_all', function () {\n $(this).closest('.cognito_checkbox_group').find('input[type=checkbox]').prop('checked', $(this).is(':checked'))\n })\n\n // Handle clicking on update items beside referenced table dropdowns\n $(document).on('click', '.cf-select-update-item', function () {\n // get id\n var item_id = $(this).closest('.input-group').find('select').val()\n var namespace = $(this).attr('data-namespace')\n var model = $(this).attr('data-model')\n newdialog('/cms/' + namespace + '/' + model + '/update/' + item_id)\n })\n\n // Search by code submit on enter\n $(document).on('keyup', '.search_by_code', function (ev) {\n if (ev.which != 13) {\n return\n }\n ev.preventDefault()\n $(this).closest('form').submit()\n })\n\n // Wiggle one signal notification\n function wiggleNotification(el) {\n el.wiggle('start', {\n multiplier: 4,\n delay: 20,\n })\n setTimeout(function () {\n el.wiggle('stop')\n }, 500)\n }\n\n setInterval(function () {\n wiggleNotification($('.wiggle-notification'))\n }, 10000)\n\n // Automatic dataTables\n setInterval(function () {\n $('.datatable-auto').each(function () {\n if ($(this).attr('dtauto-init')) {\n return\n }\n $(this).attr('dtauto-init', 1)\n $(this).DataTable({\n dom: '<\\'row\\'<\\'col-sm-6\\'l><\\'col-sm-6\\'f>>'\n + '<\\'row\\'<\\'col-sm-12\\'tr>>'\n + '<\\'row\\'<\\'col-sm-12 text-right\\'B>>'\n + '<\\'row\\'<\\'col-sm-5\\'i><\\'col-sm-7\\'p>>',\n buttons: [\n 'copy',\n 'csv',\n 'print',\n ],\n })\n })\n }, 1000)\n})\n","/*! For license information please see form-builder.min.js.LICENSE.txt */\n!function(e){\"use strict\";!function(){var t={349:function(e,t,r){r.r(t);var o=r(645),n=r.n(o),i=r(278),l=r.n(i),a=r(21),s=r.n(a),d=new URL(r(138),r.b),c=new URL(r(488),r.b),f=new URL(r(591),r.b),u=l()(n()),p=s()(d),m=s()(c),b=s()(f);u.push([e.id,'@font-face{font-family:\"formbuilder-icons\";src:url('+p+') format(\"woff\")}[class^=formbuilder-icon-]:before,[class*=\" formbuilder-icon-\"]:before{font-family:\"formbuilder-icons\";font-style:normal;font-weight:normal;speak:never;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.formbuilder-icon-autocomplete:before{content:\"\"}.formbuilder-icon-date:before{content:\"\"}.formbuilder-icon-checkbox:before{content:\"\"}.formbuilder-icon-checkbox-group:before{content:\"\"}.formbuilder-icon-radio-group:before{content:\"\"}.formbuilder-icon-rich-text:before{content:\"\"}.formbuilder-icon-select:before{content:\"\"}.formbuilder-icon-textarea:before{content:\"\"}.formbuilder-icon-text:before{content:\"\"}.formbuilder-icon-pencil:before{content:\"\"}.formbuilder-icon-file:before{content:\"\"}.formbuilder-icon-hidden:before{content:\"\"}.formbuilder-icon-cancel:before{content:\"\"}.formbuilder-icon-button:before{content:\"\"}.formbuilder-icon-header:before{content:\"\"}.formbuilder-icon-paragraph:before{content:\"\"}.formbuilder-icon-number:before{content:\"\"}.formbuilder-icon-copy:before{content:\"\"}.formbuilder-icon-grid:before{content:url('+m+\")}.formbuilder-icon-plus:before{content:url(\"+b+')}.formbuilder-icon-sort-lower:before{content:\"\"}.formbuilder-icon-sort-higher:before{content:\"\"}.form-wrap.form-builder{position:relative;display:flex;flex-direction:row}.form-wrap.form-builder *{box-sizing:border-box}.form-wrap.form-builder.formbuilder-embedded-bootstrap button,.form-wrap.form-builder.formbuilder-embedded-bootstrap input,.form-wrap.form-builder.formbuilder-embedded-bootstrap select,.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.form-wrap.form-builder.formbuilder-embedded-bootstrap input{line-height:normal}.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea{overflow:auto}.form-wrap.form-builder.formbuilder-embedded-bootstrap button,.form-wrap.form-builder.formbuilder-embedded-bootstrap input,.form-wrap.form-builder.formbuilder-embedded-bootstrap select,.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea{font-family:inherit;font-size:inherit;line-height:inherit}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group{position:relative;display:inline-block;vertical-align:middle}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn{position:relative;float:left}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn+.btn-group,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .btn-group+.btn-group{margin-left:-1px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:last-child:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.dropdown-toggle:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:focus,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn-group>.btn:hover{z-index:2}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;background-image:none;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn.btn-active,.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn:active{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon:last-child,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:first-child>.btn:not(:first-child),.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.btn-group>.btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-btn{display:table-cell}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-addon,.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group{position:relative;display:table;border-collapse:separate}.form-wrap.form-builder.formbuilder-embedded-bootstrap .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control,.form-wrap.form-builder.formbuilder-embedded-bootstrap output{font-size:14px;line-height:1.42857143;display:block}.form-wrap.form-builder.formbuilder-embedded-bootstrap textarea.form-control{height:auto}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{height:34px;display:block;width:100%;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control:focus{outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-group{margin-left:0px;margin-bottom:15px}.form-wrap.form-builder.formbuilder-embedded-bootstrap .btn,.form-wrap.form-builder.formbuilder-embedded-bootstrap .form-control{background-image:none}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-right{float:right}.form-wrap.form-builder.formbuilder-embedded-bootstrap .pull-left{float:left}.form-wrap.form-builder .formbuilder-required,.form-wrap.form-builder .required-asterisk{color:#c10000}.form-wrap.form-builder .formbuilder-checkbox-group input[type=checkbox],.form-wrap.form-builder .formbuilder-checkbox-group input[type=radio],.form-wrap.form-builder .formbuilder-radio-group input[type=checkbox],.form-wrap.form-builder .formbuilder-radio-group input[type=radio]{margin:0 4px 0 0}.form-wrap.form-builder .formbuilder-checkbox-inline,.form-wrap.form-builder .formbuilder-radio-inline{margin-right:8px;display:inline-block;vertical-align:middle;padding-left:0}.form-wrap.form-builder .formbuilder-checkbox-inline label input[type=text],.form-wrap.form-builder .formbuilder-radio-inline label input[type=text]{margin-top:0}.form-wrap.form-builder .formbuilder-checkbox-inline:first-child,.form-wrap.form-builder .formbuilder-radio-inline:first-child{padding-left:0}.form-wrap.form-builder .formbuilder-autocomplete-list{background-color:#fff;display:none;list-style:none;padding:0;border:1px solid #ccc;border-width:0 1px 1px;position:absolute;z-index:20;max-height:200px;overflow-y:auto}.form-wrap.form-builder .formbuilder-autocomplete-list li{display:none;cursor:default;padding:5px;margin:0;transition:background-color 200ms ease-in-out}.form-wrap.form-builder .formbuilder-autocomplete-list li:hover,.form-wrap.form-builder .formbuilder-autocomplete-list li.active-option{background-color:rgba(0,0,0,.075)}@keyframes PLACEHOLDER{0%{height:1px}100%{height:15px}}.form-wrap.form-builder .cb-wrap{width:26%;max-width:-moz-fit-content;max-width:fit-content;transition:transform 250ms}.form-wrap.form-builder .cb-wrap.sticky-controls{position:sticky;align-self:flex-start;top:0}.form-wrap.form-builder .cb-wrap h4{margin-top:0;color:#666}@media(max-width: 481px){.form-wrap.form-builder .cb-wrap{width:64px}.form-wrap.form-builder .cb-wrap h4{display:none}}.form-wrap.form-builder .cb-wrap .form-actions{float:right;margin-top:5px}.form-wrap.form-builder .cb-wrap .form-actions button{border:0 none}.form-wrap.form-builder .frmb-control{margin:0;padding:0;border-radius:5px}.form-wrap.form-builder .frmb-control li{cursor:move;list-style:none;margin:0 0 -1px 0;padding:10px;text-align:left;background:#fff;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;box-shadow:inset 0 0 0 1px #c5c5c5}.form-wrap.form-builder .frmb-control li .control-icon{width:16px;height:auto;margin-right:10px;margin-left:.2em;display:inline-block}.form-wrap.form-builder .frmb-control li .control-icon img,.form-wrap.form-builder .frmb-control li .control-icon svg{max-width:100%;height:auto}.form-wrap.form-builder .frmb-control li:first-child{border-radius:5px 5px 0 0;margin-top:0}.form-wrap.form-builder .frmb-control li:last-child{border-radius:0 0 5px 5px}.form-wrap.form-builder .frmb-control li::before{margin-right:10px;font-size:16px}.form-wrap.form-builder .frmb-control li:hover{background-color:#f2f2f2}.form-wrap.form-builder .frmb-control li.ui-sortable-helper{border-radius:5px;transition:box-shadow 250ms;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff}.form-wrap.form-builder .frmb-control li.ui-state-highlight{width:0;overflow:hidden;padding:0;margin:0;border:0 none}.form-wrap.form-builder .frmb-control li.moving{opacity:.6}.form-wrap.form-builder .frmb-control li.formbuilder-separator{background-color:rgba(0,0,0,0);box-shadow:none;padding:0;cursor:default}.form-wrap.form-builder .frmb-control li.formbuilder-separator hr{margin:10px 0}@media(max-width: 481px){.form-wrap.form-builder .frmb-control li::before{font-size:30px}.form-wrap.form-builder .frmb-control li{text-overflow:clip}.form-wrap.form-builder .frmb-control li span{visibility:hidden}.form-wrap.form-builder .frmb-control li span span{visibility:visible;font-size:30px;width:auto !important}}.form-wrap.form-builder .frmb-control.sort-enabled li.ui-state-highlight{box-shadow:none;height:0;width:100%;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin:1px 0 3px;animation:PLACEHOLDER 250ms forwards}.controls-left.form-wrap.form-builder .form-actions{float:left}.formbuilder-mobile.form-wrap.form-builder .form-actions{width:100%}.formbuilder-mobile.form-wrap.form-builder .form-actions button{width:100%;font-size:.85em !important;display:block !important;border-radius:0 !important;margin-top:-1px;margin-left:0 !important}.formbuilder-mobile.form-wrap.form-builder .form-actions button:first-child{border-radius:5px 5px 0 0 !important;margin-top:0 !important;border-bottom:0 none}.formbuilder-mobile.form-wrap.form-builder .form-actions button:last-child{border-radius:0 0 5px 5px !important}.form-wrap.form-builder .stage-wrap{flex-grow:1;display:flex;flex-direction:column;position:relative;padding:0;margin:0;width:calc(74% - 5px)}@media(max-width: 481px){.form-wrap.form-builder .stage-wrap{width:calc(100% - 64px)}}.form-wrap.form-builder .stage-wrap.empty{border:3px dashed #ccc;background-color:rgba(255,255,255,.25)}.form-wrap.form-builder .stage-wrap.empty::after{content:attr(data-content);position:absolute;text-align:center;top:50%;left:0;width:100%;margin-top:-1em}.form-wrap.form-builder .frmb{list-style-type:none;min-height:200px;transition:background-color 500ms ease-in-out}.form-wrap.form-builder .frmb .formbuilder-required{color:#c10000}.form-wrap.form-builder .frmb.removing{overflow:hidden}.form-wrap.form-builder .frmb li.form-field:hover{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.1),0 0 8px rgba(102,175,233,.6)}.form-wrap.form-builder .frmb li.form-field:hover .field-actions{opacity:1}.form-wrap.form-builder .frmb li.form-field:hover li :hover{background:#fefefe}.form-wrap.form-builder .frmb li.form-field{position:relative;padding:6px;clear:both;margin-left:0;margin-bottom:3px;background-color:#fff;transition:background-color 250ms ease-in-out,margin-top 400ms}.form-wrap.form-builder .frmb li.form-field.hidden-field{background-color:rgba(255,255,255,.6)}.form-wrap.form-builder .frmb li.form-field:first-child{border-top-right-radius:5px;border-top-left-radius:5px}.form-wrap.form-builder .frmb li.form-field:first-child .field-actions .btn:last-child{border-radius:0 5px 0 0}.form-wrap.form-builder .frmb li.form-field:last-child{border-bottom-right-radius:5px;border-bottom-left-radius:5px}.form-wrap.form-builder .frmb li.form-field.no-fields label{font-weight:400}@keyframes PLACEHOLDER{0%{height:0}100%{height:15px}}.form-wrap.form-builder .frmb li.form-field.frmb-placeholder,.form-wrap.form-builder .frmb li.form-field.ui-state-highlight{height:0;padding:0;background:radial-gradient(ellipse at center, rgb(84, 84, 84) 0%, rgba(0, 0, 0, 0) 75%);border:0 none;clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);visibility:visible;overflow:hidden;margin-bottom:3px;animation:PLACEHOLDER 250ms forwards}.form-wrap.form-builder .frmb li.form-field.moving,.form-wrap.form-builder .frmb li.form-field.ui-sortable-helper{transition:box-shadow 500ms ease-in-out;box-shadow:2px 2px 6px 0 #666;border:1px solid #fff;border-radius:5px}.form-wrap.form-builder .frmb li.form-field.disabled-field{z-index:1;position:relative;overflow:visible}.form-wrap.form-builder .frmb li.form-field.disabled-field:hover .frmb-tt{display:inline-block}.form-wrap.form-builder .frmb li.form-field.disabled-field [type=checkbox]{float:left;margin-right:10px}.form-wrap.form-builder .frmb li.form-field.disabled-field h2{border-bottom:0 none}.form-wrap.form-builder .frmb li.form-field.disabled-field label{font-size:12px;font-weight:400;color:#666}.form-wrap.form-builder .frmb li.form-field.disabled-field .prev-holder{cursor:default;line-height:28px;padding-left:5px}.form-wrap.form-builder .frmb li.form-field .close-field{position:absolute;color:#666;left:50%;bottom:6px;background:#fff;border-top:1px solid #c5c5c5;border-left:1px solid #c5c5c5;border-right:1px solid #c5c5c5;transform:translateX(-50%);padding:0 5px;border-top-right-radius:3px;border-top-left-radius:3px;cursor:pointer;transition:background-color 250ms ease-in-out}.form-wrap.form-builder .frmb li.form-field .close-field:hover{text-decoration:none}.form-wrap.form-builder .frmb li.form-field.header-field h1,.form-wrap.form-builder .frmb li.form-field.header-field h2,.form-wrap.form-builder .frmb li.form-field.header-field h3,.form-wrap.form-builder .frmb li.form-field.header-field h4,.form-wrap.form-builder .frmb li.form-field.header-field h5,.form-wrap.form-builder .frmb li.form-field.header-field h6{word-break:break-word}.form-wrap.form-builder .frmb li.form-field.paragraph-field p{word-break:break-word}.form-wrap.form-builder .frmb li.form-field .field-label{display:block;overflow-wrap:break-word}.form-wrap.form-builder .frmb li.form-field.button-field h1,.form-wrap.form-builder .frmb li.form-field.button-field h2,.form-wrap.form-builder .frmb li.form-field.button-field h3,.form-wrap.form-builder .frmb li.form-field.button-field p,.form-wrap.form-builder .frmb li.form-field.button-field canvas,.form-wrap.form-builder .frmb li.form-field.button-field output,.form-wrap.form-builder .frmb li.form-field.button-field address,.form-wrap.form-builder .frmb li.form-field.button-field blockquote,.form-wrap.form-builder .frmb li.form-field.button-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.header-field h1,.form-wrap.form-builder .frmb li.form-field.header-field h2,.form-wrap.form-builder .frmb li.form-field.header-field h3,.form-wrap.form-builder .frmb li.form-field.header-field p,.form-wrap.form-builder .frmb li.form-field.header-field canvas,.form-wrap.form-builder .frmb li.form-field.header-field output,.form-wrap.form-builder .frmb li.form-field.header-field address,.form-wrap.form-builder .frmb li.form-field.header-field blockquote,.form-wrap.form-builder .frmb li.form-field.header-field .prev-holder,.form-wrap.form-builder .frmb li.form-field.paragraph-field h1,.form-wrap.form-builder .frmb li.form-field.paragraph-field h2,.form-wrap.form-builder .frmb li.form-field.paragraph-field h3,.form-wrap.form-builder .frmb li.form-field.paragraph-field p,.form-wrap.form-builder .frmb li.form-field.paragraph-field canvas,.form-wrap.form-builder .frmb li.form-field.paragraph-field output,.form-wrap.form-builder .frmb li.form-field.paragraph-field address,.form-wrap.form-builder .frmb li.form-field.paragraph-field blockquote,.form-wrap.form-builder .frmb li.form-field.paragraph-field .prev-holder{margin:0}.form-wrap.form-builder .frmb li.form-field.button-field .field-label,.form-wrap.form-builder .frmb li.form-field.header-field .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field .field-label{display:none}.form-wrap.form-builder .frmb li.form-field.button-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.header-field.editing .field-label,.form-wrap.form-builder .frmb li.form-field.paragraph-field.editing .field-label{display:block}.form-wrap.form-builder .frmb li.form-field.paragraph-field .fld-label{min-height:150px;overflow-y:auto}.form-wrap.form-builder .frmb li.form-field.checkbox-field .field-label{display:none}.form-wrap.form-builder .frmb li.deleting,.form-wrap.form-builder .frmb li.delete:hover,.form-wrap.form-builder .frmb li:hover li.delete:hover{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting .close-field,.form-wrap.form-builder .frmb li.delete:hover .close-field,.form-wrap.form-builder .frmb li:hover li.delete:hover .close-field{background-color:#fdd}.form-wrap.form-builder .frmb li.deleting{z-index:20;pointer-events:none}.form-wrap.form-builder .frmb.disabled-field{padding:0 5px}.form-wrap.form-builder .frmb.disabled-field :hover{border-color:rgba(0,0,0,0)}.form-wrap.form-builder .frmb.disabled-field .form-element{float:none;margin-bottom:10px;overflow:visible;padding:5px 0;position:relative}.form-wrap.form-builder .frmb .frm-holder{display:none}.form-wrap.form-builder .frmb .tooltip{left:20px}.form-wrap.form-builder .frmb .prev-holder{display:block}.form-wrap.form-builder .frmb .prev-holder .form-group{margin:0}.form-wrap.form-builder .frmb .prev-holder .ql-editor{min-height:125px}.form-wrap.form-builder .frmb .prev-holder .form-group>label:not([class=formbuilder-checkbox-label]){display:none}.form-wrap.form-builder .frmb .prev-holder select,.form-wrap.form-builder .frmb .prev-holder input[type=text],.form-wrap.form-builder .frmb .prev-holder textarea,.form-wrap.form-builder .frmb .prev-holder input[type=number]{background-color:#fff;border:1px solid #ccc;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .prev-holder input[type=date]{width:auto}.form-wrap.form-builder .frmb .prev-holder select[multiple]{height:auto}.form-wrap.form-builder .frmb .prev-holder label{font-weight:normal}.form-wrap.form-builder .frmb .prev-holder input[type=number]{width:auto;max-width:100%}.form-wrap.form-builder .frmb .prev-holder input[type=color]{width:60px;padding:2px;display:inline-block}.form-wrap.form-builder .frmb .required-asterisk{display:none}.form-wrap.form-builder .frmb .field-label,.form-wrap.form-builder .frmb .legend{color:#666;margin-bottom:5px;line-height:27px;font-size:16px;font-weight:normal}.form-wrap.form-builder .frmb .disabled-field .field-label{display:block}.form-wrap.form-builder .frmb .other-option:checked+label input{display:inline-block}.form-wrap.form-builder .frmb .other-val{margin-left:5px;display:none}.form-wrap.form-builder .frmb .field-actions{position:absolute;top:0;right:0;opacity:0}.form-wrap.form-builder .frmb .field-actions a::before{margin:0}.form-wrap.form-builder .frmb .field-actions a:hover{text-decoration:none;color:#000}.form-wrap.form-builder .frmb .field-actions .btn{display:inline-block;width:32px;height:32px;padding:0 6px;border-radius:0;border-color:#c5c5c5;background-color:#fff;color:#c5c5c5;line-height:32px;font-size:16px;border-width:0 0 1px 1px}.form-wrap.form-builder .frmb .field-actions .btn:first-child{border-bottom-left-radius:5px}.form-wrap.form-builder .frmb .field-actions .toggle-form:hover{border-color:#ccc;background-color:#65aac6;color:#fff}.form-wrap.form-builder .frmb .field-actions .toggle-form::before{margin:0}.form-wrap.form-builder .frmb .field-actions .copy-button:hover{background-color:#6fc665;color:#fff}.form-wrap.form-builder .frmb .field-actions .del-button:hover{background-color:#c66865;color:#fff}.form-wrap.form-builder .frmb .option-actions{text-align:right;margin-top:10px;width:100%;margin-left:2%}.form-wrap.form-builder .frmb .option-actions button,.form-wrap.form-builder .frmb .option-actions a{background:#fff;padding:5px 10px;border:1px solid #c5c5c5;font-size:14px;border-radius:5px;cursor:default}.form-wrap.form-builder .frmb .sortable-options-wrap{width:81.33333333%;display:inline-block}.form-wrap.form-builder .frmb .sortable-options-wrap label{font-weight:normal}@media(max-width: 481px){.form-wrap.form-builder .frmb .sortable-options-wrap{display:block;width:100%}}.form-wrap.form-builder .frmb .radio-group-field .sortable-options li:nth-child(2) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options{display:inline-block;width:100%;margin-left:2%;background:#c5c5c5;margin-bottom:0;border-radius:2px;list-style:none;padding:0}.form-wrap.form-builder .frmb .sortable-options>li{cursor:move;margin:1px;padding:6px;background-color:#fff}.form-wrap.form-builder .frmb .sortable-options>li:nth-child(1) .remove{display:none}.form-wrap.form-builder .frmb .sortable-options>li .remove{position:relative;opacity:1;float:right;right:14px;height:18px;width:18px;top:8px;font-size:12px;padding:0;color:#c10000}.form-wrap.form-builder .frmb .sortable-options>li .remove::before{margin:0}.form-wrap.form-builder .frmb .sortable-options>li .remove:hover{background-color:#c10000 !important;text-decoration:none;color:#fff}.form-wrap.form-builder .frmb .sortable-options .option-selected{margin:0;width:5%}.form-wrap.form-builder .frmb .sortable-options input[type=text]{width:calc(44.5% - 17px);margin:0 3px;float:none}.form-wrap.form-builder .frmb .form-field .form-group{width:100%;clear:left;float:none}.form-wrap.form-builder .frmb .col-md-6 .form-elements,.form-wrap.form-builder .frmb .col-md-8 .form-elements{width:100%}.form-wrap.form-builder .frmb .field-options .add-area .add{clear:both}.form-wrap.form-builder .frmb .style-wrap button.selected{border:1px solid #000;margin-top:0;margin-right:1px;box-shadow:0 0 0 1px #fff inset;padding:1px 5px}.form-wrap.form-builder .frmb .form-elements{padding:10px 5px;background:#f7f7f7;border-radius:3px;margin:0;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements .input-wrap{width:81.33333333%;margin-left:2%;float:left}.form-wrap.form-builder .frmb .form-elements .input-wrap>input[type=checkbox]{margin-top:8px}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.form-wrap.form-builder .frmb .form-elements .add{clear:both}.form-wrap.form-builder .frmb .form-elements [contenteditable],.form-wrap.form-builder .frmb .form-elements select[multiple]{height:auto}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control{display:inline-block}.form-wrap.form-builder .frmb .form-elements [contenteditable].form-control,.form-wrap.form-builder .frmb .form-elements input[type=text],.form-wrap.form-builder .frmb .form-elements input[type=number],.form-wrap.form-builder .frmb .form-elements input[type=date],.form-wrap.form-builder .frmb .form-elements input[type=color],.form-wrap.form-builder .frmb .form-elements textarea,.form-wrap.form-builder .frmb .form-elements select{transition:background 250ms ease-in-out;padding:6px 12px;border:1px solid #c5c5c5;background-color:#fff}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .input-wrap{width:100%;margin-left:0;float:none}}.form-wrap.form-builder .frmb .form-elements input[type=number]{width:auto}.form-wrap.form-builder .frmb .form-elements .btn-group{margin-left:2%}.col-md-6 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-8 .form-wrap.form-builder .frmb .form-elements .false-label,.col-md-6 .form-wrap.form-builder .frmb .form-elements label,.col-md-8 .form-wrap.form-builder .frmb .form-elements label{display:block}.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{width:16.66666667%;padding-top:7px;margin-bottom:0;text-align:right;font-weight:700;float:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .false-label:first-child,.form-wrap.form-builder .frmb .form-elements label:first-child{display:block;width:auto;float:none;text-align:left}.form-wrap.form-builder .frmb .form-elements .false-label:first-child.empty-label,.form-wrap.form-builder .frmb .form-elements label:first-child.empty-label{display:none}}.form-wrap.form-builder .frmb .form-elements .false-label.multiple,.form-wrap.form-builder .frmb .form-elements .false-label.required-label,.form-wrap.form-builder .frmb .form-elements .false-label.toggle-label,.form-wrap.form-builder .frmb .form-elements .false-label.roles-label,.form-wrap.form-builder .frmb .form-elements .false-label.other-label,.form-wrap.form-builder .frmb .form-elements label.multiple,.form-wrap.form-builder .frmb .form-elements label.required-label,.form-wrap.form-builder .frmb .form-elements label.toggle-label,.form-wrap.form-builder .frmb .form-elements label.roles-label,.form-wrap.form-builder .frmb .form-elements label.other-label{text-align:left;float:none;margin-bottom:-3px;font-weight:400;width:calc(81.3333% - 23px)}.form-wrap.form-builder .frmb .form-elements input.error{border:1px solid #c10000}.form-wrap.form-builder .frmb .form-elements input.fld-maxlength,.form-wrap.form-builder .frmb .form-elements input.fld-rows{width:75px}.form-wrap.form-builder .frmb .form-elements input.field-error{background:#fefefe;border:1px solid #c5c5c5}.form-wrap.form-builder .frmb .form-elements label em{display:block;font-weight:400;font-size:.75em}.form-wrap.form-builder .frmb .form-elements label.maxlength-label{line-height:1em}.form-wrap.form-builder .frmb .form-elements .available-roles{display:none;padding:10px;margin:10px 0;background:#e6e6e6;box-shadow:inset 0 0 2px 0 #b3b3b3}@media(max-width: 481px){.form-wrap.form-builder .frmb .form-elements .available-roles{margin-left:0}}.form-wrap.form-builder .frmb .form-elements .available-roles label{font-weight:400;width:auto;float:none;display:inline}.form-wrap.form-builder .frmb .form-elements .available-roles input{display:inline;top:auto}.form-wrap.form-builder .autocomplete-field .sortable-options .option-selected{display:none}.formbuilder-mobile.form-wrap.form-builder .field-actions{opacity:1}.form-wrap.form-builder .snackbar{visibility:hidden;min-width:250px;margin-left:-125px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:16px;position:fixed;z-index:1;left:50%;bottom:30px}.form-wrap.form-builder .snackbar.show{visibility:visible;animation:fadein .5s,fadeout .5s 2.5s}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:30px;opacity:1}}@keyframes fadeout{from{bottom:30px;opacity:1}to{bottom:0;opacity:0}}.form-wrap.form-builder .ui-state-highlight{border-radius:3px;border:1px dashed #0d99f2;background-color:#e5f5f8;width:12px}.form-wrap.form-builder .moveHighlight{border:1px dashed #0d99f2 !important;background-color:#e5f5f8 !important}.form-wrap.form-builder .currentGridModeFieldHighlight{background-color:#e5f5f8 !important}.form-wrap.form-builder .grid-mode-help{background-color:#fff;border-top-left-radius:5px;border-top-right-radius:5px}.form-wrap.form-builder .grid-mode-help-row1{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:1px}.form-wrap.form-builder .grid-mode-help-row2{white-space:nowrap}.form-wrap.form-builder .colWithInsertButtons{padding-left:0 !important;padding-right:0 !important;flex:95 1 0% !important}.form-wrap.form-builder .rowWrapper{margin-left:0 !important;margin-right:0 !important}.form-wrap.form-builder .rowWrapper:last-child{flex-grow:1}.form-wrap.form-builder .rowWrapper:not(.tempRowWrapper){padding-top:1em;padding-bottom:1em}.form-wrap.form-builder .btnAddControl{border:0;background-color:unset}.form-wrap.form-builder .hoverColumnDropStyle{border:1px dashed #0d99f2;border-radius:3px;background-color:#e5f5f8;width:20px;position:fixed;margin-left:40px}.form-wrap.form-builder .hoverDropStyleInverse{background-color:#0d99f2;border:1px dashed #e5f5f8;min-height:20px}.form-wrap.form-builder .hoverDropStyleInverse .colWrapper{max-width:calc(100% - 40px)}.form-wrap.form-builder .stage-wrap>.hoverDropStyleInverse{width:100%}.form-wrap.form-builder .rowWrapper>.hoverDropStyleInverse{min-width:40px;flex-grow:1}.form-wrap.form-builder .hoverDropStyleInverse:last-child{flex-grow:1}.form-wrap.form-builder .invisibleRowPlaceholder{width:0 !important;position:fixed !important;left:-100px !important}.form-wrap.form-builder *[tooltip]{position:relative}.form-wrap.form-builder *[tooltip]:hover::after{background:rgba(0,0,0,.9);border-radius:5px 5px 5px 0;bottom:23px;color:#fff;content:attr(tooltip);padding:10px 5px;position:absolute;z-index:98;left:2px;width:230px;text-shadow:none;font-size:12px;line-height:1.5em;cursor:default}.form-wrap.form-builder *[tooltip]:hover::before{border:solid;border-color:#222 rgba(0,0,0,0);border-width:6px 6px 0;bottom:17px;content:\"\";left:2px;position:absolute;z-index:99;cursor:default}.form-wrap.form-builder .tooltip-element{visibility:visible;color:#fff;background:#000;width:16px;height:16px;border-radius:8px;display:inline-block;text-align:center;line-height:16px;margin:0 5px;font-size:12px;cursor:default}.form-wrap.form-builder .kc-toggle{padding-left:0 !important}.form-wrap.form-builder .kc-toggle span{position:relative;width:48px;height:24px;background:#e6e6e6;display:inline-block;border-radius:4px;border:1px solid #ccc;padding:2px;overflow:hidden;float:left;margin-right:5px;will-change:transform}.form-wrap.form-builder .kc-toggle span::after,.form-wrap.form-builder .kc-toggle span::before{position:absolute;display:inline-block;top:0}.form-wrap.form-builder .kc-toggle span::after{position:relative;content:\"\";width:50%;height:100%;left:0;border-radius:3px;background:linear-gradient(to bottom, white 0%, #ccc 100%);border:1px solid #999;transition:transform 100ms;transform:translateX(0)}.form-wrap.form-builder .kc-toggle span::before{border-radius:4px;top:2px;left:2px;content:\"\";width:calc(100% - 4px);height:18px;box-shadow:0 0 1px 1px #b3b3b3 inset;background-color:rgba(0,0,0,0)}.form-wrap.form-builder .kc-toggle input{height:0;overflow:hidden;width:0;opacity:0;pointer-events:none;margin:0}.form-wrap.form-builder .kc-toggle input:checked+span::after{transform:translateX(100%)}.form-wrap.form-builder .kc-toggle input:checked+span::before{background-color:#6fc665}.form-wrap.form-builder.controls-left{flex-direction:row-reverse}.form-wrap.form-builder::after{content:\"\";display:table;clear:both}.form-wrap.form-builder .cb-wrap,.form-wrap.form-builder .stage-wrap{vertical-align:top}.form-wrap.form-builder .form-elements,.form-wrap.form-builder .form-group,.form-wrap.form-builder .multi-row span,.form-wrap.form-builder textarea{display:block}.form-wrap.form-builder .form-elements::after,.form-wrap.form-builder .form-group::after{content:\".\";display:block;height:0;clear:both;visibility:hidden}.form-wrap.form-builder .form-elements .field-options div:hover,.form-wrap.form-builder .frmb .legend,.form-wrap.form-builder .frmb .prev-holder{cursor:move}.form-wrap.form-builder .frmb-tt{display:none;position:absolute;top:0;left:0;border:1px solid #262626;background-color:#666;border-radius:5px;padding:5px;color:#fff;z-index:20;text-align:left;font-size:12px;pointer-events:none}.form-wrap.form-builder .frmb-tt::before{border-color:#262626 rgba(0,0,0,0);bottom:-11px}.form-wrap.form-builder .frmb-tt::before,.form-wrap.form-builder .frmb-tt::after{content:\"\";position:absolute;border-style:solid;border-width:10px 10px 0;border-color:#666 rgba(0,0,0,0);display:block;width:0;z-index:1;margin-left:-10px;bottom:-10px;left:20px}.form-wrap.form-builder .frmb-tt a{text-decoration:underline;color:#fff}.form-builder-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:none;z-index:10}.form-builder-overlay.visible{display:block}.form-builder-dialog{position:absolute;border-radius:5px;background:#fff;z-index:20;transform:translate(-50%, -50%);top:0;left:0;padding:10px;box-shadow:0 3px 10px #000;min-width:166px;max-height:80%;overflow-y:scroll}.form-builder-dialog h3{margin-top:0}.form-builder-dialog.data-dialog{width:65%;background-color:#23241f}.form-builder-dialog.data-dialog pre{background:none;border:0 none;box-shadow:none;margin:0;color:#f2f2f2}.form-builder-dialog.positioned{transform:translate(-50%, -100%)}.form-builder-dialog.positioned .button-wrap::before{content:\"\";width:0;height:0;border-left:15px solid rgba(0,0,0,0);border-right:15px solid rgba(0,0,0,0);border-top:10px solid #fff;position:absolute;left:50%;top:100%;transform:translate(-50%, 10px)}.form-builder-dialog .button-wrap{position:relative;margin-top:10px;text-align:right;clear:both}.form-builder-dialog .button-wrap .btn{margin-left:10px}',\"\"]),t.default=u},278:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=\"\",o=void 0!==t[5];return t[4]&&(r+=\"@supports (\".concat(t[4],\") {\")),t[2]&&(r+=\"@media \".concat(t[2],\" {\")),o&&(r+=\"@layer\".concat(t[5].length>0?\" \".concat(t[5]):\"\",\" {\")),r+=e(t),o&&(r+=\"}\"),t[2]&&(r+=\"}\"),t[4]&&(r+=\"}\"),r})).join(\"\")},t.i=function(e,r,o,n,i){\"string\"==typeof e&&(e=[[null,e,void 0]]);var l={};if(o)for(var a=0;a<this.length;a++){var s=this[a][0];null!=s&&(l[s]=!0)}for(var d=0;d<e.length;d++){var c=[].concat(e[d]);o&&l[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]=\"@layer\".concat(c[5].length>0?\" \".concat(c[5]):\"\",\" {\").concat(c[1],\"}\")),c[5]=i),r&&(c[2]?(c[1]=\"@media \".concat(c[2],\" {\").concat(c[1],\"}\"),c[2]=r):c[2]=r),n&&(c[4]?(c[1]=\"@supports (\".concat(c[4],\") {\").concat(c[1],\"}\"),c[4]=n):c[4]=\"\".concat(n)),t.push(c))}},t}},21:function(e){e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['\"].*['\"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/[\"'() \\t\\n]|(%20)/.test(e)||t.needQuotes?'\"'.concat(e.replace(/\"/g,'\\\\\"').replace(/\\n/g,\"\\\\n\"),'\"'):e):e}},645:function(e){e.exports=function(e){return e[1]}},781:function(e,t,r){var o=r(433).Symbol;e.exports=o},148:function(e,t,r){var o=r(781),n=r(903),i=r(738),l=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?\"[object Undefined]\":\"[object Null]\":l&&l in Object(e)?n(e):i(e)}},812:function(e,t,r){var o=r(140),n=/^\\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(n,\"\"):e}},380:function(e){var t=\"object\"==typeof global&&global&&global.Object===Object&&global;e.exports=t},903:function(e,t,r){var o=r(781),n=Object.prototype,i=n.hasOwnProperty,l=n.toString,a=o?o.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),r=e[a];try{e[a]=void 0;var o=!0}catch(e){}var n=l.call(e);return o&&(t?e[a]=r:delete e[a]),n}},738:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},433:function(e,t,r){var o=r(380),n=\"object\"==typeof self&&self&&self.Object===Object&&self,i=o||n||Function(\"return this\")();e.exports=i},140:function(e){var t=/\\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},177:function(e,t,r){var o=r(953),n=r(664),i=r(378),l=Math.max,a=Math.min;e.exports=function(e,t,r){var s,d,c,f,u,p,m=0,b=!1,h=!1,g=!0;if(\"function\"!=typeof e)throw new TypeError(\"Expected a function\");function w(t){var r=s,o=d;return s=d=void 0,m=t,f=e.apply(o,r)}function y(e){var r=e-p;return void 0===p||r>=t||r<0||h&&e-m>=c}function v(){var e=n();if(y(e))return x(e);u=setTimeout(v,function(e){var r=t-(e-p);return h?a(r,c-(e-m)):r}(e))}function x(e){return u=void 0,g&&s?w(e):(s=d=void 0,f)}function A(){var e=n(),r=y(e);if(s=arguments,d=this,p=e,r){if(void 0===u)return function(e){return m=e,u=setTimeout(v,t),b?w(e):f}(p);if(h)return clearTimeout(u),u=setTimeout(v,t),w(p)}return void 0===u&&(u=setTimeout(v,t)),f}return t=i(t)||0,o(r)&&(b=!!r.leading,c=(h=\"maxWait\"in r)?l(i(r.maxWait)||0,t):c,g=\"trailing\"in r?!!r.trailing:g),A.cancel=function(){void 0!==u&&clearTimeout(u),m=0,s=p=d=u=void 0},A.flush=function(){return void 0===u?f:x(n())},A}},953:function(e){e.exports=function(e){var t=typeof e;return null!=e&&(\"object\"==t||\"function\"==t)}},934:function(e){e.exports=function(e){return null!=e&&\"object\"==typeof e}},414:function(e,t,r){var o=r(148),n=r(934);e.exports=function(e){return\"symbol\"==typeof e||n(e)&&\"[object Symbol]\"==o(e)}},664:function(e,t,r){var o=r(433);e.exports=function(){return o.Date.now()}},858:function(e,t,r){var o=r(177),n=r(953);e.exports=function(e,t,r){var i=!0,l=!0;if(\"function\"!=typeof e)throw new TypeError(\"Expected a function\");return n(r)&&(i=\"leading\"in r?!!r.leading:i,l=\"trailing\"in r?!!r.trailing:l),o(e,t,{leading:i,maxWait:t,trailing:l})}},378:function(e,t,r){var o=r(812),n=r(953),i=r(414),l=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if(\"number\"==typeof e)return e;if(i(e))return NaN;if(n(e)){var t=\"function\"==typeof e.valueOf?e.valueOf():e;e=n(t)?t+\"\":t}if(\"string\"!=typeof e)return 0===e?e:+e;e=o(e);var r=a.test(e);return r||s.test(e)?d(e.slice(2),r?2:8):l.test(e)?NaN:+e}},252:function(e){e.exports=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=7)}([function(e,t,r){var o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n=r(2),i=r(10),l=Object.prototype.toString;function a(e){return\"[object Array]\"===l.call(e)}function s(e){return null!==e&&\"object\"===(void 0===e?\"undefined\":o(e))}function d(e){return\"[object Function]\"===l.call(e)}function c(e,t){if(null!=e)if(\"object\"!==(void 0===e?\"undefined\":o(e))&&(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:a,isArrayBuffer:function(e){return\"[object ArrayBuffer]\"===l.call(e)},isBuffer:i,isFormData:function(e){return\"undefined\"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return\"undefined\"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return\"string\"==typeof e},isNumber:function(e){return\"number\"==typeof e},isObject:s,isUndefined:function(e){return void 0===e},isDate:function(e){return\"[object Date]\"===l.call(e)},isFile:function(e){return\"[object File]\"===l.call(e)},isBlob:function(e){return\"[object Blob]\"===l.call(e)},isFunction:d,isStream:function(e){return s(e)&&d(e.pipe)},isURLSearchParams:function(e){return\"undefined\"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return(\"undefined\"==typeof navigator||\"ReactNative\"!==navigator.product)&&\"undefined\"!=typeof window&&\"undefined\"!=typeof document},forEach:c,merge:function e(){var t={};function r(r,n){\"object\"===o(t[n])&&\"object\"===(void 0===r?\"undefined\":o(r))?t[n]=e(t[n],r):t[n]=r}for(var n=0,i=arguments.length;n<i;n++)c(arguments[n],r);return t},extend:function(e,t,r){return c(t,(function(t,o){e[o]=r&&\"function\"==typeof t?n(t,r):t})),e},trim:function(e){return e.replace(/^\\s*/,\"\").replace(/\\s*$/,\"\")}}},function(e,t,r){(function(t){var o=r(0),n=r(13),i={\"Content-Type\":\"application/x-www-form-urlencoded\"};function l(e,t){!o.isUndefined(e)&&o.isUndefined(e[\"Content-Type\"])&&(e[\"Content-Type\"]=t)}var a={adapter:function(){var e;return(\"undefined\"!=typeof XMLHttpRequest||void 0!==t)&&(e=r(3)),e}(),transformRequest:[function(e,t){return n(t,\"Content-Type\"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(l(t,\"application/x-www-form-urlencoded;charset=utf-8\"),e.toString()):o.isObject(e)?(l(t,\"application/json;charset=utf-8\"),JSON.stringify(e)):e}],transformResponse:[function(e){if(\"string\"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:\"XSRF-TOKEN\",xsrfHeaderName:\"X-XSRF-TOKEN\",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:\"application/json, text/plain, */*\"}}};o.forEach([\"delete\",\"get\",\"head\"],(function(e){a.headers[e]={}})),o.forEach([\"post\",\"put\",\"patch\"],(function(e){a.headers[e]=o.merge(i)})),e.exports=a}).call(this,r(12))},function(e,t,r){e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),o=0;o<r.length;o++)r[o]=arguments[o];return e.apply(t,r)}}},function(e,t,r){var o=r(0),n=r(14),i=r(16),l=r(17),a=r(18),s=r(4),d=\"undefined\"!=typeof window&&window.btoa&&window.btoa.bind(window)||r(19);e.exports=function(e){return new Promise((function(t,c){var f=e.data,u=e.headers;o.isFormData(f)&&delete u[\"Content-Type\"];var p=new XMLHttpRequest,m=\"onreadystatechange\",b=!1;if(\"undefined\"==typeof window||!window.XDomainRequest||\"withCredentials\"in p||a(e.url)||(p=new window.XDomainRequest,m=\"onload\",b=!0,p.onprogress=function(){},p.ontimeout=function(){}),e.auth){var h=e.auth.username||\"\",g=e.auth.password||\"\";u.Authorization=\"Basic \"+d(h+\":\"+g)}if(p.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p[m]=function(){if(p&&(4===p.readyState||b)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf(\"file:\"))){var r=\"getAllResponseHeaders\"in p?l(p.getAllResponseHeaders()):null,o={data:e.responseType&&\"text\"!==e.responseType?p.response:p.responseText,status:1223===p.status?204:p.status,statusText:1223===p.status?\"No Content\":p.statusText,headers:r,config:e,request:p};n(t,c,o),p=null}},p.onerror=function(){c(s(\"Network Error\",e,null,p)),p=null},p.ontimeout=function(){c(s(\"timeout of \"+e.timeout+\"ms exceeded\",e,\"ECONNABORTED\",p)),p=null},o.isStandardBrowserEnv()){var w=r(20),y=(e.withCredentials||a(e.url))&&e.xsrfCookieName?w.read(e.xsrfCookieName):void 0;y&&(u[e.xsrfHeaderName]=y)}if(\"setRequestHeader\"in p&&o.forEach(u,(function(e,t){void 0===f&&\"content-type\"===t.toLowerCase()?delete u[t]:p.setRequestHeader(t,e)})),e.withCredentials&&(p.withCredentials=!0),e.responseType)try{p.responseType=e.responseType}catch(t){if(\"json\"!==e.responseType)throw t}\"function\"==typeof e.onDownloadProgress&&p.addEventListener(\"progress\",e.onDownloadProgress),\"function\"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener(\"progress\",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),c(e),p=null)})),void 0===f&&(f=null),p.send(f)}))}},function(e,t,r){var o=r(15);e.exports=function(e,t,r,n,i){var l=new Error(e);return o(l,t,r,n,i)}},function(e,t,r){e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){function o(e){this.message=e}o.prototype.toString=function(){return\"Cancel\"+(this.message?\": \"+this.message:\"\")},o.prototype.__CANCEL__=!0,e.exports=o},function(e,t,r){t.__esModule=!0,t.I18N=void 0;var o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},n=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,\"value\"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),i=r(8),l={extension:\".lang\",location:\"assets/lang/\",langs:[\"en-US\"],locale:\"en-US\",override:{}},a=t.I18N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,e),this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}return e.prototype.processConfig=function(e){var t=this,r=Object.assign({},l,e),o=r.location,n=function(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}(r,[\"location\"]),i=o.replace(/\\/?$/,\"/\");this.config=Object.assign({},{location:i},n);var a=this.config,s=a.override,d=a.preloaded,c=void 0===d?{}:d,f=Object.entries(this.langs).concat(Object.entries(s||c));this.langs=f.reduce((function(e,r){var o=r[0],n=r[1];return e[o]=t.applyLanguage.call(t,o,n),e}),{}),this.locale=this.config.locale||this.config.langs[0]},e.prototype.init=function(e){return this.processConfig.call(this,Object.assign({},this.config,e)),this.setCurrent(this.locale)},e.prototype.addLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=\"string\"==typeof t?this.processFile.call(this,t):t,this.applyLanguage.call(this,e,t),this.config.langs.push(\"locale\")},e.prototype.getValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.locale;return this.langs[t]&&this.langs[t][e]||this.getFallbackValue(e)},e.prototype.getFallbackValue=function(e){var t=Object.values(this.langs).find((function(t){return t[e]}));return t&&t[e]},e.prototype.makeSafe=function(e){var t={\"{\":\"\\\\{\",\"}\":\"\\\\}\",\"|\":\"\\\\|\"};return e=e.replace(/\\{|\\}|\\|/g,(function(e){return t[e]})),new RegExp(e,\"g\")},e.prototype.put=function(e,t){return this.current[e]=t},e.prototype.get=function(e,t){var r=this.getValue(e);if(r){var n=r.match(/\\{[^}]+?\\}/g),i=void 0;if(t&&n)if(\"object\"===(void 0===t?\"undefined\":o(t)))for(var l=0;l<n.length;l++)i=n[l].substring(1,n[l].length-1),r=r.replace(this.makeSafe(n[l]),t[i]||\"\");else r=r.replace(/\\{[^}]+?\\}/g,t);return r}},e.prototype.fromFile=function(e){for(var t,r=e.split(\"\\n\"),o={},n=0;n<r.length;n++)(t=r[n].match(/^(.+?) *?= *?([^\\n]+)/))&&(o[t[1]]=t[2].replace(/^\\s+|\\s+$/,\"\"));return o},e.prototype.processFile=function(e){return this.fromFile(e.replace(/\\n\\n/g,\"\\n\"))},e.prototype.loadLang=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this;return new Promise((function(o,n){if(-1!==r.loaded.indexOf(e)&&t)return r.applyLanguage.call(r,r.langs[e]),o(r.langs[e]);var l=[r.config.location,e,r.config.extension].join(\"\");return(0,i.get)(l).then((function(t){var n=t.data,i=r.processFile(n);return r.applyLanguage.call(r,e,i),r.loaded.push(e),o(r.langs[e])})).catch((function(){var t=r.applyLanguage.call(r,e);o(t)}))}))},e.prototype.applyLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.config.override[e]||{},o=this.langs[e]||{};return this.langs[e]=Object.assign({},o,t,r),this.langs[e]},e.prototype.setCurrent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"en-US\";return this.loadLang(t).then((function(){return e.locale=t,e.current=e.langs[t],e.current}))},n(e,[{key:\"getLangs\",get:function(){return this.config.langs}}]),e}();t.default=new a},function(e,t,r){e.exports=r(9)},function(e,t,r){var o=r(0),n=r(2),i=r(11),l=r(1);function a(e){var t=new i(e),r=n(i.prototype.request,t);return o.extend(r,i.prototype,t),o.extend(r,t),r}var s=a(l);s.Axios=i,s.create=function(e){return a(o.merge(l,e))},s.Cancel=r(6),s.CancelToken=r(26),s.isCancel=r(5),s.all=function(e){return Promise.all(e)},s.spread=r(27),e.exports=s,e.exports.default=s},function(e,t,r){function o(e){return!!e.constructor&&\"function\"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(o(e)||function(e){return\"function\"==typeof e.readFloatLE&&\"function\"==typeof e.slice&&o(e.slice(0,0))}(e)||!!e._isBuffer)}},function(e,t,r){var o=r(1),n=r(0),i=r(21),l=r(22);function a(e){this.defaults=e,this.interceptors={request:new i,response:new i}}a.prototype.request=function(e){\"string\"==typeof e&&(e=n.merge({url:arguments[0]},arguments[1])),(e=n.merge(o,{method:\"get\"},this.defaults,e)).method=e.method.toLowerCase();var t=[l,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},n.forEach([\"delete\",\"get\",\"head\",\"options\"],(function(e){a.prototype[e]=function(t,r){return this.request(n.merge(r||{},{method:e,url:t}))}})),n.forEach([\"post\",\"put\",\"patch\"],(function(e){a.prototype[e]=function(t,r,o){return this.request(n.merge(o||{},{method:e,url:t,data:r}))}})),e.exports=a},function(e,t,r){var o,n,i=e.exports={};function l(){throw new Error(\"setTimeout has not been defined\")}function a(){throw new Error(\"clearTimeout has not been defined\")}function s(e){if(o===setTimeout)return setTimeout(e,0);if((o===l||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o=\"function\"==typeof setTimeout?setTimeout:l}catch(e){o=l}try{n=\"function\"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var d,c=[],f=!1,u=-1;function p(){f&&d&&(f=!1,d.length?c=d.concat(c):u=-1,c.length&&m())}function m(){if(!f){var e=s(p);f=!0;for(var t=c.length;t;){for(d=c,c=[];++u<t;)d&&d[u].run();u=-1,t=c.length}d=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function h(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new b(e,t)),1!==c.length||f||s(m)},b.prototype.run=function(){this.fun.apply(null,this.array)},i.title=\"browser\",i.browser=!0,i.env={},i.argv=[],i.version=\"\",i.versions={},i.on=h,i.addListener=h,i.once=h,i.off=h,i.removeListener=h,i.removeAllListeners=h,i.emit=h,i.prependListener=h,i.prependOnceListener=h,i.listeners=function(e){return[]},i.binding=function(e){throw new Error(\"process.binding is not supported\")},i.cwd=function(){return\"/\"},i.chdir=function(e){throw new Error(\"process.chdir is not supported\")},i.umask=function(){return 0}},function(e,t,r){var o=r(0);e.exports=function(e,t){o.forEach(e,(function(r,o){o!==t&&o.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[o])}))}},function(e,t,r){var o=r(4);e.exports=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(o(\"Request failed with status code \"+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){e.exports=function(e,t,r,o,n){return e.config=t,r&&(e.code=r),e.request=o,e.response=n,e}},function(e,t,r){var o=r(0);function n(e){return encodeURIComponent(e).replace(/%40/gi,\"@\").replace(/%3A/gi,\":\").replace(/%24/g,\"$\").replace(/%2C/gi,\",\").replace(/%20/g,\"+\").replace(/%5B/gi,\"[\").replace(/%5D/gi,\"]\")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(o.isURLSearchParams(t))i=t.toString();else{var l=[];o.forEach(t,(function(e,t){null!=e&&(o.isArray(e)?t+=\"[]\":e=[e],o.forEach(e,(function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),l.push(n(t)+\"=\"+n(e))})))})),i=l.join(\"&\")}return i&&(e+=(-1===e.indexOf(\"?\")?\"?\":\"&\")+i),e}},function(e,t,r){var o=r(0),n=[\"age\",\"authorization\",\"content-length\",\"content-type\",\"etag\",\"expires\",\"from\",\"host\",\"if-modified-since\",\"if-unmodified-since\",\"last-modified\",\"location\",\"max-forwards\",\"proxy-authorization\",\"referer\",\"retry-after\",\"user-agent\"];e.exports=function(e){var t,r,i,l={};return e?(o.forEach(e.split(\"\\n\"),(function(e){if(i=e.indexOf(\":\"),t=o.trim(e.substr(0,i)).toLowerCase(),r=o.trim(e.substr(i+1)),t){if(l[t]&&n.indexOf(t)>=0)return;l[t]=\"set-cookie\"===t?(l[t]?l[t]:[]).concat([r]):l[t]?l[t]+\", \"+r:r}})),l):l}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement(\"a\");function n(e){var o=e;return t&&(r.setAttribute(\"href\",o),o=r.href),r.setAttribute(\"href\",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,\"\"):\"\",host:r.host,search:r.search?r.search.replace(/^\\?/,\"\"):\"\",hash:r.hash?r.hash.replace(/^#/,\"\"):\"\",hostname:r.hostname,port:r.port,pathname:\"/\"===r.pathname.charAt(0)?r.pathname:\"/\"+r.pathname}}return e=n(window.location.href),function(t){var r=o.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){function o(){this.message=\"String contains an invalid character\"}o.prototype=new Error,o.prototype.code=5,o.prototype.name=\"InvalidCharacterError\",e.exports=function(e){for(var t,r,n=String(e),i=\"\",l=0,a=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";n.charAt(0|l)||(a=\"=\",l%1);i+=a.charAt(63&t>>8-l%1*8)){if((r=n.charCodeAt(l+=.75))>255)throw new o;t=t<<8|r}return i}},function(e,t,r){var o=r(0);e.exports=o.isStandardBrowserEnv()?{write:function(e,t,r,n,i,l){var a=[];a.push(e+\"=\"+encodeURIComponent(t)),o.isNumber(r)&&a.push(\"expires=\"+new Date(r).toGMTString()),o.isString(n)&&a.push(\"path=\"+n),o.isString(i)&&a.push(\"domain=\"+i),!0===l&&a.push(\"secure\"),document.cookie=a.join(\"; \")},read:function(e){var t=document.cookie.match(new RegExp(\"(^|;\\\\s*)(\"+e+\")=([^;]*)\"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,\"\",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){var o=r(0);function n(){this.handlers=[]}n.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},n.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},n.prototype.forEach=function(e){o.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=n},function(e,t,r){var o=r(0),n=r(23),i=r(5),l=r(1),a=r(24),s=r(25);function d(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return d(e),e.baseURL&&!a(e.url)&&(e.url=s(e.baseURL,e.url)),e.headers=e.headers||{},e.data=n(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach([\"delete\",\"get\",\"head\",\"post\",\"put\",\"patch\",\"common\"],(function(t){delete e.headers[t]})),(e.adapter||l.adapter)(e).then((function(t){return d(e),t.data=n(t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(d(e),t&&t.response&&(t.response.data=n(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){var o=r(0);e.exports=function(e,t,r){return o.forEach(r,(function(r){e=r(e,t)})),e}},function(e,t,r){e.exports=function(e){return/^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(e)}},function(e,t,r){e.exports=function(e,t){return t?e.replace(/\\/+$/,\"\")+\"/\"+t.replace(/^\\/+/,\"\"):e}},function(e,t,r){var o=r(6);function n(e){if(\"function\"!=typeof e)throw new TypeError(\"executor must be a function.\");var t;this.promise=new Promise((function(e){t=e}));var r=this;e((function(e){r.reason||(r.reason=new o(e),t(r.reason))}))}n.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},n.source=function(){var e;return{token:new n((function(t){e=t})),cancel:e}},e.exports=n},function(e,t,r){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},395:function(e){e.exports=function(e){try{var t=window[e],r=\"__storage_test__\";return t.setItem(r,r),t.removeItem(r),!0}catch(e){return!1}}},287:function(e,t,r){var o=r(292),n=r(349);\"string\"==typeof(n=n.__esModule?n.default:n)&&(n=[[e.id,n,\"\"]]);o(n,{attributes:{class:\"formBuilder-injected-style\"},insert:\"head\",singleton:!1}),e.exports=n.locals||{}},292:function(e,t,r){var o,n=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),i=[];function l(e){for(var t=-1,r=0;r<i.length;r++)if(i[r].identifier===e){t=r;break}return t}function a(e,t){for(var r={},o=[],n=0;n<e.length;n++){var a=e[n],s=t.base?a[0]+t.base:a[0],d=r[s]||0,c=\"\".concat(s,\" \").concat(d);r[s]=d+1;var f=l(c),u={css:a[1],media:a[2],sourceMap:a[3]};-1!==f?(i[f].references++,i[f].updater(u)):i.push({identifier:c,updater:b(u,t),references:1}),o.push(c)}return o}function s(e){var t=document.createElement(\"style\"),o=e.attributes||{};if(void 0===o.nonce){var i=r.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),\"function\"==typeof e.insert)e.insert(t);else{var l=n(e.insert||\"head\");if(!l)throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");l.appendChild(t)}return t}var d,c=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join(\"\\n\")});function f(e,t,r,o){var n=r?\"\":o.media?\"@media \".concat(o.media,\" {\").concat(o.css,\"}\"):o.css;if(e.styleSheet)e.styleSheet.cssText=c(t,n);else{var i=document.createTextNode(n),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(i,l[t]):e.appendChild(i)}}function u(e,t,r){var o=r.css,n=r.media,i=r.sourceMap;if(n?e.setAttribute(\"media\",n):e.removeAttribute(\"media\"),i&&\"undefined\"!=typeof btoa&&(o+=\"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i)))),\" */\")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var p=null,m=0;function b(e,t){var r,o,n;if(t.singleton){var i=m++;r=p||(p=s(t)),o=f.bind(null,r,i,!1),n=f.bind(null,r,i,!0)}else r=s(t),o=u.bind(null,r,t),n=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else n()}}e.exports=function(e,t){(t=t||{}).singleton||\"boolean\"==typeof t.singleton||(t.singleton=(void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o));var r=a(e=e||[],t);return function(e){if(e=e||[],\"[object Array]\"===Object.prototype.toString.call(e)){for(var o=0;o<r.length;o++){var n=l(r[o]);i[n].references--}for(var s=a(e,t),d=0;d<r.length;d++){var c=l(r[d]);0===i[c].references&&(i[c].updater(),i.splice(c,1))}r=s}}}},138:function(e){e.exports=\"data:font/woff;base64,d09GRgABAAAAAB3kAA8AAAAANfQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAARAAAAGA+I1Q9Y21hcAAAAdgAAADCAAACkjLzuTNjdnQgAAACnAAAAAsAAAAOAAAAAGZwZ20AAAKoAAAG7QAADgxiLvl6Z2FzcAAACZgAAAAIAAAACAAAABBnbHlmAAAJoAAAELEAAB26+tMzTGhlYWQAABpUAAAAMgAAADYiPFnvaGhlYQAAGogAAAAfAAAAJAc6A2VobXR4AAAaqAAAACsAAABUSeb/+mxvY2EAABrUAAAALAAAACxYemDFbWF4cAAAGwAAAAAgAAAAIAKiD4NuYW1lAAAbIAAAAZgAAAM5OICv6HBvc3QAABy4AAAArwAAAPnOOpcKcHJlcAAAHWgAAAB6AAAAnH62O7Z4nGNgZGBg4GIwYLBjYHJx8wlh4MtJLMljkGJgYYAAkDwymzEnMz2RgQPGA8qxgGkOIGaDiAIAJjsFSAB4nGNgYW5lnMDAysDAVMW0h4GBoQdCMz5gMGRkAooysDIzYAUBaa4pDAdeMHzyZQ76n8UQxbyGYRpQmBFFERMAgi4M6Hic7ZLLccJAEAV7hcBG5iejEDi4XE5FOZAERMGJKN9VJIDfaIcsmKrez2gkbU0vsAQW5s+0UO4UIm7Oljm/oJvzLWfvOz5paLRVP10f4/MJQvvpUtcZxXUnfvid142/0fpPKz789trPvtiwZceeAz3fHBlcuOIdmxjKazdEdyuRVOKOoiTsKQmDSsKsEnceJXaAEttAib2gJIwrsSuUxOmU2B9KbNJ3oELMhwox9xV7ZrpUbJzpWrF7HmOF4R+2CjoCAAB4nGNgQAYAAA4AAQB4nK1Xa1sbxxWe1Q2MAQNC2M267ihjUZcdySRxHGIrDtllURwlqcC43XVuu0i4TZNekt7oNb1flD9zVrRPnW/5aXnPzEoBB9ynz1M+6Lwz886c65xZSGhJ4n4UxlJ2H4n5nS5V7j2I6IZL1+LkoRzej6jQSD+bFtOi31f7br1OIiYRqK2RcESQ+E1yNMnkYZMKWtVVvUlFLQdHxeWa8AOqBjJJ/KywHPhZoxhQIdg7lDSrAIJ0QKXe4ahQKOAYqh9crvPsaL7m+JcloPJHVaeKNUWiFx3EoxWnYBSWNBU9qgUR66OVIMgJrhxI+rxHpdUHo2vOXBD2Q6qEUZ2KjXj3rQhkdxhJ6vUwtQk2bTDaiGOZWTYsuoapfCRpndfXmfl5L5KIxjCVNNOLEsxIXpthdJPRzcRN4jh2ES2aDfokdiMSXSbXMXa7dIXRlW76aEH0mfGoLPbjeJDG5HhxnHsQywH8UX7cpLKWsKDUSOHTVNCLaEr5NK18ZABbkiZVTLgRCTnIpvZ9yYvsrmvN518SSdin8lodi4EcyiF0ZevlBiK0EyU9N92NIxXXY0mb9yKsuRyX3JQmTWk6F3gjUbBpnsZQ+QrlovyUCvsPyenDEJpaa9I5LdnaebhVEvuST6DNJGZKsmWsndGjc/MiCP21+qRwzuuThTRrT3E8mBDA9USGQ5VyUk2whcsJIenCyLGVSK1Kt6yKuTO201XsEu6Xrh3fNK+NQ0dzs6IYQour6vEaiviCzgqFkAbpVpMWNKhS0oXgNT4AABmiBR7tYrRg8rWIgxZMUCRi0IdmWgwSOUwkLSJsTVrS3b0oKw224qs0d6AOm1TV3Z2oe89OunXMV838ss7EUnA/ypaWAnJSnxY9vnIoLT+7wD8L+CFnBbkoNnpRxuGDv/4QGYbahbW6wrYxdu06b8FN5pkYnnRgfwezJ5N1RgozIaoK8UJB3Rk5jmOyVdMiE4VwL6Il5cuQ5lF+c4hw4svkP5cuOWJRVIXv+xyBZaw5abY87dGnnvs0wrUCH2teky7qzGF5CfFm+TWdFVk+pbMSS1dnZZaXdVZh+XWdTbG8orNplt/Q2TmWnlbj+FMlQaSVbJHzDt+WJuljiyuTxY/sYvPY4upk8WO7KLWgC96ZfsKpf1tX2c/j/tXhn4RdT8M/lgr+sbwK/1g24B/LVfjH8pvwj+U1+MfyW/CP5Rr8Y9nSsm0K9rqG2kuJRNNzksCkFJewxTW7rum6R9dxH5/BVejIM7Kp0g3Fjf2JDJe9f3ac4my+EnLF0TNrWdmphRGaInv53LHwnMW5oeXzxvLncZrlhF/ViWt7qi08L1b+Jfhv647ayG44Nfb1JuIBB063H5cl3WjSC7p1sd2kjf9GRWH3QX8RKRIrDdmSHW4JCO3d4bCjOughER4+dF28SBuOU1tGhG+hd63QRdBKaKcNQ8tmhU/nA+9g2FJStoc48/ZJmmzZ86ii/DFbUsI9ZXMnOirJsnSPSqvlp2KfO+0MmrYyO9R2QpXg8euacLezr1IpSAaKynhUsVwKUhc44U73+J4UpqH/q23kWEHDNr9YM4HRgvNOUaJsT62giSAZZRRc+Sun4kQ2osFGFPGbd9IvdaEQ2uNYSMyWV/NYqDbC9NJkiWbM+rbqsFLO4p1JCNkZG2kSe1FLtvGgs/X5pGS78lRQpYHR3ePfLjaJp1V7ni3FJf/yMUuCcboS/sB53OVxijfRP1ocxW26GEQ9F2+qbMetbN1Zxr195cTqrts7seqfuvdJOwJNt7wnKdzSdNsbwjauMTh1JhUJbdE6doTGZa7PVRv5FB9ovnWdC1Th+rRw8+z52zqbwVsz3vI/lnTn/1XF7BP3sbZCqzpWL/U4t7ODBnzLG0flVYxue3WVxyX3ZhKCuwhBzV57fI3ghldbdBO3/LUz5rs4zlmu0gvAr2t6EeINjmKIcMttPLzjaL2puaDpDcBv65EQ2wA9AIfBjh45ZmYXwMzcY04HYI85DO4zh8F3mMPgu/oIvTAAioAcg2J95Ni5B0B27i3mOYzeZp5B7zDPoHeZZ9B7rDMESFgng5R1MthnnQz6zHkVYMAcBgfMYfCQOQy+Z+zaAvq+sYvR+8YuRj8wdjH6wNjF6ENjF6MfGrsY/cjYxejHiHF7ksCfmBFtAn5k4SuAH3PQzcjH6Kd4a3POzyxkzs8Nx8k5v8Dmlyan/tKMzI5DC3nHryxk+q9xTk74jYVM+K2FTPgduHcm5/3ejAz9EwuZ/gcLmf5H7MwJf7KQCX+2kAl/AfflyXl/NSND/5uFTP+7hUz/B3bmhH9ayIShhUz4VI/Omy9bqrijUqEY4p8mtMHY92j6gIpXe4fjx7r5BSXaAUEAAAAAAQAB//8AD3iczVlZbFzXeT7/ufvMnTvrnX2/s4gzlEjNSpnSzGizaJMSSZkyRdki6XW0xBZFu1btmDQbWU6Uh7oBahet1RRsUMCxg8aRESeAVaCoZKeGYQdtvBT1S9GXyi9+aPNSWjPqf+7M0KwkB66DFLm8Z+E95/xn+bfvP0MchFw/wV3lDhKOSMRK7MRNfCREYsQgWZIno2SCTJHD5Gm6d/Q1z8Thxp/yQI1NBl20gJxOpeXUCknl0qnccgJi3n5vbJH0x+P9Cx63k7NHtIh9UXc5OC0a1RZIMAQBfzDQDIO/DwzqN5pkU3bQNsBLZJPUFDhKrAoFkUAzo1KRpGUx3dwCuc156o3lvMcKya1cnETs8cgxEvX5otMkGvXNE1/UNxEafU3Htf1Zd22bVr5kcf0rt15dRIsu/y6X1/jzr7Qyb398eX1p2sr/y9pmZhonDh2anPT7VfWpPzzzxB88/tji6VMnjjUffujBB+6/b35u9ug9hw4fOjx99+TU5NRdByfGD4zdse/2vXt279rZqA2VC4P5XN+mbCadMpKJeCwaCftD/lAw4PPqHrfL6VDtqt3lZI+jKEbyUNSNrKEXq5jwLeNr+DBlscJ16yyxRtA9GuTB6RGNRDJTdpZqUEyUjXJCN/REIQpcH+iJdJmRMXQoZYyE08DmopkSSTECHm/R7MwGFSplOFOvL9Vq+K7VzaJev4RfzBcr8NNgPhBLhluusIE1eHEJti3BdCAffLN9vn2eftZ6HrvR11xa+4c4vlZrn9CcTq3XT3PRICNfq3fzeuu9uvnQP1kL5ILt74STyTD9JdLD0fVgvvXBpc8ZGfhAc7V/Ua/hn0tb05w4tObUCOoi083VW+pmkVTJMKmTcfIY+X7jpZ1pGnHdsTnFuSN0LA7RILgiUdfxRIxG3EpkOgTugM/GKbJbOeb3qpysOyVO4GWh6XGIHG+3chwQHpqahXIkHCbTZoWE50iYhMcXFx450Xz4gfmj99x91/6xvXvqtR3bh2/bNlStlEtbB/qyPcYj1/1dtncfR1KM5XsszW4o4YaSK5cySEeUdI+3WixUYEP/arfN122rfiEQlWEos6zgjeCITk3SiwXvvtXVty5efKuXw0uvv/7RxYvwo9XVj15//YoqpiQLdPKXzE8fra66LLIhqYC5bPm4P3zts0guFxkpobKWPqqkjHQF9kVy46urq6mLFy+mVltXVtdYlroIg6smtVU2up3BttXVkxs+9bfKjBR9N5KrpEuldKWT5whF/v4j9+/0H4iH9JFCY8A8PjeROApjHoA7CRDKAW0i/wk3TTiOzGGFjJeHqyVeDDLV0ACPYgt0laPg9VUlBYR0mWlDUtSdTANQ8rkxFOjW+yh6WNJComh58cP2B+33oQD9Tq31vuZyabSgOWmwrfY6YZlLTP9X+wV48cE3VCbpnX5ExnW/fEuf8XjjdAR4IQYKHwBZCYEo6yCJwlgUhCAoXhC5UR9Id+DGCEoc2xhF49W0gEB4ReCbRCGyqMhNIkqSOE1EUZqzIgFpXFVluWdONJtsla1MyByqGMo7E2gRMAmYObFaxrodsj631Enc1Wt+luAMLbbeY2npwuzshW7iPLU3a292dHWtfmk2vgxvzMaX4KeYEYK7u3mvceRWmdTQN06Bu+MV7yNWKlDrYghciuu5jduz4vb8KhVswFsE/rgPLMQuWuzHiUgkpyg1g+AgTs3hPB4AjbhlzX087KGyosgzrJSV+3QvVWRlMtS4vzOHsPK7m2SmsWv/WKNereRzyYTucTgmJ8am9k/dvrc+2hgdvq1Sq9YKg7lyvpxJJ/qSfaGgJ67HHW7HusY7Iqjw6wwxk844onMopCiiaLVRZLNJ0eMtVEqZ7ldUWI9448cbu/a4uI2ebj3fS5+YwlowJRYlNIxC2hHfbLWaxQ8hl8t2UxeT5Wt19leHN4I5s62QCy65sDHsan/L7F4+WF7C3rpHbz/fHY/ZcqcP0bty4dkg/R2LvJvsQ8kYJ3eRaXIPKuwZ8k3yDDlLvs3tHH1NQVn5S7JdGpa2L94OQ1VRHFrcgYyslEmliUJVypVLzeLWgc18vi8VD/sFyuXpsU1707sTOyP1gMJl9xi7Yo1QzafwAsc3M8lo0CsIuttptwlWVbA2C4Nb+vmcx+XQeNWSU5vEQhTZojRRa6XtstTENd62bfi2JtlGqkPbqqhpAKamwTwBERiUsuAi//o3LbIfF0lyeZqb/m2XyvV3V9r/tVZqxZV+f+NKq0Piyu/ZeTb+qrPA4ZXf0xXOIAT8m6efnpqamBgbGxnZs6fR2L59aIiSbz937tmz3/qjlaefefqZ5aVvPvVkDx4unHr0kW+cPHG8AxIZRLz3niMzh6emp6bvPjRx18RdByfHxsfGD+wfGR0ZvfOOPfv2IGBs7G4gZNxe347wYWh4CAEEww/FwtbBgS2b+28EkRuwhMMiETu17xO9edjo05yljIBoUscECWZzzL8iosGbUlo3dtCi7rtl0UOMiB31m5NJFbpuJYuJe+XaC2HDCHMnEc5de7KAD3fy2gu9VDh6cHpydnR2cra/dWr04MuTkz8cHf3x5OR3WcfC7ORh1jR6tDum5epYsqW2Cr/mPMkIw55GmH4WNp512dyt87Tf5lbdtvUn5nbb0KbdlMcxs4lq7wmo7tYLDNfW6oQ41n2YinUP8SOqi5MU2UT6ySApkSGyvWO3YHfHmz0SAiunctZFovK8uhDwUV3wCvpi0E+9ouhdSHqcdt4maZJt0c1iFFnWFuJALcBZKddUgI+GKUR4OJaKGVyECHpEaDJXZBOlYwlA+CBPYyGTeawR1JDHuvOpKzghp/LLvRm9K+aUgldc/mJObaUzqaTJy19/1pnGISbpmzfraMo3Smi9tg5uUTg3D25G+byVeOp+HSXUFFBEJHi0qruUFv0YN2ztCWjRabq/rgt0o5AxgXViqvYSSlh6w/+QLQpdsUUpOB1Orl2b/sLfrV26dO1XLKDohSzt8706fFg/c+2/kd3cwY540iIM1S69eQnH0NOX6rXWe7Xus2bmsLB3jZFCjCOu+7IexmERxs86srCTYGDAk0UVwMKDZZnIGlhF2WoeLYfYoofhbAzDEYbhLIpimSYWizJPFIuC/N3VoQErX5/ITCMTjyPzSNyIIxOiIa8bT11lQNCiIMLkkQLntIu+fBWPOo16GoHEDsCjdzv/NxbmnAnnJfh1W/3iXN9Mhr/Q6dq1F37ADolFiXhqTBW7aslZUF0/YwicXP8P7ir9sHtLck/jMMPpCNahyWuU2MBiJZamaqdWxOKiVWjKYOJZLBDQEoZn43EgTKA62wn2bJ3dIrPNYDwfg5jDtHjMMjEb19nBMOhmvFvuWkBAIesDJ1ql1qnZtdkLoZQRvoAV+r1w0rj21AX6y9Yp+j16mEWcGX/7fNhg0aURhjP+THsUzrTPwxkUATx0cv0n3H56HTniIQG0Ds81fFGgQsSrSbieAIcBIe4Rw8Sx0ddcKBhZIlDhHG6cnmNnf44QbFxA38LzMI0F8POM68j+zM09ybmbO840XIQk4n6fw67IuAzRIyE7fdUsRnQY3htJCUTdUyxUoZL1gVEGD6L8aqUQA++7hbPFEZhTBb79T7xN4GGAi15tD17l9nuOXj3qGfae9UjFs8Xt+6io8u1/5jGHLfzpq+2BT+EvIvrRT+/V9bNedg6cqQuvoC7waCXsZG9jlwX4O2WR8gJ/jghEOCcx4E0J10R+A50mlMIcAQrjigJEsStMLq2MjdgJ96UgF9MMD0uo/1D1GU7DCR+289wr9aWl1sLa2oVLP/j886UavLG21v4FbCOks5Cr9PCX3MkNrEf/G7Hm3zf+rs9mVSSBk2CTapFFnqLfZAGCnWhOu9YkTuJwOx1NpObS3a4mYlgPxtRNpO0N+LxN5Lo/FPA389m0kYhFpFAwGJpe/ycUnMtlUsl4NCwFQ8FxdPRT6OYn0MmPoYsf6d0Ibbwb+Aq+vRc29GPY4N5w/XNjEn5D+rIx7u79Queq54aX2VHuFSzvvqH8Vc+ibnzrnQ40WNv4LNWXNqSND5yptVVmWlmQRgj9W3oRfW60EfI7LRxPCYwxa0HOYXBPn/D4PT4WzZdLdchmSkygUaq9KN3oXsTkAMa/yUzw8uVg6fbglcuBkULg8uVAYSRw+UpgpHgkFWRlIXDlCvt25XKw017EaaWb5MhPEqSfbv1ZLpviFBnGOlj/gAQcgkbOsuIEi0osCzZQZaIu2EFTrIK2yOJOK2o2FRQqLPfiTge6VEWTleNornlhmggC02OB7+HyPetUbaqTs8hI166hRURai7ekZb01LefvZIXMgk3cmqq8bJJVNOvK/52uG+lO3kBXXf6tCTcOfiWaipUuf2WiM+xpGMEAql++b1MmbSSjkUAiyAJ/v9PfU02XGM27Ge4tOg0s+wBLoReVZ1nknkSh9RX1alHyGVndqDFoy64/OxC3Vmv9SzKb3Z3NJga3bZu/7bZ3Yg9vOv1k3yMxVCfTBd2J+jJXuLuAb6DxjQa+/Pz8iacefbSjP+iX3uKsZJkcaIzOTJU4UfChtZXZ3diYjPZVooLIC+yuA6gITQtQ1LgZLCiZ45iajT/15MKpkw/Nzx0+NH7gzj2Pe3fMW1HfhGQmKRrJTLVUo9XKDihlGU6wgwf9XsHr84hSt0PZ7FDOOquVTGkAtkB2C4g4rFIt4CEUC2jKxKQoibqPAYwOqS20fHO7e50092rg/sL9AZsDXMG44gJJb3/HK4GuJKMeUO3BY1tn/TbN5Y1iGzoZylNZkJN+L6ha8NjgvFfTXMGwxQOSHZ7TJHBbtoQ1zf/gwLxf0zz+pOQBtxIPu0Ad53m/zeWgomjd/a+qwHH/Nq6KvMOl+YG1OB08L9l2x+Btu01DghYHFXjabQ6yZkE9cIWi27x4QBWp6t3QYNvf+s9dSAwDT3+HT/Qd5FOebGnkIzJFHo3h4SMDFhlueJZBDH6a8Dy5j8GNyR1F95AhiKE84PGgc2cH5PSIeWA3u8Z6LZPFP3aWFXa9Sd/xaGGq8eC1bdc8Ey4H5gert6dTD+yuvQpWzUM/7XOkgNPEaGtJ83g0+nLrMCtBl4KJ3Tsn7j2HLo+ZZPNu/STGRMyvTjT2M/wG5ywgS/JzPIqO3WHjBJEITU2lJnhjJbuOVCjDb4QwT4aD152Zc/1BXwZlo2pIZtKLZipWzYTf8XORO3khthRbw/TJu7EfbahfWIutwSdLa/gsrXWLtTXUg+ut638MP8b1ekmsEUYgbR4v0HOdheOWnkgZKQ9zJGmvHZjfyFSGwdm5FNedxQK8ykuXRbvwtmyxLlnkk7JlCUvlY0H4WNHpz2WLRW6NmD7revv6CZxrS2cunk0wZiI3Cgy6IdB7wpMyEuYVtGj+QNPlWjJTBxOQwatCbw5Vli4LdvFtidatrRE2C/25V2azysw9Xb/e/f2RRR3D5LsNuwG8kEdVJgqAxKGPUtGmDqDJ4gR+EUGZ+bsFA2oiR8wAAlgAgUoC07gyOsdOZTzUGOyM4Fa+6pCZhlpOZDzucsVnKMhDYUPg4EO47e7+7pDFM8X/vWjq2C8T2EPqAnO0JdjG5JRbVcXWqrnZOckyUkq3VtMlqKToXLr00QgedOf3gSNHUhUopfFrZQedMzlgNtCHWP9OA5R+cuSI2ZsRHOnQKJH/ATlaCL8AAAB4nGNgZGBgAGLzFH+neH6brwz8zC+AIgz3Z3Grw+j/f/9nMb9gDgJyORiYQKIANPsLzQAAeJxjYGRgYA76nwUkX/z/+/8v8wsGoAgKEAUAtlcHpAB4nGN+wcDADMILoDQuHIlgM61DYp8C0tkMDIxr/v8F4n/ML/7/BwAcMRcVAAAAAAABzgK+AxoDkAScBvIIAgiaCQQJiAnKCrAK7gxQDSQNfA3UDgoOQA7dAAEAAAAVAIgAFgAAAAAAAgCOAO0AjQAAAVsODAAAAAB4nI2SzUrDQBRGv9S2ogVBBdeDC7FI0zbSjatCQVduBLsU0nTyU5JMmUyEunflg/gG7nwAX0Jfxa/JIEoRTZjk3HPvTGYuAXCAdziorxFHzQ72GdXcwDYuLW/RX1tuku8st9CBstymf7C8izM8We7gEC9cwWnuMFrgzbKDY+fccgN7zq3lLfrAcpP8aLmFI+fZcpv+1fIups6H5Q5OGqOJWq50EsVGnE66wht4npithKJKcj8VfmlipQsxFqHKjUxT5QYqC5XOZmWSzqXuJYHKixsZlamvN/yGmEpdJCoXQ3ewkbuSudS+kfP1Dor7yDMmFKFWmbi03xZLrRYyMG5szPKi3/++J0zY3CVW0EgQIYaBwCltl28PAw6PNGOFYGVdlSCHj5TGR8kZcZUpGI85QkY5rWRFSnYR8JlVXvM945yEmTkrNHrkoJpR4IYmYjbluvof9X9XTCtT0KxjgSF3M/jHvCuavLJ+dZL5Vw8K3HOPHq3hOuvT6up0gj/yz3ML9nWdW9AE9G7VXUN7gT7vX/r0CXMPouh4nG3IW1ICMRBG4fwY41wQvOEuZlE9nXaSMiSpJlPi7i2gePM8fXXMxtwazP8dsMEDLB7h8IQOPQaM2OIZO+zxgle84R0fOODTbGlthcuxJmliPTXpOAh/z+W8u2NatKx1VPKx3Nxr5DA1OTd3kiTcuotJhex1Vskck/2KSVyI3kt2TJkluXltrWQXhLxoX0lpUarB5fU4iw6nom1K5Ud0vDLEJYhaLvXXmD8uHj97AHicY/DewXAiKGIjI2Nf5AbGnRwMHAzJBRsZ2J02MjBoQWguFHonAwMDNxJrJwMzA4PLRhXGjsCIDQ4dESB+istGDRB/BwcDRIDBJVJ6ozpIaBdHAwMji0NHcghMAgQ2MvBp7WD837qBpXcjE4PLZtYUNgYXFwCUHCoHAAA=\"},488:function(e){e.exports=\"data:image/svg+xml; utf8, <svg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 fill=%27currentColor%27 class=%27bi bi-list-nested%27 viewBox=%270 0 16 16%27><path fill-rule=%27evenodd%27 d=%27M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z%27/></svg>\"},591:function(e){e.exports=\"data:image/svg+xml; utf8,<svg xmlns=%27http://www.w3.org/2000/svg%27 width=%2716%27 height=%2716%27 fill=%27currentColor%27 class=%27bi bi-plus-circle%27 viewBox=%270 0 16 16%27><path d=%27M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z%27/><path d=%27M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z%27/></svg>\"}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={id:e,exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},o.b=document.baseURI||self.location.href,o.nc=void 0,function(){o(287);var t=o(858),r=o.n(t);function n(e,t,r){return(t=function(e){var t=function(e,t){if(\"object\"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,\"string\");if(\"object\"!=typeof o)return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return String(e)}(e);return\"symbol\"==typeof t?t:t+\"\"}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const i={},l={text:[\"text\",\"password\",\"email\",\"color\",\"tel\"],header:[\"h1\",\"h2\",\"h3\"],button:[\"button\",\"submit\",\"reset\"],paragraph:[\"p\",\"address\",\"blockquote\",\"canvas\",\"output\"],textarea:[\"textarea\",\"quill\"]},a=e=>{e.parentNode&&e.parentNode.removeChild(e)},s=e=>{for(;e.firstChild;)e.removeChild(e.firstChild);return e},d=(e,t,r=!0)=>{const o=[];let n=[\"none\",\"block\"];r&&(n=n.reverse());for(let r=e.length-1;r>=0;r--)-1!==e[r].textContent.toLowerCase().indexOf(t.toLowerCase())?(e[r].style.display=n[0],o.push(e[r])):e[r].style.display=n[1];return o},c=[\"select\",\"checkbox-group\",\"checkbox\",\"radio-group\",\"autocomplete\"],f=new RegExp(`(${c.join(\"|\")})`);class u{constructor(e){return n(this,\"stage\",void 0),n(this,\"controls\",void 0),n(this,\"formActions\",void 0),n(this,\"editorWrap\",void 0),this.optionFields=c,this.optionFieldsRegEx=f,this.subtypes=l,this.empty=s,this.filter=d,i[e]=this,i[e]}onRender(e,t){e.parentElement?t(e):window.requestAnimationFrame((()=>this.onRender(e,t)))}}const p={};class m{constructor(e){this.formData={},this.formID=e,p[e]=this}}var b=o(252),h=o.n(b);function g(e){let t;return\"function\"==typeof Event?t=new Event(e):(t=document.createEvent(\"Event\"),t.initEvent(e,!0,!0)),t}var w={loaded:g(\"loaded\"),viewData:g(\"viewData\"),userDeclined:g(\"userDeclined\"),modalClosed:g(\"modalClosed\"),modalOpened:g(\"modalOpened\"),formSaved:g(\"formSaved\"),fieldAdded:g(\"fieldAdded\"),fieldRemoved:g(\"fieldRemoved\"),fieldRendered:g(\"fieldRendered\"),fieldEditOpened:g(\"fieldEditOpened\"),fieldEditClosed:g(\"fieldEditClosed\"),stageEmptied:g(\"stageEmptied\")};const y={clobberingProtection:{document:!0,form:!0,namespaceAttributes:!1},backendOrder:[\"dompurify\",\"sanitizer\",\"fallback\"],backends:{sanitizer:\"function\"==typeof window.Sanitizer&&new window.Sanitizer,dompurify:!!window.DOMPurify&&(v=window.DOMPurify,v.setConfig({SANITIZE_DOM:!1,ADD_ATTR:[\"contenteditable\"]}),v),fallback:e=>e}};var v;const x=(e,t)=>{if(0===y.backendOrder.length)return!1;const r=e.toLowerCase();return t=t?t+\"\":\"\",r.startsWith(\"on\")||[\"form\",\"formaction\"].includes(r)||t.trim().toLowerCase().startsWith(\"javascript:\")};y.backends.fallback=function(t){const r=document.implementation.createHTMLDocument(\"\"),o=r.createElement(\"base\");o.href=document.location.href,r.head.appendChild(o);const n=[\"applet\",\"comment\",\"embed\",\"iframe\",\"link\",\"listing\",\"meta\",\"noscript\",\"object\",\"plaintext\",\"script\",\"style\",\"xmp\"],i=e.parseHTML(t,r,!1);e(i).find(\"*\").addBack().each(((t,r)=>{\"#text\"!==r.nodeName&&(r.tagName&&n.includes(r.tagName.toLowerCase())?r.parentElement?r.parentElement.removeChild(r):i.includes(r)&&i.splice(i.indexOf(r),1):r.attributes&&Array.from(r.attributes).forEach((t=>{x(t.name,t.value)&&e(r).removeAttr(t.name)})))}));const l=r.createElement(\"div\");return e(l).html(i),l.innerHTML};const A=e=>{const t=!!y.clobberingProtection.document&&document,r=!!y.clobberingProtection.form&&document.createElement(\"form\");return t&&e in t||r&&e in r?y.clobberingProtection.namespaceAttributes?\"user-content-\"+e:void 0:e},C={fallback:(e,t)=>{const r=y.backends.fallback,o=\"function\"==typeof r;return o&&(t=r(t)),e.innerHTML=t,o},dompurify:(e,t)=>{const r=y.backends.dompurify;return!(!1===r||!r.isSupported||(e.innerHTML=r.sanitize(t),0))},sanitizer:(e,t)=>{const r=y.backends.sanitizer;return!!r&&(e.setHTML(t,{sanitizer:r}),!0)}},O=(t,r,o=!1)=>{if(!o){const o=document.createElement(t.tagName);return void 0!==y.backendOrder.find((e=>C[e](o,r)))?((t=>{e(t).find(\"*\").each(((e,t)=>{[\"embed\",\"form\",\"iframe\",\"image\",\"img\",\"object\"].includes(t.tagName.toLowerCase())&&t.removeAttribute(\"name\"),[\"id\",\"name\"].forEach((e=>{if(t.hasAttribute(e)){const r=A(t.getAttribute(e));void 0===r?t.removeAttribute(e):t.setAttribute(e,r)}}))}))})(o),t.innerHTML=o.innerHTML,t):(t.innerHTML=r,t)}t.textContent=r},k=[\"events\"],E=[\"tag\",\"content\"];function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){N(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function N(e,t,r){return(t=function(e){var t=function(e,t){if(\"object\"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,\"string\");if(\"object\"!=typeof o)return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return String(e)}(e);return\"symbol\"==typeof t?t:t+\"\"}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}window.fbLoaded={js:[],css:[]},window.fbEditors={quill:{},tinymce:{}};const D=function(e,t=!1){if(null==e||\"object\"!=typeof e)return e;const r=\"function\"==typeof window.structuredClone?window.structuredClone(e):Object.assign({},e),o=[null,void 0,\"\"];t&&o.push(!1);for(const e in r)o.includes(r[e])?delete r[e]:Array.isArray(r[e])&&(r[e].length||delete r[e]);return r},L=function(e){return![\"values\",\"enableOther\",\"other\",\"label\",\"subtype\"].includes(e)},R=e=>Object.entries(e).map((([e,t])=>L(e)&&Object.values(I(e,t)).join(\"\"))).filter(Boolean).join(\" \"),I=(e,t)=>{let r;return e=M(e),t&&(Array.isArray(t)?r=X(t.join(\" \")):(\"boolean\"==typeof t&&(t=t.toString()),r=X(t.trim()))),{name:e,value:t=t?`=\"${r}\"`:\"\"}},P=e=>e.reduce(((e,t)=>e.concat(Array.isArray(t)?P(t):t)),[]),M=e=>({className:\"class\"}[e]||B(e)),B=e=>(e=(e=e.replace(/[^\\w\\s\\-]/gi,\"\")).replace(/([A-Z])/g,(function(e){return\"-\"+e.toLowerCase()}))).replace(/\\s/g,\"-\").replace(/^-+/g,\"\"),F=e=>e.replace(/-([a-z])/g,((e,t)=>t.toUpperCase())),H=function(){let e,t=0;return function(r){const o=Date.now();return o===e?++t:(t=0,e=o),(r.type||B(r.label))+\"-\"+o+\"-\"+t}}(),q=e=>void 0===e?e:[[\"array\",e=>Array.isArray(e)],[\"node\",e=>e instanceof window.Node||e instanceof window.HTMLElement],[\"component\",()=>e&&e.dom],[typeof e,()=>!0]].find((t=>t[1](e)))[0],z=function(e,t=\"\",r={}){let o=q(t);const{events:n}=r,i=T(r,k),l=document.createElement(e),a={string:e=>{O(l,l.innerHTML+e)},object:e=>{const{tag:t,content:r}=e,o=T(e,E);return l.appendChild(z(t,r,o))},node:e=>l.appendChild(e),array:e=>{for(let t=0;t<e.length;t++)o=q(e[t]),a[o](e[t])},function:e=>{e=e(),o=q(e),a[o](e)},undefined:()=>{}};for(const e in i)if(i.hasOwnProperty(e)){const t=M(e);let r=Array.isArray(i[e])?Z(i[e].join(\" \").split(\" \")).join(\" \"):i[e];if(x(t,r))continue;if(\"boolean\"==typeof r){if(!0===r){const e=\"contenteditable\"===t||t;l.setAttribute(t,e)}}else\"id\"!==t&&\"name\"!==t||(r=A(r)),void 0!==r&&l.setAttribute(t,r)}return t&&a[o](t),((e,t)=>{if(t)for(const r in t)t.hasOwnProperty(r)&&e.addEventListener(r,(e=>t[r](e)))})(l,n),l},U=e=>{const t=e.attributes,r={};return Q(t,(e=>{let o=t[e].value||\"\";o.match(/false|true/g)?o=\"true\"===o:o.match(/undefined/g)&&(o=void 0),o&&(r[F(t[e].name)]=o)})),r},W=e=>{const t=[];for(let r=0;r<e.length;r++){const o=S(S({},U(e[r])),{},{label:e[r].textContent});t.push(o)}return t},$=e=>{const t=[];if(e.length){const r=e[0].getElementsByTagName(\"value\");for(let e=0;e<r.length;e++)t.push(r[e].textContent)}return t},V=e=>{const t=(new window.DOMParser).parseFromString(e,\"text/xml\"),r=[];if(t){const e=t.getElementsByTagName(\"field\");for(let t=0;t<e.length;t++){const o=U(e[t]),n=e[t].getElementsByTagName(\"option\"),i=e[t].getElementsByTagName(\"userData\");n&&n.length&&(o.values=W(n)),i&&i.length&&(o.userData=$(i)),r.push(o)}}return r},J=e=>{const t=document.createElement(\"textarea\");return t.innerHTML=e,t.textContent},G=e=>{const t=document.createElement(\"textarea\");return t.textContent=e,t.innerHTML},X=e=>{const t={'\"':\""\",\"&\":\"&\",\"<\":\"<\",\">\":\">\"};return\"string\"==typeof e?e.replace(/[\"&<>]/g,(e=>t[e]||e)):e},Q=function(e,t,r){for(let o=0;o<e.length;o++)t.call(r,o,e[o])},Z=e=>e.filter(((e,t,r)=>r.indexOf(e)===t)),Y=(e,t)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},K=(e,t=\"\")=>{const r=jQuery;let o=[];return Array.isArray(e)||(e=[e]),_(e)||(o=jQuery.map(e,(e=>{const r={dataType:\"script\",cache:!0,url:(t||\"\")+e};return jQuery.ajax(r).done((()=>window.fbLoaded.js.push(e)))}))),o.push(jQuery.Deferred((e=>r(e.resolve)))),jQuery.when(...o)},_=(e,t=\"js\")=>{const r=window.fbLoaded[t];return Array.isArray(e)?e.every((e=>r.includes(e))):r.includes(e)},ee=(t,r=\"\")=>{Array.isArray(t)||(t=[t]),t.forEach((t=>{let o=\"href\",n=t,i=\"\";if(\"object\"==typeof t&&(o=t.type||(t.style?\"inline\":\"href\"),i=t.id,n=i||t.href||t.style,t=\"inline\"===o?t.style:t.href),!_(n,\"css\")){if(\"href\"===o){const e=document.createElement(\"link\");e.type=\"text/css\",e.rel=\"stylesheet\",e.href=(r||\"\")+t,document.head.appendChild(e)}else e(`<style type=\"text/css\">${t}</style>`).attr(\"id\",i).appendTo(e(document.head));window.fbLoaded.css.push(n)}}))},te=e=>e.replace(/\\b\\w/g,(function(e){return e.toUpperCase()})),re=(e,t)=>{const r=Object.assign({},e,t);for(const o in t)r.hasOwnProperty(o)&&(Array.isArray(t[o])?r[o]=Array.isArray(e[o])?Z(e[o].concat(t[o])):t[o]:\"object\"==typeof t[o]?r[o]=re(e[o],t[o]):r[o]=t[o]);return r},oe=(e,t,r)=>t.split(\" \").forEach((t=>e.addEventListener(t,r,!1))),ne=(e,t)=>{const r=t.replace(\".\",\"\");for(;(e=e.parentElement)&&!e.classList.contains(r););return e},ie=()=>{let e=\"\";var t;return t=navigator.userAgent||navigator.vendor||window.opera,/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)&&(e=\"formbuilder-mobile\"),e},le=e=>e.replace(/\\s/g,\"-\").replace(/[^a-zA-Z0-9[\\]_-]/g,\"\"),ae=e=>e.replace(/[^0-9]/g,\"\"),se=(e,t)=>t.filter((function(e){return!~this.indexOf(e)}),e),de=/^col-(xs|sm|md|lg)-([^\\s]+)/,ce=e=>\"string\"==typeof e?e.split(\" \").filter((e=>de.test(e)||e.startsWith(\"row-\"))):[];function fe(...e){return e.find((e=>\"number\"==typeof e))}const ue={addEventListeners:oe,attrString:R,camelCase:F,capitalize:te,closest:ne,getContentType:q,escapeAttr:X,escapeAttrs:e=>{for(const t in e)e.hasOwnProperty(t)&&(e[t]=X(e[t]));return e},escapeHtml:G,forceNumber:ae,forEach:Q,getScripts:K,getStyles:ee,hyphenCase:B,isCached:_,markup:z,merge:re,mobileClass:ie,nameAttr:H,parsedHtml:J,parseXML:V,removeFromArray:Y,safeAttr:I,safeAttrName:M,safename:le,subtract:se,trimObj:D,unique:Z,validAttr:L,titleCase:function(e){const t=[\"a\",\"an\",\"and\",\"as\",\"at\",\"but\",\"by\",\"for\",\"for\",\"from\",\"in\",\"into\",\"near\",\"nor\",\"of\",\"on\",\"onto\",\"or\",\"the\",\"to\",\"with\"].map((e=>`\\\\s${e}\\\\s`)),r=new RegExp(`(?!${t.join(\"|\")})\\\\w\\\\S*`,\"g\");return`${e}`.replace(r,(e=>e.charAt(0).toUpperCase()+e.slice(1).replace(/[A-Z]/g,(e=>` ${e}`))))},firstNumberOrUndefined:fe,splitObject:(e,t)=>{const r=e=>(t,r)=>(t[r]=e[r],t);return[Object.keys(e).filter((e=>t.includes(e))).reduce(r(e),{}),Object.keys(e).filter((e=>!t.includes(e))).reduce(r(e),{})]}};e.fn.swapWith=function(t){const r=this,o=e(t),n=e(\"<div>\");return r.before(n),o.before(r),n.before(o).remove(),r};var pe=ue;const me=[\"label\",\"type\"];class be{constructor(e,t){this.rawConfig=jQuery.extend({},e),e=jQuery.extend({},e),this.preview=t,delete e.isPreview,this.preview&&delete e.required;const r=[\"label\",\"description\",\"subtype\",\"required\",\"disabled\"];for(const t of r)this[t]=e[t],delete e[t];e.id||(e.name?e.id=e.name:e.id=\"control-\"+Math.floor(1e7*Math.random()+1)),this.id=e.id,this.type=e.type,this.description&&(e.title=this.description),be.controlConfig||(be.controlConfig={});const o=this.subtype?this.type+\".\"+this.subtype:this.type;this.classConfig=jQuery.extend({},be.controlConfig[this.type]||{},be.controlConfig[o]||{}),this.subtype&&(e.type=this.subtype),this.required&&(e.required=\"required\",e[\"aria-required\"]=\"true\"),this.disabled&&(e.disabled=\"disabled\"),this.config=e,this.configure()}static get definition(){return{}}static register(e,t,r){const o=r?r+\".\":\"\";be.classRegister||(be.classRegister={}),Array.isArray(e)||(e=[e]);for(const r of e)-1===r.indexOf(\".\")?be.classRegister[o+r]=t:be.error(`Ignoring type ${r}. Cannot use the character '.' in a type name.`)}static getRegistered(e=!1){const t=Object.keys(be.classRegister);return t.length?t.filter((t=>e?t.indexOf(e+\".\")>-1:-1===t.indexOf(\".\"))):t}static getRegisteredSubtypes(){const e={};for(const t in be.classRegister)if(be.classRegister.hasOwnProperty(t)){const[r,o]=t.split(\".\");if(!o)continue;e[r]||(e[r]=[]),e[r].push(o)}return e}static getClass(e,t){const r=t?e+\".\"+t:e;return be.classRegister[r]||be.classRegister[e]||be.error(\"Invalid control type. (Type: \"+e+\", Subtype: \"+t+\"). Please ensure you have registered it, and imported it correctly.\")}static loadCustom(e){let t=[];if(e&&(t=t.concat(e)),window.fbControls&&(t=t.concat(window.fbControls)),!this.fbControlsLoaded){for(const e of t)e(be,be.classRegister);this.fbControlsLoaded=!0}}static mi18n(e,t){const r=this.definition;let o=r.i18n||{};o=o[h().locale]||o.default||o;const n=this.camelCase(e),i=\"object\"==typeof o?o[n]||o[e]:o;if(i)return i;let l=r.mi18n;return\"object\"==typeof l&&(l=l[n]||l[e]),l||(l=n),h().get(l,t)}static active(e){return!Array.isArray(this.definition.inactive)||-1===this.definition.inactive.indexOf(e)}static label(e){return this.mi18n(e)}static icon(e){const t=this.definition;return t&&\"object\"==typeof t.icon?t.icon[e]:t.icon}configure(){}build(){const e=this.config,{label:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,me);return this.markup(r,J(t),o)}on(e){const t={prerender:e=>e,render:e=>{const t=()=>{this.onRender&&this.onRender(e)};this.css&&ee(this.css),this.js&&!_(this.js)?K(this.js).done(t):t()}};return e?t[e]:t}static error(e){throw new Error(e)}markup(e,t=\"\",r={}){return this.element=z(e,t,r),this.element}parsedHtml(e){return J(e)}static camelCase(e){return F(e)}}const he=(e,t)=>{let r=e.id?`formbuilder-${e.type} form-group field-${e.id}`:\"\";if(e.className){const o=ce(e.className);o&&o.length>0&&(r+=` ${o.join(\" \")}`,Array.isArray(t)||(t=[t]),t.forEach((e=>{e.classList&&e.classList.remove(...o),e.querySelectorAll(\"[class*=row-],[class*=col-]\").forEach((e=>{e.classList&&e.classList.remove(...o)}))})))}return r};class ge{constructor(e,t=!1,r=!1,o={}){this.preview=null!=t&&t,this.disableHTMLLabels=null!=r&&r,this.controlConfig=null!=o?o:{},this.templates={label:null,help:null,default:(e,t,r,o)=>(r&&t.appendChild(r),this.markup(\"div\",[t,e],{className:he(o,e)})),noLabel:(e,t,r,o)=>this.markup(\"div\",e,{className:he(o,e)}),hidden:e=>e},e&&(this.templates=jQuery.extend(this.templates,e)),this.configure()}configure(){}build(e,t,r){this.preview&&(t.name?t.name=t.name+\"-preview\":t.name=pe.nameAttr(t)+\"-preview\"),t.id=t.name,this.data=jQuery.extend({},t),be.controlConfig=this.controlConfig;const o=new e(t,this.preview);let n=o.build();if(\"object\"==typeof n&&n.field||(n={field:n}),\"string\"==typeof n.field){const e=this.markup(\"div\",n.field,{});1===e.childElementCount?n.field=e.children.item(0):n.field=Array.from(e.children)}const i=this.label(),l=this.help();let a;a=r&&this.isTemplate(r)?r:this.isTemplate(n.layout)?n.layout:\"default\";const s=this.processTemplate(a,n.field,i,l);return o.on(\"prerender\")(s),s.addEventListener(\"fieldRendered\",o.on(\"render\")),s}label(){const e=this.data.label||\"\",t=[this.disableHTMLLabels?document.createTextNode(e):pe.parsedHtml(e)];return this.data.required&&t.push(this.markup(\"span\",\"*\",{className:\"formbuilder-required\"})),this.isTemplate(\"label\")?this.processTemplate(\"label\",t):this.markup(\"label\",t,{for:this.data.id,className:`formbuilder-${this.data.type}-label`})}help(){return this.data.description?this.isTemplate(\"help\")?this.processTemplate(\"help\",this.data.description):this.markup(\"span\",\"?\",{className:\"tooltip-element\",tooltip:this.data.description}):null}isTemplate(e){return\"function\"==typeof this.templates[e]}processTemplate(e,...t){let r=this.templates[e](...t,this.data);return r.jquery&&(r=r[0]),r}markup(e,t=\"\",r={}){return pe.markup(e,t,r)}}const we=()=>null;h().addLanguage(\"en-US\",{NATIVE_NAME:\"English (US)\",ENGLISH_NAME:\"English\",addOption:\"Add Option +\",allFieldsRemoved:\"All fields were removed.\",allowMultipleFiles:\"Allow users to upload multiple files\",allowSelect:\"Allow selection\",autocomplete:\"Autocomplete\",button:\"Button\",cannotBeEmpty:\"This field cannot be empty\",checkboxGroup:\"Checkbox Group\",checkbox:\"Checkbox\",checkboxes:\"Checkboxes\",className:\"Class\",clearAllMessage:\"Are you sure you want to clear all fields?\",clear:\"Clear\",close:\"Close\",content:\"Content\",copy:\"Copy To Clipboard\",copyButton:\"+\",copyButtonTooltip:\"Copy\",dateField:\"Date Field\",description:\"Help Text\",descriptionField:\"Description\",devMode:\"Developer Mode\",editNames:\"Edit Names\",editorTitle:\"Form Elements\",editXML:\"Edit XML\",enableOther:\"Enable "Other"\",enableOtherMsg:\"Let users enter an unlisted option\",fieldDeleteWarning:\"false\",fieldVars:\"Field Variables\",fieldNonEditable:\"This field cannot be edited.\",fieldRemoveWarning:\"Are you sure you want to remove this field?\",fileUpload:\"File Upload\",formUpdated:\"Form Updated\",getStarted:\"Drag a field from the right to this area\",header:\"Header\",hide:\"Edit\",hidden:\"Hidden Input\",inline:\"Inline\",inlineDesc:\"Display {type} inline\",label:\"Label\",labelEmpty:\"Field Label cannot be empty\",limitRole:\"Limit access to one or more of the following roles:\",mandatory:\"Mandatory\",maxlength:\"Max Length\",minOptionMessage:\"This field requires a minimum of 2 options\",minSelectionRequired:\"Minimum {min} selections required\",multipleFiles:\"Multiple Files\",name:\"Name\",no:\"No\",noFieldsToClear:\"There are no fields to clear\",number:\"Number\",off:\"Off\",on:\"On\",option:\"Option\",optionCount:\"Option {count}\",options:\"Options\",optional:\"optional\",optionLabelPlaceholder:\"Label\",optionValuePlaceholder:\"Value\",optionEmpty:\"Option value required\",other:\"Other\",paragraph:\"Paragraph\",placeholder:\"Placeholder\",\"placeholders.value\":\"Value\",\"placeholders.label\":\"Label\",\"placeholders.email\":\"Enter your email\",\"placeholders.className\":\"space separated classes\",\"placeholders.password\":\"Enter your password\",preview:\"Preview\",radioGroup:\"Radio Group\",radio:\"Radio\",removeMessage:\"Remove Element\",removeOption:\"Remove Option\",remove:\"×\",required:\"Required\",reset:\"Reset\",requireValidOption:\"Only accept a pre-defined Option\",richText:\"Rich Text Editor\",roles:\"Access\",rows:\"Rows\",save:\"Save\",selectOptions:\"Options\",select:\"Select\",selectColor:\"Select Color\",selectionsMessage:\"Allow Multiple Selections\",size:\"Size\",sizes:\"Sizes\",\"size.xs\":\"Extra Small\",\"size.sm\":\"Small\",\"size.m\":\"Default\",\"size.lg\":\"Large\",step:\"Step\",style:\"Style\",styles:\"Styles\",\"styles.btn\":\"Button Styles\",\"styles.btn.default\":\"Default\",\"styles.btn.danger\":\"Danger\",\"styles.btn.info\":\"Info\",\"styles.btn.primary\":\"Primary\",\"styles.btn.success\":\"Success\",\"styles.btn.warning\":\"Warning\",submit:\"Submit\",subtype:\"Type\",text:\"Text Field\",textArea:\"Text Area\",toggle:\"Toggle\",warning:\"Warning!\",value:\"Value\",viewJSON:\"[{…}]\",viewXML:\"</>\",yes:\"Yes\"});const ye={actionButtons:[],allowStageSort:!0,append:!1,controlOrder:[\"autocomplete\",\"button\",\"checkbox-group\",\"checkbox\",\"date\",\"file\",\"header\",\"hidden\",\"number\",\"paragraph\",\"radio-group\",\"select\",\"text\",\"textarea\"],controlPosition:\"right\",dataType:\"json\",defaultFields:[],disabledActionButtons:[],disabledAttrs:[],disabledFieldButtons:{},disabledSubtypes:{},disableFields:[],disableHTMLLabels:!1,disableInjectedStyle:!1,editOnAdd:!1,fields:[],fieldRemoveWarn:!1,fieldEditContainer:null,inputSets:[],notify:{error:e=>{console.log(e)},success:e=>{console.log(e)},warning:e=>{console.warn(e)}},onAddField:(e,t)=>t,onAddFieldAfter:(e,t)=>t,onAddOption:e=>e,onClearAll:we,onCloseFieldEdit:we,onOpenFieldEdit:we,onSave:we,persistDefaultFields:!1,prepend:!1,replaceFields:[],roles:{1:\"Administrator\"},sanitizerOptions:{clobberingProtection:{document:!1,form:!1},backendOrder:[]},scrollToFieldOnAdd:!0,showActionButtons:!0,sortableControls:!1,stickyControls:{enable:!0,offset:{top:5,bottom:\"auto\",right:\"auto\"}},subtypes:{},templates:{},typeUserAttrs:{},typeUserDisabledAttrs:{},typeUserEvents:{},defaultGridColumnClass:\"col-md-12\",cancelGridModeDistance:100,enableColumnInsertMenu:!1,enableEnhancedBootstrapGrid:!1},ve={btn:[\"default\",\"danger\",\"info\",\"primary\",\"success\",\"warning\"]},xe={location:\"assets/lang/\"},Ae={},Ce={rowWrapperClass:\"rowWrapper\",colWrapperClass:\"colWrapper\",tmpRowPlaceholderClass:\"tempRowWrapper\",invisibleRowPlaceholderClass:\"invisibleRowPlaceholder\"};var Oe=o(395),ke=o.n(Oe);const Ee=[\"values\"],je=[\"label\",\"events\"],Se=[\"actionButtons\",\"replaceFields\"];function Ne(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}class Te{constructor(e,t,r){this.data=p[e],this.d=i[e],this.config=Ae[e],this.doCancel=!1,this.layout=t,this.handleKeyDown=this.handleKeyDown.bind(this),this.formBuilder=r,this.toastTimer=null}startMoving(e,t){t.item.show().addClass(\"moving\"),this.doCancel=!0,this.from=t.item.parent()}stopMoving(t,r){const o=this;r.item.removeClass(\"moving\"),o.doCancel&&(r.sender&&e(r.sender).sortable(\"cancel\"),this.from.closest(\".frmb-control\").sortable(\"cancel\")),o.save(),o.doCancel=!1}beforeStop(e,t){const r=this,o=this.config.opts,n=r.d.stage.childNodes.length-1,i=[];r.stopIndex=t.placeholder.closest(\"ul.stage-wrap > *\").index()-1,!o.sortableControls&&t.item.parent().hasClass(\"frmb-control\")&&i.push(!0),i.push(t.item.is(\":not(li.input-control,li.input-set-control)\")&&!t.item.parent().hasClass(\"frmb-control\")),o.prepend&&i.push(0===r.stopIndex),o.append&&i.push(r.stopIndex+1===n),r.doCancel=i.some((e=>!0===e))}getTypes(t){const r={type:t.attr(\"type\")},o=e(\".fld-subtype\",t).val();return o!==r.type&&(r.subtype=o),r}fieldOptionData(t){const r=[],o=e(\".sortable-options li\",t);return o.each((e=>{const t=o[e],n=t.querySelectorAll(\"input[type=text], input[type=number], select\"),i=t.querySelectorAll(\"input[type=checkbox], input[type=radio]\"),l={};Q(n,(e=>{const t=n[e],r=t.dataset.attr;l[r]=t.value})),Q(i,(e=>{const t=i[e],r=t.getAttribute(\"data-attr\");l[r]=t.checked})),r.push(l)})),r}xmlSave(e){const t=this.prepData(e),r=new XMLSerializer,o=[\"<fields>\"];t.forEach((e=>{const{values:t}=e;let r=[`<field ${n=Ne(e,Ee),Object.entries(n).map((([e,t])=>`${B(e)}=\"${t}\"`)).join(\" \")}>`];var n;if(c.includes(e.type)){const e=t.map((e=>z(\"option\",e.label,e).outerHTML));r=r.concat(e)}r.push(\"</field>\"),o.push(r)})),o.push(\"</fields>\");const n=z(\"form-template\",P(o).join(\"\"));return r.serializeToString(n)}prepData(t){const r=[],o=this.d,n=this,i=this.config;if(0!==t.childNodes.length){const l=[];Q(t.childNodes,(function(t,r){e(r).find(\"li.form-field\").each((function(e,t){l.push(t)}))})),Q(t.childNodes,(function(t,r){const o=e(r);o.is(\"li\")&&o.hasClass(\"form-field\")&&l.push(r)})),l.length&&l.forEach((t=>{const l=e(t);if(!l.hasClass(\"disabled-field\")){let a=n.getTypes(l);const s=e(\".roles-field:checked\",t),d=s.map((e=>s[e].value)).get();if(a=Object.assign({},a,n.getAttrVals(t)),a.subtype)if(\"quill\"===a.subtype){const e=`${a.name}-preview`;if(window.fbEditors.quill[e]){const t=window.fbEditors.quill[e].instance.getContents();a.value=window.JSON.stringify(t.ops)}}else if(\"tinymce\"===a.subtype&&window.tinymce){const e=`${a.name}-preview`,t=window.tinymce.get(e);t&&(a.value=t.getContent())}if(d.length&&(a.role=d.join(\",\")),a.className=a.className||a.class,a.className&&\"true\"==l.attr(\"addeddefaultcolumnclass\")&&1==l.closest(this.formBuilder.rowWrapperClassSelector).children().length&&a.className.includes(i.opts.defaultGridColumnClass)){const e=ce(a.className);e&&e.length>0&&e.forEach((e=>{a.className=a.className.replace(e,\"\").trim()}))}if(a.className){const e=new RegExp(\"(?:^|\\\\s)btn-(\"+ve.btn.join(\"|\")+\")(?:\\\\s|$)\",\"g\").exec(a.className);e&&(a.style=e[1])}a=D(a),a.type&&a.type.match(o.optionFieldsRegEx)&&(a.values=n.fieldOptionData(l)),r.push(a)}}))}return r}getData(e){const t=this.data;if(e||(e=this.config.opts.formData),!e)return!1;const r={xml:e=>Array.isArray(e)?e:V(e),json:e=>\"string\"==typeof e?window.JSON.parse(e):e};return t.formData=r[this.config.opts.dataType](e)||[],t.formData}save(e=!1){const t=this,r=this.data,o=this.d.stage,n={xml:()=>t.xmlSave(o),json:e=>window.JSON.stringify(t.prepData(o),null,e&&\" \")};return r.formData=n[this.config.opts.dataType](e),document.dispatchEvent(w.formSaved),r.formData}incrementId(e){const t=e.lastIndexOf(\"-\"),r=parseInt(e.substring(t+1))+1;return`${e.substring(0,t)}-${r}`}getAttrVals(t){const r=this.config,o=Object.create(null),n=t.querySelectorAll('[class*=\"fld-\"]');return Q(n,(t=>{const i=n[t],l=F(i.getAttribute(\"name\"));o[l]=[[i.attributes.contenteditable,()=>\"xml\"===r.opts.dataType?G(i.innerHTML):i.innerHTML],[\"checkbox\"===i.type,()=>i.checked],[\"number\"===i.type&&\"\"!==i.value,()=>Number(i.value)],[i.attributes.multiple,()=>e(i).val()],[!0,()=>i.value]].find((([e])=>!!e))[1]()})),o}updatePreview(t){const r=this,o=this.d,n=t.attr(\"class\"),i=t[0];if(n.includes(\"input-control\"))return;const l=t.attr(\"type\"),a=e(\".prev-holder\",i);let d=Object.assign({},r.getAttrVals(i),{type:l});l.match(o.optionFieldsRegEx)&&(d.values=[],d.multiple=e('[name=\"multiple\"]',i).is(\":checked\"),e(\".sortable-options li\",i).each((function(t,r){const o={selected:e(\".option-selected\",r).is(\":checked\"),value:e(\".option-value\",r).val(),label:e(\".option-label\",r).val()};d.values.push(o)}))),d=D(d,!0),d.className=r.classNames(i,d),t.data(\"fieldData\",d);const c=r.formBuilder.controls.custom.lookup(d.type),f=r.formBuilder.controls.custom.getClass(d.type),u=c?c.class:f||be.getClass(d.type,d.subtype),p=this.layout.build(u,d);s(a[0]),a[0].appendChild(p),p.dispatchEvent(w.fieldRendered)}disabledTT(e){const t=e.querySelectorAll(\".disabled-field\");Q(t,(e=>{const r=t[e],o=h().get(\"fieldNonEditable\");if(o){const e=z(\"p\",o,{className:\"frmb-tt\"});r.appendChild(e),r.addEventListener(\"mousemove\",(t=>((e,t)=>{const r=t.field.getBoundingClientRect(),o=e.clientX-r.left-21,n=e.clientY-r.top-t.tt.offsetHeight-12;t.tt.style.transform=`translate(${o}px, ${n}px)`})(t,{tt:e,field:r})))}}))}classNames(t,r){const o=t.querySelector(\".fld-className\"),n=t.querySelector(\".btn-style\"),i=n&&n.value;if(!o)return;const{type:l}=r,a=o.multiple?e(o).val():o.value.trim().split(\" \"),s={button:\"btn\",submit:\"btn\"}[l];if(s&&i){for(let e=0;e<a.length;e++){const t=new RegExp(`^${s}-(?:`+ve.btn.join(\"|\")+\")$\");a[e].match(t)&&a.splice(e,1,s+\"-\"+i)}a.push(s+\"-\"+i),a.push(s)}const d=Z(a).join(\" \").trim();return o.value=d,d}closeConfirm(e,t){e||(e=document.getElementsByClassName(\"form-builder-overlay\")[0]),e&&a(e),t||(t=document.getElementsByClassName(\"form-builder-dialog\")[0]),t&&a(t),document.removeEventListener(\"keydown\",this.handleKeyDown,!1),document.dispatchEvent(w.modalClosed)}handleKeyDown(e){27===(e.keyCode||e.which)&&(e.preventDefault(),this.closeConfirm.call(this))}showOverlay(){const e=z(\"div\",null,{className:\"form-builder-overlay\"});return document.body.appendChild(e),e.classList.add(\"visible\"),e.addEventListener(\"click\",(({target:e})=>this.closeConfirm(e)),!1),document.addEventListener(\"keydown\",this.handleKeyDown,!1),e}confirm(e,t,r=!1,o=\"\"){const n=this,i=h().current,l=n.showOverlay(),a=z(\"button\",i.yes,{className:\"yes btn btn-success btn-sm\"}),s=z(\"button\",i.no,{className:\"no btn btn-danger btn-sm\"});s.onclick=function(){n.closeConfirm(l)},a.onclick=function(){t(),n.closeConfirm(l)};const d=z(\"div\",[s,a],{className:\"button-wrap\"}),c=z(\"div\",[e,d],{className:o=\"form-builder-dialog \"+o});if(r)c.classList.add(\"positioned\");else{const e=document.documentElement;r={pageX:Math.max(e.clientWidth,window.innerWidth||0)/2,pageY:Math.max(e.clientHeight,window.innerHeight||0)/2},c.style.position=\"fixed\"}return c.style.left=r.pageX+\"px\",c.style.top=r.pageY+\"px\",document.body.appendChild(c),a.focus(),c}dialog(e,t=!1,r=\"\"){const o=document.documentElement.clientWidth,n=document.documentElement.clientHeight;this.showOverlay();const i=z(\"div\",e,{className:r=\"form-builder-dialog \"+r});return t?i.classList.add(\"positioned\"):(t={pageX:Math.max(o,window.innerWidth||0)/2,pageY:Math.max(n,window.innerHeight||0)/2},i.style.position=\"fixed\"),i.style.left=t.pageX+\"px\",i.style.top=t.pageY+\"px\",document.body.appendChild(i),document.dispatchEvent(w.modalOpened),-1!==r.indexOf(\"data-dialog\")&&document.dispatchEvent(w.viewData),i}confirmRemoveAll(t){const r=this,o=this.config,n=t.target.id.match(/frmb-\\d{13}/)[0],i=document.getElementById(n),l=h().current,a=e(\"li.form-field\",i),s=t.target.getBoundingClientRect(),d=document.body.getBoundingClientRect(),c={pageX:s.left+s.width/2,pageY:s.top-d.top-12};a.length?r.confirm(l.clearAllMessage,(()=>{r.removeAllFields.call(r,i),o.opts.persistDefaultFields&&o.opts.defaultFields?this.addDefaultFields():o.opts.notify.success(l.allFieldsRemoved),o.opts.onClearAll()}),c):r.dialog(l.noFieldsToClear,c)}addDefaultFields(){this.config.opts.defaultFields.forEach((e=>this.formBuilder.prepFieldVars(e))),this.d.stage.classList.remove(\"empty\")}removeAllFields(e){const t=h().current,r=this.config.opts,o=[];e.querySelectorAll(this.formBuilder.fieldSelector).length&&(r.prepend&&o.push(!0),r.append&&o.push(!0),o.some(Boolean)||(e.classList.add(\"empty\"),e.dataset.content=t.getStarted),this.emptyStage(e))}emptyStage(e){s(e).classList.remove(\"removing\"),e.dispatchEvent(w.stageEmptied),this.save()}stageIsEmpty(){return 0===e(this.d.stage).find(\"li\").length}setFieldOrder(t){if(!this.config.opts.sortableControls)return!1;const r=window.JSON,o=[];return t.children().each(((t,r)=>{const n=e(r).data(\"type\");n&&o.push(n)})),ke()(\"sessionStorage\")&&window.sessionStorage.setItem(\"fieldOrder\",r.stringify(o)),o}closeAllEdit(){e(this.d.stage).find(\"li.form-field\").each(((e,t)=>{this.closeField(t.id,!1)}))}toggleEdit(t,r=!0){const o=document.getElementById(t);if(o)return e(o).hasClass(\"editing\")?this.closeField(t,r):this.openField(t,r)}closeField(t,r=!0){const o=this,n=document.getElementById(t);if(!n)return n;const i=e(\".frm-holder\",n),l=e(\".prev-holder\",n);let a=!1;if(e(n).hasClass(\"editing\")&&(a=!0),!a)return n;n.classList.toggle(\"editing\"),e(\".toggle-form\",n).toggleClass(\"open\"),r?(l.slideToggle(250),i.slideToggle(250)):(l.toggle(),i.toggle()),this.updatePreview(e(n));const s=e(`#${t}`),d=e(`#${t}-cont`);d.append(s),this.removeContainerProtection(d.attr(\"id\")),this.config.opts.onCloseFieldEdit(i[0]),document.dispatchEvent(w.fieldEditClosed);const c=s.find(\".prev-holder\"),f=setTimeout((()=>{clearTimeout(f),o.tmpCleanPrevHolder(c).forEach((e=>{if(e.columnInfo.columnSize){const t=o.getBootstrapColumnClass(d.attr(\"class\"));t!==e.columnInfo.columnSize&&(d.removeClass(t).addClass(e.columnInfo.columnSize),o.tmpCleanPrevHolder(c))}}))}),300);return n}openField(t,r=!0){const o=document.getElementById(t);if(!o)return o;const n=e(\".frm-holder\",o),i=e(\".prev-holder\",o);let l=!1;if(e(o).hasClass(\"editing\")&&(l=!0),l)return o;o.classList.toggle(\"editing\"),e(\".toggle-form\",o).toggleClass(\"open\"),r?(i.slideToggle(250),n.slideToggle(250)):(i.toggle(),n.toggle()),this.updatePreview(e(o));const a=e(`#${t}`),s=e(`#${t}-cont`),d=s.closest(this.formBuilder.rowWrapperClassSelector);return this.formBuilder.preserveTempContainers.push(s.attr(\"id\")),a.insertAfter(d),this.formBuilder.currentEditPanel=n[0],this.config.opts.onOpenFieldEdit(n[0]),document.dispatchEvent(w.fieldEditOpened),e(document).trigger(\"fieldOpened\",[{rowWrapperID:d.attr(\"id\")}]),o}getStyle(e,t=!1){let r;return window.getComputedStyle?r=window.getComputedStyle(e,null):e.currentStyle&&(r=e.currentStyle),t?r[t]:r}showData(){const e=G(this.getFormData(this.config.opts.dataType,!0)),t=z(\"code\",e,{className:`formData-${this.config.opts.dataType}`});this.dialog(z(\"pre\",t),!1,\"data-dialog\")}removeField(t,r=250){let o=!1;const n=this,i=this.d.stage,l=i.getElementsByClassName(\"form-field\");if(!l.length)return this.config.opts.notify.warning(\"No fields to remove\"),!1;if(!t){const e=[].slice.call(l).map((e=>e.id));this.config.opts.notify.warning(\"fieldID required to remove specific fields.\"),this.config.opts.notify.warning(\"Removing last field since no ID was supplied.\"),this.config.opts.notify.warning(\"Available IDs: \"+e.join(\", \")),t=e[e.length-1]}const a=document.getElementById(t);if(!a)return this.config.opts.notify.warning(\"Field not found\"),!1;const s=e(a),d=s.closest(this.formBuilder.rowWrapperClassSelector);s.slideUp(r,(function(){s.removeClass(\"deleting\"),s.remove(),o=!0,n.save(),i.childNodes.length||(i.classList.add(\"empty\"),i.dataset.content=h().current.getStarted)}));const c=Object.assign({},this.config.opts.typeUserEvents[\"*\"],this.config.opts.typeUserEvents[a.type]);if(c&&c.onremove&&c.onremove(a),document.dispatchEvent(w.fieldRemoved),d.length){this.removeContainerProtection(`${t}-cont`);const r=setTimeout((()=>{clearTimeout(r),e(document).trigger(\"checkRowCleanup\",[{rowWrapperID:d.attr(\"id\")}])}),333)}return o}processActionButtons(e){const{label:t,events:r}=e,o=Ne(e,je);let n=t;const i=this.data;n=n?h().current[n]||n:o.id?h().current[o.id]||te(o.id):\"\",o.id?o.id=`${i.formID}-${o.id}-action`:o.id=`${i.formID}-action-${Math.round(1e3*Math.random())}`;const l=z(\"button\",n,o);if(r)for(const e in r)r.hasOwnProperty(e)&&l.addEventListener(e,(t=>r[e](t)));return l}processSubtypes(e){const t=this.config.opts.disabledSubtypes;for(const t in e)e.hasOwnProperty(t)&&be.register(e[t],be.getClass(t),t);const r=be.getRegisteredSubtypes(),o=Object.entries(r).reduce(((e,[r,o])=>(e[r]=t[r]&&se(t[r],o)||o,e)),{}),n={};for(const e in o)if(o.hasOwnProperty(e)){const t=[];for(const r of o[e]){const o=be.getClass(e,r),n=o.mi18n(`subtype.${r}`)||o.mi18n(r)||r;t.push({label:n,value:r})}n[e]=t}return n}editorUI(e,t){const r=this.d,o=this.data,n=e||o.formID,i=\"left\"===(t||\"\")?\"controls-left\":\"controls-right\";r.editorWrap=z(\"div\",null,{id:`${o.formID}-form-wrap`,className:`form-wrap form-builder formbuilder-embedded-bootstrap ${ie()} ${i}`}),r.stage=z(\"ul\",null,{id:n,className:\"frmb stage-wrap\"}),r.controls=z(\"ul\",null,{id:`${n}-control-box`,className:\"frmb-control\"});const l=this.formActionButtons();r.formActions=z(\"div\",l,{className:\"form-actions btn-group\"})}formActionButtons(){const e=this.config.opts;return e.actionButtons.map((t=>{if(t.id&&-1===e.disabledActionButtons.indexOf(t.id))return this.processActionButtons(t)})).filter(Boolean)}processOptions(e){const t=this,{actionButtons:r,replaceFields:o}=e,n=Ne(e,Se);let i=n.fieldEditContainer;\"string\"==typeof n.fieldEditContainer&&(i=document.querySelector(n.fieldEditContainer));const l=[{type:\"button\",id:\"clear\",className:\"clear-all btn btn-danger\",events:{click:t.confirmRemoveAll.bind(t)}},{type:\"button\",label:\"viewJSON\",id:\"data\",className:\"btn btn-default get-data\",events:{click:t.showData.bind(t)}},{type:\"button\",id:\"save\",className:\"btn btn-primary save-template\",events:{click:e=>{t.save(),t.config.opts.onSave(e,t.data.formData)}}}].concat(r);return n.fields=n.fields.concat(o),n.disableFields=n.disableFields.concat(o.map((({type:e})=>e&&e))),\"xml\"===n.dataType&&(n.disableHTMLLabels=!0),t.config.opts=Object.assign({},{actionButtons:l},{fieldEditContainer:i},n),t.config.opts}input(e={}){return z(\"input\",null,e)}getFormData(e=\"js\",t=!1){const r=this,o={js:()=>r.prepData(r.d.stage),xml:()=>r.xmlSave(r.d.stage),json:e=>window.JSON.stringify(r.prepData(r.d.stage),null,e&&\" \")};return o[e](t)}tmpCleanPrevHolder(t){const r=this,o=[],n=t.find(\".form-group\");function i(e){const t=e.attr(\"class\");if(void 0!==t&&!1!==t){const t=r.tryParseColumnInfo(e[0]);e.attr(\"class\",e.attr(\"class\").replace(\"__fb-tmp-col-\",\"col-\")),e.attr(\"class\",e.attr(\"class\").replace(\"__fb-tmp-row-\",\"row-\")),e.attr(\"class\",e.attr(\"class\").replace(\"col-\",\"__fb-tmp-col-\")),e.attr(\"class\",e.attr(\"class\").replace(\"row-\",\"__fb-tmp-row-\"));const n={};n.field=e,n.columnInfo=t,o.push(n)}}return i(n),n.find(\"*\").each((function(t,r){i(e(r))})),o}tryParseColumnInfo(e){const t={};if(e.className){const r=ce(e.className);r&&r.length>0&&r.forEach((e=>{e.startsWith(\"row-\")?t.rowUniqueId=e.replace(\"row-\",\"\").trim():t.columnSize=e}))}return t}removeContainerProtection(e){const t=this.formBuilder.preserveTempContainers.indexOf(e);-1!==t&&this.formBuilder.preserveTempContainers.splice(t,1)}toggleHighlight(e,t=600){e.addClass(\"moveHighlight\"),setTimeout((function(){e.removeClass(\"moveHighlight\")}),t)}showToast(t,r=3e3){null!=this.toastTimer&&(window.clearTimeout(this.toastTimer),this.toastTimer=null),this.toastTimer=setTimeout((function(){e(\".snackbar\").removeClass(\"show\")}),r),e(\".snackbar\").addClass(\"show\").html(t)}getDistanceBetweenPoints(e,t,r,o){const n=r-e,i=o-t;return Math.floor(Math.sqrt(i*i+n*n))}getRowClass(e){if(e){const t=e.split(\" \").filter((e=>e.startsWith(\"row-\")));if(t&&t.length>0)return t[0]}return\"\"}getRowValue(e){if(e){const t=this.getRowClass(e);if(t)return t.split(\"-\")[1]}return\"0\"}changeRowClass(e,t){const r=this.getRowClass(e);return e.replace(r,`row-${t}`)}getBootstrapColumnValue(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return parseInt(t.split(\"-\")[2])}return 0}getBootstrapColumnPrefix(e){if(e){const t=this.getBootstrapColumnClass(e);if(t)return`${t.split(\"-\")[0]}-${t.split(\"-\")[1]}`}return\"\"}getBootstrapColumnClass(e){if(e){const t=e.split(\" \").filter((e=>de.test(e)));if(t&&t.length>0)return t[0]}return\"\"}changeBootstrapClass(e,t){const r=this.getBootstrapColumnClass(e);return e.replace(r,`${this.getBootstrapColumnPrefix(e)}-${t}`)}syncBootstrapColumnWrapperAndClassProperty(t,r){const o=e(`#${t}-cont`);o.attr(\"class\",this.changeBootstrapClass(o.attr(\"class\"),r));const n=e(`#className-${t}`);n.val()&&n.val(this.changeBootstrapClass(n.val(),r))}syncFieldWithNewRow(t,r){if(t){const n=e(t).find(\".fld-className\"),i=n.val()?.trim();if(i){var o;let e=i.split(\" \");const t=this.getRowClass(i),l=this.getRowClass(null!==(o=r?.className)&&void 0!==o?o:\"\");t!==l&&(t&&(e=e.filter((function(e){return e!==t}))),l&&e.push(l),n.val(e.join(\" \")))}}}}const De=[\"values\",\"type\"];be.register(\"autocomplete\",class extends be{static get definition(){return{mi18n:{requireValidOption:\"requireValidOption\"}}}build(){const e=this.config,{values:t,type:r}=e,o=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,De),n=e=>{const t=e.target.nextSibling.nextSibling,r=e.target.nextSibling,o=this.getActiveOption(t);let n=new Map([[38,()=>{const e=this.getPreviousOption(o);e&&this.selectOption(t,e)}],[40,()=>{const e=this.getNextOption(o);e&&this.selectOption(t,e)}],[13,()=>{o?(e.target.value=o.innerHTML,r.value=o.getAttribute(\"value\"),\"none\"===t.style.display?this.showList(t,o):this.hideList(t)):this.config.requireValidOption&&(this.isOptionValid(t,e.target.value)||(e.target.value=\"\",e.target.nextSibling.value=\"\")),e.preventDefault()}],[27,()=>{this.hideList(t)}]]).get(e.keyCode);return n||(n=()=>!1),n()},i={focus:e=>{const t=e.target.nextSibling.nextSibling,r=d(t.querySelectorAll(\"li\"),e.target.value);if(e.target.addEventListener(\"keydown\",n),e.target.value.length>0){const e=r.length>0?r[r.length-1]:null;this.showList(t,e)}},blur:e=>{e.target.removeEventListener(\"keydown\",n);const t=setTimeout((()=>{e.target.nextSibling.nextSibling.style.display=\"none\",clearTimeout(t)}),200);if(this.config.requireValidOption){const t=e.target.nextSibling.nextSibling;this.isOptionValid(t,e.target.value)||(e.target.value=\"\",e.target.nextSibling.value=\"\")}},input:e=>{const t=e.target.nextSibling.nextSibling;e.target.nextSibling.value=e.target.value;const r=d(t.querySelectorAll(\"li\"),e.target.value);if(0==r.length)this.hideList(t);else{let e=this.getActiveOption(t);e||(e=r[r.length-1]),this.showList(t,e)}}},l=Object.assign({},o,{id:`${o.id}-input`,autocomplete:\"off\",events:i}),a=Object.assign({},o,{type:\"hidden\"});delete l.name;const s=[this.markup(\"input\",null,l),this.markup(\"input\",null,a)],c=t.map((e=>{const t=e.label,r={events:{click:t=>{const r=t.target.parentElement,o=r.previousSibling.previousSibling;o.value=e.label,o.nextSibling.value=e.value,this.hideList(r)}},value:e.value};return this.markup(\"li\",t,r)}));return s.push(this.markup(\"ul\",c,{id:`${o.id}-list`,className:`formbuilder-${r}-list`})),s}hideList(e){this.selectOption(e,null),e.style.display=\"none\"}showList(e,t){this.selectOption(e,t),e.style.display=\"block\",e.style.width=e.parentElement.offsetWidth+\"px\"}getActiveOption(e){const t=e.getElementsByClassName(\"active-option\")[0];return t&&\"none\"!==t.style.display?t:null}getPreviousOption(e){let t=e;do{t=t?t.previousSibling:null}while(null!=t&&\"none\"===t.style.display);return t}getNextOption(e){let t=e;do{t=t?t.nextSibling:null}while(null!=t&&\"none\"===t.style.display);return t}selectOption(e,t){const r=e.querySelectorAll(\"li\");for(let e=0;e<r.length;e++)r[e].classList.remove(\"active-option\");t&&t.classList.add(\"active-option\")}isOptionValid(e,t){const r=e.querySelectorAll(\"li\");let o=!1;for(let e=0;e<r.length;e++)if(r[e].innerHTML===t){o=!0;break}return o}onRender(t){if(this.config.userData){const t=e(\"#\"+this.config.name),r=t.next(),o=this.config.userData[0];let n=null;if(r.find(\"li\").each((function(){e(this).attr(\"value\")===o&&(n=e(this).get(0))})),null===n)return this.config.requireValidOption?void 0:void t.prev().val(this.config.userData[0]);t.prev().val(n.innerHTML),t.val(n.getAttribute(\"value\"));const i=t.next().get(0);\"none\"===i.style.display?this.showList(i,n):this.hideList(i)}return t}});class Le extends be{build(){return{field:this.markup(\"button\",this.label,this.config),layout:\"noLabel\"}}}be.register(\"button\",Le),be.register([\"button\",\"submit\",\"reset\"],Le,\"button\");class Re extends be{constructor(e,t,r){super(e,t),this.template=r}build(){let e=this.template;if(!e)return be.error(`Invalid custom control type '${this.type}'. Please ensure you have registered it correctly as a template option.`);const t=Object.assign(this.config),r=[\"label\",\"description\",\"subtype\",\"id\",\"preview\",\"required\",\"title\",\"aria-required\",\"type\"];for(const e of r)t[e]=this.config[e]||this[e];return e=e.bind(this),e=e(t),e.js&&(this.js=e.js),e.css&&(this.css=e.css),this.onRender=e.onRender,{field:e.field,layout:e.layout}}}be.register(\"hidden\",class extends be{build(){return this.field=this.markup(\"input\",null,this.config),{field:this.field,layout:\"hidden\"}}onRender(){this.config.userData&&e(this.field).val(this.config.userData[0])}});const Ie=[\"type\"];class Pe extends be{build(){const e=this.config,{type:t}=e,r=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,Ie);let o=t;const n={paragraph:\"p\",header:this.subtype};return n[t]&&(o=n[t]),{field:this.markup(o,pe.parsedHtml(this.label),r),layout:\"noLabel\"}}}be.register([\"paragraph\",\"header\"],Pe),be.register([\"p\",\"address\",\"blockquote\",\"canvas\",\"output\"],Pe,\"paragraph\"),be.register([\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\"],Pe,\"header\");const Me=[\"values\",\"value\",\"placeholder\",\"type\",\"inline\",\"other\",\"toggle\"],Be=[\"label\"];function Fe(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}be.register([\"select\",\"checkbox-group\",\"radio-group\",\"checkbox\"],class extends be{static get definition(){return{inactive:[\"checkbox\"],mi18n:{minSelectionRequired:\"minSelectionRequired\"}}}build(){const e=[],t=this.config,{values:r,value:o,placeholder:n,type:i,inline:l,other:a,toggle:s}=t,d=Fe(t,Me),c=i.replace(\"-group\",\"\"),f=\"select\"===i;if((d.multiple||\"checkbox-group\"===i)&&(d.name=d.name+\"[]\"),\"checkbox-group\"===i&&d.required){const e=this,t=this.onRender.bind(this);this.onRender=function(){t(),e.groupRequired()}}if(delete d.title,r){n&&f&&e.push(this.markup(\"option\",n,{disabled:!0,selected:!0,value:\"\"}));for(let t=0;t<r.length;t++){let i=r[t];\"string\"==typeof i&&(i={label:i,value:i});const{label:a=\"\"}=i,u=Fe(i,Be);if(u.id=`${d.id}-${t}`,u.selected&&!n||delete u.selected,void 0!==o&&u.value===o&&(u.selected=!0),f){const t=this.markup(\"option\",document.createTextNode(a),u);e.push(t)}else{const t=[a];let r=`formbuilder-${c}`;l&&(r+=\"-inline\"),u.type=c,u.selected&&(u.checked=\"checked\",delete u.selected);const o=this.markup(\"input\",null,Object.assign({},d,u)),n={for:u.id};let i=[o,this.markup(\"label\",t,n)];s&&(delete n.for,n.className=\"kc-toggle\",t.unshift(o,this.markup(\"span\")),i=this.markup(\"label\",t,n));const f=this.markup(\"div\",i,{className:r});e.push(f)}}if(!f&&a){var u;const t={id:`${d.id}-other`,className:`${null!==(u=d.className)&&void 0!==u?u:\"\"} other-option`,value:\"\"};let r=`formbuilder-${c}`;l&&(r+=\"-inline\");const o=Object.assign({},d,t);o.type=c;const n={type:\"text\",events:{input:e=>{const t=e.target;t.parentElement.previousElementSibling.value=t.value}},id:`${t.id}-value`,className:\"other-val\"},i=this.markup(\"input\",null,o),a=[document.createTextNode(be.mi18n(\"other\")),this.markup(\"input\",null,n)],s=this.markup(\"label\",a,{for:o.id}),f=this.markup(\"div\",[i,s],{className:r});e.push(f)}}return this.dom=\"select\"==i?this.markup(c,e,D(d,!0)):this.markup(\"div\",e,{className:i}),this.dom}groupRequired(){const e=this.element.getElementsByTagName(\"input\"),t=()=>{const t=[].some.call(e,(e=>e.checked));((e,t)=>{[].forEach.call(e,(e=>{t?e.removeAttribute(\"required\"):e.setAttribute(\"required\",\"required\"),((e,t)=>{const r=be.mi18n(\"minSelectionRequired\",1);t?e.setCustomValidity(\"\"):e.setCustomValidity(r)})(e,t)}))})(e,t)};for(let r=e.length-1;r>=0;r--)e[r].addEventListener(\"change\",t);t()}onRender(){if(this.config.userData){const t=this.config.userData.slice();\"select\"===this.config.type?e(this.dom).val(t).prop(\"selected\",!0):this.config.type.endsWith(\"-group\")&&(\"checkbox-group\"===this.config.type&&this.dom.querySelectorAll(\"input[type=checkbox]\").forEach((e=>{e.removeAttribute(\"checked\")})),this.dom.querySelectorAll(\"input\").forEach((e=>{if(!e.classList.contains(\"other-val\")){for(let r=0;r<t.length;r++)if(e.value===t[r]){e.setAttribute(\"checked\",\"checked\"),t.splice(r,1);break}if(e.id.endsWith(\"-other\")&&t.length>0){const r=this.dom.querySelector(`#${e.id}-value`);e.setAttribute(\"checked\",\"checked\"),r.value=e.value=t[0],r.style.display=\"inline-block\"}}})))}}});class He extends be{static get definition(){return{mi18n:{date:\"dateField\",file:\"fileUpload\"}}}build(){let{name:e}=this.config;e=this.config.multiple?`${e}[]`:e;const t=Object.assign({},this.config,{name:e});return this.dom=this.markup(\"input\",null,t),this.dom}onRender(){this.config.userData&&e(this.dom).val(this.config.userData[0])}}be.register([\"text\",\"file\",\"date\",\"number\"],He),be.register([\"text\",\"password\",\"email\",\"color\",\"tel\"],He,\"text\"),be.register([\"date\",\"time\",\"datetime-local\"],He,\"date\"),be.register([\"number\",\"range\"],He,\"number\");const qe=[\"value\"];class ze extends be{static get definition(){return{mi18n:{textarea:\"textArea\"}}}build(){const e=this.config,{value:t=\"\"}=e,r=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,qe);return delete r.type,this.field=this.markup(\"textarea\",this.parsedHtml(t),r),this.field}onRender(){this.config.userData&&e(this.field).val(this.config.userData[0])}on(t){return\"prerender\"==t&&this.preview?t=>{this.field&&(t=this.field),e(t).on(\"mousedown\",(e=>{e.stopPropagation()}))}:super.on(t)}}be.register(\"textarea\",ze),be.register(\"textarea\",ze,\"textarea\");const Ue=[\"value\"];ze.register(\"tinymce\",class extends ze{configure(){if(this.js=[],window.tinymce||this.js.push(\"https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js\"),this.classConfig.js){let e=this.classConfig.js;Array.isArray(e)||(e=new Array(e)),this.js=this.js.concat(e),delete this.classConfig.js}this.classConfig.css&&(this.css=this.classConfig.css),this.editorOptions={height:250,paste_data_images:!0,plugins:[\"advlist\",\"autolink\",\"lists\",\"link\",\"image\",\"charmap\",\"print\",\"preview\",\"anchor\",\"searchreplace\",\"visualblocks\",\"code\",\"fullscreen\",\"insertdatetime\",\"media\",\"table\",\"contextmenu\",\"paste\",\"code\"],toolbar:\"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | table\"}}build(){const e=this.config,{value:t=\"\"}=e,r=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,Ue);return delete r.type,this.field=this.markup(\"textarea\",this.parsedHtml(t),r),r.disabled&&(this.editorOptions.readonly=!0),this.field}onRender(){const e=window.tinymce.get(this.id);e&&window.tinymce.remove(e);const t=jQuery.extend(this.editorOptions,this.classConfig);t.target=this.field;const r=[];Number(window.tinymce.majorVersion)>=5&&r.push(\"contextmenu\"),Number(window.tinymce.majorVersion)>=6&&r.push(\"paste\",\"print\"),t.plugins=t.plugins.filter((e=>-1===r.indexOf(e)));const o=this.config.userData?this.parsedHtml(this.config.userData[0]):void 0,n=window.lastFormBuilderCopiedTinyMCE?this.parsedHtml(window.lastFormBuilderCopiedTinyMCE):void 0;window.lastFormBuilderCopiedTinyMCE=null;const i=function(e){n?e[0].setContent(n):o&&e[0].setContent(o)};setTimeout((()=>{window.tinymce.init(t).then(i)}),0)}},\"textarea\");const We=[\"value\"];function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(r),!0).forEach((function(t){Je(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Je(e,t,r){return(t=function(e){var t=function(e,t){if(\"object\"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,\"string\");if(\"object\"!=typeof o)return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return String(e)}(e);return\"symbol\"==typeof t?t:t+\"\"}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}ze.register(\"quill\",class extends ze{configure(){const e={modules:{toolbar:[[{header:[1,2,!1]}],[\"bold\",\"italic\",\"underline\"],[\"code-block\"]]},placeholder:this.config.placeholder||\"\",theme:\"snow\"},[t,r]=pe.splitObject(this.classConfig,[\"css\",\"js\"]);Object.assign(this,Ve(Ve({},{js:\"https://cdn.quilljs.com/1.2.4/quill.js\",css:\"https://cdn.quilljs.com/1.2.4/quill.snow.css\"}),t)),this.editorConfig=Ve(Ve({},e),r)}build(){const e=this.config,{value:t=\"\"}=e,r=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,We);return delete r.type,this.field=this.markup(\"div\",null,r),this.field.classList.contains(\"form-control\")&&this.field.classList.remove(\"form-control\"),this.field}onRender(e){const t=this.config.value||\"\",r=window.Quill.import(\"delta\");window.fbEditors.quill[this.id]={};const o=window.fbEditors.quill[this.id];return o.instance=new window.Quill(this.field,this.editorConfig),o.data=new r,t&&o.instance.setContents(window.JSON.parse(this.parsedHtml(t))),o.instance.on(\"text-change\",(function(e){o.data=o.data.compose(e)})),e}},\"textarea\");class Ge{constructor(e={},t=[]){this.customRegister={},this.templateControlRegister={},this.def={icon:{},i18n:{}},this.register(e,t)}register(e={},t=[]){const r=h().locale;this.def.i18n[r]||(this.def.i18n[r]={});const o=this;Object.keys(e).forEach((t=>{const r=function(r,o){this.customControl=new Re(r,o,e[t]),this.build=function(){return this.customControl.build()},this.on=function(e){return this.customControl.on(e)}};r.definition={},r.label=e=>o.label(e),r.icon=e=>o.icon(e),this.templateControlRegister[t]=r}));for(const o of t){let t=o.type;if(o.attrs=o.attrs||{},!t){if(!o.attrs.type){be.error(\"Ignoring invalid custom field definition. Please specify a type property.\");continue}t=o.attrs.type}let n=o.subtype||t;if(e[t]){const e=this.templateControlRegister[t];e.definition=o,this.customRegister[n]=jQuery.extend(o,{type:t,class:e})}else try{const e=be.getClass(t,o.subtype);n=o.datatype?o.datatype:`${t}-${Math.floor(9e3*Math.random()+1e3)}`,this.customRegister[n]=jQuery.extend(o,{type:t,class:e})}catch(e){be.error(\"Error while registering custom field: \"+t+(o.subtype?\":\"+o.subtype:\"\")+\". Unable to find any existing defined control or template for rendering.\")}this.def.i18n[r][n]=Array.isArray(o.label)?h().get(...o.label)||o.label[0]:o.label,this.def.icon[n]=o.icon}}label(e){const t=this.def;let r=t.i18n||{};r=r[h().locale]||r.default||r;const o=be.camelCase(e),n=\"object\"==typeof r?r[o]||r[e]:r;if(n)return n;{let r=t.mi18n;return\"object\"==typeof r&&(r=r[o]||r[e]),r||(r=o),h().get(r)}}get definition(){return{}}icon(e){const t=this.def;return t&&\"object\"==typeof t.icon?t.icon[e]:t.icon}getRegistered(e=!1){var t;return e?null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0:Object.keys(this.customRegister)}getClass(e){var t;return null!==(t=this.templateControlRegister[e])&&void 0!==t?t:void 0}lookup(e){return this.customRegister[e]}}var Xe=JSON.parse('{\"fn\":\"formbuilder-icon-\"}');const Qe=Xe.fn;class Ze{constructor(e,t){this.opts=e,this.dom=t.controls,this.getRegistered=be.getRegistered,this.init()}init(){this.setupControls(),this.appendControls()}setupControls(){const e=this.opts;be.loadCustom(e.controls),this.custom=new Ge(e.templates,e.fields);const t=be.getRegistered(),r=this.custom.getRegistered();r&&jQuery.merge(t,r),this.registeredSubtypes=be.getRegisteredSubtypes(),e.sortableControls&&this.dom.classList.add(\"sort-enabled\"),this.controlList=[],this.allControls={};for(let e=0;e<t.length;e++){const r=t[e];let o,n,i=this.custom.lookup(r);if(i)o=i.class,n=this.custom.label(r);else{if(i={},o=be.getClass(r),!o||!o.active(r))continue;n=o.label(r)}const l=i.icon||o.icon(r),a=l?\"\":i.iconClassName||`${Qe+r.replace(/-[\\d]{4}$/,\"\")}`;l&&(n=`<span class=\"control-icon\">${l}</span>${n}`);const s=z(\"li\",z(\"span\",n),{className:`${a} input-control input-control-${e}`});s.dataset.type=r,this.controlList.push(r),this.allControls[r]=s}e.inputSets.length&&e.inputSets.forEach(((e,t)=>{let{name:r,label:o}=e;r=r||B(o),e.icon&&(o=`<span class=\"control-icon\">${e.icon}</span>${o}`);const n=z(\"li\",z(\"span\",o),{className:`input-set-control input-set-${t}`});n.dataset.type=r,this.controlList.push(r),this.allControls[r]=n}))}orderFields(e){const t=this.opts,r=t.controlOrder.concat(e);let o;return ke()(\"sessionStorage\")&&(t.sortableControls?o=window.sessionStorage.getItem(\"fieldOrder\"):window.sessionStorage.removeItem(\"fieldOrder\")),o?(o=window.JSON.parse(o),o=Z(o.concat(e)),o=Object.keys(o).map((e=>o[e]))):o=Z(r),o.forEach((e=>{const t=new RegExp(\"-[\\\\d]{4}$\");if(e.match(t)){const r=o.indexOf(e.replace(t,\"\"));-1!==r&&(o.splice(o.indexOf(e),1),o.splice(r+1,o.indexOf(e),e))}})),t.disableFields.length&&(o=o.filter((e=>!t.disableFields.includes(e)))),o.filter(Boolean)}appendControls(){const e=document.createDocumentFragment();s(this.dom),this.orderFields(this.controlList).forEach((t=>{const r=this.allControls[t];r&&e.appendChild(r)})),this.dom.appendChild(e)}getClass(e,t){return this.custom.getClass(e)||be.getClass(e,t)}}const Ye=[\"class\",\"className\"],Ke=[\"multiple\",\"options\",\"label\",\"value\",\"class\",\"className\"],_e=[\"class\",\"className\"],et=[\"tag\",\"content\"],tt=[\"i18n\"];function rt(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){it(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function it(e,t,r){return(t=function(e){var t=function(e,t){if(\"object\"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,\"string\");if(\"object\"!=typeof o)return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return String(e)}(e);return\"symbol\"==typeof t?t:t+\"\"}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const lt=Xe.fn,{rowWrapperClass:at,colWrapperClass:st,tmpRowPlaceholderClass:dt,invisibleRowPlaceholderClass:ct}=Ce,{rowWrapperClassSelector:ft,colWrapperClassSelector:ut,tmpRowPlaceholderClassSelector:pt,invisibleRowPlaceholderClassSelector:mt}=(bt=Ce,Object.entries(bt).reduce(((e,[t,r])=>S(S({},e),{},{[`${t}Selector`]:`.${r}`})),{}));var bt;function ht(e,t,o){const n=this,i=h().current,l=`frmb-${Date.now()}`,s=new m(l),d=new u(l),c=Ae[l]={};let f=[];n.preserveTempContainers=[],n.rowWrapperClassSelector=ft,n.colWrapperClassSelector=ut,n.colWrapperClass=st,n.fieldSelector=e.enableEnhancedBootstrapGrid?ft:\"li.form-field\",(e=>{if(\"object\"!=typeof e)throw\"Invalid value given to setSanitizerConfig, expected config object\";if(e.hasOwnProperty(\"clobberingProtection\")&&[\"document\",\"form\",\"namespaceAttributes\"].forEach((t=>{e.clobberingProtection.hasOwnProperty(t)&&\"boolean\"==typeof e.clobberingProtection[t]&&(y.clobberingProtection[t]=e.clobberingProtection[t])})),e.hasOwnProperty(\"backends\")){if(\"object\"!=typeof e.backends)throw\"backends config expected to be an Object\";Object.keys(e.backends).forEach((t=>y.backends[t]=e.backends[t]))}if(e.hasOwnProperty(\"backendOrder\")){if(y.backendOrder=[],!Array.isArray(e.backendOrder))throw\"backendOrder config expected to be an Array of backend keys as strings\";e.backendOrder.forEach((e=>{if(!y.backends.hasOwnProperty(e))throw\"unknown sanitizer backend \"+e;y.backendOrder.push(e)}))}})(e.sanitizerOptions),o(t).closest(\"form\").length&&e.notify.warning(\"WARNING: FormBuilder does not support being contained with a <form> Element\"),e.layout||(e.layout=ge);const p=new e.layout(e.layoutTemplates,!0,e.disableHTMLLabels,e.controlConfig),b=new Te(l,p,n),g=z;e=b.processOptions(e),b.editorUI(l,e.controlPosition),s.formID=l,s.lastID=`${s.formID}-fld-0`;const v=new Ze(e,d);n.controls=v;const x=c.subtypes=b.processSubtypes(e.subtypes),A=o(d.stage),C=o(d.controls);let k,E,j=!1,S=!1,N=!1;function T(){return!!e.enableEnhancedBootstrapGrid}A.sortable({cursor:\"move\",opacity:.9,revert:150,beforeStop:(e,t)=>b.beforeStop.call(b,e,t),start:(e,t)=>b.startMoving.call(b,e,t),stop:(e,t)=>b.stopMoving.call(b,e,t),change:function(t,r){e.prepend&&r.placeholder.index()<1?o(\"li.form-prepend\").after(r.placeholder):e.append&&r.placeholder.index()>=A.children(\"li\").length-1&&o(\"li.form-append\").before(r.placeholder)},cancel:[\"input\",\"select\",\"textarea\",\".disabled-field\",\".form-elements\",\".btn\",\"button\",\".is-locked\"].join(\", \"),placeholder:\"frmb-placeholder hoverDropStyleInverse\"}),e.allowStageSort||A.sortable(\"disable\"),C.sortable({helper:\"clone\",opacity:.9,connectWith:`#${l}, ${ft}`,cancel:\".formbuilder-separator\",cursor:\"move\",scroll:!1,placeholder:\"hoverDropStyleInverse ui-state-highlight\",tolerance:\"pointer\",start:(e,t)=>b.startMoving.call(b,e,t),stop:(e,t)=>{b.stopMoving.call(b,e,t)},revert:150,beforeStop:(e,t)=>b.beforeStop.call(b,e,t),distance:3,change:function(t,r){e.prepend&&r.placeholder.index()<1?o(\"li.form-prepend\").after(r.placeholder):e.append&&r.placeholder.index()>=A.children(\"li\").length-1&&o(\"li.form-append\").before(r.placeholder)},update:function(t,r){if(b.doCancel)return!1;o(r.item).closest(\".stage-wrap\").length&&0===o(r.item).closest(ft).length?(b.doCancel=!0,L(r.item)):(T()&&he(),b.setFieldOrder(C),b.doCancel=!e.sortableControls)}}),C.on(\"mouseenter\",(function(){b.stageIsEmpty()||A.children(pt+\":not(:last-child)\").addClass(ct)}));const L=t=>{if(t[0].classList.contains(\"input-set-control\")){const r=[],o=e.inputSets.find((e=>B(e.name||e.label)===t[0].dataset.type));if(o&&o.showHeader){const e={type:\"header\",subtype:\"h2\",id:o.name,label:o.label};r.push(e)}r.push(...o.fields),r.forEach((e=>{W(e,!0),(b.stopIndex||0===b.stopIndex)&&b.stopIndex++}))}else W(t,!0)},I=o(d.editorWrap);o('<div class=\"snackbar\">').appendTo(I);let P=\"cb-wrap\",M=\"\";if(e.stickyControls.enable){P+=\" sticky-controls\";const e={top:0,bottom:\"auto\",right:\"auto\",left:\"auto\"},t=Object.assign({},e,c.opts.stickyControls.offset);0!==t.top&&(M=`top: ${t.top}px`)}const F=g(\"div\",d.controls,{id:`${s.formID}-cb-wrap`,className:P,style:M});e.showActionButtons&&F.appendChild(d.formActions);const U=g(\"div\",\"\",{id:`${s.formID}-gridModeHelp`,className:\"grid-mode-help\"});F.appendChild(U),I.append(d.stage,F),\"textarea\"!==t.type?o(t).append(I):o(t).replaceWith(I),o(d.controls).on(\"click\",\"li.input-control, li.input-set-control\",(({target:t})=>{b.stageIsEmpty()&&A.find(pt).eq(0).remove();const r=o(t).closest(\"li\");b.stopIndex=e.append?A.children().length-1:void 0,L(r),b.save.call(b)}));const W=(t,r=!1)=>{let n={};if(t instanceof jQuery)if(n.type=t[0].dataset.type,n.type){const e=v.custom.lookup(n.type);if(e){const t=n.type;n=Object.assign({},e),n.label=v.custom.label(t)}else{const e=v.getClass(n.type);n.label=e.label(n.type)}}else{const e=t[0].attributes;r||(n.values=t.children().map(((e,t)=>({label:o(t).text(),value:o(t).attr(\"value\"),selected:Boolean(o(t).attr(\"selected\"))}))));for(let t=e.length-1;t>=0;t--)n[e[t].name]=e[t].value}else n=Object.assign({},t);n.name||(n.name=H(n)),r&&[\"text\",\"number\",\"file\",\"date\",\"select\",\"textarea\",\"autocomplete\"].includes(n.type)&&(n.className=n.className||\"form-control\");const i=/(?:^|\\s)btn-(.*?)(?:\\s|$)/g.exec(n.className);if(i&&(n.style=i[1]),r){const e=setTimeout((()=>{document.dispatchEvent(w.fieldAdded),clearTimeout(e)}),10)}e.onAddField(s.lastID,n),me(n,r),e.onAddFieldAfter(s.lastID,n),d.stage.classList.remove(\"empty\")};n.prepFieldVars=W;const $=function(t){(t=b.getData(t))&&t.length?(t.forEach((e=>V(e))),t.forEach((e=>W(D(e)))),d.stage.classList.remove(\"empty\")):e.defaultFields&&e.defaultFields.length?(c.opts.defaultFields.forEach((e=>V(e))),b.addDefaultFields()):e.prepend||e.append||(d.stage.classList.add(\"empty\"),d.stage.dataset.content=h().get(\"getStarted\")),(()=>{const t=[],r=t=>g(\"li\",e[t],{className:`disabled-field form-${t}`});return e.prepend&&!o(\".disabled-field.form-prepend\",d.stage).length&&(t.push(!0),A.prepend(r(\"prepend\"))),e.append&&!o(\".disabled-field.form-append\",d.stage).length&&(t.push(!0),A.append(r(\"append\"))),b.disabledTT(d.stage),t.some((e=>!0===e))})()&&d.stage.classList.remove(\"empty\"),b.save()};function V(e){const t=b.getRowValue(e.className);t&&!f.includes(t)&&f.push(t)}const G=t=>{const{type:r}=t,o=[],n=v.getClass(r),i=(e=>{const t=[\"required\",\"label\",\"description\",\"placeholder\",\"className\",\"name\",\"access\",\"value\"],r=![\"header\",\"paragraph\",\"file\",\"autocomplete\"].concat(d.optionFields).includes(e),o={autocomplete:t.concat([\"options\",\"requireValidOption\"]),button:[\"label\",\"subtype\",\"style\",\"className\",\"name\",\"value\",\"access\"],checkbox:[\"required\",\"label\",\"description\",\"toggle\",\"inline\",\"className\",\"name\",\"access\",\"other\",\"options\"],text:t.concat([\"subtype\",\"maxlength\"]),date:t.concat([\"subtype\",\"min\",\"max\",\"step\"]),file:t.concat([\"multiple\"]),header:[\"label\",\"subtype\",\"className\",\"access\"],hidden:[\"name\",\"value\",\"access\"],paragraph:[\"label\",\"subtype\",\"className\",\"access\"],number:t.concat([\"subtype\",\"min\",\"max\",\"step\"]),select:t.concat([\"multiple\",\"options\"]),textarea:t.concat([\"subtype\",\"maxlength\",\"rows\"])};e in v.registeredSubtypes&&!(e in o)&&(o[e]=t.concat([\"subtype\"])),o[\"checkbox-group\"]=o.checkbox,o[\"radio-group\"]=o.checkbox;const n=o[e];return\"radio-group\"===e&&Y(\"toggle\",n),[\"header\",\"paragraph\",\"button\"].includes(e)&&Y(\"description\",n),r||Y(\"value\",n),n||t})(r),l={required:()=>pe(t),toggle:()=>re(\"toggle\",t,{first:h().get(\"toggle\")}),inline:()=>{const e={first:h().get(\"inline\"),second:h().get(\"inlineDesc\",r.replace(\"-group\",\"\"))};return re(\"inline\",t,e)},label:()=>ue(\"label\",t),description:()=>ue(\"description\",t),subtype:e=>ce(\"subtype\",t,x[r],e),style:()=>ie(t.style),placeholder:()=>ue(\"placeholder\",t),rows:()=>de(\"rows\",t),className:e=>ue(\"className\",t,e),name:e=>ue(\"name\",t,e),value:()=>ue(\"value\",t),maxlength:()=>de(\"maxlength\",t),access:()=>{const r=[`<div class=\"available-roles\" ${t.role?'style=\"display:block\"':\"\"}>`];for(a in e.roles)if(e.roles.hasOwnProperty(a)){const t=`fld-${s.lastID}-roles-${a}`,o={type:\"checkbox\",name:\"roles[]\",value:a,id:t,className:\"roles-field\"};f.includes(a)&&(o.checked=\"checked\"),r.push(`<label for=\"${t}\">`),r.push(b.input(o).outerHTML),r.push(` ${e.roles[a]}</label>`)}r.push(\"</div>\");const o={first:h().get(\"roles\"),second:h().get(\"limitRole\"),content:r.join(\"\")};return re(\"access\",t,o)},other:()=>re(\"other\",t,{first:h().get(\"enableOther\"),second:h().get(\"enableOtherMsg\")}),options:()=>function(e){const{type:t,values:r}=e;let o;const n=[g(\"a\",h().get(\"addOption\"),{className:\"add add-opt\"})],i=[g(\"label\",h().get(\"selectOptions\"),{className:\"false-label\"})],l=e.multiple||\"checkbox-group\"===t,a=e=>{const t=h().get(\"optionCount\",e);return{selected:!1,label:t,value:B(t)}};if(r&&r.length)o=r.map((e=>Object.assign({},{selected:!1},e)));else{let e=[1,2,3];[\"checkbox-group\",\"checkbox\"].includes(t)&&(e=[1]),o=e.map(a);const r=o[0];r.hasOwnProperty(\"selected\")&&\"radio-group\"!==t&&(r.selected=!0)}const s=g(\"div\",n,{className:\"option-actions\"}),d=g(\"ol\",o.map(((r,o,n,i=e.name)=>{const a=c.opts.onAddOption(r,{type:t,index:o,isMultiple:l});return Ne(i+\"-options\",a,l)})),{className:\"sortable-options\"}),f=g(\"div\",[d,s],{className:\"sortable-options-wrap\"});return i.push(f),g(\"div\",i,{className:\"form-group field-options\"}).outerHTML}(t),requireValidOption:()=>re(\"requireValidOption\",t,{first:\" \",second:h().get(\"requireValidOption\")}),multiple:()=>{const e={default:{first:\"Multiple\",second:\"set multiple attribute\"},file:{first:h().get(\"multipleFiles\"),second:h().get(\"allowMultipleFiles\")},select:{first:\" \",second:h().get(\"selectionsMessage\")}};return re(\"multiple\",t,e[r]||e.default)}};let a;const f=void 0!==t.role?t.role.split(\",\"):[];[\"min\",\"max\",\"step\"].forEach((e=>{l[e]=\"number\"===r?()=>de(e,t):()=>ue(e,t)}));const u=[\"name\",\"className\",\"subtype\"],p=Object.assign({},e.typeUserAttrs[\"*\"],e.typeUserAttrs[r]);if(Object.keys(i).forEach((t=>{const a=i[t],s=[!0],d=e.disabledAttrs.includes(a);if(e.typeUserDisabledAttrs[r]){const t=e.typeUserDisabledAttrs[r];s.push(!t.includes(a))}if(n.definition.hasOwnProperty(\"disabledAttrs\")){const e=n.definition.disabledAttrs;s.push(!e.includes(a))}if(n.definition.hasOwnProperty(\"defaultAttrs\")){const e=Object.keys(n.definition.defaultAttrs);s.push(!e.includes(a))}if(p){const e=Object.keys(p);s.push(!e.includes(a))}d&&!u.includes(a)&&s.push(!1),s.every(Boolean)&&o.push(l[a](d))})),n.definition.hasOwnProperty(\"defaultAttrs\")){const e=K(n.definition.defaultAttrs,t);o.push(e)}if(p){const e=K(p,t);o.push(e)}return o.join(\"\")};function X(e){return[[\"array\",({options:e})=>!!e],[\"boolean\",({type:e})=>\"checkbox\"===e],[typeof e.value,()=>!0]].find((t=>t[1](e)))[0]}function Z(e,t){return e.subtype&&e.subtype===t}function K(t,r){const o=[],n={array:ee,string:_,number:de,boolean:(e,t)=>{let o=!1;return\"checkbox\"===e.type?o=Boolean(!!t.hasOwnProperty(\"value\")&&t.value):r.hasOwnProperty(e)?o=r[e]:(t.hasOwnProperty(\"value\")||t.hasOwnProperty(\"checked\"))&&(o=t.value||t.checked||!1),re(e,nt(nt({},t),{},{[e]:o}),{first:i[e]})}};for(const l in t)if(t.hasOwnProperty(l)){const a=X(t[l]);if(\"undefined\"!==a){const e=h().get(l),s=Object.assign({},t[l]);let d=s.value;\"boolean\"===a?s[l]??=s.value:\"number\"===a?s[l]??=fe(r[l],d):(d??=\"\",s[l]??=r[l]||d),s.value=s[l],s.label&&(i[l]=Array.isArray(s.label)?h().get(...s.label)||s.label[0]:s.label),n[a]&&o.push(n[a](l,s)),i[l]=e}else if(\"undefined\"===a&&Z(r,l))o.push(K(t[l],r));else{const r={};r[l]=t[l],e.notify.warning(\"Warning: unable to process typeUserAttr definition : \"+JSON.stringify(r))}}return o.join(\"\")}function _(e,t){const{class:r,className:o}=t,n=rt(t,Ye);let l={id:e+\"-\"+s.lastID,title:n.description||n.label||e.toUpperCase(),name:e,type:n.type||\"text\",className:[`fld-${e}`,(r||o||\"\").trim()],value:n.hasOwnProperty(e)?n[e]:n.value||\"\"};const a=`<label for=\"${l.id}\">${i[e]||\"\"}</label>`;return[\"checkbox\",\"checkbox-group\",\"radio-group\"].includes(l.type)||l.className.push(\"form-control\"),l=Object.assign({},n,l),`<div class=\"form-group ${e}-wrap\">${a}<div class=\"input-wrap\">${(()=>{if(\"textarea\"===l.type){const e=l.value;return delete l.value,`<textarea ${R(l)}>${e}</textarea>`}return`<input ${R(l)}>`})()}</div></div>`}function ee(e,t){const{multiple:r,options:o,label:n,value:l,class:a,className:d}=t,c=rt(t,Ke),f=t.hasOwnProperty(e)?t[e]:l||[],u=Object.keys(o).map((e=>{const t={value:e},r=o[e],n=Array.isArray(r)?h().get(...r)||r[0]:r;return(Array.isArray(f)?f.includes(e):e===f)&&(t.selected=!0),g(\"option\",n,t)})),p={id:`${e}-${s.lastID}`,title:c.description||n||e.toUpperCase(),name:e,className:`fld-${e} form-control ${a||d||\"\"}`.trim()};r&&(p.multiple=!0);const m=`<label for=\"${p.id}\">${i[e]}</label>`;return Object.keys(c).forEach((function(e){p[e]=c[e]})),`<div class=\"form-group ${e}-wrap\">${m}<div class=\"input-wrap\">${g(\"select\",u,p).outerHTML}</div></div>`}const re=(e,t,r={})=>{const o=t=>g(\"label\",t,{for:`${e}-${s.lastID}`}).outerHTML,n={type:\"checkbox\",className:`fld-${e}`,name:e,id:`${e}-${s.lastID}`};t[e]&&(n.checked=!0);const i=[];let l=[g(\"input\",null,n).outerHTML];return r.first&&i.push(o(r.first)),r.second&&l.push(\" \",o(r.second)),r.content&&l.push(r.content),l=g(\"div\",l,{className:\"input-wrap\"}).outerHTML,g(\"div\",i.concat(l),{className:`form-group ${e}-wrap`}).outerHTML},ie=e=>{let t=\"\";\"undefined\"===e&&(e=\"default\");const r=`<label>${i.style}</label>`;return t+=b.input({value:e||\"default\",type:\"hidden\",className:\"btn-style\"}).outerHTML,t+='<div class=\"btn-group\" role=\"group\">',ve.btn.forEach((r=>{const o=[\"btn-xs\",\"btn\",`btn-${r}`];e===r&&o.push(\"selected\");const n=g(\"button\",h().get(`styles.btn.${r}`),{value:r,type:\"button\",className:o.join(\" \")}).outerHTML;t+=n})),t+=\"</div>\",t=g(\"div\",[r,t],{className:\"form-group style-wrap\"}),t.outerHTML},de=(e,t)=>{const{class:r,className:o}=t,n=rt(t,_e),i=Number.isNaN(n[e])?void 0:n[e],l=h().get(e)||e,a={type:\"number\",value:i,name:e,placeholder:h().get(`placeholder.${e}`),className:`fld-${e} form-control ${r||o||\"\"}`.trim(),id:`${e}-${s.lastID}`},d=b.input(D(a)).outerHTML;return g(\"div\",[`<label for=\"${a.id}\">${l}</label>`,`<div class=\"input-wrap\">${d}</div>`],{className:`form-group ${e}-wrap`}).outerHTML},ce=(e,t,r,o=!1)=>{const n=r.map(((r,o)=>{let n=Object.assign({label:`${i.option} ${o}`,value:void 0},r);return r.value===t[e]&&(n.selected=!0),n=D(n),g(\"option\",n.label,n)})),l={id:e+\"-\"+s.lastID,name:e,className:`fld-${e} form-control`},a=h().get(e)||te(e)||\"\",d=g(\"label\",a,{for:l.id}),c=g(\"select\",n,l),f=g(\"div\",c,{className:\"input-wrap\"});return g(\"div\",[d,f],{className:`form-group ${l.name}-wrap`,style:\"display: \"+(o?\"none\":\"block\")}).outerHTML},ue=(t,r,o=!1)=>{let n=r[t]||\"\",i=h().get(t)||t;\"label\"===t&&([\"paragraph\"].includes(r.type)?i=h().get(\"content\"):n=J(n));const l=h().get(`placeholders.${t}`)||\"\";let a=\"\";if(![].some((e=>!0===e))){const d={name:t,placeholder:l,className:`fld-${t} form-control`,id:`${t}-${s.lastID}`},c=g(\"label\",i,{for:d.id}).outerHTML;\"label\"!==t||e.disableHTMLLabels?\"textarea\"===r.type&&\"value\"===t?a+=g(\"textarea\",n,d).outerHTML:(d.value=n,d.type=\"text\",a+=`<input ${R(d)}>`):(d.contenteditable=!0,a+=g(\"div\",n,d).outerHTML);const f=`<div class=\"input-wrap\">${a}</div>`;let u=o?\"none\":\"block\";\"value\"===t&&(u=r.subtype&&\"quill\"===r.subtype&&\"none\"),a=g(\"div\",[c,f],{className:`form-group ${t}-wrap`,style:`display: ${u}`})}return a.outerHTML},pe=e=>{const{type:t}=e,r=[];let o=\"\";return[\"header\",\"paragraph\",\"button\"].includes(t)&&r.push(!0),r.some((e=>!0===e))||(o=re(\"required\",e,{first:h().get(\"required\")})),o},me=function(t,r=!0){const l=Se(t);s.lastID=b.incrementId(s.lastID);const a=t.type||\"text\";let c=t.label||(r?i[a]||h().get(\"label\"):\"\");var f;\"hidden\"!==a&&\"\"!==c||(c=`${null!==(f=h().get(a))&&void 0!==f?f:a}: ${t.name}`);const u=e.disabledFieldButtons[a]||t.disabledFieldButtons;let p=[g(\"a\",null,{type:\"remove\",id:\"del_\"+s.lastID,className:`del-button btn ${lt}cancel delete-confirm`,title:h().get(\"removeMessage\")}),g(\"a\",null,{type:\"edit\",id:s.lastID+\"-edit\",className:`toggle-form btn ${lt}pencil`,title:h().get(\"hide\")}),g(\"a\",null,{type:\"copy\",id:s.lastID+\"-copy\",className:`copy-button btn ${lt}copy`,title:h().get(\"copyButtonTooltip\")})];T()?p.push(g(\"a\",null,{type:\"grid\",id:s.lastID+\"-grid\",className:`grid-button btn ${lt}grid`,title:\"Grid Mode\"})):p.push(g(\"a\",null,{type:\"sort\",id:s.lastID+\"-sort-higher\",className:`sort-button sort-button-higher btn ${lt}sort-higher`,title:\"Move Higher\"}),g(\"a\",null,{type:\"sort\",id:s.lastID+\"-sort-lower\",className:`sort-button sort-button-lower btn ${lt}sort-lower`,title:\"Move Lower\"})),u&&Array.isArray(u)&&(p=p.filter((e=>!u.includes(e.type))));const m=[g(\"div\",p,{className:\"field-actions\"})],w=e.disableHTMLLabels?document.createTextNode(c):J(c);m.push(g(\"label\",w,{className:\"field-label\"})),m.push(g(\"span\",\" *\",{className:\"required-asterisk\",style:t.required?\"display:inline\":\"\"}));const y={className:\"tooltip-element\",tooltip:t.description,style:t.description?\"display:inline-block\":\"display:none\"};m.push(g(\"span\",\"?\",y));const v=g(\"div\",\"\",{className:\"prev-holder\",dataFieldId:s.lastID});m.push(v);const x=g(\"div\",[G(t),g(\"a\",h().get(\"close\"),{className:\"close-field\"})],{className:\"form-elements\"}),C=g(\"div\",x,{id:`${s.lastID}-holder`,className:\"frm-holder\",dataFieldId:s.lastID});n.currentEditPanel=C,m.push(C);const O=g(\"li\",m,{class:`${a}-field form-field`,type:a,id:s.lastID}),E=o(O);let D;if(be(E),E.data(\"fieldData\",{attrs:t}),void 0!==b.stopIndex?o(d.stage).children().eq(b.stopIndex).before(E):A.append(E),o(\".sortable-options\",E).sortable({update:()=>b.updatePreview(E)}),b.updatePreview(E),T()){const t=`div.row-${l.rowUniqueId}`;let r=!1;A.children(t).length?D=A.children(t):(D=g(\"div\",null,{id:`${O.id}-row`,className:`row row-${l.rowUniqueId} ${at}`}),r=!0),j&&S&&(k.attr(\"id\",D.id),k.attr(\"class\",D.className),k.attr(\"style\",\"\"),k.attr(\"data-row-id\",l.rowUniqueId),D=k);const n=g(\"div\",null,{id:`${O.id}-cont`,className:`${l.columnSize} ${st}`});j&&N&&(\"true\"===k.attr(\"prepend\")?o(n).prependTo(D):o(n).insertAfter(`#${k.attr(\"appendAfter\")}`)),N||o(n).appendTo(D),!j&&r&&E.after(D),E.appendTo(n),r&&(xe(D),he(),we(D),e.enableColumnInsertMenu&&(o(D).off(\"mouseenter\"),o(D).on(\"mouseenter\",(function(e){ke(o(e.currentTarget))})),o(D).off(\"mouseleave\"),o(D).on(\"mouseleave\",(function(e){je(o(e.currentTarget))})))),ke(D,!0),l.addedDefaultColumnClass&&E.attr(\"addedDefaultColumnClass\",!0),b.tmpCleanPrevHolder(o(v))}e.typeUserEvents[a]&&e.typeUserEvents[a].onadd?e.typeUserEvents[a].onadd(O):e.typeUserEvents[\"*\"]&&e.typeUserEvents[\"*\"].onadd&&e.typeUserEvents[\"*\"].onadd(O),r&&(e.editOnAdd&&(b.closeAllEdit(),b.toggleEdit(s.lastID,!1)),O.scrollIntoView&&e.scrollToFieldOnAdd&&O.scrollIntoView({behavior:\"smooth\"})),T()&&j&&N&&Be(D,!0),j=!1,S=!1,N=!1};function be(e){T()&&e.mouseenter((function(e){Pe||(Le=o(this),Re=e.pageX,Ie=e.pageY)}))}function he(){A.find(pt+\":not(:last-child)\").css(\"height\",\"1px\").addClass(ct)}function we(e){const t=o(e).clone();if(t.addClass(ct).addClass(dt).html(\"\"),t.css(\"height\",\"1px\"),t.attr(\"class\",t.attr(\"class\").replace(\"row-\",\"\")),t.removeAttr(\"id\"),0===o(e).index()){const e=o(t).clone();A.prepend(e),xe(e)}t.insertAfter(o(e)),xe(t),A.find(ft+\":last-of-type\").removeClass(ct)}function ye(){A.children(pt).remove(),A.children(ft).each(((e,t)=>{we(o(t))})),A.find(ft+\":last-of-type\").removeClass(ct)}function xe(e){if(!T())return;o(e).sortable({connectWith:[ft],cursor:\"move\",opacity:.9,revert:150,distance:3,tolerance:\"pointer\",helper:function(e,t){const r=t.clone();return r.find(\".field-actions\").remove(),r.css({width:\"20%\",height:\"100px\",minHeight:\"60px\",overflow:\"hidden\"}),r},over:function(e){const t=o(e.target),r=t.hasClass(dt);r||Ee(t),t.addClass(\"hoverDropStyleInverse\"),r||(he(),t.prev(pt).removeClass(ct).css(\"height\",\"40px\"),t.next(pt).removeClass(ct).css(\"height\",\"40px\"))},out:function(e){A.children(pt).removeClass(\"hoverDropStyleInverse\"),o(e.target).removeClass(\"hoverDropStyleInverse\")},placeholder:\"hoverDropStyleInverse\",receive:function(e,t){const r=o(t.sender).attr(\"id\")===C.attr(\"id\"),n=o(t.item).parent().hasClass(dt),i=!n&&o(t.item).parent().hasClass(at);if(n)if(r)S=!0,j=!0,k=o(t.item).parent();else{const e=o(t.item),r=Se({}),n=g(\"div\",null,{id:`${e.find(\"li\").attr(\"id\")}-row`,className:`row row-${r.rowUniqueId} ${at}`});o(t.item).parent().replaceWith(n),be(o(t.item)),e.appendTo(n),xe(n),b.syncFieldWithNewRow(e[0],e.closest(ft)[0])}if(i&&r){k=o(t.item).prev().hasClass(\"btnAddControl\")?o(t.item).prev():o(t.item).next().hasClass(\"btnAddControl\")?o(t.item).next():o(t.item).attr(\"prepend\",\"true\");const e=b.getRowClass(o(t.item).parent().attr(\"class\"));k.addClass(e),N=!0,j=!0,b.stopIndex=void 0}j&&(b.doCancel=!0,L(t.item),b.save.call(b)),Fe(),ye();const l=o(t.item).find(\"li\");l.length&&(Ce(l),Oe(l),b.tmpCleanPrevHolder(o(t.item).find(\".prev-holder\")))},start:(e,t)=>{A.addClass(\"__preventColButtons\"),Ee(t.item.closest(ft))},stop:(e,t)=>{A.removeClass(\"__preventColButtons\"),A.children(pt).removeClass(\"hoverDropStyleInverse\"),Fe(),Be(t.item.closest(ft),!0)},update:(e,t)=>{b.syncFieldWithNewRow(t.item,o(t.item).closest(ft)[0])}});const t=b.getRowValue(e.className);\"0\"!==t&&o(e).attr(\"data-row-id\",t)}function Ce(e){const t=e.find('textarea[type=\"tinymce\"]');t.length&&(window.lastFormBuilderCopiedTinyMCE=window.tinymce.get(t.attr(\"id\")).save())}function Oe(e){b.updatePreview(e),b.save.call(b)}function ke(t,r=!1){if(!e.enableColumnInsertMenu||A.hasClass(\"__preventColButtons\"))return;o(t).children(\"button.btnAddControl\").remove();const n=o(t).children(ut);n.each(((e,t)=>{const i=o(t);i.addClass(\"colWithInsertButtons\"),0===n.index(i)&&o(`<button type=\"button\" class=\"formbuilder-icon-plus btnAddControl ${b.getRowClass(i.parent().attr(\"class\"))}\" prepend=\"true\" style='visibility: ${r?\"hidden\":\"visible\"}'></button>`).insertBefore(i),o(`<button type=\"button\" class=\"formbuilder-icon-plus btnAddControl ${b.getRowClass(i.parent().attr(\"class\"))}\" appendAfter=\"${i.attr(\"id\")}\" style='visibility: ${r?\"hidden\":\"visible\"}'></button>`).insertAfter(i)}))}function Ee(e){e.find(\"button.btnAddControl\").remove(),e.find(ut).removeClass(\"colWithInsertButtons\")}function je(e){e.find(\"button.btnAddControl\").css(\"visibility\",\"hidden\")}function Se(t){if(!T())return{};const r=b.tryParseColumnInfo(t);if(!r.rowUniqueId){if(j&&N)r.rowUniqueId=b.getRowValue(k.attr(\"class\"));else{let e;if(0===f.length)e=1;else{const t=f.filter((e=>!isNaN(e)&&!isNaN(parseInt(e)))).map((e=>parseInt(e)));e=Math.max(...t,0)+1}r.rowUniqueId=e.toString()}r.columnSize=e.defaultGridColumnClass,t.className||(t.className=\"\"),t.className+=` row-${r.rowUniqueId} ${r.columnSize}`,r.addedDefaultColumnClass=!0}return f.includes(r.rowUniqueId)||f.push(r.rowUniqueId),r}const Ne=function(e,t,r){const o={selected:r?\"checkbox\":\"radio\"},n={boolean:(t,r)=>{const n={value:t,type:o[r]||\"checkbox\"};return t&&(n.checked=!!t),n.name=e,[\"input\",null,n]},number:e=>[\"input\",null,{value:e,type:\"number\"}],string:(e,t)=>[\"input\",null,{value:e,type:\"text\",placeholder:h().get(`placeholder.${t}`)||\"\"}],array:e=>[\"select\",e.map((({label:e,value:t})=>g(\"option\",e,{value:t})))],object:e=>{let{tag:t,content:r}=e;return[t,r,rt(e,et)]}};t=nt(nt({},{selected:!1,label:\"\",value:\"\"}),t);const i=Object.entries(t).map((([e,t])=>{const r=q(t),[o,i,l]=n[r](t,e),a=`option-${e} option-attr`;return l[\"data-attr\"]=e,l.className=l.className?`${l.className} ${a}`:a,g(o,i,l)})),l={className:`remove btn ${lt}cancel`,title:h().get(\"removeMessage\")};return i.push(g(\"a\",null,l)),g(\"li\",i).outerHTML},De=[\".form-elements input\",\".form-elements select\",\".form-elements textarea\"].join(\", \");A.on(\"change blur keyup click\",De,r()((e=>{if(e){if([({type:e,target:t})=>\"keyup\"===e&&\"className\"===t.name].some((t=>t(e))))return!1;Oe(o(e.target).closest(\".form-field\"))}}),333,{leading:!1})),A.on(\"click touchstart\",\".remove\",(t=>{const r=o(t.target).parents(\".form-field:eq(0)\"),n=r[0],i=n.getAttribute(\"type\"),l=o(t.target.parentElement);t.preventDefault(),n.querySelector(\".sortable-options\").childNodes.length<=2&&!i.includes(\"checkbox\")?e.notify.error(\"Error: \"+h().get(\"minOptionMessage\")):l.slideUp(\"250\",(()=>{l.remove(),Oe(r)}))})),A.on(\"touchstart\",\"input\",(e=>{const t=o(e.target);if(!0===e.handled)return!1;if(\"checkbox\"===t.attr(\"type\"))t.trigger(\"click\");else{t.focus();const e=t.val();t.val(e)}})),A.on(\"click touchstart\",\".toggle-form, .close-field\",(function(e){if(e.stopPropagation(),e.preventDefault(),!0===e.handled)return!1;{const t=o(e.target).parents(\".form-field:eq(0)\").attr(\"id\");b.toggleEdit(t),e.handled=!0}})),A.on(\"dblclick\",\"li.form-field\",(e=>{if(![\"select\",\"input\",\"label\",\"textarea\"].includes(e.target.tagName.toLowerCase())&&!0!==e.target.isContentEditable&&(e.stopPropagation(),e.preventDefault(),!0!==e.handled)){const t=o(e.target).closest(\"li.form-field\").attr(\"id\");b.toggleEdit(t),e.handled=!0}})),A.on(\"change\",'[name=\"subtype\"]',(e=>{const t=o(e.target).closest(\"li.form-field\");o(\".value-wrap\",t).toggle(\"quill\"!==e.target.value)})),A.on(\"change\",'[name=\"name\"]',(t=>{const r=t.target.value;(e=>{const t=document,r=document.createElement(\"form\");return e in t||e in r})(r)&&e.notify.error(\"Potential for Dom Clobbering with field name \"+r)})),A.on(\"change\",[\".prev-holder input\",\".prev-holder select\",\".prev-holder textarea\"].join(\", \"),(e=>{let t;if(e.target.classList.contains(\"other-option\"))return;const r=ne(e.target,\".form-field\");if([\"select\",\"checkbox-group\",\"radio-group\"].includes(r.type)){const o=r.getElementsByClassName(\"option-value\");\"select\"===r.type?Q(o,(t=>{o[t].parentElement.childNodes[0].checked=e.target.value===o[t].value})):(t=document.getElementsByName(e.target.name),Q(t,(e=>{t[e].classList.contains(\"other-option\")||(o[e].parentElement.childNodes[0].checked=t[e].checked)})))}else{const t=document.getElementById(\"value-\"+r.id);t&&(t.value=e.target.value)}b.save.call(b)})),oe(d.stage,\"keyup change\",(({target:e})=>{if(!e.classList.contains(\"fld-label\"))return;const t=e.value||e.innerHTML,r=ne(e,\".form-field\").querySelector(\".field-label\");O(r,J(t),c.opts.disableHTMLLabels)})),A.on(\"keyup\",\"input.error\",(({target:e})=>o(e).removeClass(\"error\"))),A.on(\"keyup\",'input[name=\"description\"]',(function(e){const t=o(e.target).parents(\".form-field:eq(0)\"),r=o(\".tooltip-element\",t),n=o(e.target).val();if(\"\"!==n)if(r.length)r.attr(\"tooltip\",n).css(\"display\",\"inline-block\");else{const e=`<span class=\"tooltip-element\" tooltip=\"${n}\">?</span>`;o(\".field-label\",t).after(e)}else r.length&&r.css(\"display\",\"none\")})),A.on(\"change\",\".fld-multiple\",(e=>{const t=e.target.checked?\"checkbox\":\"radio\",r=o(\".option-selected\",o(e.target).closest(\".form-elements\"));return r.each((e=>r[e].type=t)),t})),A.on(\"blur\",\"input.fld-name\",(function(e){e.target.value=le(e.target.value),\"\"===e.target.value?o(e.target).addClass(\"field-error\").attr(\"placeholder\",h().get(\"cannotBeEmpty\")):o(e.target).removeClass(\"field-error\")})),A.on(\"blur\",\"input.fld-maxlength, input.fld-rows\",(e=>{e.target.value=ae(e.target.value)})),A.on(\"click touchstart\",\".btnAddControl\",(function(e){const t=o(e.currentTarget);E=C.clone(),E.hover((function(){}),(function(){E.remove()})),E.on(\"click\",\"li\",(({target:e})=>{N=!0,j=!0,k=t;const r=o(e).closest(\"li\");b.stopIndex=void 0,L(r),b.save.call(b),E.remove()})),A.append(E),0==t.index()?E.css({position:\"fixed\",left:t.offset().left,top:t.offset().top-o(window).scrollTop()}):E.css({position:\"fixed\",left:t.offset().left-80,top:t.offset().top-o(window).scrollTop()});const r=E.offset().top+E.outerHeight(),n=o(window).scrollTop()+o(window).innerHeight();r>n&&E.css({top:parseInt(E.css(\"top\"))-(r-n)})})),A.on(\"click\",`.${lt}copy`,(function(t){t.preventDefault();const r=o(t.target).parent().parent(\"li\"),n=function(t){s.lastID=b.incrementId(s.lastID),Ce(t);const r=t.attr(\"id\"),n=t.attr(\"type\"),i=n+\"-\"+(new Date).getTime(),l=t.clone();return o(\".fld-name\",l).val(i),l.find(\"[id]\").each(((e,t)=>{t.id=t.id.replace(r,s.lastID)})),l.find(\"[for]\").each(((e,t)=>{const o=t.getAttribute(\"for\").replace(r,s.lastID);t.setAttribute(\"for\",o)})),t.find(\"select\").each((function(e){l.find(\"select\").eq(e).val(o(this).val())})),l.attr(\"id\",s.lastID),l.attr(\"name\",i),l.addClass(\"cloned\"),o(\".sortable-options\",l).sortable(),e.typeUserEvents[n]&&e.typeUserEvents[n].onclone?e.typeUserEvents[n].onclone(l[0]):e.typeUserEvents[\"*\"]&&e.typeUserEvents[\"*\"].onclone&&e.typeUserEvents[\"*\"].onclone(l[0]),l}(r);T()?function(e,t){const r=o(`#className-${t.attr(\"id\")}`),n=Se({}),i=g(\"div\",null,{id:`${e.attr(\"id\")}-row`,className:`row row-${n.rowUniqueId} ${at}`}),l=g(\"div\",null,{id:`${e.attr(\"id\")}-cont`,className:`${b.getBootstrapColumnClass(r.val())} ${st}`});let a;o(l).appendTo(i),t.parent().is(\"div\")?a=t.closest(ft):t.parent().is(\"ul\")&&(a=t),o(i).insertAfter(a),e.appendTo(l),xe(i),ye(),b.syncFieldWithNewRow(e[0],e.closest(ft)[0])}(n,r):n.insertAfter(r),Oe(n),b.tmpCleanPrevHolder(n.find(\".prev-holder\")),e.editOnAdd&&b.closeField(s.lastID,!1)})),T()&&A.on(\"stageEmptied\",(()=>{f=[]})),A.on(\"click\",\".delete-confirm\",(t=>{t.preventDefault();const r=t.target.getBoundingClientRect(),n=document.body.getBoundingClientRect(),i={pageX:r.left+r.width/2,pageY:r.top-n.top-12},l=o(t.target).parents(\".form-field:eq(0)\").attr(\"id\"),a=o(document.getElementById(l));if(document.addEventListener(\"modalClosed\",(function(){a.removeClass(\"deleting\")}),!1),e.fieldRemoveWarn){const e=g(\"h3\",h().get(\"warning\")),t=g(\"p\",h().get(\"fieldRemoveWarning\"));b.confirm([e,t],(()=>b.removeField(l)),i),a.addClass(\"deleting\")}else b.removeField(l)}));let Le,Re,Ie,Pe=!1,Me=0;function Be(e,t=!1){const r=e.children(`div${ut}`).length,n=Math.floor(12/r);e.children(`div${ut}`).each(((e,r)=>{const i=o(`#${r.id}`);t||\"true\"!=i.find(\"li\").attr(\"manuallyChangedDefaultColumnClass\")?b.syncBootstrapColumnWrapperAndClassProperty(r.id.replace(\"-cont\",\"\"),n):b.showToast(`Preserving column size of field ${e+1} because you had personally adjusted it`,4e3)}))}function Fe(){A.find(ut).each(((e,t)=>{const r=o(t);r.is(\":empty\")&&!n.preserveTempContainers.includes(r.attr(\"id\"))&&r.remove()})),A.children(ft).not(pt).each(((e,t)=>{if(0===o(t).children(ut).length){const e=b.getRowValue(o(t).attr(\"class\"));f=f.filter((t=>t!==e)),o(t).remove()}else ke(o(t),!0)}))}function He(e=!0){if(e)Pe=!0,b.showToast(\"Starting Grid Mode - Use the mousewheel to resize.\",1500),C.css(\"display\",\"none\"),o(d.formActions).css(\"display\",\"none\"),o(U).html(\"\\n <div style='padding:5px'>\\n <h3 class=\\\"text text-center\\\">Grid Mode</h3> \\n \\n <table style='border-spacing:7px;border-collapse: separate'>\\n <thead>\\n <tr>\\n <th>Action</th>\\n <th>Result</th>\\n </tr>\\n </thead>\\n <tbody>\\n <tr>\\n <td><kbd>MOUSEWHEEL</kbd></td>\\n <td>Adjust the field column size</td>\\n </tr> \\n <tr>\\n <td><kbd>W or ↑</kbd></td> \\n <td>Move entire row up</td>\\n </tr>\\n <tr>\\n <td><kbd>S or ↓</kbd></td> \\n <td>Move entire row down</td>\\n </tr>\\n <tr>\\n <td><kbd>A or ←</kbd></td>\\n <td>Move field left within the row</td>\\n </tr>\\n <tr>\\n <td><kbd>D or →</kbd></td> \\n <td>Move field right within the row</td>\\n </tr>\\n <tr>\\n <td><kbd>R</kbd></td> \\n <td>Resize all fields within the row to be maximally equal</td>\\n </tr>\\n <tr>\\n </tbody> \\n </table>\\n\\n <h5 class=\\\"text text-center\\\" style='padding-top:10px'>Current Row Fields</h5> \\n \\n <table class='gridHelpCurrentRow'>\\n <colgroup>\\n <col width=\\\"100%\\\" />\\n <col width=\\\"0%\\\" />\\n </colgroup>\\n \\n <thead>\\n <tr>\\n <th>Field</th>\\n <th>Size</th>\\n </tr>\\n </thead>\\n\\n <tbody>\\n </tbody> \\n </table>\\n \\n </div>\\n \"),qe(),b.closeAllEdit(),b.toggleHighlight(Le),he();else{b.showToast(\"Grid Mode Finished\",1500);const e=Le.closest(ft);let t=0;e.children(`div${ut}`).each(((e,r)=>{const n=o(`#${r.id}`).find(\"li\").attr(\"id\");t+=b.getBootstrapColumnValue(o(`#${n}-cont`).attr(\"class\"))})),t>12&&Be(e,!0),Pe=!1,Le=null,o(U).empty(),C.css(\"display\",\"unset\"),o(d.formActions).css(\"display\",\"unset\")}}function qe(){o(U).find(\".gridHelpCurrentRow tbody\").empty(),Le.closest(ft).children(`div${ut}`).each(((e,t)=>{const r=o(`#${t.id}`).find(\"li\").attr(\"id\"),n=o(`#${r}`),i=n.attr(\"type\");let l=o(`#label-${r}`).html();\"hidden\"!==i&&\"paragraph\"!==i||(l=o(`#name-${r}`).val()),l||(l=n.attr(\"id\"));let a=\"\";Le.attr(\"id\")===r&&(a=\"currentGridModeFieldHighlight\"),o(U).find(\".gridHelpCurrentRow tbody\").append(`\\n <tr>\\n <td class='grid-mode-help-row1 ${a}'>${l}</td>\\n <td class='grid-mode-help-row2 ${a}'>\\n ${b.getBootstrapColumnValue(o(`#${r}-cont`).attr(\"class\"))}\\n </td>\\n <tr>\\n `)}))}if(A.on(\"click touchstart\",\".grid-button\",(e=>{e.preventDefault();const t=o(e.target).parents(\".form-field:eq(0)\").attr(\"id\");Le=o(document.getElementById(t)),Re=e.pageX,Ie=e.pageY,Me=0,He()})),A.on(\"wheel\",(function(e){if(0!==e.originalEvent.deltaY&&Pe){e.preventDefault(),Me+=e.originalEvent.deltaY;const t=120;if(Me>0&&Me<t||Me<0&&Me>-t)return;const r=Le.closest(\"div\"),n=b.getBootstrapColumnValue(r.attr(\"class\")),i=Math.round(Me/t);Me%=t;const l=n+i;if(l>12)return void b.showToast('<b class=\"formbuilder-required\">Column Size cannot exceed 12</b>');if(l<1)return void b.showToast('<b class=\"formbuilder-required\">Column Size cannot be less than 1</b>');const a=Le.closest(ft);let s=l;if(a.children(`div${ut}`).each(((e,t)=>{const r=o(`#${t.id}`).find(\"li\").attr(\"id\");r!=Le.attr(\"id\")&&(s+=b.getBootstrapColumnValue(o(`#${r}-cont`).attr(\"class\")))})),s>12)return void b.showToast('<b class=\"formbuilder-required\">There is a maximum of 12 columns per row</b>');b.syncBootstrapColumnWrapperAndClassProperty(Le.attr(\"id\"),l),Le.attr(\"manuallyChangedDefaultColumnClass\",!0),qe(),b.toggleHighlight(Le)}})),o(document).keydown((e=>{if(Pe){e.preventDefault();const t=Le.closest(ft);switch(event.code){case\"KeyW\":case\"ArrowUp\":Ee(t),function(e){const t=e.prevAll().not(pt).not(\".form-prepend\").first();t.length&&(o(Le.parent().parent()).swapWith(t),b.toggleHighlight(Le))}(t);break;case\"KeyS\":case\"ArrowDown\":Ee(t),function(e){const t=e.nextAll().not(mt).not(\".form-append\").first();t.length&&(o(Le.parent().parent()).swapWith(t),b.toggleHighlight(Le))}(t);break;case\"KeyA\":case\"ArrowLeft\":Ee(t),function(){const e=Le.parent().prev();e.length&&Le.parent().after(e),b.toggleHighlight(Le)}();break;case\"KeyD\":case\"ArrowRight\":Ee(t),function(){const e=Le.parent().next();e.length&&Le.parent().before(e),b.toggleHighlight(Le)}();break;case\"KeyR\":Ee(t),Be(t,!0),ke(t,!0)}qe(),je(t)}})),o(document).mousemove((e=>{Pe&&b.getDistanceBetweenPoints(Re,Ie,e.pageX,e.pageY)>c.opts.cancelGridModeDistance&&He(!1)})),o(document).on(\"checkRowCleanup\",((e,t)=>{Fe();const r=o(`#${t.rowWrapperID}`);r.length&&Be(r,!0)})),o(document).on(\"fieldOpened\",((e,t)=>{const r=o(`#${t.rowWrapperID}`);r.length&&je(r)})),A.on(\"click\",\".field-actions .sort-button\",(function(e){e.preventDefault();const t=o(e.target).parent().parent(\"li\");let r;o(e.target).hasClass(\"sort-button-higher\")?(r=t.prev(\"li\"),r.length&&!r.hasClass(\"form-prepend\")&&t.insertBefore(r)):(r=t.next(\"li\"),r.length&&!r.hasClass(\"form-append\")&&t.insertAfter(r)),b.toggleHighlight(t)})),A.on(\"click\",\".style-wrap button\",(e=>{const t=o(e.target),r=t.closest(\".form-elements\"),n=t.val(),i=o(\".btn-style\",r);i.val(n),t.siblings(\".btn\").removeClass(\"selected\"),t.addClass(\"selected\"),Oe(i.closest(\".form-field\"))})),A.on(\"click\",\".fld-required\",(e=>{o(e.target).closest(\".form-field\").find(\".required-asterisk\").toggle()})),A.on(\"click\",\"input.fld-access\",(function(e){const t=o(e.target).closest(\".form-field\").find(\".available-roles\"),r=o(e.target);t.slideToggle(250,(function(){r.is(\":checked\")||o(\"input[type=checkbox]\",t).removeAttr(\"checked\")}))})),A.on(\"click\",\".add-opt\",(function(e){e.preventDefault();const t=o(e.target).closest(\".form-field\").attr(\"type\"),r=o(e.target).closest(\".field-options\"),n=o('[name=\"multiple\"]',r),i=o(\".option-selected:eq(0)\",r),l=n.length?n.prop(\"checked\"):\"checkbox\"===i.attr(\"type\"),a=o(\".sortable-options\",r),s=c.opts.onAddOption({selected:!1,label:\"\",value:\"\"},{type:t,index:a.children().length,isMultiple:l});a.append(Ne(i.attr(\"name\"),s,l))})),A.on(\"mouseover mouseout\",\".remove, .del-button\",(e=>o(e.target).closest(\"li\").toggleClass(\"delete\"))),$(),!0===e.disableInjectedStyle){const e=document.getElementsByClassName(\"formBuilder-injected-style\");Q(e,(t=>a(e[t])))}else\"bootstrap\"===e.disableInjectedStyle&&d.editorWrap.classList.remove(\"formbuilder-embedded-bootstrap\");return document.dispatchEvent(w.loaded),n.actions={getFieldTypes:t=>t?se(v.getRegistered(),e.disableFields):v.getRegistered(),clearFields:()=>b.removeAllFields(d.stage),showData:b.showData.bind(b),save:e=>{const t=b.save(e),r=window.JSON.parse(t);return c.opts.onSave(r),r},addField:(e,t)=>{b.stopIndex=s.formData.length?t:void 0,W(e)},removeField:b.removeField.bind(b),getData:b.getFormData.bind(b),setData:e=>{b.stopIndex=void 0,b.removeAllFields(d.stage),$(e)},setLang:e=>h().setCurrent.call(h(),e).then((()=>{d.stage.dataset.content=h().get(\"getStarted\"),v.init(),d.empty(d.formActions),b.formActionButtons().forEach((e=>d.formActions.appendChild(e)))})),showDialog:b.dialog.bind(b),toggleFieldEdit:e=>{(Array.isArray(e)?e:[e]).forEach((e=>{[\"number\",\"string\"].includes(typeof e)&&(\"number\"==typeof e?e=d.stage.children[e].id:/^frmb-/.test(e)||(e=d.stage.querySelector(e).id),b.toggleEdit(e))}))},toggleAllFieldEdit:()=>{Q(d.stage.children,(e=>{b.toggleEdit(d.stage.children[e].id)}))},closeAllFieldEdit:b.closeAllEdit.bind(b),getCurrentFieldId:()=>s.lastID},d.onRender(d.controls,(()=>{const e=setTimeout((()=>{d.stage.style.minHeight=`${d.controls.clientHeight}px`,clearTimeout(e)}),0)})),n}const gt=function(e,t){const r=this,o=jQuery.extend({},ye,e,!0),{i18n:n}=o,i=rt(o,tt);this.i18nOpts=jQuery.extend({},xe,n,!0);const l=()=>{console.error(\"formBuilder is still initialising\"),console.info(\"See https://formbuilder.online/docs/formBuilder/actions/getData/#wont-work and https://formbuilder.online/docs/formBuilder/promise/ for more information on formBuilder asynchronous loading\")};this.instance={actions:[\"getFieldTypes\",\"addField\",\"clearFields\",\"closeAllFieldEdit\",\"getData\",\"removeField\",\"save\",\"setData\",\"setLang\",\"showData\",\"showDialog\",\"toggleAllFieldEdit\",\"toggleFieldEdit\",\"getCurrentFieldId\"].reduce(((e,t)=>(e[t]=l,e)),{}),markup:z,get formData(){return r.instance.actions.getData!==l&&r.instance.actions.getData(\"json\")},promise:new Promise((function(e,o){h().init(r.i18nOpts).then((()=>{const o=new ht(i,t[0],jQuery);jQuery(t[0]).data(\"formBuilder\",o),Object.assign(r.instance,o.actions),r.instance.actions=o.actions,delete r.instance.promise,e(r.instance)})).catch((e=>{o(e),i.notify.error(e)}))}))}};jQuery.fn.formBuilder=function(e={},...t){if(\"string\"!=typeof e){const t=new gt(e,this);return this.data(\"fbInstance\",t.instance),t.instance}{const r=this.data(\"fbInstance\");if(r[e])return\"function\"==typeof r[e]?r[e].apply(this,t):r[e]}}}()}()}(jQuery);"]}