!function(e,t){"use strict";"object"==typeofmodule&&"object"==typeofmodule.exports?module.exports=e.document?t(e,!0):function(e){if(e.document)returnt(e);thrownewError("jQuery requires a window with a document")}:t(e)}("undefined"!=typeofwindow?window:this,function(T,R){"use strict";functionv(e){return"function"==typeofe&&"number"!=typeofe.nodeType}functiong(e){returnnull!=e&&e===e.window}vart=[],M=Object.getPrototypeOf,s=t.slice,I=t.flat?function(e){returnt.flat.call(e)}:function(e){returnt.concat.apply([],e)},W=t.push,F=t.indexOf,B={},$=B.toString,_=B.hasOwnProperty,z=_.toString,U=z.call(Object),y={},C=T.document,X={type:!0,src:!0,nonce:!0,noModule:!0};functionV(e,t,n){varr,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(rinX)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}functionh(e){returnnull==e?e+"":"object"==typeofe||"function"==typeofe?B[$.call(e)]||"object":typeofe}vare="3.5.0",E=function(e,t){returnnewE.fn.init(e,t)};functionG(e){vart=!!e&&"length"ine&&e.length,n=h(e);return!v(e)&&!g(e)&&("array"===n||0===t||"number"==typeoft&&0<t&&t-1ine)}E.fn=E.prototype={jquery:e,constructor:E,length:0,toArray:function(){returns.call(this)},get:function(e){returnnull==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){e=E.merge(this.constructor(),e);returne.prevObject=this,e},each:function(e){returnE.each(this,e)},map:function(n){returnthis.pushStack(E.map(this,function(e,t){returnn.call(e,t,e)}))},slice:function(){returnthis.pushStack(s.apply(this,arguments))},first:function(){returnthis.eq(0)},last:function(){returnthis.eq(-1)},even:function(){returnthis.pushStack(E.grep(this,function(e,t){return(t+1)%2}))},odd:function(){returnthis.pushStack(E.grep(this,function(e,t){returnt%2}))},eq:function(e){vart=this.length,e=+e+(e<0?t:0);returnthis.pushStack(0<=e&&e<t?[this[e]]:[])},end:function(){returnthis.prevObject||this.constructor()},push:W,sort:t.sort,splice:t.splice},E.extend=E.fn.extend=function(){vare,t,n,r,i,o=arguments[0]||{},a=1,s=arguments.length,u=!1;for("boolean"==typeofo&&(u=o,o=arguments[a]||{},a++),"object"==typeofo||v(o)||(o={}),a===s&&(o=this,a--);a<s;a++)if(null!=(e=arguments[a]))for(tine)n=e[t],"__proto__"!==t&&o!==n&&(u&&n&&(E.isPlainObject(n)||(r=Array.isArray(n)))?(i=o[t],i=r&&!Array.isArray(i)?[]:r||E.isPlainObject(i)?i:{},r=!1,o[t]=E.extend(u,i,n)):void0!==n&&(o[t]=n));returno},E.extend({expando:"jQuery"+(e+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){thrownewError(e)},noop:function(){},isPlainObject:function(e){return!(!e||"[object Object]"!==$.call(e)||(e=M(e))&&("function"!=typeof(e=_.call(e,"constructor")&&e.constructor)||z.call(e)!==U))},isEmptyObject:function(e){for(vartine)return!1;return!0},globalEval:function(e,t,n){V(e,{nonce:t&&t.nonce},n)},each:function(e,t){varn,r=0;if(G(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);elsefor(rine)if(!1===t.call(e[r],r,e[r]))break;returne},makeArray:function(e,t){t=t||[];returnnull!=e&&(G(Object(e))?E.merge(t,"string"==typeofe?[e]:e):W.call(t,e)),t},inArray:function(e,t,n){returnnull==t?-1:F.call(t,e,n)},merge:function(e,t){for(varn=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];returne.length=i,e},grep:function(e,t,n){for(varr=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!=a&&r.push(e[i]);returnr},map:function(e,t,n){varr,i,o=0,a=[];if(G(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);elsefor(oine)null!=(i=t(e[o],o,n))&&a.push(i);returnI(a)},guid:1,support:y}),"function"==typeofSymbol&&(E.fn[Symbol.iterator]=t[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){B["[object "+t+"]"]=t.toLowerCase()});functionr(e,t,n){for(varr=[],i=void0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}returnr}functionY(e,t){for(varn=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);returnn}vare=function(R){functionf(e,t){returne="0x"+e.slice(1)-65536,t||(e<0?String.from
!function(t){"function"==typeofdefine&&define.amd?define(["jquery"],t):"object"==typeofmodule&&"object"==typeofmodule.exports?t(require("jquery")):t(jQuery)}(function(l){l.timeago=function(t){returntinstanceofDate?o(t):o("string"==typeoft?l.timeago.parse(t):"number"==typeoft?newDate(t):l.timeago.datetime(t))};vari=l.timeago,a=(l.extend(l.timeago,{settings:{refreshMillis:6e4,allowPast:!0,allowFuture:!1,localeTitle:!1,cutoff:0,autoDispose:!0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"any moment now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(i){if(!this.settings.allowPast&&!this.settings.allowFuture)throw"timeago allowPast and allowFuture settings can not both be set to false.";vara=this.settings.strings,t=a.prefixAgo,e=a.suffixAgo;if(this.settings.allowFuture&&i<0&&(t=a.prefixFromNow,e=a.suffixFromNow),!this.settings.allowPast&&0<=i)returnthis.settings.strings.inPast;varn=Math.abs(i)/1e3,o=n/60,r=o/60,s=r/24,u=s/365;functionm(t,e){t=l.isFunction(t)?t(e,i):t,e=a.numbers&&a.numbers[e]||e;returnt.replace(/%d/i,e)}n=n<45&&m(a.seconds,Math.round(n))||n<90&&m(a.minute,1)||o<45&&m(a.minutes,Math.round(o))||o<90&&m(a.hour,1)||r<24&&m(a.hours,Math.round(r))||r<42&&m(a.day,1)||s<30&&m(a.days,Math.round(s))||s<45&&m(a.month,1)||s<365&&m(a.months,Math.round(s/30))||u<1.5&&m(a.year,1)||m(a.years,Math.round(u)),o=a.wordSeparator||"";returnvoid0===a.wordSeparator&&(o=" "),l.trim([t,n,e].join(o))},parse:function(t){t=l.trim(t);returnt=(t=(t=(t=(t=t.replace(/\.\d+/,"")).replace(/-/,"/").replace(/-/,"/")).replace(/T/," ").replace(/Z/," UTC")).replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2")).replace(/([\+\-]\d\d)$/," $100"),newDate(t)},datetime:function(t){t=i.isTime(t)?l(t).attr("datetime"):l(t).attr("title");returni.parse(t)},isTime:function(t){return"time"===l(t).get(0).tagName.toLowerCase()}}),{init:function(){a.dispose.call(this);vart=l.proxy(n,this),e=(t(),i.settings);0<e.refreshMillis&&(this._timeagoInterval=setInterval(t,e.refreshMillis))},update:function(t){t=tinstanceofDate?t:i.parse(t);l(this).data("timeago",{datetime:t}),i.settings.localeTitle&&l(this).attr("title",t.toLocaleString()),n.apply(this)},updateFromDOM:function(){l(this).data("timeago",{datetime:i.parse(i.isTime(this)?l(this).attr("datetime"):l(this).attr("title"))}),n.apply(this)},dispose:function(){this._timeagoInterval&&(window.clearInterval(this._timeagoInterval),this._timeagoInterval=null)}});functionn(){vart=i.settings;if(t.autoDispose&&!l.contains(document.documentElement,this))returnl(this).timeago("dispose"),this;vare=function(t){{vare;(t=l(t)).data("timeago")||(t.data("timeago",{datetime:i.datetime(t)}),e=l.trim(t.text()),i.settings.localeTitle?t.attr("title",t.data("timeago").datetime.toLocaleString()):!(0<e.length)||i.isTime(t)&&t.attr("title")||t.attr("title",e))}returnt.data("timeago")}(this);returnisNaN(e.datetime)||(0===t.cutoff||Math.abs(r(e.datetime))<t.cutoff?l(this).text(o(e.datetime)):0<l(this).attr("title").length&&l(this).text(l(this).attr("title"))),this}functiono(t){returni.inWords(r(t))}functionr(t){return(newDate).getTime()-t.getTime()}l.fn.timeago=function(t,e){vari=t?a[t]:a.init;if(i)returnthis.each(function(){i.call(this,e)}),this;thrownewError("Unknown function name '"+t+"' for timeago")},document.createElement("abbr"),document.createElement("time")});
!function(){varl=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],p="undefined"!=typeofwindow,h=p&&null!=window.mozInnerScreenX;functione(e,t,o){if(!p)thrownewError("textarea-caret-position#getCaretCoordinates should only be called in a browser");varo=o&&o.debug||!1,n=(!o||(n=document.querySelector("#input-textarea-caret-position-mirror-div"))&&n.parentNode.removeChild(n),document.createElement("div")),i=(n.id="input-textarea-caret-position-mirror-div",document.body.appendChild(n),n.style),r=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,d="INPUT"===e.nodeName,a=(i.whiteSpace="pre-wrap",d||(i.wordWrap="break-word"),i.position="absolute",o||(i.visibility="hidden"),l.forEach(function(e){d&&"lineHeight"===e?i.lineHeight=r.height:i[e]=r[e]}),h?e.scrollHeight>parseInt(r.height)&&(i.overflowY="scroll"):i.overflow="hidden",n.textContent=e.value.substring(0,t),d&&(n.textContent=n.textContent.replace(/\s/g,"")),document.createElement("span")),e=(a.textContent=e.value.substring(t)||".",n.appendChild(a),{top:a.offsetTop+parseInt(r.borderTopWidth),left:a.offsetLeft+parseInt(r.borderLeftWidth),height:parseInt(r.lineHeight)});returno?a.style.backgroundColor="#aaa":document.body.removeChild(n),e}"undefined"!=typeofmodule&&void0!==module.exports?module.exports=e:p&&(window.getCaretCoordinates=e)}();
varGOVUK=function(e){"use strict";varr="undefined"!=typeofglobalThis?globalThis:"undefined"!=typeofwindow?window:"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:{};functiont(e,t){returne(t={exports:{}},t.exports),t.exports}varo,n=t(function(e,t){functionn(e){this.$module=e}e.exports=(function(e){varc,a,l,u;"defineProperty"inObject&&function(){try{returnObject.defineProperty({},"test",{value:42}),!0}catch(e){return!1}}()||(c=Object.defineProperty,a=Object.prototype.hasOwnProperty("__defineGetter__"),l="Getters & setters cannot be defined on this javascript engine",u="A property cannot both have accessors and be writable or have a value",Object.defineProperty=function(e,t,n){if(c&&(e===window||e===document||e===Element.prototype||einstanceofElement))returnc(e,t,n);if(null===e||!(einstanceofObject||"object"==typeofe))thrownewTypeError("Object.defineProperty called on non-object");if(!(ninstanceofObject))thrownewTypeError("Property description must be an object");vart=String(t),o="value"inn||"writable"inn,r="get"inn&&typeofn.get,i="set"inn&&typeofn.set;if(r){if("function"!==r)thrownewTypeError("Getter must be a function");if(!a)thrownewTypeError(l);if(o)thrownewTypeError(u);Object.__defineGetter__.call(e,t,n.get)}elsee[t]=n.value;if(i){if("function"!==i)thrownewTypeError("Setter must be a function");if(!a)thrownewTypeError(l);if(o)thrownewTypeError(u);Object.__defineSetter__.call(e,t,n.set)}return"value"inn&&(e[t]=n.value),e})}.call("object"==typeofwindow&&window||"object"==typeofself&&self||"object"==typeofr&&r||{}),function(e){"bind"inFunction.prototype||Object.defineProperty(Function.prototype,"bind",{value:function(t){functione(){}varn=Array,o=Object,r=o.prototype,n=n.prototype,i=r.toString,c="function"==typeofSymbol&&"symbol"==typeofSymbol.toStringTag,a=Function.prototype.toString,l=n.slice,u=n.concat,s=n.push,r=Math.max,d=this;if(!function(e){if("function"!=typeofe)return!1;{if(!c)return"[object Function]"===(t=i.call(e))||"[object GeneratorFunction]"===t;vart=e;try{returna.call(t),!0}catch(e){return!1}}}(d))thrownewTypeError("Function.prototype.bind called on incompatible "+d);for(varp,f=l.call(arguments,1),m=r(0,d.length-f.length),y=[],b=0;b<m;b++)s.call(y,"$"+b);returnp=Function("binder","return function ("+y.join(",")+"){ return binder.apply(this, arguments); }")(function(){vare;returnthisinstanceofp?(e=d.apply(this,u.call(f,l.call(arguments))),o(e)===e?e:this):d.apply(t,u.call(f,l.call(arguments)))}),d.prototype&&(e.prototype=d.prototype,p.prototype=newe,e.prototype=null),p}})}.call("object"==typeofwindow&&window||"object"==typeofself&&self||"object"==typeofr&&r||{}),function(e){"Window"inthis||"undefined"==typeofWorkerGlobalScope&&"function"!=typeofimportScripts&&!function(e){e.constructor?e.Window=e.constructor:(e.Window=e.constructor=newFunction("return function Window() {}")()).prototype=this}(this)}.call("object"==typeofwindow&&window||"object"==typeofself&&self||"object"==typeofr&&r||{}),function(e){"Document"inthis||"undefined"==typeofWorkerGlobalScope&&"function"!=typeofimportScripts&&(this.HTMLDocument?this.Document=this.HTMLDocument:(this.Document=this.HTMLDocument=document.constructor=newFunction("return function Document() {}")(),this.Document.prototype=document))}.call("object"==typeofwindow&&window||"object"==typeofself&&self||"object"==typeofr&&r||{}),function(e){vart,n,a,l,u,s,o,r,i;functionc(){returni--||clearTimeout(r),!(!document.body||document.body.prototype||!/(complete|interactive)/.test(document.readyState))&&(u(document,!0),r&&document.body.prototype&&clearTimeout(r),!!document.body.prototype)}"Element"inthis&&"HTMLElement"inthis||(window.Element&&!window.HTMLElement?window.HTMLElement=window.Element:(window.Element=window.HTMLElement=newFunction("return function Element() {}")(),n=(t=document.appendChild(document.createElement("body"))).appendChild(document.createElement("iframe")).contentWindow.document,a=Element.prototype=n.appendChild(n.createElement("*")),l={},u=function(e,t){varn,o
"use strict";window.GOVUK=window.GOVUK||{},window.GOVUK.Modules=window.GOVUK.Modules||{},function(e){functiono(){}o.clearOldCookies=function(e){varo=["_ga","_gid"];if(window.GOVUK.cookie("seen_cookie_message")&&(document.cookie="seen_cookie_message=;expires="+(newDate).toGMTString()+";path=/"),null===e)for(vari,t=0;t<o.length;t++)window.GOVUK.cookie(o[t])&&(i=o[t]+"=;expires="+(newDate).toGMTString()+";domain="+window.location.hostname.replace(/^www\./,".")+";path=/",document.cookie=i)},o.prototype.start=function(e){this.$module=e[0],this.$module.hideCookieMessage=this.hideCookieMessage.bind(this),this.$module.showConfirmationMessage=this.showConfirmationMessage.bind(this),this.$module.setCookieConsent=this.setCookieConsent.bind(this),this.$module.cookieBanner=document.querySelector(".notify-cookie-banner"),this.$module.cookieBannerConfirmationMessage=this.$module.querySelector(".notify-cookie-banner__confirmation"),this.setupCookieMessage()},o.prototype.setupCookieMessage=function(){vare=this;this.$hideLink=this.$module.querySelector("button[data-hide-cookie-banner]"),this.$hideLink&&this.$hideLink.addEventListener("click",this.$module.hideCookieMessage),this.$acceptCookiesLink=this.$module.querySelector("button[data-accept-cookies=true]"),this.$acceptCookiesLink&&this.$acceptCookiesLink.addEventListener("click",function(){returne.$module.setCookieConsent(!0)}),this.$rejectCookiesLink=this.$module.querySelector("button[data-accept-cookies=false]"),this.$rejectCookiesLink&&this.$rejectCookiesLink.addEventListener("click",function(){returne.$module.setCookieConsent(!1)}),this.showCookieMessage()},o.prototype.showCookieMessage=function(){vare;this.isInCookiesPage()||(e=window.GOVUK.cookie("cookies_policy"),this.$module&&!e&&(this.$module.style.display="block"))},o.prototype.hideCookieMessage=function(e){this.$module&&(this.$module.style.display="none"),e.target&&e.preventDefault()},o.prototype.setCookieConsent=function(e){window.GOVUK.setConsentCookie({analytics:e}),this.$module.showConfirmationMessage(e),this.$module.cookieBannerConfirmationMessage.focus(),e&&window.GOVUK.initAnalytics()},o.prototype.showConfirmationMessage=function(e){e=e?"You’ve accepted analytics cookies.":"You told us not to use analytics cookies.";this.$cookieBannerMainContent=document.querySelector(".notify-cookie-banner__wrapper"),this.$cookieBannerConfirmationMessage=document.querySelector(".notify-cookie-banner__confirmation-message"),this.$cookieBannerConfirmationMessage.insertAdjacentText("afterbegin",e),this.$cookieBannerMainContent.style.display="none",this.$module.cookieBannerConfirmationMessage.style.display="block"},o.prototype.isInCookiesPage=function(){return"/cookies"===window.location.pathname},e.CookieBanner=o}(window.GOVUK.Modules);
"use strict";window.GOVUK.Modules.TemplateFolderForm=function(){vare=this;this.start=function(t){vare=this;this.$form=$(t),this.$form.find("button[value=unknown]").remove(),this.$liveRegionCounter=this.$form.find(".selection-counter"),this.$liveRegionCounter.before(this.nothingSelectedButtons),this.$liveRegionCounter.before(this.itemsSelectedButtons),this.states=[{key:"nothing-selected-buttons",$el:this.$form.find("#nothing_selected"),cancellable:!1},{key:"items-selected-buttons",$el:this.$form.find("#items_selected"),cancellable:!1},{key:"move-to-existing-folder",$el:this.$form.find("#move_to_folder_radios"),cancellable:!0,setFocus:function(){return$("#move_to_folder_radios").focus()},action:"move to folder",description:"Press move to confirm or cancel to close"},{key:"move-to-new-folder",$el:this.$form.find("#move_to_new_folder_form"),cancellable:!0,setFocus:function(){return$("#move_to_new_folder_form").focus()},action:"move to new folder",description:"Press add to new folder to confirm name or cancel to close"},{key:"add-new-folder",$el:this.$form.find("#add_new_folder_form"),cancellable:!0,setFocus:function(){return$("#add_new_folder_form").focus()},action:"new folder",description:"Press add new folder to confirm name or cancel to close"},{key:"add-new-template",$el:this.$form.find("#add_new_template_form"),cancellable:!0,setFocus:function(){return$("#add_new_template_form").focus()},action:"new template",description:"Press continue to confirm selection or cancel to close"}],this.states.filter(function(t){returnt.cancellable}).forEach(function(t){returne.addCancelButton(t)}),this.states.filter(function(t){return"items-selected-buttons"===t.key}).forEach(function(t){returne.addClearButton(t)}),this.states.filter(function(t){returnt.setFocus}).forEach(function(t){returnt.$el.attr("tabindex","0")}),this.addDescriptionsToStates(),this.activateStickyElements(),this._lastState=this.$form.data("prev-state"),void0===this._lastState?this.selectActionButtons():(this.currentState=this._lastState,this.render()),this.$form.on("click","button.govuk-button--secondary",function(t){returne.actionButtonClicked(t)}),this.$form.on("change","input[type=checkbox]",function(){returne.templateFolderCheckboxChanged()})},this.addDescriptionsToStates=function(){varn,o;$.each(this.states.filter(function(t){return"description"int}),function(t,e){n="".concat(e.key,"__description"),o='<p class="govuk-visually-hidden" id="'.concat(n,'">').concat(e.description,"</p>"),e.$el.prepend(o).attr("aria-describedby",n)})},this.activateStickyElements=function(){vare="js-will-stick-at-bottom-when-scrolling";this.states.forEach(function(t){t.$el.find("."+e).removeClass(e).addClass("js-stick-at-bottom-when-scrolling")})},this.addCancelButton=function(t){vare=this,n="[value=".concat(t.key,"]"),o=this.makeButton("Cancel",{onclick:function(){t.$el.find("input:radio").prop("checked",!1),t.$el.find("input:text").val(""),e.selectActionButtons(n)},cancelSelector:n,nonvisualText:t.action});t.$el.find("[type=submit]").after(o)},this.addClearButton=function(t){vare=this,n=this.makeButton("Clear",{onclick:function(){e.$form.find("input:checkbox").prop("checked",!1),e.selectActionButtons("button[value=add-new-template]")},nonvisualText:"selection"});t.$el.find(".template-list-selected-counter").append(n)},this.makeButton=function(t,e){t=$('<a href=""></a>').html(t).addClass("govuk-link govuk-link--no-visited-state js-cancel").data("target",e.cancelSelector||void0).attr("tabindex","0").on("click keydown",function(t){-1<[13,32,void0].indexOf(t.keyCode)&&(t.preventDefault(),e.hasOwnProperty("onclick")&&e.onclick())});returne.hasOwnProperty("nonvisualText")&&t.append('<span class="govuk-visually-hidden"> '.concat(e.nonvisualText,"</span>")),t},this.selectActionButtons=function(t){this.currentState="nothing-selected-buttons",this.templateFolderCheckboxChanged(),t&&$(t).focus()},this.stateChanged=function(){vart=this.currentState!==this._lastState;returnthis._lastState=this.currentState,t},this.$singleNotificationChannel=document.querySelector("div[id=a