PageSourceSearch

https://electionjudgments.org/LazyLoadMonacoEditor.aa8c88443ae518269b9f.bundle.js

js electionjudgments.org collected 2026-10-02 12:42:10 UTC 3,487 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkuwazi=self.webpackChunkuwazi||[]).push([[8359],{36379(e,r,t){var n=t(96540),o=t(64251),c=t(96811),i=t(500),a=t(34611);function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?u(Object(t),!0).forEach(function(r){l(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function l(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const f=e=>{const r=(()=>{const e=Array.from(document.querySelectorAll("script[src]")).map(e=>e.getAttribute("src")).filter(e=>Boolean(e)).map(e=>new URL(e,window.location.origin)).find(e=>e.origin!==window.location.origin);return e?e.origin:window.location.origin})(),t=new URL(`/${e}`,`${r}/`).toString();if(r===window.location.origin)return new Worker(t,{type:"classic"});const n=`importScripts(${JSON.stringify(t)});`,o=new Blob([n],{type:"text/javascript"});return new Worker(URL.createObjectURL(o),{type:"classic"})};t.d(r,["CodeEditorComponent",0,({language:e,intialValue:r,onMount:t,onChange:u,fallbackElement:l})=>{const d=(0,n.useRef)(null),p=(0,n.useRef)(void 0),g=(0,n.useRef)(void 0),[b,m]=(0,n.useState)(!1),[w,v]=(0,n.use
1State)(!1),[y,j]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{g.current=u},[u]),(0,n.useEffect)(()=>{i.oc?((()=>{const e=Reflect.get(globalThis,"MonacoEnvironment"),r="object"==typeof(t=e)&&null!==t?e:{};var t;Reflect.set(globalThis,"MonacoEnvironment",s(s({},r),{},{getWorker:(e,r)=>f((e=>"json"===e?"json.worker.js":"css"===e||"scss"===e||"less"===e?"css.worker.js":"html"===e||"handlebars"===e||"razor"===e?"html.worker.js":"typescript"===e||"javascript"===e?"ts.worker.js":"editor.worker.js")(r))}))})(),document.fonts.ready.then(()=>{c.EN.remeasureFonts(),v(!0)}).catch(e=>{m(!0);const r=new Error("Code editor error",{cause:e});(0,o.Cp)(r)})):v(!0)},[]),(0,n.useEffect)(()=>{if(!p.current&&!b&&w&&d.current)try{var t;if(p.current=((e,r,t)=>{const n=c.EN.create(e,{value:t,language:r,tabSize:2,automaticLayout:!0,fontFamily:'Consolas, "Courier New", monospace',fontLigatures:!1});return n.changeViewZones(e=>{e.addZone({afterLineNumber:0,heightInPx:8,domNode:document.createElement("SPAN")})}),n})(d.current,e,r),g.current)g.current(p.current.getValue()),null===(t=p.current.getModel())||void 0===t||t.onDidChangeContent(()=>{var e,r,t;null===(e=g.current)||void 0===e||e.call(g,null!==(r=null===(t=p.current)||void 0===t?void 0:t.getValue())&&void 0!==r?r:"")});j(!0)}catch(e){m(!0),(0,a.CB)(e,"Error creating monaco editor")}return()=>{p.current&&p.current.dispose()}},[e,w,b]),(0,n.useEffect)(()=>{t&&y&&p.current&&t(p.current)},[y,t]),b?l||n.createElement("div",null):n.createElement("div",{className:"w-full h-full border monaco-code-editor-container",dir:"ltr",ref:d})}])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.