Gemeente Nunspeet: Nieuws en gemeentepagina's
Gemeente Nunspeet: Nieuws en gemeentepagina's /*<![CDATA[*/ (function() { var sz = document.createElement('script'); sz.type = 'text/javascript'; sz.async = true; sz.src = 'https://siteimproveanalytics.com/js/siteanalyze_6005078.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sz, s); })(); /*]]>*/ // Load the TalkJS library (function(t,a,l,k,j,s){ s=a.createElement('script');s.async=1;s.src="https://cdn.talkjs.com/talk.js";a.head.appendChild(s) ;k=t.Promise;t.Talk={v:2,ready:{then:function(f){if(k)return new k(function(r,e){l.push([f,r,e])});l .push([f])},catch:function(){return k&&new k()},c:l}};})(window,document,[]); const notificationsSupported = !!(window.Notification && Notification.requestPermission) // Define the chat options // See next section for more details // as an example we are includng here `customerRole` and `cookieOptions` but they are optional and can be removed var COOSTO_WEBCHAT_OPTIONS = { appId: 'E30LNkr5', companyName: 'Gemeente Nunspeet', companyLogo: 'https://www.mimir.nu/wp-content/uploads/2019/03/logo-nunspeet-200x200.png', welcomeMessage: { default: { // the first entry in this 'default' section will be the one used as a 'last resort' option if the local can not be detected 'nl-NL': 'Welkom bij de gemeente Nunspeet.
Waarmee kunnen we u helpen?', 'en-GB': 'Hi! Feel free to ask the questions you have here and we will be happy to help you on your way.', }, urls: { 'pricing': { // this messages will be used if url is something like: `https://www.example.com/something/some-pricing-page/12341234 because it contains pricing 'nl-NL': 'Hoi! Dit gaat over prijzen.', 'en-GB': 'Hi! This is about pricing.', }, } }, systemMessages: { 'nl-NL': ['Welkom!'], 'en-GB': ['Welcome!'] }, locale: navigator.language || 'nl-NL', // customerRole: 'yyyy', // cookieOptions: ';max-age=86400' // notificationsEnabled: notificationsSupported autoOpen: 'never', // autoOpenDelay:5000, // customButton: { // elementId: 'message_bubble', // closeElementId: 'close_button' // }, // emailEnabled: true, keepOpen: true, launcher: 'always' // 'always', 'close-only', 'never' } // v1.1.3 !function(){"use strict";var t=function(t,e){this.talkJsInstance=t,this.options=e};function e(t,e,o){var s=t+"="+e;o&&(s+=";"+o),document.cookie=s} t.prototype.build=function(){this.participants=this.setupParticipants();var t=new this.talkJsInstance.Session({appId:this.options.appId, me:this.participants.customerUser});t.setDesktopNotificationEnabled(this.options.notificationsEnabled) ;var e=this.setupConversation(t,this.participants);return this.chatWindow=this.setupChatWindow(t,e),t},t.prototype.setupParticipants=function(){ var t=this.options,e=t.customerId+"_"+t.locale;return{webCareUser:new this.talkJsInstance.User({id:t.appId+"_"+e,name:t.companyName, photoUrl:t.companyLogo,welcomeMessage:this.getWelcomeMessage(),role:t.webCareAgentRole}),customerUser:new this.talkJsInstance.User({id:e, name:t.customerName,role:t.customerRole,locale:t.locale})}},t.prototype.setupConversation=function(t,e){ this.conversationId=this.talkJsInstance.oneOnOneId(e.customerUser,e.webCareUser);var o=t.getOrCreateConversation(this.conversationId),s={ welcomeMessages:this.getSystemMessages(),custom:{url:window.location.href}};return o.setAttributes(s),o.setParticipant(e.customerUser), o.setParticipant(e.webCareUser),o},t.prototype.setupChatWindow=function(t,e){var o=t.createPopup(e,{keepOpen:this.options.keepOpen, launcher:this.options.launcher});return o.mount({show:!1}),this.shouldAutoOpen()&&setTimeout((function(){o.show()}),this.options.autoOpenDelay), o.on("focus",(function(){o.select(e)})),o},t.prototype.enableEmailFeature=function(t){if(this.options.emailEnabled){ var e=this.options.customerRole,o=this.options.webCareAgentRole;if(e||o){ var s=this.conversationId,n=this.participants.customerUser.id,i=this.options.cookieName;this.chatWindow.createHtmlPanel({url:"./email-form.html", height:130}).then((function(o){t?o.DOMContentLoadedPromise.then((function(){ o.window.document.getElementById("register-form").addEventListener("submit",(function(t){o&&(o.hide(),o.window.saveForm(s,e,n,i),t.preventDefault()) }))})):o.hide()})).catch((function(t){return console.log(t)}))}}},t.prototype.isMobile=function(){ return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},t.prototype.shouldAutoOpen=function(){ switch(this.options.autoOpen){case"mobileOnly":return this.isMobile();case"desktopOnly":return!this.isMobile();case"always":return!0;case"never": default:return!1}},t.prototype.isValidObject=function(t){return"object"==typeof t&&Object.keys(t).length>0},t.prototype.getWelcomeMessage=function(){ var t,e=this.options;if(!this.isValidObject(e.welcomeMessage))throw new Error("Invalid `welcomeMessage`");if(t=e.welcomeMessage.default||{}, !this.isValidObject(t))throw new Error("Invalid `welcomeMessage.default`");var o=t[Object.keys(t)[0]] ;if(e.welcomeMessage.urls&&"object"==typeof e.welcomeMessage.urls){var s=Object.keys(e.welcomeMessage.urls).find((function(t){ return window.location.href.toLowerCase().includes(t.toLowerCase())}));if(s&&(t=e.welcomeMessage.urls[s], !this.isValidObject(t)))throw new Error("Invalid `welcomeMessage for url`")}return t[e.locale]?t[e.locale]:o}, t.prototype.getSystemMessages=function(){var t=this.options,e=t.systemMessages||{} ;return e&&this.isValidObject(e)?e[t.locale]||e[Object.keys(e)[0]]:null},t.prototype.getChatWindow=function(){return this.chatWindow} ;var o=function(t,e){void 0===t&&(t="COOKIE_STORE"),void 0===e&&(e=""),this.keyPrefix=t,this.cookieOptions=e};o.prototype._getCookieName=function(t){ return this.keyPrefix+"_"+t},o.prototype.get=function(t){return function(t){for(var e=t+"=",o=document.cookie.split(";"),s=0,n=o.length;s<n;s++){ for(var i=o[s];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return i.substring(e.length,i.length)}return null }(this._getCookieName(t))},o.prototype.set=function(t,o){return e(this._getCookieName(t),o,this.cookieOptions)},o.prototype.remove=function(t){ return o=this._getCookieName(t),s=this.cookieOptions,n="expires=Thu, 01 Jan 1970 00:00:00 GMT",void e(o,"",s?s+"; "+n:n);var o,s,n};var s={appId:null, companyName:"",companyLogo:null,webCareAgentRole:null,welcomeMessage:{},customerId:null,customerName:"Guest",customerRole:null, notificationsEnabled:!1,autoOpen:"always",autoOpenDelay:5e3,cookieName:"COOSTO_WEBCHAT",cookieOptions:"",metadataPollInterval:6e4, lastMessageTimeThreshold:36e5,locale:"nl-NL",customButton:{elementId:"message_bubble",closeElementId:"close_button"},systemMessages:{},keepOpen:!1, launcher:"always"},n=function(t,e){var n=Object.assign({},s,e);n.appId&&(this.talkJsInstance=t,this.options=n, this.store=new o(this.options.cookieName,this.options.cookieOptions),this.session=null,this.initialize())},i={customerId:{configurable:!0}, hasActiveConversation:{configurable:!0}};function a(){ if(void 0!==window.Talk&&void 0!==window.COOSTO_WEBCHAT_OPTIONS)return new n(window.Talk,window.COOSTO_WEBCHAT_OPTIONS)}i.customerId.get=function(){ if(this.options.customerId)return this.options.customerId;var t=this.store.get("USER_ID");return t||(t="_"+Math.random().toString(36).substr(2,9), this.store.set("USER_ID",t)),t},i.hasActiveConversation.get=function(){var t=Number(this.store.get("LAST_MESSAGE")) ;return!(!t||isNaN(t))&&(new Date).getTime()-t<this.options.lastMessageTimeThreshold},n.prototype.initialize=function(){var e=this ;this.checkStatus().then((function(o){if(o||e.hasActiveConversation){var s=Object.assign({},e.options,{customerId:e.customerId }),n=new t(e.talkJsInstance,s);e.session=n.build(),e.chatWindow=n.getChatWindow(),e.session.on("message",(function(t){ e.store.set("LAST_MESSAGE",t.timestamp)})),e.monitorChatAvailability(),e.handleMessageBubble(),e.askUserForEmail(n), e.options.afterLoadHook&&e.options.afterLoadHook()}}))},n.prototype.askUserForEmail=function(t){var e=this.store.get("TALKJS_EMAIL") ;t.enableEmailFeature(!e)},n.prototype.checkStatus=function(){return this.talkJsInstance.getAppMetadata(this.options.appId).then((function(t){ return!t.custom.closed}))},n.prototype.closeChat=function(){this.session&&this.session.getPopups().forEach((function(t){return t.destroy()}))}, n.prototype.monitorChatAvailability=function(){var t=this;if(this.options.metadataPollInterval)var e=setInterval((function(){ t.checkStatus().then((function(o){o||t.hasActiveConversation||(t.closeChat(),clearInterval(e))}))}),this.options.metadataPollInterval)}, n.prototype.handleMessageBubble=function(){ var t="open",e=this.options.customButton.elementId,o=this.options.customButton.closeElementId,s=document.getElementById("__talkjs_launcher"),n=document.getElementById(e) ;if(n&&"always"===this.options.launcher){n.style.display=s.classList.contains(t)?"none":"block";var i=this.chatWindow ;n.addEventListener("click",(function(){i.show()}));var a=s.classList.contains(t),r=new MutationObserver((function(e){e.forEach((function(e){ if("class"===e.attributeName){var o=e.target.classList.contains(t);a!==o&&(a=o,n.style.display=o?"none":"block")}}))}));r.observe(s,{attributes:!0}) ;var c=document.getElementById(o);c&&c.addEventListener("click",(function(t){n.style.display="none",r.disconnect(),t.stopPropagation()}))}}, Object.defineProperties(n.prototype,i),window.addEventListener("load",a),"complete"===document.readyState&&a()}();
21 jun. 2023 02:00:00