(function(n){n.fn.tinyscrollbar=function(t){function b(){r.obj.bind("mousedown",k);u.obj.bind("mouseup",p);t.scroll&&this.addEventListener?(a[0].addEventListener("DOMMouseScroll",y,!1),a[0].addEventListener("mousewheel",y,!1)):t.scroll&&(a[0].onmousewheel=y)}function k(t){return v.start=f?t.pageX:t.pageY,c.start=parseInt(r.obj.css(h)),n(document).bind("mousemove",p),n(document).bind("mouseup",l),r.obj.bind("mouseup",l),!1}function y(u){if(!(i.ratio>=1)){u=n.event.fix(u||window.event);var f=u.wheelDelta?u.wheelDelta/120:-u.detail/3;e-=f*t.wheel;e=Math.min(i[t.axis]-o[t.axis],Math.max(0,e));r.obj.css(h,e/s.ratio);i.obj.css(h,-e);u.preventDefault()}}function l(){return n(document).unbind("mousemove",p),n(document).unbind("mouseup",l),r.obj.unbind("mouseup",l),!1}function p(n){return i.ratio>=1||(c.now=Math.min(u[t.axis]-r[t.axis],Math.max(0,c.start+((f?n.pageX:n.pageY)-v.start))),e=c.now*s.ratio,i.obj.css(h,-e),r.obj.css(h,c.now)),!1}var t=n.extend({axis:"y",wheel:40,scroll:!0},t),a=n(this),o={obj:n(".viewport",this)},i={obj:n(".overview",this)},s={obj:n(".scrollbar",this)},u={obj:n(".track",s.obj)},r={obj:n(".thumb",s.obj)},f=t.axis=="x",h=f?"left":"top",w=f?"width":"height",e=0,c={start:0,now:0},v={};return this.length>1?(this.each(function(){n(this).tinyscrollbar(t)}),this):(this.initialize=function(){this.update();b()},this.update=function(){o[t.axis]=f?o.obj[0].offsetWidth:o.obj[0].offsetHeight;i[t.axis]=f?i.obj[0].scrollWidth:i.obj[0].scrollHeight;i.ratio=o[t.axis]/i[t.axis];s.obj.toggleClass("disable",i.ratio>=1);v.start=r.obj.offset()[h];u.obj.css(w,o[t.axis]);u[t.axis]=f?u.obj[0].offsetWidth:u.obj[0].offsetHeight;r[t.axis]=Math.min(u[t.axis],Math.max(0,u[t.axis]*i.ratio));r.obj.css(w,r[t.axis]);s.ratio=i[t.axis]/u[t.axis]},this.initialize())}})(jQuery);var CivicWeb=CivicWeb||{};CivicWeb.Document=CivicWeb.Document||{};CivicWeb.Document.AgendaNotes=function(n){var ii=n.isLoggedIn,ut=n.userId,d=n.documentId,a=n.localization,g=n.agendaSe,bi=window.CivicWeb.Documents.SplitscreenPage.toggleNotesClientId,ki=window.CivicWeb.Documents.SplitscreenPage.printNotesClientId,di=window.CivicWeb.Documents.SplitscreenPage.agendaButtonClientId,gi=window.CivicWeb.Documents.SplitscreenPage.toolbarClientId,w="parentIframe",nr=window.CivicWeb.Documents.SplitscreenPage.agendaFrameClientId,tr=window.CivicWeb.Documents.SplitscreenPage.agendaPaneClientId,ir=window.CivicWeb.Documents.SplitscreenPage.attachmentFrameClientId,ri=window.CivicWeb.Documents.SplitscreenPage.attachmentPaneClientId,t=$(document.getElementById(w)).length?$(document.getElementById(w)).contents():$(document),o=t.find("iframe#"+nr),ft=t.find("div#"+tr),i=o.contents(),r=t.find("iframe#"+ir),e=t.find("div#"+ri),h=t.find("#"+bi),ct=t.find("#"+ki),ui=t.find("#"+di),lt=t.find("#"+gi),k="agenda-notes-editor",at="agenda-notes-editor-header",et="toogle-agenda-notes-editor",y="agenda-notes-editor-textarea",vt="note-",yt="agenda-notes-user:"+ut+"-document:-"+d,nt="saved-notes-notification",p=[],u=null,s="false",f=null,pt=null,fi,c=1,v=null,wt,l=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1,tt=/android/i.test(navigator.userAgent.toLowerCase()),rr=/msie/.test(navigator.userAgent.toLowerCase())||/trident/.test(navigator.userAgent.toLowerCase())||/edge/.test(navigator.userAgent.toLowerCase()),it={expandIcon:"glyphicon-chevron-up",collapseIcon:"glyphicon-chevron-down"},ur="/Main.html",ot=!0,ei=function(n){var t,i;s==="true"&&($(n.target).attr("data-type")==="ItemAttachment"||ot?$(n.target).attr("data-type")==="ItemAttachment"&&r.get(0).src!==window.location.protocol+"//"+window.location.host+$(n.target).attr("data-id")&&(t=$(n.target).attr("data-id"),l?rt(t):r.get(0).src=t):(ot=!0,r.get(0).src=ur),i=$(n.target).siblings("img[id^=agenda-item-location]"),i.length&&i.click(),$(this).closest("body").find(".agenda-notes-item").css({"border-color":"transparent","background-color":""}).attr("data-selected",!1),$(this).css({"border-color":"black","background-color":"rgba(100,101,103,0.5)"}).attr("data-selected",!0),o.css({border:"3px solid transparent"}),dt($(this).attr("data-id")))},oi=function(){if(s==="true"){var n=u.attr("data-expanded");u.find("#"+et).removeClass(it.expandIcon).removeClass(it.collapseIcon);n==="true"?(u.find("#"+y).hide(),u.attr("data-expanded",!1),u.find("#"+et).addClass(it.expandIcon),r.height(t.height()-u.find("#"+at).height()),e.height(t.height()-u.find("#"+at).height()),r.siblings("#AttachmentScrollBar").height(r.height())):(u.find("#"+y).show(),u.attr("data-expanded",!0),u.find("#"+et).addClass(it.collapseIcon),r.height(t.height()-u.height()),e.height(t.height()-u.height()),r.siblings("#AttachmentScrollBar").height(r.height()))}},fr=function(){var n,h;if(o&&o.length>0&&f){i.find("[id^=note-print-]").remove();for(n in f)if(f.hasOwnProperty(n)){var e=n.indexOf("/document")>-1||n.indexOf("/FileStorage")>-1?i.find("a[href='"+n+"']"):i.find("a[name="+n+"]"),t=p.indexOf(n),s=p[t+1]?p[t+1].indexOf("/document")>-1||p[t+1].indexOf("/FileStorage")>-1?i.find("a[href='"+p[t+1]+"']"):i.find("a[name="+p[t+1]+"]"):"",r=$("<div/>").attr({id:"note-print-"+n,"class":"note-print"}).html(f[n].text.replace(/\n/g,"<br />"));s.length>0?s.before(r):e.closest("table").length>0?e.closest("table").after(r):i.find("body").children().last().after(r)}if(l){var c=window.open("","_new"),v=$("<style/>").attr({type:"text/css"}).text(".agenda-notes-item { border: none; display: none;}.note-icon { display: none; } .note-print { display: block;border: 2px solid black;clear: both;line-height: normal;padding: 2px;}"),u=o.contents().find("html").clone();u.find("head").append(v);h=$("<div/>",{id:"print-instruction-warning"}).css({width:"90%",position:"absolute",margin:"0.5em","background-color":"#fcf8e3",border:"1px solid #f5e79e",padding:"1em","border-radius":"3px","font-family":"Helvetica Neue, Helvetica, Arial, sans-serif"}).append($("<div/>").css({width:"90%",display:"inline-block"}).text(a.androidPrintWarning)).append($("<div/>").css({width:"10%",display:"inline-block"}).append($("<button/>",{onclick:"document.getElementById('print-instruction-warning').style.display = 'none'"}).css({"margin-left":"0.3em",width:"30px",height:"30px",border:"none",background:"none","font-size":"25px","font-weight":"bold"}).html("&times;")));u.find("body").prepend(h);c.document.write($("<div/>").append(u).html())}else rr?o.contents().get(0).execCommand("print",!1,null):o[0].contentWindow.print(),setTimeout(function(){o.hide().show(0)},0)}},er=function(){var n=$(this).closest("#"+k).attr("data-id");n&&f&&f[n]!=null&&(delete f[n],u.find("#"+y).val(""),localStorage.setItem(yt,JSON.stringify(f)),i.find("span[id='"+vt+n+"']").remove())},b=function(n){$(n.target).hasClass("agenda-notes-item")||$(n.target).closest(".agenda-notes-item").length!==0?s==="true"&&o.css({border:"3px solid transparent"}):s==="true"&&(i.find(".agenda-notes-item").css({"border-color":"transparent","background-color":""}).attr("data-selected",!1),o.css({border:"3px solid grey"}),ot=!1,dt("AgendaDocument"+d))},st=function(n){ot=!1;$(this).siblings("div.agenda-notes-item").click();n.stopPropagation()},or=function(n){s=h.attr("data-enabled");s==="false"&&kt();var t=$(n.target).attr("id").replace(vt,""),r=t.indexOf("AgendaDocument")>-1,u=r?i.find("body"):i.find("div[id='"+t+"']");return u.click(),n.preventDefault(),n.stopPropagation(),!1},si=function(n){if(s==="true"){$(this).closest("body").find(".agenda-notes-item").css({"border-color":"transparent","background-color":""}).attr("data-selected",!1);var t=$(this).siblings("div.agenda-notes-item");$(t).css({"border-color":"black","background-color":"rgba(100,101,103,0.5)"}).attr("data-selected",!0);o.css({border:"3px solid transparent"});dt($(t).attr("data-id"));n.stopPropagation()}},sr=function(){tt?t.find("#"+k).css({width:e.width(),top:"0",bottom:""}):l&&window.scrollTo(0,document.body.scrollHeight)},hr=function(){tt&&(t.find("#"+k).css({top:"",bottom:"1px"}),e.height(t.height()-u.height()-5))};this.LoadAgendaNotes=function(n){ht(n)};var ht=function(n){if(gt()){$(i.find("div.agenda-notes-item")).remove();var t=i.find("a").filter(function(){if($(this).is("[name^=AgendaHeading]")||$(this).is("[name^=AgendaItem]")||$(this).is('a[href]:not([href="#"])')&&$(this).closest("#HtmlAgendaCoverLink").length===0||$(this).is("[name^=Recommendation]")){var n=$(this).is('a[href]:not([href="#"])')?$(this).attr("href"):$(this).attr("name");return p.indexOf(n)<0&&p.push(n),$(this)}return null}).css({"vertical-align":"top"});$.each(t,function(r,u){var h,e,c;if($(u).siblings($(u).attr("name")).length===0||$(u).attr("name")==null){var f=$(u).attr("name"),o=$(u).offset(),s=t[r+1]?$(t[r+1]).offset():null,l=s&&!g?s.top-o.top-4:g?$(u).height()+2:i.find("body").offset().top+i.find("body").height()-o.top;if(f=f==null?$(u).attr("href"):f,h=$(u).is("[name^=AgendaHeading]")?"AgendaHeading":$(u).is("[name^=AgendaItem]")?"AgendaItem":$(u).is("[name^=Recommendation]")?"Recommendation":$(u).is("[name^=ItemAttachment]")||$(u).is('a[href]:not([href="#"])')?"ItemAttachment":"None",e=$("<div><\/div>").attr({id:f,title:"Click add note","class":"agenda-notes-item","data-id":f,"data-type":h}).css({height:l+"px",top:o.top+6,"z-index":n==="true"?"100":""}),n==="true"){e.css("cursor","pointer");e.off("mouseover",ci).on("mouseover",ci);e.off("mouseout",li).on("mouseout",li)}e.off("click",ei).on("click",ei);if(f!=null&&f.indexOf("ItemAttachment")===0&&$(u).attr("href")==null){c=$(u).siblings('a[href]:not([href="#"])');c.off("click",st).on("click",st)}else if(f!=null&&$(u).attr("target")==="AgendaAttachment"&&$(u).attr("href"))$(u).off("click",st).on("click",st);$(u).before(e)}});i.find('a[href]:not([href="#"])').css({"z-index":"150",position:"relative"});i.find("img[id^=agenda-item-location-]").css({"z-index":"150",position:"relative"}).off("click",si).on("click",si);f==null&&hi(d,ut)}},hi=function(){f=localStorage.getItem(yt)!=null?JSON.parse(localStorage.getItem(yt)):{};f!=null&&$.each(f,function(n){var r=n.indexOf("AgendaDocument")>-1,t=r?i.find("body"):i.find("div[id='"+n+"']");t.length>0&&t.siblings("span[id='note-"+n+"']").length===0&&t.before($("<span/>").attr({id:vt+n,"class":"icon icon-list-alt note-icon"}).css({position:"absolute",top:r?"0":t.offset().top+2,"z-index":"500"}).off("click").on("click",or))})},bt=function(){var n=u.attr("data-id"),t;n.indexOf("AgendaDocument")>-1?i.find("body").children("span#note-"+n).length===0&&i.find("body").after($("<span/>").attr({id:"note-"+n,"class":"icon icon-list-alt note-icon"}).css({position:"absolute",top:"0"})):$(i.get(0).getElementById(n)).siblings("span[id='note-"+n+"']").length===0&&$(i.get(0).getElementById(n)).before($("<span/>").attr({id:"note-"+n,"class":"icon icon-list-alt note-icon"}).css({position:"absolute",top:$(i.get(0).getElementById(n)).offset().top+2}));f&&f[n]==null?(t={dateModified:(new Date).getTime(),text:u.find("#"+y).val()},f[n]=t):(f[n].dateModified=(new Date).getTime(),f[n].text=u.find("#"+y).val());localStorage.setItem("agenda-notes-user:"+ut+"-document:-"+d,JSON.stringify(f));setTimeout(function(){$(document.getElementById(nt)).removeClass("hidden")},800);wt!=null&&clearTimeout(wt);wt=setTimeout(function(){$(document.getElementById(nt)).addClass("hidden")},2e3)},ci=function(){$(this).css({"background-color":"rgba(100,101,103,0.5)"})},li=function(){($(this).attr("data-selected")==null||$(this).attr("data-selected")==="false")&&$(this).css({"background-color":""})},kt=function(){var f,n,c;if(s=h.attr("data-enabled"),s==="false"){h.attr({"data-enabled":!0,title:a.agendaNotesDisableToolTip});s="true";ht(s);h.find(".glyphicon").removeClass("glyphicon-list-alt").addClass("glyphicon-pencil");$(document.getElementById("agenda-notes-enabled-message")).removeClass("hidden");pt!=null&&clearTimeout(pt);pt=setTimeout(function(){$(document.getElementById("agenda-notes-enabled-message")).addClass("hidden")},5e3);i.off("click",b).on("click",b);ft.find("#SplitScreenAgendaCoverLink a").off("click",b).on("click",b);i.css({border:"3px solid transparent"});$(document.getElementById("nextQuickView")).addClass("hidden");$(document.getElementById("previousQuickViewCell")).addClass("hidden");l&&!tt&&ii&&yi();ct.removeClass("hidden");f=window.location.protocol+"//"+window.location.hostname+"/api/agendanotes/attachment/defaultweb/"+(g&&g!=="undefined"?"true":"false")+"/en";l?rt(f):r.attr("src",f);ui.off("click",b).on("click",b)}else i.find("body").css("margin-left",""),o.css({border:""}),r.attr("src",window.location.protocol+"//"+window.location.hostname+"/Main.html"),u&&(r.height(e.height()),r.siblings("#AttachmentScrollBar").height(r.height())),cr(),h.attr({"data-enabled":!1,title:a.agendaNotesEnableToolTip}),s="false",h.find(".glyphicon").removeClass("glyphicon-pencil").addClass("glyphicon-list-alt"),ct.addClass("hidden"),ui.off("click",b),$(document.getElementById("nextQuickView")).removeClass("hidden"),$(document.getElementById("previousQuickViewCell")).removeClass("hidden");n=t.height();e.height(n);r.height(n);r.siblings("#AttachmentScrollBar").height(n);lt.removeClass("collapsed");c=lt.width();lt.toggleClass("collapsed",c>ft.width())},dt=function(n){var o,i;if(u==null){u=$("<div/>").attr({id:k,"data-id":n,"data-expanded":!0,"class":"agenda-notes-editor"}).css({position:"fixed",bottom:"1px",right:"0",width:$(e).width()}).append($("<div/>").attr({id:at}).css({height:"27px","background-color":"#646567",position:"relative"}).append($("<span/>",{"class":"glyphicon glyphicon-info-sign"}).css({float:"left",color:"white",margin:"0.2em",cursor:"pointer"}).off("click").on("click",vi)).append($("<div/>",{id:"agenda-notes-cookies-warning","class":"alert alert-warning alert-dismissible hidden"}).css({position:"absolute",top:"20px","background-color":"#fff",color:"#333"}).append($("<div/>").css({display:"inline-block","vertical-align":"middle",width:"90%"}).text(a.agendaNotesDeleteCookiesWarning).prepend($("<span/>",{"class":"glyphicon glyphicon-warning-sign"}).css({"margin-right":"0.2em"}))).append($("<div/>").css({display:"inline-block","vertical-align":"middle",width:"10%"}).append($("<button/>",{type:"button","class":"close","data-dismiss":"alert"}).css({"margin-left":"0.3em",width:"30px",height:"30px"}).html("&times;").off("click").on("click",vi)))).append($("<span/>").css({float:"left","font-weight":"bold",color:"white",margin:"2px","font-family":"Segoe UI, Helvetica, Tahoma, Arial, Calibri, Verdana, sans-serif"}).text(a.agendaNotesHeaderText)).append($("<span/>").attr({id:et,"class":"glyphicon "+it.collapseIcon,alt:a.agendaNotesCollapseImgToolTip,title:a.agendaNotesCollapseImgToolTip}).css({cursor:"pointer",float:"left",margin:"1px 0.3em","font-size":"1.5em",color:"white"}).off("click",oi).on("click",oi)).append($("<div/>",{id:nt,"class":"hidden"}).css({display:"inline-block",margin:"0.2em",background:"#80FF80",padding:"0 0.2em","border-radius":"3px",border:"1px solid #41BF41"}).append($("<span/>",{"class":"glyphicon glyphicon-ok-sign"})).append($("<span/>").css({"margin-left":"0.2em"}).text(a.savedNotification))).append($("<button/>").attr({title:a.agendaNotesDeleteBtnToolTip}).css({float:"right",margin:"1px 0.5em"}).text("Delete Note").off("click").on("click",er))).append($("<textarea/>").attr({id:y}).css({margin:"0",width:"100%",height:"143px","box-sizing":"border-box"}).off("focus").on("focus",sr).off("blur").on("blur",hr));e.after(u);e.on("load",function(){r.height(t.find("#"+ri).height()-t.find("#"+k).height()-2)})}else u.attr("data-id",n);o=f[n]!=null?f[n].text:"";u.find("#"+y).val(o).off("keyup").on("keyup",lr);l||u.find("#"+y).focus();i=t.height()-u.height();e.height(i);r.height(i-5);r.siblings("#AttachmentScrollBar").height(i-5)},cr=function(){$(i.find("div.agenda-notes-item")).remove();$(document.getElementById("agenda-notes-enabled-message")).addClass("hidden");$(i.find("div[id^=note-print-]")).remove();$(u).remove();e.height("");r.height("");r.siblings("#AttachmentScrollBar").height("");u=null;f=null},ai=function(){var n=i.find("a").filter(function(){return $(this).is("[name^=AgendaHeading]")||$(this).is("[name^=AgendaItem]")||$(this).is("[name^=ItemAttachment]")||$(this).is("[name^=Recommendation]")?$(this):null});return n&&n.length>0?!0:!1},gt=function(){var n;try{localStorage?(localStorage.setItem("test","test"),localStorage.removeItem("test"),n=!0):n=!1}catch(t){n=!1}return n},ni=function(n){ai()&&(setTimeout(function(){t.find("#"+k).width($(e).width())},0),clearTimeout(fi),fi=setTimeout(function(){var n=i.find(".agenda-notes-item[data-selected='true']").attr("id");i.find(".agenda-notes-item").remove();i.find(".note-icon").remove();ht(s);hi(d,ut);n!=null&&$(i.get(0).getElementById(n)).click()},400));n!=null&&n.preventDefault()};this.resizeAgendaDocument=function(n){ni(n)};var vi=function(n){var t=$(n.target).closest("#agenda-notes-editor").find("#agenda-notes-cookies-warning");t.hasClass("hidden")?t.removeClass("hidden"):t.addClass("hidden")},yi=function(){var t,n;return l&&($(document.getElementById("ipad-notification-alert")).length&&$(document.getElementById("ipad-notification-alert")).empty(),t="<div id='ibb-widget-root-518359182'><\/div><script>(function(t,e,i,d){var o=t.getElementById(i),n=t.createElement(e);o.style.height=250;o.style.width=300;o.style.display='inline-block';n.id='ibb-widget',n.setAttribute('src',('https:'===t.location.protocol?'https://':'http://')+d),n.setAttribute('width','300'),n.setAttribute('height','250'),n.setAttribute('frameborder','0'),n.setAttribute('scrolling','no'),o.appendChild(n)})(document,'iframe','ibb-widget-root-518359182',\"banners.itunes.apple.com/banner.html?partnerId=&aId=&bt=catalog&t=catalog_black&id=518359182&c=us&l=en-US&w=300&h=250&store=apps\");<\/script>",$("body").append($("<div><\/div>",{id:"ipad-notification-alert","class":"hidden"})),n=$(document.getElementById("ipad-notification-alert")).html(t),n.dialog({title:"AgendaNotes iPad App",width:300,height:250}),n.removeClass("hidden").dialog("open")),!1},lr=function(n){n.which===16||n.which===17||n.which===18||n.which===83&&n.ctrlKey||($(document.getElementById(nt)).addClass("hidden"),bt())},ar=function(){t.find("head").append($("<script><\/script>",{type:"text/javascript",src:"/Global/3rdParty/pdfjs/pdf.js"}));r.before($("<div/>",{id:"canvas-container","class":"hidden"}).css({display:"inline-block",overflow:"auto"}));r.before($("<div/>",{id:"attachment-page-navigation","class":"hidden"}).css({position:"fixed",top:"0",width:$(e).width()+"px","background-color":"white","text-align":"center"}).append($("<button><\/button>").css("padding","0.5em").text("Previous").on("click",yr)).append($("<span><\/span>",{id:"pdf-page-label"}).css({margin:"0 1em"})).append($("<button><\/button>").css("padding","0.5em").text("Next").on("click",vr)));i.find('a[href]:not([href="#"])').each(function(n,t){$(t).off("click").on("click",pi)});ft.find("#SplitScreenAgendaCoverLink a").off("click",wi).on("click",wi)};this.selectPdf=function(n){pi(n)};var pi=function(n){var t=$(n.target).closest("a"),i,r;t.length>0&&(i=t.attr("href"),r=t.attr("target"),r=="AgendaAttachment"&&(rt(i),n.preventDefault()))},ti=function(n){var u,f;t.find("#canvas-container").empty();var r=n.getViewport(1),i=document.createElement("canvas");t.find("#canvas-container").append(i);u=i.getContext("2d");i.height=r.height;i.width=r.width;f={canvasContext:u,viewport:r};n.render(f)},vr=function(){v?pr():rt(t.find("#attachment-page-navigation").attr("url"),++c)},yr=function(){if(v)wr();else{if(c<=1)return;rt(t.find("#attachment-page-navigation").attr("url"),--c)}},pr=function(){c>=v.numPages||(c++,v.getPage(c).then(ti),e.find("#pdf-page-label").text(c+"/"+v.numPages),e.animate({scrollTop:0},"fast"))},wr=function(){c<=1||(c--,v.getPage(c).then(ti),e.find("#pdf-page-label").text(c+"/"+v.numPages),e.animate({scrollTop:0},"fast"))},rt=function(n,i,u,f){r.addClass("hidden");t.find("#attachment-page-navigation").addClass("hidden");t.find("#canvas-container").empty().removeClass("hidden");t.find("#canvas-container").append($("<div/>",{id:"loading-attachment"}).css({"background-color":"white",border:"1px solid black",padding:"0.5em","border-radius":"3px",margin:"5em auto",left:"0",right:"0",width:"13%","text-align":"center",position:"absolute"}).text("Loading..."));PDFJS.workerSrc="/Global/3rdParty/pdfjs/pdf.worker.js";PDFJS.getDocument(n).then(function(f){u?u():(r.addClass("hidden"),i=i&&i>=1&&i<f.numPages?i:1,f.getPage(i).then(ti),c=i,v=f,e.find("#pdf-page-label").text(c+"/"+v.numPages),t.find("#canvas-container").removeClass("hidden"),t.find("#attachment-page-navigation").removeClass("hidden"),t.find("#attachment-page-navigation").attr("url",n))}).then(null,function(){if(f)f();else if(r.get(0).src=n,l)r.on("load",function(){t.find("#attachment-page-navigation").addClass("hidden");t.find("#canvas-container").addClass("hidden");r.removeClass("hidden")});else t.find("#attachment-page-navigation").addClass("hidden"),t.find("#canvas-container").addClass("hidden"),r.removeClass("hidden")})},wi=function(){t.find("#canvas-container").addClass("hidden");t.find("#attachment-page-navigation").addClass("hidden");r.removeClass("hidden")},br=function(){for(var t=[],n,r=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),i=0;i<r.length;i++)n=r[i].split("="),t.push(n[0]),t[n[0]]=n[1];return t.notes},kr=function(){i.find("head").append($("<style/>").attr({type:"text/css"}).text(".icon { background-image: url('/Global/3rdParty/bootstrap/img/glyphicons-halflings.png'); display: inline-block; width: 14px; height: 14px; *margin-right: .3em; line-height: 14px; vertical-align: text-top; background-position: 14px 14px; background-repeat: no-repeat; margin-top: 1px; } .icon-white { background-image: url('/Global/3rdParty/bootstrap/img/glyphicons-halflings-white.png'); } .icon-list-alt { background-position: -264px -24px; } .icon-chevron-up { background-position: -288px -120px; } .icon-chevron-down { background-position: -313px -119px; }"));var n=$("<style/>").attr({type:"text/css"}).text(".agenda-notes-editor {position: absolute;bottom: 1px;width: 100%;}.agenda-notes-item {width: 98%;position: absolute;left: 1px;opacity: 0.5;border: 2px solid transparent;display: inline-block;z-index: -1;}.note-print {display: none;border: 2px solid black;clear: both;z-index: 100;position: relative;}.note-icon {padding: 1px;left: 0;}@media print { .agenda-notes-item { border: none; display: none;}.note-icon { display: none; } .note-print { display: block;border: 2px solid black;clear: both;line-height: normal;padding: 2px;}}");i.find("head").append(n);$(document.getElementById(w)).contents().find("head").append($("<link/>",{rel:"stylesheet",href:"/Content/bootstrap.css"}));$(document.getElementById(w)).contents().find("head").append($("<link/>",{rel:"stylesheet",href:"/Content/bootstrap-theme.css"}));$(document.getElementById(w)).contents().find("head").append($("<style/>",{type:"text/css"}).html(".hidden { display: none !important; }"));gt()&&i.find("body").css("margin-left","15px")};(function(){if(gt()&&(ai()||g)){kr();h.removeClass("hidden");h.attr("data-enabled",!1);h.find(".glyphicon").removeClass("glyphicon-pencil").addClass("glyphicon-list-alt");h.off("click").on("click",kt);ct.off("click").on("click",fr);if(ht(s),o!=null&&o.length>0){$(o[0].contentWindow).resize(ni);$(window).on("resize",ni)}l&&(ft.width("35.8%"),e.width("62.8%"));br()&&kt()}else if(l&&ii&&!tt){h.off("click").on("click",yi);h.removeClass("hidden")}else h.addClass("hidden");l&&ar();tt&&($(document).find("head meta[name=viewport]").remove(),$(document).find("head").prepend('<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />'),r.contents().find("head meta[name=viewport]").remove(),r.contents().find("head").prepend('<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />'),$(document.getElementById(w)).contents().find("head meta[name=viewport]").remove(),$(document.getElementById(w)).contents().find("head").prepend('<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />'));$(window).keydown(function(n){return n.which===83&&n.ctrlKey?($(document.getElementById(nt)).addClass("hidden"),bt(),n.preventDefault(),!1):!0});window.onbeforeunload=function(){s==="true"&&bt()}})()};CivicWeb.Document.AgendaNotesPage={instances:[],getInstance:function(){return this.instances.length>0?this.instances[0]:null},getIndex:function(){var n=0;return n>=this.instances.length?-1:n},createInstance:function(n){var i=this.getInstance(n.clientId),t=this.getIndex(n.clientId);i&&delete i;t<0&&(t=this.instances.length);this.instances[t]=new CivicWeb.Document.AgendaNotes(n)},getCurrentId:function(){return this.getInstance().getCurrentId()},selectPdf:function(n){return this.getInstance().selectPdf(n)},events:{resizeAgendaDocument:function(n){CivicWeb.Document.AgendaNotesPage.getInstance().resizeAgendaDocument(n)}}}