(function(){"use strict";var v;function ve(){Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(Element.prototype,"textContent").get&&(function(){var E=Object.getOwnPropertyDescriptor(Element.prototype,"innerText");Object.defineProperty(Element.prototype,"textContent",{get:function(){return E.get.call(this)},set:function(s){return E.set.call(this,s)}})})(),(function(){if(typeof window.scrollTo=="function")return!1;Window.prototype.scrollTo=Window.prototype.scroll})(),(function(){if(typeof window.CustomEvent=="function")return!1;function E(s,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var e=document.createEvent("CustomEvent");return e.initCustomEvent(s,t.bubbles,t.cancelable,t.detail),e}E.prototype=window.Event.prototype,window.CustomEvent=E})()}var w;(E=>{(s=>{if(!window.jp){var t={};window.jp=t,"ninesense"in t||(t.ninesense={}),t.ninesense.ts||(t.ninesense.ts={}),"ontouchend"in document&&document.documentElement.classList.add("touchsupport"),(function(e){const i=function(d){document.documentElement.classList.add("nslib-sub["+d+"]");var c=l[d];if(c)for(var u=c.length,f=0;f<u;f++)c[f]()},n=[],l={},o={init:function(d){t.ninesense.ts.init===!0?d(i):n.push(d)},sub:function(d,c){document.documentElement.classList.contains("nslib-sub["+d+"]")?c():(l[d]||(l[d]=[]),l[d].push(c))}};e.lib=o,window.addEventListener("jp.ninesense.ts",function(){for(var d=n.length,c=0;c<d;c++)n[c](i);document.documentElement.classList.add("nslib-init")});const a={},r={},h={jsons:r,add:function(d,c){if(r[d]=c,a[d]){var u,f=c(),m=Array.prototype.slice.call(a[d]);for(a[d]=[];u=m.pop();)u(f)}},get:function(d){return r[d]?r[d]():null},on:function(d,c){if(r[d]){c(r[d]());return}a[d]||(a[d]=[]),a[d].push(c)}};e.values=h})(t.ninesense.ts)}s.ts=window.jp.ninesense.ts})(E.ninesense||(E.ninesense={}))})(w||(w={})),w.ninesense.ts.init=void 0,w.ninesense.ts.values&&(w.ninesense.ts.values.gets=((...E)=>{const s=[];for(const t of E)s.push(new Promise((e,i)=>{var n;(n=w.ninesense.ts.values)==null||n.on(t,l=>{e(l)})}));return Promise.all(s)})),ve(),window.jp.ninesense.ts.lib;const we=()=>{w.ninesense.ts.init=!0;const E={imports:["webpack"]};try{window.dispatchEvent(new CustomEvent("nsLibInit",{detail:E})),window.dispatchEvent(new CustomEvent("jp.ninesense.ts",{detail:E})),window.console.log("%cINITIALIZED JP.NINESENSE.TS","font-size:11px;color: white;border: 1px solid #0E5579;margin:3px 0;padding: 2px 15px 2px;border-radius: 3px;background: #1879AA;letter-spacing:2px;")}catch{const t=document.createEvent("CustomEvent");t.initCustomEvent("jp.ninesense.ts",!1,!1,{detail:E}),window.dispatchEvent(t),window.console.log("=== INITIALIZED JP.NINESENSE.TS ===")}};class ae{constructor(s,t,e,i,n,l,o,a){if(this.loading=!1,this.OnLoadStart=c=>{this.start(this,c)},this.OnLoadEnd=c=>{if(this.loading=!1,this.jsonpCallbackName)window[this.uniqu]=u=>{delete window[this.id],this.jsonpData=u,this.end(this,c);const f=this.doAutoParse(u);if(f instanceof Error)for(const m of this.promise)m.rej(new ErrorEvent("ParseError"));else for(const m of this.promise)m.res(f);this.release()};else{if(this.end(this,c),this.promise.length>0){const u=this.request;if(400<=u.status&&u.status<600){const f=this.doAutoParse(this.getData());if(f instanceof Error)for(const m of this.promise)m.rej(new ErrorEvent("StatusError",{message:u.status.toString(),error:f}));else if(u.status<500)for(const m of this.promise)m.rej(new ErrorEvent("ClientError",{message:u.status.toString(),error:new Error(u.statusText)}));else for(const m of this.promise)m.rej(new ErrorEvent("ServerError",{message:u.status.toString(),error:new Error(u.statusText)}))}else{const f=this.doAutoParse(this.getData());if(f instanceof Error)for(const m of this.promise)m.rej(new ErrorEvent("ParseError"));else for(const m of this.promise)m.res(f)}}this.release()}},this.doAutoParse=c=>{if(this.autoparse){let u=!1;try{typeof c=="string"&&(c=JSON.parse(decodeURIComponent(c))),c={id:c.id,status:c.status,data:c.data},u=!0}catch{window.console.error("Loader:ParseError")}if(!u)return new Error("Loader:ParseError")}return c},this.OnLoadProgress=c=>{this.progress(this,c)},this.OnLoadError=c=>{this.loading=!1,this.error(this,c);for(const u of this.promise)u.rej(c);this.release()},this.promise=[],this.getData=()=>{if(this.data)return this.data;if(this.request instanceof HTMLScriptElement)this.data=this.jsonpData;else return this.request?(this.data=this.request.response,this.data):null;return this.data},this.getDataAs=()=>this.loading?new Promise((c,u)=>{this.promise.push({res:c,rej:u})}):Promise.resolve(this.data),this.open=c=>{if(this.loading=!1,this.request instanceof HTMLScriptElement)switch(this.uniqu=btoa(this.id),this.jsonpCallbackScript.innerHTML="window."+this.jsonpCallbackName+' = function(data){ window.setTimeout( function () { window["'+this.uniqu+'"](data) }, 1); }',c){case 0:this.request.src=this.id;break;case 1:this.request.src=this.url;break}else switch(c){case 0:this.request.open("GET",this.id,!0);break;case 1:this.request.open("POST",this.url,!0);break}},this.setRequestHeader=(c,u)=>{this.request instanceof HTMLScriptElement||this.request.setRequestHeader(c,u)},this.setResponseType=c=>{this.request instanceof HTMLScriptElement||(this.request.responseType=c)},this.send=(c=null)=>{var u;try{this.request instanceof HTMLScriptElement?(u=this.jsonpCallbackScript.parentElement)==null||u.insertBefore(this.request,this.jsonpCallbackScript):this.request.send(c),this.loading=!0}catch(f){this.loading=!1,window.console.error(f)}},this.release=()=>{this.request&&(this.request.removeEventListener("loadend",this.OnLoadEnd),this.request.removeEventListener("error",this.OnLoadError),this.request.removeEventListener("loadstart",this.OnLoadStart),this.request.removeEventListener("progress",this.OnLoadProgress),this.request instanceof HTMLScriptElement&&this.request.parentElement&&this.request.parentElement.removeChild(this.request),this.jsonpCallbackScript&&this.jsonpCallbackScript instanceof HTMLScriptElement&&this.jsonpCallbackScript.parentElement&&this.jsonpCallbackScript.parentElement.removeChild(this.jsonpCallbackScript)),this.jsonpCallbackScript=null,this.jsonpCallbackName=null,this.request=null,this.end=null,this.start=null,this.progress=null,this.error=null,this.promise=null},this.url=s,this.query=t,this.start=e,this.end=i,this.progress=n,this.error=l,this.jsonpCallbackName=o,o){var r=document.createElement("script");r.async=!0,r.classList.add("jp-ninesense-ts-loader-script"),r.addEventListener("load",this.OnLoadEnd),r.addEventListener("error",this.OnLoadError),r.addEventListener("loadstart",this.OnLoadStart),r.addEventListener("progress",this.OnLoadProgress),this.request=r,this.jsonpCallbackScript=document.createElement("script"),this.jsonpCallbackScript.type="text/javascript";var h=document.getElementsByTagName("SCRIPT"),d=h[h.length-1];d.parentElement.appendChild(this.jsonpCallbackScript)}else{this.request=(()=>{try{return new XMLHttpRequest}catch{}try{return new ActiveXObject("MSXML2.XMLHTTP.6.0")}catch{}try{return new ActiveXObject("MSXML2.XMLHTTP.3.0")}catch{}try{return new ActiveXObject("MSXML2.XMLHTTP")}catch{}return null})();try{this.request.responseType=a}catch{}this.request.addEventListener("loadend",this.OnLoadEnd),this.request.addEventListener("error",this.OnLoadError),this.request.addEventListener("loadstart",this.OnLoadStart),this.request.addEventListener("progress",this.OnLoadProgress)}this.m_setEvent=!0}get Loading(){return this.loading}}w.ninesense.ts.LoaderToken=ae;const I=class I{constructor(s){this.owners=Object.create(null),this.method=0,this.AddOwner=(t,e="",i={})=>{if(t.iloadOwner_uniquekey||(t.iloadOwner_uniquekey=I.noSeq,I.noSeq++),this.owners[t.iloadOwner_uniquekey]){var l=this.owners[t.iloadOwner_uniquekey];l.owner=t,l.filter[e]=i}else{var n={};n[e]=i,this.owners[t.iloadOwner_uniquekey]={owner:t,filter:n}}return this},this.RemoveOwner=(t,e=void 0)=>{e?delete this.owners[t.iloadOwner_uniquekey].filter[e]:delete this.owners[t.iloadOwner_uniquekey]},this.autoparse=!0,this.RequestGet=(t,e=null,i="application/x-www-form-urlencoded",n=!1,l=!0,o=void 0,a="text")=>{var r=this.method;this.method=0;try{return this.RequestUrl(t,e,i,n,l,o,a)}finally{this.method=r}},this.RequestPost=(t,e=null,i="application/x-www-form-urlencoded",n=!1,l=!0,o=void 0,a="text")=>{var r=this.method;this.method=1;try{return this.RequestUrl(t,e,i,n,l,o,a)}finally{this.method=r}},this.setHeader=t=>{this.header=t},this.RequestUrl=(t,e=null,i="application/x-www-form-urlencoded",n=!1,l=!0,o,a="text")=>{if(sessionStorage.getItem(I.timeName)===null)try{sessionStorage.setItem(I.timeName,new Date().getMilliseconds().toString())}catch(A){console.error(A)}var r=e;if(!n&&typeof r=="object"){var h=[];for(var d in r){var c=r[d];typeof c=="object"&&(c=JSON.stringify(c));var u=encodeURIComponent(d)+"="+encodeURIComponent(c);h.push(u)}r=h.join("&").replace(/%20/g,"+")}var f;switch(this.method){case 0:var m="?";t.lastIndexOf("?")>-1&&(m="&"),r!==""&&(r="&"+r);var L=t+m+"loaderID="+(sessionStorage.getItem(I.timeName)||"unknown")+r;if(I.tokens[L])return I.tokens[L];f=new ae(t,e,this.OnLoadStart,this.OnLoadEnd,this.OnLoadProgress,this.OnLoadError,o,a),f.autoparse=l,f.id=L,f.open(this.method);try{if(typeof i=="string")f.setRequestHeader("Content-Type",i);else for(var y in i)f.setRequestHeader(y,i[y])}catch(A){window.console.error(A)}f.send();break;case 1:switch(f=new ae(t,e,this.OnLoadStart,this.OnLoadEnd,this.OnLoadProgress,this.OnLoadError,o,a),f.autoparse=l,i){case"application/json":if(typeof e=="string")var C=e;else var C=JSON.stringify(e);break;case"multipart/form-data":e instanceof FormData&&(i=null);break;default:var C="loaderID="+(sessionStorage.getItem(I.timeName)||"unknown")+"&"+r}f.id=t+"?"+C,f.open(this.method);try{if(typeof i=="string")f.setRequestHeader("Content-Type",i);else for(var y in i)f.setRequestHeader(y,i[y])}catch{}n?f.send(r):f.send(C);break}return I.tokens[f.id]=f,f},this.RequestQuery=(t=null,e="application/x-www-form-urlencoded",i=!1)=>this.RequestUrl(this.serverUrl,t,e,i,this.autoparse),this.isLoading=t=>I.tokens[t]?I.tokens[t].Loading:!1,this.checkFilter=(t,e)=>{var i=this.owners[e],n=i.filter,l;if((l=n[t.url])||n[""]){var o=!1;for(var a in l){var r=t.query[a];if(!r||r!==l[a]){o=!0;break}}return!o}return!1},this.OnLoadStart=(t,e)=>{for(var i in this.owners){let n;this.checkFilter(t,i)&&(n=this.owners[i].owner.LoadStart)&&n(t)}},this.OnLoadEnd=(t,e)=>{var i=t.getData(),n;if(t.autoparse)try{typeof i=="string"&&(i=JSON.parse(decodeURIComponent(i))),n={id:i.id,status:i.status,data:i.data}}catch{window.console.error("Loader:ParseError")}else n={data:i};n||(n={id:"",status:{loading:!1},data:i});for(var l in this.owners)if(this.checkFilter(t,l)){var o=this.owners[l].owner;o.LoadEnd(t,n)}},this.OnLoadError=(t,e)=>{for(var i in this.owners)this.checkFilter(t,i)&&this.owners[i].owner.LoadError(t,e)},this.OnLoadProgress=(t,e)=>{for(var i in this.owners){let n;this.checkFilter(t,i)&&(n=this.owners[i].owner.LoadProgress)&&n(t,e)}},this.OnFormat=t=>{},this.serverUrl=s}get serverURL(){return this.serverUrl}set serverURL(s){this.serverUrl=s}cacheDelete(s){delete I.tokens[s.id]}};I.timeName="jp.ninesense.ts.Common.ajax.Loader.time",I.noSeq=0,I.tokens={};let $=I;w.ninesense.ts.Loader=$;var te=(E=>(E[E.GET=0]="GET",E[E.POST=1]="POST",E))(te||{});w.ninesense.ts.LoadMethod=te;const g=class g{};g.httpRegex=(()=>{var s=new RegExp("https?://[^/]*");return s})(),g.httpUnderRegex=(()=>{var s=new RegExp("https?://[^/]*");return s})(),g.href=decodeURI(location.href),g.mapping=[],g.timeout=0,g.isHttps=g.href.indexOf("https://")>-1,g.getDomain=()=>(g.domain||(g.domain=location.host),g.domain),g.getUnderDomain=()=>(g.underDomain||(g.underDomain=location.pathname),g.underDomain),g.getParam=()=>{if(!g.param){for(var s=location.search.substring(1).split("&"),t={},e=s.length,i=0;i<e;i++){var n=s[i].indexOf("="),l="";n!=-1&&(l=s[i].slice(0,n));var o=s[i].slice(s[i].indexOf("=",0)+1);if(l!=""){const a=/([^\]]*)\[([^\]]?)\]/.exec(l);if(a&&a[0])if(a[1]!==void 0&&a[2]!==void 0){const r=a[1],h=a[2];if(!t[r]){const c=parseInt(h,10);isNaN(c)?t[r]={}:t[r]=[]}const d=t[r];d instanceof Array?h===void 0||h===""?d.push(decodeURIComponent(o)):d[parseInt(h)]=decodeURIComponent(o):d[l]=decodeURIComponent(o)}else t[l]=decodeURIComponent(o);else t[l]=decodeURIComponent(o)}}g.param=t}return g.param},g.getParamToQuery=()=>{const s=g.getParam();let t="";for(const e in s)t=g.toQuery(t,e,s[e]);return t},g.toQuery=(s,t,e)=>{const i=s!=="";switch(typeof e){case"boolean":case"string":case"number":i&&(s+="&"),s+=encodeURIComponent(t)+"="+encodeURIComponent(e.toString());break;case"object":let n="";for(const l in e)n=g.toQuery(n,t+"["+l+"]",e);i&&n!==""&&(s+="&"),s+=n}return s},g.setting=(s,t)=>{var e=location.pathname;e===s&&t()},g.loaded=s=>{var t=g.mapping.length,e=g.getParam();console.log(s?"HTTP INIT":"HTTP INIT:TM"),g.timeout=0;for(var i=0;i<t&&g.mapping[i](e)!==!0;i++);g.mapping=[]},g.init=(s,t)=>{var e=location.pathname;if(e===s||s===""||s instanceof RegExp&&s.test(e)){if(document.readyState==="complete"){g.mapping.push(t),g.timeout===0&&(g.timeout=setTimeout(g.loaded,1));return}g.mapping[0]||(window.addEventListener?window.addEventListener("load",g.loaded,!1):"attachEvent"in window?window.attachEvent("onload",g.loaded):window.onload=g.loaded),g.mapping.push(t)}};let se=g;w.ninesense.ts.http=se;var J;(E=>{(s=>{s.ts||(s.ts={})})(E.ninesense||(E.ninesense={}))})(J||(J={})),J.ninesense.ts.wordpress=window.jp.ninesense.ts.wordpress=window.jp.ninesense.ts.wordpress||{};const q=class q{static init(){return q.loader?Promise.resolve(q.loader):w.ninesense.ts.values.gets("ns_server_information").then(s=>{if(q.loader)return q.loader;const t=new $(s[0].ajax_url);return t.method=te.POST,t.autoparse=!0,this.loader={loader:t,info:s[0].info}})}};q.catch=()=>q.init(),q.request=(s,t)=>q.init().then(e=>e.loader.RequestQuery({action:s,token:e.info.token,payload:t}).getDataAs());let le=q;const O=class O{constructor(s){if(this.LoadEnd=(o,a)=>{window.console.log("loaded")},this.LoadError=(o,a)=>{window.console.log(a)},O.instance)return;O.instance=this;const t=O.info.pageID,e=O.info.pageOP,i=O.info.pageVW,n=O.info.pageTP,l=O.info.pageLG;try{const o=le.catch(),a=O.info.ajax,r=O.info.token;o.then(h=>{h.loader.AddOwner(this,a,{action:"access_init"}),h.loader.RequestUrl(a,{action:"access_init",token:r,location:{href:location.href,origin:location.origin,search:location.search,pathname:location.pathname,hash:location.hash},access:{pageID:t,pageOP:e,pageTP:n,pageVW:i,pageLG:l}})}).catch(h=>{console.error(h)})}catch(o){window.console.log(o)}}};O.init=s=>{O.info=s};let W=O;const Ee=()=>{J.ninesense.ts.wordpress.accessedInit=W},j=class j{};j.have=null,j.createEvent=(s,t)=>{if(j.have===null){try{var e=new CustomEvent(s,t);j.have=!0}catch{var e=document.createEvent("Event");e.initEvent(s,t.bubbles,t.cancelable),j.have=!1}return e}if(j.have)var e=new CustomEvent(s,t);else{var e=document.createEvent("Event");e.initEvent(s,t.bubbles,t.cancelable)}return e},j.dispatch=(s,t,e)=>{var i=j.createEvent(t,e);return s.dispatchEvent(i)};let ie=j;w.ninesense.ts.eventDispatcher=ie;class ne{constructor(){this.listeners={}}addEventListener(s,t,e){s in this.listeners||(this.listeners[s]=[]),this.listeners[s].push(t)}removeEventListener(s,t,e){if(s in this.listeners){var i=this.listeners[s];for(var n in i)if(i[n]===t){i.splice(n,1);return}}}dispatchEvent(s){var t=s.type;if(!(t in this.listeners))return!0;var e=this.listeners[t].slice();for(var i of e)i.call(this,s);return!s.defaultPrevented}}w.ninesense.ts.eventTarget=ne;const k=class k{static abs(s){return(s^s>>31)-(s>>31)}};k.maxElement=255,k.nearOne=.999999999999999,k.nearOneM=-.999999999999999,k.floor=s=>s<<1>>1,k.Upper=s=>s+(s>=0?k.nearOne:k.nearOneM)<<1>>1,k.equalSign=(s,t)=>(s^t)>=0,k.equalSignNum=(s,t)=>(k.Upper(s)^k.Upper(t))>=0,k.changeSign=s=>~s+1,k.isEven=s=>!(s&1),k.leftShift=(s,t)=>s<<t,k.rightShift=(s,t)=>s>>t,k.matchOut=(s,t)=>s&t-1,k.valueChange=(s,t)=>{},k.randomInt=(s,t)=>k.floor(Math.random()*(t-s+1))+s,k.euclid=(s,t)=>{var e;return s<t&&(e=s,s=t,t=e),t<1?-1:s%t==0?t:k.euclid(t,s%t)};let Y=k;w.ninesense.ts.MathBit=Y;const p=class p{constructor(){if(this.keySec=0,this.length=0,this.lastTime=0,this.startTime=0,this.lastFrame=-1,this.afterFunc=[],this.start=()=>{p.useAnimationFrame?this.timerToken=setTimeout(this.OnTickerTimer):(this.startTime=p.getTime(),this.timerToken=setInterval(this.OnTickerEventBase,p.nmInterval))},this.stop=()=>{p.useAnimationFrame?p.isAnimationFrame===!1?cancelAnimationFrame(this.timerToken):clearTimeout(this.timerToken):clearTimeout(this.timerToken),this.timerToken=NaN},this.Add=(s,t)=>{s.key||(this.keySec++,s.key=this.keySec),!this.actionList[s.key]&&(this.length++,this.actionList[s.key]={key:s,opt:t},this.length===1&&this.start())},this.Remove=s=>{this.actionList[s.key]&&(this.length--,delete this.actionList[s.key],this.length===0&&this.stop())},this.AddAfterFunction=s=>this.afterFunc.push(s)-1,this.RemoveAfterFunction=s=>{delete this.afterFunc[s]},this.checkTimeInfomation=s=>{const t=s-this.lastTime;p.diff=t,this.lastTime=s;const e=Y.floor((s-this.startTime)/p.nmInterval);if(e===this.lastFrame)return!1;if(e!==1?p.lastFrameDeficiency=Y.floor(t/p.nmInterval*100)/100:p.lastFrameDeficiency=0,this.lastFrame=e,p.calcFps){p.frames++;let i=p.lastCheck;const n=s-i;s>i+1&&(p.fps=p.frames*1e3/n,p.frames=0,p.lastCheck=s)}return!0},this.OnTickerTimer=()=>{this.timerToken=requestAnimationFrame(this.OnTickerEventBase);const s=this.actionList;for(var t in s){const e=this.actionList[t],i=e.key,n=e.opt;let l=i.getTickIndex();if(n&&n.preaction){if(n.pauseCount!==void 0&&n.pauseCount>1)continue;n.preparam=n.preaction(l,n)}}},this.OnTickerEventBase=s=>{try{if(p.useAnimationFrame)if(this.checkTimeInfomation(s)===!1){this.timerToken=requestAnimationFrame(this.OnTickerEventBase);return}else p.isAnimationFrame=!0,this.timerToken=setTimeout(this.OnTickerTimer);var t=this.length;if(t===0){this.stop();return}const l=this.actionList;for(var e in l){const o=this.actionList[e],a=o.key,r=o.opt;let h=a.getTickIndex();try{if(r&&r.pauseCount!==void 0&&r.pauseCount!==0&&(r.pauseCount-=1,a.OnTickerPauseEvent&&(h=a.OnTickerPauseEvent(h,r)),r.pauseCount>0))continue;h=a.OnTickerEvent(h,r)}finally{a.setTickIndex(h)}}var i=this.afterFunc;for(var n in i)i[n]();i.length=0}finally{p.isAnimationFrame=!1}},p.instance!==void 0)throw new Error("ActionTimerはシングルトンクラスです。");this.actionList=Object.create(null)}static get UseAnimationFrame(){return p.useAnimationFrame}static set UseAnimationFrame(s){if(p.instance!==void 0)throw new Error("ActionTimerのインターバルはActionTimerを使用する前に設定してください。");p.useAnimationFrame!==s&&(s&&!requestAnimationFrame||(p.useAnimationFrame=s,s&&window.console.log("==== USE ANIMATION FRAME FOR NINESENSE ACTION TIMER ====")))}static get Interval(){return p.nmInterval}static set Interval(s){if(p.instance!==void 0)throw new Error("ActionTimerのインターバルはActionTimerを使用する前に設定してください。");p.nmInterval=s}};p.nmInterval=1e3/60,p.useAnimationFrame=!1,p.nowFunc=window.performance&&(performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow)||(()=>new Date().getTime()),p.getTime=()=>p.nowFunc.call(performance),p.GetInstance=()=>(p.instance===void 0&&(p.instance=new p),p.instance),p.lastFrameDeficiency=0,p.diff=0,p.isAnimationFrame=!1,p.calcFps=!0,p.frames=0,p.fps=0,p.lastCheck=0;let X=p;w.ninesense.ts.ActionTimer=X;class me{constructor(s){this.index=0,this.getTickIndex=()=>this.index,this.setTickIndex=t=>{this.index!==t&&(this.index=t,t!==0?X.GetInstance().Add(this,this.option):X.GetInstance().Remove(this))},this.actionFromTo=(t,e)=>{var i=this.getTickIndex();return i===t?(this.setTickIndex(e),!0):!1},this.stopTo=t=>{var e=this.getTickIndex();return e===0?(this.setTickIndex(t),!0):!1},this.OnTickerEvent=s}}w.ninesense.ts.ActionObj=me;class pe extends me{constructor(s){super(s)}}w.ninesense.ts.ActionObjEx=pe,"requestAnimationFrame"in window&&(X.UseAnimationFrame=!0);let R=(v=class{static enabledFullScreen(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.documentElement.webkitRequestFullScreen||document.msFullscreenEnabled}static getFullScreenObject(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement}},v.mapping=[],v.timeout=0,v.init=(s,t)=>{var e=location.pathname;if(e===s||s===""||s instanceof RegExp&&s.test(e)){if(document.readyState==="complete"||document.readyState==="interactive"){v.mapping.push(t),v.timeout===0&&(v.timeout=setTimeout(v.loaded,1));return}v.mapping[0]||(window.addEventListener?window.addEventListener("DOMContentLoaded",v.loaded,!1):"attachEvent"in window&&window.attachEvent("onreadystatechange",v.loaded)),v.mapping.push(t)}},v.loaded=s=>{var t=v.mapping.concat();v.mapping=[];var e=t.length,i=se.getParam();console.log(s?"DOM INIT:EV":"DOM INIT:TM"),v.timeout=0;for(var n=0;n<e&&t[n](i)!==!0;n++);},v.insertNext=(s,t)=>{var e=t.nextElementSibling;if(e){if(s===e)return;e.parentElement.insertBefore(s,e)}else t.parentElement.appendChild(s)},v.insertLastSameTag=s=>{var t=s.ownerDocument.getElementsByTagName(s.tagName),e=t[t.length-1];v.insertNext(e,s)},v.removeAllChild=s=>{for(;s.firstChild;)s.removeChild(s.firstChild)},v.classOnParent=(s,t)=>{var e=s;if(e.classList.contains(t))return e;for(;e.parentElement;)if(e=e.parentElement,e.classList.contains(t))return e;return null},v.requestFullscreen=(s,t=null)=>{var e=s.requestFullscreen||s.mozRequestFullScreen||s.webkitRequestFullScreen||s.msRequestFullscreen;e&&e.call(s,t)},v.exitFullscreen=()=>{const s=document.exitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.msExitFullscreen;s&&s.call(document)},v.addListenFullScreen=(s,t=!1)=>{document.addEventListener("fullscreenchange",s,t),document.addEventListener("webkitfullscreenchange",s,t),document.addEventListener("mozfullscreenchange",s,t),document.addEventListener("MSFullscreenChange",s,t)},v.setMeta=s=>{if(s.title){document.title=s.title;var t=document.head.querySelector('meta[property="og:title"]');t&&(t.content=s.title)}if(s.image){var e=document.head.querySelector('meta[property="og:image"]');if(e&&(e.content=s.image,s.imagealt)){var i=document.head.querySelector('meta[property="og:image:alt"]');i&&(i.content=s.imagealt)}}if(s.description){var n=document.head.querySelector('meta[name="description"]');n&&(document.head.querySelector('meta[name="description"]').content=s.description);var l=document.head.querySelector('meta[property="og:description"]');l&&(l.content=s.description)}},v.getMeta=()=>{var s=document.head.querySelector('meta[name="description"]'),t=document.head.querySelector('meta[property="og:image"]'),e=document.head.querySelector('meta[property="og:image:alt"]');return{title:document.title,description:s?s.content:document.title,image:t?t.content:"",imagealt:e?e.content:document.title}},v.unescapeUnknown=s=>s.replace(/&lt;/g,"<").replace(/&gt;/g,">"),v.getTestElement=(()=>{if(v.testElement)return v.testElement;const s=document.createElement("div");s.attachShadow({mode:"open"});let t=s.shadowRoot;return t||(t=s),v.testElement=t}),v.escapeUnknown=s=>{if(!s||s==="")return s;let t=s.length;const e=[""];let i=0;for(let o=0;o<t;o++){const a=s.charAt(o);a==="<"?(e[i]!==""&&(i++,e[i]=""),e[i]+=a):a===">"?(e[i]+=a,i++,e[i]=""):e[i]+=a}t=e.length,e[i]===""&&(t--,e.length=t-1);let n="";const l=v.getTestElement();for(let o=0;o<t;o++)if(e[o])try{if(e[o].indexOf("<script ")===0||e[o].indexOf("<iframe ")===0||e[o].indexOf("<style ")===0||e[o].indexOf("<link ")===0||e[o].indexOf("<img ")===0)continue;l.innerHTML=e[o],(!l.firstChild||l.firstChild instanceof HTMLUnknownElement)&&(e[o].match(/<\/[^>]*>/)||(l.textContent=e[o],e[o]=l.innerHTML)),v.removeAllChild(l)}finally{n+=e[o]}return n},v);w.ninesense.ts.dom=R;const Q=class Q{static inputWithLabel(s,t,e="before",i=null){if(typeof s=="string")if(s==="select")s=document.createElement("select");else{const o=document.createElement("input");o.type=s,s=o}s.name=t,s.classList.add("set-input");var n=document.createElement("label");n.classList.add(t+"-label","set-label");var l=document.createElement("span");switch(l.classList.add(t+"-label-text","set-label-text"),i&&(i.id&&(n.id=i.id+"-label",l.id=i.id+"-label-text",n.setAttribute("for",s.id=i.id)),i.class&&(n.className=i.class+"-label",l.className=i.class+"-label-text",n.className=i.class+"-label")),e){case"before":n.appendChild(l),n.appendChild(s);break;case"after":n.appendChild(s),n.appendChild(l);break}return{input:s,label:n,label_text:l}}};Q.createTableExFrame=(s,t,e=!0,i=!0,n="card")=>{var l=document.createElement("section");l.classList.add("ns-table-frame"),l.classList.add(n);var o=document.createElement("header");o.classList.add(n+"-header");var a=document.createElement("div");if(a.classList.add(n+"-actions"),o.appendChild(a),i){var r=document.createElement("a");r.href="#",r.className=n+"-action "+n+"-action-dismiss",r.setAttribute("data-"+n+"-toggle",""),a.appendChild(r)}if(e){var r=document.createElement("a");r.href="#",r.className=n+"-action "+n+"-action-toggle",r.setAttribute("data-"+n+"-toggle",""),a.appendChild(r)}var h=document.createElement("h2");h.className=n+"-title",h.textContent=s,o.appendChild(h);var d=document.createElement("div");d.className=n+"-body advanced";var c=document.createElement("div");return c.className="row "+n+"-caption",d.appendChild(c),t.classList.add(n+"-body-inner"),d.appendChild(t),l.appendChild(o),l.appendChild(d),l},Q.createTableExBase=(s,t,e)=>{var i=document.createElement("div");i.className="table-advanced";var n=document.createElement("table");n.className="table table-bordered table-striped mb-none",n.id=s;var l=document.createElement("thead"),o=t.length;if(o>0)for(var a=0;a<o;a++){var r=t[a],h=document.createElement("tr");for(var d in r){var c=r[d],u=document.createElement("th");u.classList.add("h-"+d),u.classList.add("h-title"),typeof c=="string"?u.innerHTML=c:(u.innerHTML=c.title,c.rspan&&(u.rowSpan=c.rspan),c.cspan&&(u.colSpan=c.cspan),c.class&&u.classList.add(c.class)),h.appendChild(u)}l.appendChild(h)}n.appendChild(l);var f;o===1?(f=document.createElement("tbody"),n.appendChild(f)):f=n,e["{temp}"]||(e["{temp}"]={});for(var m in e){var L=e[m];let N;o===1?N=document.createElement("tr"):N=document.createElement("tbody"),N.id="id-"+m,N.classList.add("ns-recode");for(var a=0;a<o;a++){var r=t[a],y;o===1?y=N:(y=document.createElement("tr"),N.appendChild(y));for(var d in r){let oe=L[d];oe||(oe="&nbsp;");var C=document.createElement("td");C.classList.add("c-"+d),C.setAttribute("data-ns-search",oe);var A=document.createElement("span"),F=document.createElement("div"),ee=document.createElement("span");A.className="c-title";var T=r[d];typeof T=="string"?A.innerHTML=T:(A.innerHTML=T.title,T.rspan&&(C.rowSpan=T.rspan),T.cspan&&(C.colSpan=T.cspan),T.class&&C.classList.add(T.class)),F.className="c-body",F.innerHTML=oe,ee.className="c-ui",C.appendChild(A),C.appendChild(F),C.appendChild(ee),y.appendChild(C)}}if(m!=="{temp}")f.appendChild(N);else{var V=document.createElement("tbody");V.appendChild(N),l.setAttribute("data-ns-row-temp",V.innerHTML)}}return i.appendChild(n),i},Q.createSVG=(s="0 0 100 100",t={x:"0px",y:"0px"})=>{var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("version","1.1"),e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("x","0px"),e.setAttribute("y","0px"),e.setAttribute("viewBox",s),e.setAttribute("style","enable-background:new "+s+";"),e.setAttribute("xml:space","preserve");for(var i in t)e.setAttribute(i,t[i]);return e},Q.addViewInner=(s,t="div",e="div")=>{var i=document.createElement(t);i.classList.add("view");var n=document.createElement(e);return n.classList.add("inner"),i.appendChild(n),s.appendChild(i),s.classList.add("wrap"),{view:i,inner:n}};let ce=Q;var de={dom:ce};w.ninesense.ts.template=de,window.dataLayer=window.dataLayer||[];const D=class D extends ne{constructor(){super(),this.gtmConsentMap={},this.init=()=>{w.ninesense.ts.values&&(this.permission=w.ninesense.ts.values.on("permission",s=>{s.cookie.enabled&&(U.init(s.cookie,t=>{this.dispatchEvent(new CustomEvent("change",{detail:{type:"cookie",param:t}}))}),U.getInstance().checkNeedConsent()===!1&&setTimeout(()=>{this.dispatchEvent(new CustomEvent("consented",{detail:{type:"cookie",param:U.getInstance().getSaveData()}}))})),this.addEventListener("consented",t=>{this.staticDoConsent(t.detail.type,t.detail.param)}),this.addEventListener("change",t=>{this.staticDoConsent(t.detail.type,t.detail.param)}),this.init=null}))},this.setGtmConsentMap=(s,t)=>{this.gtmConsentMap=t},this.isCookieConsented=s=>this.permission?U.getInstance().isConsented(s):!0,this.addSystemCookie=s=>{U.getInstance().addSystemCookie(s)}}staticDoConsent(s,t){switch(s){case"cookie":const i=this.gtmConsentMap,n={};let l=0;for(const o in i)t[o]==="1"&&(n[i[o]]="granted",window.console.debug(i[o]+" : granted"),l++);if(l>0){var e;e||(e=function(){window.dataLayer.push(arguments)}),e("consent","update",n)}}}};D.getInstance=()=>(D.instance||(D.instance=new D,D.instance.init()),D.instance);let M=D;w.ninesense.ts.permission=M;const H=class H{constructor(s,t){this.cookie_name="cookie-consent",this._systemCookie={"cookie-consent":!0},this.checkNeedConsent=()=>{var e=this.setting;for(var i in e.details){var n=e.details[i];if(n.type==="select"&&this.isConsented(n.meta.id)===null)return this.createPermissionPopup(),!0}return!1},this.createPermissionPopup=()=>{var e=this.setting,i=this.messageBox=document.createElement("section"),n=this.detailsBox=document.createElement("section");i.className="cookie-permission-popup",n.className="cookie-permission-details";var r=de.dom.addViewInner(i).inner,l=document.createElement("div"),u=document.createElement("div"),o=document.createElement("button"),a=document.createElement("button");o.textContent=e.texts.button_enabled,a.textContent=e.texts.button_detail,u.appendChild(a),u.appendChild(o),l.className="cookie-permission-message",u.className="cookie-permission-buttons",o.className="cookie-permission-enabled",a.className="cookie-permission-detail",l.innerHTML=e.texts.message,r.appendChild(l),r.appendChild(u);var r=de.dom.addViewInner(n).inner,h=e.details;h.length;var d=document.createElement("ul");d.className="cookie-permission-items";for(var c in h)d.appendChild(this.createSettingLine(h[c]));var u=document.createElement("div"),f=document.createElement("button"),m=document.createElement("button"),L=document.createElement("button");u.className="cookie-permission-detail-buttons",f.className="cookie-permission-all-anabled",m.className="cookie-permission-checkd-anabled",L.className="cookie-permission-detail-close",f.textContent=e.texts.button_all_enabled,m.textContent=e.texts.button_checked_enabled,u.appendChild(f),u.appendChild(m),r.appendChild(d),r.appendChild(u),r.appendChild(L),a.addEventListener("click",()=>{document.body.appendChild(this.detailsBox),i.classList.add("detail-open")});var y=()=>{this.doSave(!0),this.onConsented(this.getSaveData()),this.hide()};o.addEventListener("click",y),f.addEventListener("click",y),m.addEventListener("click",()=>{this.doSave(),this.onConsented(this.getSaveData()),this.hide()}),L.addEventListener("click",()=>{this.detailsBox.parentElement&&(this.detailsBox.parentElement.removeChild(this.detailsBox),i.classList.remove("detail-open"))}),this.show()},this.doSave=(e=null)=>{var i=this.setting.details,n={},l=e?"1":"0";for(var o in i)if(i[o].type==="select"){i[o];var a=i[o].input;a.checked?n[o]=e===null?"1":l:n[o]=e===null?"0":l}this.setSaveData(n)},this.createSettingLine=e=>{var i=document.createElement("li"),n=document.createElement("h3"),l=document.createElement("p"),o=document.createElement("div"),a=document.createElement("div");if(n.textContent=e.meta.title,l.textContent=e.meta.detail,e.type==="select"){var r=document.createElement("input"),h=document.createElement("label");r.name=e.meta.id,r.id="cookie-permission-"+e.meta.id,r.type="checkbox";var d=this.isConsented(e.meta.id);d===null?r.checked=!0:r.checked=d,r.checked=!0,r.className="cookie-permission-check",h.className="cookie-permission-check-label",h.setAttribute("for",r.id),h.appendChild(document.createElement("span")),a.appendChild(r),a.appendChild(h),e.input=r}return i.className="cookie-permission-item",o.className="cookie-permission-texts",a.className="cookie-permission-checkblock",n.className="cookie-permission-item-title",l.className="cookie-permission-item-detail",o.appendChild(n),o.appendChild(l),i.appendChild(o),i.appendChild(a),o.addEventListener("click",c=>{i.classList.contains("open")?i.classList.remove("open"):i.classList.add("open")}),i},this.getSaveData=()=>{if(this._saveData)return this._saveData;var e=JSON.parse(Z.getInstance().get(this.cookie_name));return e||(e={}),this._saveData=e},this.setSaveData=e=>{Z.getInstance().set(this.cookie_name,JSON.stringify(e)),this._saveData=null},this.isConsented=e=>{if(this._systemCookie[e]===!0||this.setting.details[e].type==="show")return!0;var i=this.getSaveData();return i[e]?i[e]==="1":null},this.addSystemCookie=e=>{this._systemCookie[e]=!0},this.show=()=>{document.body.appendChild(this.messageBox)},this.hide=()=>{this.messageBox.parentElement&&this.messageBox.parentElement.removeChild(this.messageBox),this.detailsBox.parentElement&&this.detailsBox.parentElement.removeChild(this.detailsBox),this.messageBox.classList.remove("detail-open")},this.setting=s,this.onConsented=t}};H.init=(s,t)=>{H.instance||(H.instance=new H(s,t))},H.getInstance=()=>H.instance;let U=H;R.init("",()=>{M.getInstance()});class x{constructor(s){this.OnStrage=t=>{t.storageArea,this.storage},this.get=(t,e=!1)=>this.storage?(window.console.debug("STORAGE GET:"+t),e===!1?this.storage.getItem(t):JSON.parse(this.storage.getItem(t))):null,this.set=(t,e)=>{if(this.storage){if(e===null){this.storage.removeItem(t);return}typeof e!="string"&&(e=JSON.stringify(e)),window.console.debug("STORAGE SET:"+t),this.storage.setItem(t,e)}},this.rm=t=>{if(!this.storage)return null;window.console.debug("STORAGE RM:"+t),this.storage.removeItem(t)},s&&(this.storage=s,window.addEventListener("storage",this.OnStrage))}static get Session(){return x.session===void 0&&(x.session=new x(window.sessionStorage)),x.session}static get Local(){return x.local===void 0&&(x.local=new x(window.localStorage)),x.local}}w.ninesense.ts.Storages=x;const G=class G{constructor(){this.use_session={},this.get=s=>{if(M.getInstance().isCookieConsented(s)!==!0)return x.Session.get("_cookie_"+s);if(this.storage[s])return this.storage[s];for(var t=document.cookie.split("; "),e=t.length,i=0;i<e;i++){var n=t[i];if(n.indexOf(s+"=")===0)return this.storage[s]=n.split("=")[1]}return null},this.set=(s,t,e=null)=>{if(t===null){this.rm(s);return}if(M.getInstance().isCookieConsented(s)!==!0){window.console.debug("COOKIE PARMITION denied. USE SESSION:"+s),this.use_session[s]=e,x.Session.set("_cookie_"+s,t);return}typeof t!="string"&&(t=JSON.stringify(t)),window.console.debug("COOKIE SET:"+s),this.storage[s]=t;var i=s+"="+t;if(e)for(var n in e){var l=e[n];switch(typeof l){case"boolean":l="; "+n;break;default:l="; "+n+"="+l.toString()}i+="; "+n+"="+l}if(!e||(e.expires||e["max-age"])===void 0){var o=new Date;o.setMonth(o.getMonth()+12),i+="; expires="+o.toString()}(!e||e.secure===void 0)&&(i+="; Secure"),(!e||e.path===void 0)&&(i+="; path=/"),document.cookie=i},this.rm=s=>{if(!this.storage)return null;window.console.debug("COOKIE RM:"+s),delete this.storage[s],document.cookie=s+"=; max-age=0"},this.storage={},M.getInstance().addEventListener("change",s=>{for(var t in this.use_session)s.detail.param[t]==="1"&&this.set(t,x.Session.get("_cookie_"+t),this.use_session[t])})}};G.getInstance=()=>G.instance?G.instance:G.instance=new G;let Z=G;w.ninesense.ts.Cookie=Z;const S=class S{};S.strageKey="nswp-posts-catalog",S.scripts={},S.init=()=>new Promise((s,t)=>{w.ninesense.ts.values.on("catalog",e=>{S.catalog=e,s(void 0)})}),S.getStrageData=s=>x.Local.get(s,!0),S.saveStrageData=(s,t)=>{x.Local.set(s,t)},S.on=(s,t)=>{const e=W.info.pageLG;let i=s;if(e&&(i+="-"+e,window.console.debug("catalog-lang:"+e)),!S.catalog[s])return window.console.debug("undefind-catalog-request:"+s),!1;const n=S.catalog[s],l=S.strageKey+"-"+i;let o=S.getStrageData(l);if(o){if(o.m===n.time)return n.p&&(o.p=n.p),t(o,null),!0;window.console.debug(n.key+". This catalog is old.")}if(o=w.ninesense.ts.values.get(n.key),!o&&!S.scripts[n.key]){const a=document.createElement("script");a.src=S.catalog[s].uri+"?lang="+e+"&tmp="+Date.now().toString(),a.type="text/javascript",a.onerror=r=>{t(null,r.toString())},S.scripts[n.key]=a,document.head.appendChild(a),window.console.debug("load-catalog:"+n.key),a.onload=r=>{t(null,n.key+". There is a problem with this catalog.")},w.ninesense.ts.values.on(n.key,r=>{a.onload=null,r.t&&(r.taxonomy=w.ninesense.ts.values.get(r.t)),S.saveStrageData(l,r),n.p&&(r.p=n.p),t(r,null)})}else o.t&&(o.taxonomy=w.ninesense.ts.values.get(o.t)),S.saveStrageData(l,o),n.p&&(o.p=n.p),t(o,null);return!0};let _=S;const be=()=>{w.ninesense.ts.wordpress.postsCatalog=_,R.init("",()=>{_.init().catch(E=>console.error(E))})},P=class P extends ne{constructor(){if(super(),this.values={},this._isBrowserback=void 0,this.targets=[],this._popStateSetting=!1,this.lock=!1,this.getHistoryState=()=>{var t=window.history.state;return(!t||typeof t!="object"||!t.jp_ninesense_ts)&&(t={jp_ninesense_ts:{values:{},history:{title:"",description:""}},othervalue:t}),this._isBrowserback===void 0&&t&&t.jp_ninesense_ts.history.isBrowserback&&(this._isBrowserback=t.jp_ninesense_ts.history.isBrowserback===!0,this._isBrowserback&&console.log("HistoryValues:This page is history data.")),t},this.OnUnLoad=t=>{var e=this.getHistoryState();e.jp_ninesense_ts.history.isBrowserback=!0,window.history.replaceState(e,"")},this.OnPopState=t=>{if(t.state){this._popStateSetting=!0;try{var e=t.state;e.jp_ninesense_ts&&(this.values=e.jp_ninesense_ts.values);for(var i=this.targets.length,n=this.values,l=0;l<i;l++){var o=this.targets[l];o.callback(o.target,n[o.id])}this.dispatchEvent(new CustomEvent("change",{detail:{type:"pop",title:document.title,path:location.href}}))}finally{this._popStateSetting=!1}}},this.addTarget=(t,e,i,n,l=null)=>{this.targets.push({id:t,target:e,callback:n,urlQuery:l});var o=this.values,a=!1;o[t]||(o[t]=i,a=!0);var r=this.getHistoryState();r.jp_ninesense_ts.values=o,window.history.replaceState(r,""),a||n(e,o[t],!0)},this.getState=(t,e)=>this.values[t]?this.values[t][e]:null,this.back=(t=1)=>t<=0||history.length===1?Promise.resolve(!1):new Promise((e,i)=>{var n=this.getHistoryState();if(!n.jp_ninesense_ts.back)return Promise.resolve(!1);const l=()=>{window.removeEventListener("popstate",l),e(!0)};window.addEventListener("popstate",l),history.go(t*-1)}),this.refleshWaight=[],this.reflesh=(t,e=!1)=>e===!0?(this.doReflesh(t),!0):new Promise((i,n)=>{this.refleshWaight.push(i),!this.time&&(this.time=setTimeout(()=>{this.doReflesh(t);for(const l of this.refleshWaight)l(!0);this.refleshWaight.length=0},1))}),this.doReflesh=t=>{this.time=void 0;var e=this.getHistoryState();const i=e.jp_ninesense_ts.values;e.jp_ninesense_ts.values=this.values;var n=[];for(var l of this.targets)n.push(l.urlQuery);n=n.sort((d,c)=>d.priority<c.priority||d.priority>c.priority?-1:0);var o={title:document.title,path:location.pathname,param:location.search.replace("?","").split("&"),hash:""};for(var a of n)o=a.onMetaParam(o),o.path=o.path.split("?")[0];var r=o.path;if(r.indexOf("https://")!==0&&r.indexOf("http://")!==0){r===""&&(r="/"),r.charAt(0)!=="/"&&(r="/"+r);const d=r.split("/"),c=d[d.length-1];!(c.split(".").length>1)&&c.charAt(c.length-1)!=="/"&&(r+="/"),r=r.replace(/\/{2}/,"/")}var h=o.param.join("&");switch(h!==""&&(r+="?"+h),o.hash!==""&&(r+="#"+o.hash),t){case"push":e.jp_ninesense_ts.back=i,window.history.pushState(e,o.title,r);break;default:window.history.replaceState(e,o.title,r)}this.dispatchEvent(new CustomEvent("change",{detail:{type:t,title:o.title,path:r}}))},P.instance!==void 0)throw new Error("シングルトンクラスを複数インスタンス化出来ません。");P.instance=this,window.addEventListener("popstate",this.OnPopState),window.addEventListener("pagehide",this.OnUnLoad);var s=this.getHistoryState();s&&s.jp_ninesense_ts&&(this.values=s.jp_ninesense_ts.values),this.values||(this.values={}),s.jp_ninesense_ts.history.isBrowserback=!1;try{history.replaceState(s,""),this._isBrowserback&&w.ninesense.ts.lib.init(()=>{this.dispatchEvent(new Event("backed"))})}catch(t){window.removeEventListener("popstate",this.OnPopState),window.removeEventListener("pagehide",this.OnUnLoad),window.console.warn(t)}}get isBrowserback(){return this._isBrowserback}get PopStateSetting(){return this._popStateSetting}set(s,t,e,i,n=!1){if(this.lock)return n?!1:Promise.resolve(!1);var l=this.values;return l[t]||(l[t]={}),l[t][e]=i,this.reflesh(s,n)}};P.GetInstance=()=>(P.instance===void 0&&(P.instance=new P),P.instance),P.useableHistory=()=>!!(window.history&&"replaceState"in window.history);let B=P;B.GetInstance(),w.ninesense.ts.HistoryValues=B;class ge{constructor(s,t){this.useHistory=!1,this.multiSelect=!0,this.method="AND",this.filters={},this.active_filters={},this.OnFilterClick=a=>{try{let r=a.target;if(this.list===r)return;for(;!(r instanceof HTMLAnchorElement);){if(!r||this.block===r)return;r=r.parentElement}const h=r,d=r.parentElement;if(this._useClearItem&&this.clearItem.contains(h)){this.doFilter(null,!0),this.onFilterClick(this);return}if(!this.multiSelect&&h.classList.contains("active_filter"))return;this.doFilter([d.id],!this.multiSelect),this.onFilterClick(this)}finally{a.preventDefault()}},this.clear=()=>{this.doFilter(null,!0)},this.doFilter=(a=[],r=!1)=>{a||(a=[]);let h=this.active_filters;const d=this.filters,c={};r&&(h={});for(const u of a)h[u]===!0?delete h[u]:h[u]=!0;for(const u in d)h[u]&&(c[u]=d[u]);this.active_filters=h,this.onFilterChange&&this.onFilterChange(c),this.FilterRefresh()},this.FilterRefresh=()=>{const a=this.filters,r=this.active_filters;let h=0;for(const d in a){const c=a[d].anchor,u=document.getElementById(d);r[d]?(c.classList.add("active_filter"),u.classList.add("active_item"),h++):(c.classList.remove("active_filter"),u.classList.remove("active_item"))}h===0?(this.block.classList.remove("do-filtering"),this._useClearItem&&this.clearItem.classList.add("active_item_clear")):(this.block.classList.add("do-filtering"),this._useClearItem&&this.clearItem.classList.remove("active_item_clear")),this.onRefresh(this)},this.block=t;const e=this.list=t.querySelector(".include-filter-tag-list");e&&e.addEventListener("click",this.OnFilterClick);const i=t.querySelectorAll(".include-filter-tag-item"),n=i.length,l=this.filters;for(let a=0;a<n;a++){const r=i[a],h=r.getElementsByTagName("a")[0],d=h.href.split("?")[1].split("[]=");if(d[0]==="")continue;const c=decodeURIComponent(d[1]);l[r.id]={taxonomy:d[0],filter:c,anchor:h,url:h.getAttribute("data-target-term"),info:s.terms[d[0]][c]},r.classList.contains("active_item")&&(this.active_filters[r.id]=!0)}const o=t.getAttribute("data-useclear");if(o&&o!==""){const a=JSON.parse(o);this.useClearItem({label:a.label,position:a.position})}this.multiSelect=t.getAttribute("data-multiselect")==="1",this.method=t.getAttribute("data-method")}get filterClearItem(){return this.clearItem}getActiveFilters(){const s=this.filters,t={};for(const e in this.active_filters)this.active_filters[e]&&(t[e]=s[e]);return t}get Filters(){return this.filters}useClearItem(s){if(s===!1)this._useClearItem=!1,this.clearItem&&this.clearItem.parentElement&&this.clearItem.parentElement.removeChild(this.clearItem);else{this._useClearItem=!0;let t=this.clearItem;const e=this.list;if(!this.clearItem){t=this.clearItem=e.firstElementChild.cloneNode(!0),t.className=t.className.replace(/ tag-.*($| )/," selected-tag-clear"),t.id="filter-clear";const i=t.querySelector("a");i.href="?",i.classList.remove("active_filter")}this.block.querySelector(".active_filter")||this.clearItem.classList.add("active_item_clear"),t.querySelector("a span").textContent=s.label,t.parentElement||(s.position==="before"?e.insertBefore(t,e.firstElementChild):e.appendChild(t))}}}J.ninesense.ts.wordpress.postfilter=ge;const b=class b extends ne{constructor(s,t=""){super(),this.no=0,this.posts_per_page=8,this.posts=[],this.post_filters={},this._loadAllow=!1,this._progressive_method="shown",this.baseUrl=null,this._filters={},this.useHistory=!1,this._focus=null,this.getFilters=()=>this._filters,this._initialized=!1,this.OnClick=e=>{this.actionTimer.setTickIndex(3),this.actionTimer.option.data.focus=R.classOnParent(e.target,"include-result")},this.OnLoadpointClick=e=>{this._progressive_method==="click"&&this.load()},this.setup=e=>{let i=document.querySelector(".no-list-item.current");i||(i=document.querySelector(".no-list-item")),i&&(this.no=parseInt(i.getAttribute("data-postno")));const n=document.querySelectorAll(".include-filter-tags"),l=n.length;this.pageinfo=w.ninesense.ts.values.get("ns-postloader-terminfo");let o=!1;const a={};for(let r=0;r<l;r++){const h=n[r];if(h){h.id===""&&(h.id="include-filter-tags-"+r.toString());const d=this._filters[h.id]=new ge(this.pageinfo,h);d.onFilterClick=this.OnFilterClick,d.onRefresh=this.onFilterRefresh,a[h.id]=d.block,(d.useHistory=h.getAttribute("data-usehistory")==="1")&&(o=!0)}}if(o=B.useableHistory(),o){this.useHistory=!0;const r=this.getMeta();R.setMeta({title:r.title,description:r.description}),window.history.scrollRestoration="auto";const h=B.GetInstance();h.addTarget(b.history_key,this,{resum:{dom:"",ids:[],scroll:0,loadInfo:null}},(c,u)=>{if(this._initialized){window.history.scrollRestoration="manual";for(const f in this._filters){const m=this._filters[f];if(m.useHistory){const L=u.resum.ids[f];L&&m.doFilter(L,!0)}}}},{onMetaParam:this.onHistoryParam,priority:10});const d=h.getState(b.history_key,"resum");if(d&&h.isBrowserback&&(d.p===!0&&this.catalog.p||d.p!==!0&&(this.catalog===void 0||this.catalog.p===void 0))&&(window.console.debug("postloader:resum"),d.loadInfo&&d.dom&&(this.catalog?d.loadInfo.m===this.catalog.m&&(this.loadInfo=d.loadInfo,this.domToList(d.dom)):(this.loadInfo=d.loadInfo,this.domToList(d.dom))),d.scroll)){const c=d.scroll;setTimeout(()=>{try{window.scroll({top:c})}catch(u){window.console.debug(u)}})}d.ids=this.getFilterIds(),d.scroll=window.scrollY,h.set("replace",b.history_key,"resum",d).catch(c=>console.error(c)),this.setupped(e)}else this.setupped(e)},this.onHistoryParam=e=>{const i=this.getMeta();return e.title=i.title,e.path=i.url,e},this.setupped=e=>{window.addEventListener("scroll",this.OnMouseWheel,{passive:!0}),b.loader.AddOwner(this),this.loadAllow=!0,this._progressive_method==="shown"&&this.load(),this.actionTimer=new pe(this.OnAction),this.actionTimer.option={data:{posts:null,focus:null}},this._initialized=!0,this.dispatchEvent(ie.createEvent("postloader-init",{detail:{target:e,filter:this._filters}})),b.initPromice.ex(this)},this.OnFilterClick=e=>{e.useHistory&&this.doHistory(!0)},this.onFilterRefresh=e=>{if(this.filterCatalogIds=null,e.useHistory){const i=this.getMeta();R.setMeta({title:i.title,description:i.description})}this.actionTimer.setTickIndex(1)},this.getMeta=()=>{const e={title:"",description:"",url:""};let i=-1,n;for(const l in this._filters){const o=this._filters[l];if(o.useHistory){i++;const a=o.getActiveFilters();let r="";for(const h in a){const d=a[h];e.description===""&&d.info.description!==""&&(e.description=d.info.description),r!==""&&(r+=","),r+=d.url,e.title!==""&&(e.title+=" "),e.title+=d.info.title}r!==""&&(n&&i>0&&e.url===""&&n.filterClearItem&&(e.url+=n.filterClearItem.textContent.trim().toLowerCase()),e.url!==""&&(e.url+="/"),e.url+=r),n=o}}return this.pageinfo?(e.title===""?e.title=this.pageinfo.baseTitle:e.title=e.title+"｜"+this.pageinfo.baseTitle,e.url!==""?e.url=this.pageinfo.baseUrl+e.url+"/":e.url=this.pageinfo.baseUrl):(e.title=document.title,e.url=location.href),e},this.doHistory=(e=!1,i="")=>{if(this.useHistory===!1)return;const n=this.getFilterIds(),l={};for(const r in this._filters)this._filters[r].useHistory&&(l[r]=n[r]);const o=B.GetInstance(),a=o.getState(b.history_key,"resum");a.dom||(a.dom=""),i&&(a.dom+=i),a.ids=l,a.scroll=window.scrollY,a.loadInfo=this.loadInfo,this.catalog&&this.catalog.p&&(a.p=!0),e?o.set("push",b.history_key,"resum",a).catch(r=>console.error(r)):o.set("replace",b.history_key,"resum",a).catch(r=>console.error(r))},this.getFilterIds=()=>{const e={};for(const i in this._filters){const n=[],o=this._filters[i].getActiveFilters();for(const a in o)n.push(a);e[i]=n}return e},this.getActiveFilters=()=>{const e={},i=this._filters;for(const n in i){const o=i[n].getActiveFilters();for(const a in o){const r=o[a];e[r.taxonomy]||(e[r.taxonomy]={}),e[r.taxonomy][a]=r}}return e},this.OnAction=(e,i)=>{try{switch(e){case 1:return this.Refresh(),this.ScrolledLoadCheck(!1),0;case 2:return this.Refresh(),this.dispatchEvent(new CustomEvent("postloader-loaded",{detail:{elements:i.data.posts,count:this.lastLoadCount}})),this.ScrolledLoadCheck(),0;case 3:return this.focus=i.data.focus,1}}catch(n){window.console.log(n)}return 0},this.Refresh=()=>{const e=this._filters,i=this.post_filters;let n=!1;const l=document.getElementById(this.target.id+"-progressive");if(!l)return;const o=l.children,a=o.length,r=[],h=[];if(this.catalog){const u=this.getFilteringCatalogIds();if(u)for(let f=0;f<a;f++){const m=o[f].getAttribute("data-post-id");u[m]===!0?r.push(o[f]):h.push(o[f])}else for(let f=0;f<a;f++)r.push(o[f])}else{const u={};for(let m=0;m<a;m++)u[o[m].id]=0;let f=0;for(const m in e){const L=e[m],y=L.getActiveFilters(),C=L.method;let A=0;const F={};let ee=!1;for(const T in y){A++,ee=!0;const V=y[T];if(!i[V.taxonomy])continue;const N=i[V.taxonomy][V.filter];if(N)for(const fe of N)F[fe]===void 0&&(F[fe]=0),F[fe]++}if(ee)switch(n=!0,f++,C){case"AND":for(const T in F)F[T]===A&&u[T]++;break;default:for(const T in F)F[T]!==void 0&&u[T]++}}if(n)for(let m=0;m<a;m++)u[o[m].id]===f?r.push(o[m]):h.push(o[m]);else for(let m=0;m<a;m++)r.push(o[m])}let d=!0;if(this.onFilterItems&&(d=this.onFilterItems(r,h)),d){for(const u of r)u.style.display="";for(const u of h)u.style.display="none"}const c=this.target.querySelector(".include-post-loading");c.style.display="",this.dispatchEvent(new Event("postloader-refresh"))},this.wheelToken=NaN,this.OnMouseWheel=e=>{isNaN(this.wheelToken)&&(this.wheelToken=setTimeout(()=>{this.wheelToken=NaN,this.doHistory(),this.loadAllow&&this.ScrolledLoadCheck()},100))},this.loadTimerToken=NaN,this.ScrolledLoadCheck=(e=!0)=>{if(this._progressive_method!=="shown")return;let i=isNaN(this.loadTimerToken)!==!1;if(e){const n=this.target.querySelector(".include-post-loading");i=n&&n.getBoundingClientRect().y+window.scrollY-window.innerHeight<window.innerHeight+window.scrollY}i!==!1&&(this.loadTimerToken=window.setTimeout(()=>{this.loadTimerToken=NaN,this.load()}))},this.load=()=>{if(this.loadAllow===!1)return;this.loadAllow=!1;let e=!1;this.lastLoadCount=NaN;try{let i;if(this.catalog&&(i=this.catalog.c.ids),i){if(this.loadCatalogPosts()===!1){this.OnLoadDataEmpty();return}}else{const n={action:this.requestID,token:b.info.token,no:this.no,page:W.info.pageID,exclude:this.posts,include:null},l=this.getActiveFilters();for(const o in l){const a=l[o];n[o]||(n[o]=[]);for(const r in a)n[o].push(a[r].filter)}this.loadID=b.loader.RequestQuery(n).id}e=!0}finally{e===!1&&(this.loadAllow=!0)}},this.loadCatalogPosts=()=>{try{const e=this.catalog.c.ids,i=this.catalog.p;if(!this.loadInfo){const c=this.loadInfo={m:this.catalog.m,postpool:[],postorder:{}},u=c.postpool;for(const L in e)e[L].p&&!i||u.push(L);u.sort((L,y)=>e[L].o<e[y].o?1:e[L].o>e[y].o?-1:0);const f=c.postorder,m=u.length;for(let L=0;L<m;L++)f[u[L]]=L}const n=this.loadInfo.postpool,l=[],o=this.posts_per_page,a=n.length,r=this.getFilteringCatalogIds();for(let c=a-1;c>=0;c--){const u=n[c];if(!(r&&r[u]!==!0)&&l.push(u)===o)break}if(l.length===0)return!1;const h={action:this.requestID,token:b.info.token,no:this.no,page:W.info.pageID,exclude:[],include:l,c:this.catalogName,p:i};this.loadID=b.loader.RequestQuery(h).id;const d=[];for(const c of n)l.indexOf(c)===-1&&d.push(c);return this.loadInfo.postpool=d,!0}catch(e){window.console.error(e)}return!1},this.getFilteringCatalogIds=()=>{if(this.filterCatalogIds)return this.filterCatalogIds;const e=this.catalog,i=this._filters;let n=0;const l={};let o=!1;const a={};for(const r in i){let h=0;const d=i[r],c=d.getActiveFilters(),u=d.method,f={};for(const m in c){h===0&&n++,h++,o=!0;const L=c[m];if(!e.taxonomy.c[L.taxonomy])continue;const y=e.taxonomy.c[L.taxonomy][L.filter];if(y)for(const C of y)f[C]||(f[C]=0),f[C]++}switch(u){case"AND":for(const m in f)f[m]===h&&(a[m]||(a[m]=0),a[m]++);break;default:for(const m in f)a[m]||(a[m]=0),a[m]++}}if(o===!1)return null;for(const r in a)a[r]===n&&(l[r]=!0);return this.filterCatalogIds=l},this.LoadEnd=(e,i)=>{this.doHistory(!1,i.data.dom),this.lastLoadCount=i.data.count||0,this.domToList(i.data.dom)},this.domToList=e=>{try{if(e===void 0||e===""){this.OnLoadDataEmpty();return}this.addPostElements(e)}finally{this.loadAllow=!0}},this.OnLoadDataEmpty=()=>{const e=this.target.querySelector(".include-post-loading");e.style.display="none",this.lastLoadCount=0},this.addPostElements=e=>{const i=document.createElement("div");i.innerHTML=e;const n=document.getElementById(this.target.id+"-progressive");if(!n)return;const l=[];if(n.children.length!==0&&this.catalog){let a=null;const r=this.loadInfo.postorder;let h=-1,d=-1;for(;i.firstElementChild;){const c=i.lastElementChild,u=parseInt(c.getAttribute("data-post-id"));if(this.posts.indexOf(u)!==-1){i.removeChild(c);continue}if(c.id="post-"+u.toString(),h=r[u.toString()],h===void 0){i.removeChild(c);continue}if(d===-1){a=n.lastElementChild;const f=a.getAttribute("data-post-id");d=r[f.toString()]}for(;h>d&&(a=a.previousElementSibling,!!a);){const f=a.getAttribute("data-post-id");d=r[f.toString()]}this.addLoadedPost(c),c.classList.add("postloader-contentloading"),a?a.nextElementSibling?n.insertBefore(c,a.nextElementSibling):n.appendChild(c):a=n.insertBefore(c,n.firstElementChild),this.ContentLoadCheck(c)}}else for(;i.firstElementChild;){const a=i.firstElementChild,r=parseInt(a.getAttribute("data-post-id"));if(this.posts.indexOf(r)!==-1){i.removeChild(a);continue}a.id="post-"+r.toString(),this.addLoadedPost(a),l.push(a),a.classList.add("postloader-contentloading"),n.appendChild(a),this.ContentLoadCheck(a)}this.actionTimer?(this.actionTimer.option.data.posts=l,this.actionTimer.setTickIndex(2)):window.setTimeout(()=>{this.actionTimer.option.data.posts=l,this.actionTimer.setTickIndex(2)})},this.addLoadedPost=e=>{const i=parseInt(e.getAttribute("data-post-id")),n=this.post_filters,l=e.getAttribute("data-filter-target");if(l)try{const o=JSON.parse(l);for(const a in o){const r=o[a];n[a]||(n[a]={});const h=r.length;for(let d=0;d<h;d++){const c=decodeURIComponent(r[d]);n[a][c]||(n[a][c]=[]),n[a][c].push(e.id)}}}catch(o){window.console.log(o)}this.posts.push(i)},this.ContentLoadCheck=e=>{const i=e.querySelector("img:not(.postloader-img-loaded)");i?i.complete?(i.classList.add("postloader-img-loaded"),this.ContentLoadCheck(e)):i.addEventListener("load",n=>{i.classList.add("postloader-img-loaded"),this.ContentLoadCheck(e)}):setTimeout(()=>{e.classList.add("postloader-contentloaded"),e.classList.remove("postloader-contentloading")})},this.LoadError=(e,i)=>{window.console.error(i),this.loadAllow=!0},b.instance=this,R.init(t,()=>{this.requestID=s;const i=JSON.parse(atob(s)).element;this.target=document.getElementById(i);const n=this.target.querySelector(".include-post-loading"),l=n.getAttribute("data-catalog"),o=n.getAttribute("data-progressive_method");switch(this.posts_per_page=parseInt(n.getAttribute("data-max")),this.posts_per_page===0&&(this.posts_per_page=8),o){case"scroll":case"click":this._progressive_method=o;break;case"":this._progressive_method="shown"}l?_.on(l,a=>{window.console.debug("using-catalog:"+l),this.catalogName=l,this.catalog=a,this.setup(i),this.target.addEventListener("click",this.OnClick),n.addEventListener("click",this.OnLoadpointClick)}):this.setup(i)})}get postsElement(){return this.target}get initialized(){return this._initialized}get progressiveMethod(){return this._progressive_method}set progressiveMethod(s){this._progressive_method=s}get lastLoadCount(){return this._lastLoadCount}set lastLoadCount(s){this._lastLoadCount=s,s===0?this.postsElement.classList.add("loaded"):this.postsElement.classList.remove("loaded")}get focus(){return this._focus}set focus(s){if(this._focus===s||s.classList.contains("include-result")===!1)return;const t=this._focus;t&&t.classList.remove("focus"),this._focus=s,s&&s.classList.add("focus"),this.dispatchEvent(new Event("postloader-focus"))}get loadAllow(){return this._loadAllow}set loadAllow(s){this._loadAllow!==s&&(this._loadAllow=s)}};b.history_key="wordpress.postloader",b.initPromice={},b.getInstance=()=>b.instance,b.waitInitialized=()=>b.initPromice.pr?b.initPromice.pr:b.initPromice.pr=new Promise((s,t)=>{b.initPromice.ex=s}),b.init=s=>{b.info||(b.info=s,b.loader=new $(s.ajax),b.loader.autoparse=!0,b.loader.method=te.POST)};let re=b;const Le=()=>{J.ninesense.ts.wordpress.postloader=re},z=class z{constructor(s){this.OnItemsClick=e=>{const i=e.target;this.current=i},this.loadImage=()=>{const e=this._current.getAttribute("data-full-srcset"),n=w.ninesense.ts.values.get("ns-gallery-srcset")[this.target.id][e];this.currentImg.srcset=n.srcset,this.currentImg.src=n.src,this.currentImg.width=n.width,this.currentImg.height=n.height,this.currentImg.alt=n.alt,this.currentImg.sizes=n.sizes,this.currentWebpSrc.srcset=n["webp-srcset"],this.currentWebpSrc.width=n.width,this.currentWebpSrc.height=n.height},this.target=s;const t=s.querySelector(".gallery-block-items");this.currentWebpSrc=s.querySelector(".slide-gallery-current-picture source"),this.currentImg=s.querySelector(".slide-gallery-current-picture img"),t.addEventListener("click",this.OnItemsClick)}get current(){return this._current}set current(s){const t=s?R.classOnParent(s,"gallery-block-item"):null;this._current!==t&&(this._current&&this._current.classList.remove("current"),this._current=t,t&&(t.classList.add("current"),this.loadImage()))}};z.init=()=>{z.instancies||(z.instancies={}),document.querySelectorAll(".slide-gallery-block").forEach(t=>{z.instancies[t.id]=new z(t)})};let he=z;const ke=he.init,K=class K{constructor(){const s=document.getElementById("intro");if(!s)return;let t=!1;try{t=window.matchMedia("(prefers-reduced-motion:reduce)").matches}catch{}let e=!1;function i(){e||(e=!0,s.classList.add("out"),setTimeout(function(){s.classList.add("done")},900),document.documentElement.style.overflow="")}if(sessionStorage.getItem("intro")){i();return}document.documentElement.style.overflow="hidden";let n=null;function l(){n||(requestAnimationFrame(function(){requestAnimationFrame(function(){s.classList.add("show"),sessionStorage.setItem("intro","true")})}),n=setTimeout(i,t?1400:2600))}R.init("",()=>{l()});function o(){n&&clearTimeout(n),i()}s.addEventListener("click",o),window.addEventListener("keydown",o,{once:!0}),window.addEventListener("wheel",o,{once:!0,passive:!0}),window.addEventListener("touchstart",o,{once:!0,passive:!0})}};K.init=()=>{K.instance||(K.instance=new K)};let ue=K;const ye=()=>{ue.init()};Ee(),be(),Le(),w.ninesense.ts.values.on("onfooter",()=>{re.waitInitialized().then(E=>{E.postsElement.querySelector(".include-result")||E.load(),E.addEventListener("postloader-refresh",t=>{E.lastLoadCount<3&&E.postsElement.classList.add("loaded")})}),ye(),ke()}),we()})();
