7873.js 2.2 KB

12
  1. (globalThis.webpackChunksakurairo_scripts=globalThis.webpackChunksakurairo_scripts||[]).push([[7873],{7873:()=>{!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e={"(":")","[":"]","{":"}"},t={"(":"brace-round","[":"brace-square","{":"brace-curly"},n={"${":"{"},r=0,s=/^(pair-\d+-)(close|open)$/;Prism.hooks.add("complete",(function(s){var c=s.element,d=c.parentElement;if(d&&"PRE"==d.tagName){var u=[];if(Prism.util.isActive(c,"match-braces")&&u.push("(","[","{"),0!=u.length){d.__listenerAdded||(d.addEventListener("mousedown",(function(){var e=d.querySelector("code"),t=a("brace-selected");Array.prototype.slice.call(e.querySelectorAll("."+t)).forEach((function(e){e.classList.remove(t)}))})),Object.defineProperty(d,"__listenerAdded",{value:!0}));var h=Array.prototype.slice.call(c.querySelectorAll("span."+a("token")+"."+a("punctuation"))),p=[];u.forEach((function(s){for(var c=e[s],d=a(t[s]),u=[],f=[],v=0;v<h.length;v++){var m=h[v];if(0==m.childElementCount){var b=m.textContent;(b=n[b]||b)===s?(p.push({index:v,open:!0,element:m}),m.classList.add(d),m.classList.add(a("brace-open")),f.push(v)):b===c&&(p.push({index:v,open:!1,element:m}),m.classList.add(d),m.classList.add(a("brace-close")),f.length&&u.push([v,f.pop()]))}}u.forEach((function(e){var t="pair-"+r+++"-",n=h[e[0]],s=h[e[1]];n.id=t+"open",s.id=t+"close",[n,s].forEach((function(e){e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",o),e.addEventListener("click",l)}))}))}));var f=0;p.sort((function(e,t){return e.index-t.index})),p.forEach((function(e){e.open?(e.element.classList.add(a("brace-level-"+(f%12+1))),f++):(f=Math.max(0,f-1),e.element.classList.add(a("brace-level-"+(f%12+1))))}))}}}))}function a(e){var t=Prism.plugins.customClass;return t?t.apply(e,"none"):e}function c(e){var t=s.exec(e.id);return document.querySelector("#"+t[1]+("open"==t[2]?"close":"open"))}function i(){Prism.util.isActive(this,"brace-hover",!0)&&[this,c(this)].forEach((function(e){e.classList.add(a("brace-hover"))}))}function o(){[this,c(this)].forEach((function(e){e.classList.remove(a("brace-hover"))}))}function l(){Prism.util.isActive(this,"brace-select",!0)&&[this,c(this)].forEach((function(e){e.classList.add(a("brace-selected"))}))}}()}}]);
  2. //# sourceMappingURL=7873.js.map