PageSourceSearch

https://www.utfpr.edu.br/static/js/react-simple-code-editor.e3c163c0.chunk.js

js utfpr.edu.br collected 2026-09-24 08:45:12 UTC 8,764 bytes, 2 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5112],{61704:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(11504));function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}var s="navigator"in n.g&&/Win/i.test(navigator.platform),l="navigator"in n.g&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),c="npm__react-simple-code-editor__textarea",u="\n/**\n * Reset the text fill color so that placeholder is visible\n */\n."+c+":empty {\n  -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * IE doesn't support '-webkit-text-fill-color'\n * So we use 'color: transparent' to make the text transparent on IE\n * Unlike other browsers, it doesn't affect caret color in IE\n */\n."+c+"-ie {\n  color: transparent !important;\n}\n\n."+c+"-ie::selection {\n  background-color: #accef7 !important;\n  color: transparent !important;\n}\n",h=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,c=Array(o),u=0;u<o;u++)c[u]=arguments[u];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.state={capture:!0,ie:!1},r._recordCurrentState=function(){var e=r._input;if(e){var t=e.value,n=e.selectionStart,i=e.selectionEnd;r._recordChange({value:t,selectionStart:n,selectionEnd:i})}},r._getLines=function(e,t){return e.substring(0,t).split("\n")},r._recordChange=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=r._history,o=n.stack,a=n.offset;if(o.length&&a>-1){r._history.stack=o.slice(0,a+1);var s=r._history.stack.length;if(s>100){var l=s-100;r._history.stack=o.slice(l,s),r._history.offset=Math.max(r._history.offset-l,0)}}var c=Date.now();if(t){var u=r._history.stack[r._history.offset];if(u&&c-u.timestamp<3e3){var h=/[^a-z0-9]([a-z0-9]+)$/i,f=r._getLines(u.value,u.selectionStart).pop().match(h),p=r._getLines(e.value,e.selectionStart).pop().match(h);if(f&&p&&p[1].startsWith(f[1]))return void(r._history.stack[r._history.offset]=i({},e,{timestamp:c}))}}r._history.stack.push(i({},e,{timestamp:c})),r._history.offset++},r._updateInput=function(e){var t=r._input;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,r.props.onValueChange(e.value))},r._applyEdits=function(e){var t=r._input,n=r._history.stack[r._history.offset];n&&t&&(r._history.stack[r._history.offset]=i({},n,{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),r._recordChange(e),r._updateInput(e)},r._undoEdit=function(){var e=r._history,t=e.stack,n=e.offset,i=t[n-1];i&&(r._updateInput(i),r._history.offset=Math.max(n-1,0))},r._redoEdit=function(){var e=r._history,t=e.stack,n=e.offset,i=t[n+1];i&&(r._updateInput(i),r._history.offset=Math.min(n+1,t.length-1))},r._handleKeyDown=function(e){var t=r.props,n=t.tabSize,i=t.insertSpaces,o=t.ignoreTabKey,a=e.target,c=a.value,u=a.selectionStart,h=a.selectionEnd,f=(i?" ":"     ").repeat(n);if(9===e.keyCode&&!o&&r.state.capture)if(e.preventDefault(),e.shiftKey){var p=r._getLines(c,u),d=p.length-1,y=r._getLines(c,h).length-1,g=c.split("\n").map(function(e,t){return t>=d&&t<=y&&e.startsWith(f)?e.substring(f.length):e}).join("\n");if(c!==g){var _=p[d];r._applyEdits({value:g,selectionStart:_.startsWith(f)?u-f.length:u,selectionEnd:h-(c.length-g.length)})}}else if(u!==h){var v=r._getLines(c,u),b=v.length-1,m=r._getLines(c,h).length-1,k=v[b];r._applyEdits({value:c.split("\n").map(function(e,t){return t>=b&&t<=m?f+e:e}).join("\n"),selectionStart:/\S/.test(k)?u+f.length:u,selectionEnd:h+f.length*(m-b+1)})}else{var S=u+f.length;r._applyEdits({value:c.substring(0,u)+f+c.substring(h),selectionStart:S,selectionEnd:S})}else if(8===e.keyCode){var E=u!==h;if(c.substring(0,u).endsWith(f)&&!E){e.preventDefault();var C=u-f.length;r._applyEdits({value:c.substring(0,u-f.length)+c.substring(h),selectionStart:C,selectionEnd:C})}}else if(13===e.keyCode){if(u===h){var w=r._getLines(c,u).pop().match(/^\s+/);if(w&&w[0]){e.preventDefault();var K="\n"+w[0],x=u+K.length;r._applyEdits({value:c.substring(0,u)+K+c.substring(h),selectionStart:x,selectionEnd:x})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var O=void 0;57===e.keyCode&&e.shiftKey?O=["(",")"]:219===e.keyCode?O=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?O=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(O=["`","`"]),u!==h&&O&&(e.preventDefault(),r._applyEdits({value:c.substring(0,u)+O[0]+c.substring(u,h)+O[1]+c.substring(h),selectionStart:u,selectionEnd:h+2}))}else!(l?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(l?e.metaKey&&90===e.keyCode&&e.shiftKey:s?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),r._redoEdit()):77!==e.ke
1yCode||!e.ctrlKey||l&&!e.shiftKey||(e.preventDefault(),r.setState(function(e){return{capture:!e.capture}})):(e.preventDefault(),r._undoEdit())},r._handleChange=function(e){var t=e.target,n=t.value,i=t.selectionStart,o=t.selectionEnd;r._recordChange({value:n,selectionStart:i,selectionEnd:o},!0),r.props.onValueChange(n)},r._history={stack:[],offset:-1},a(r,n)}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){/Trident/.test(navigator.userAgent)&&this.setState({ie:!0}),this._recordCurrentState()}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.style,a=t.padding,s=t.highlight,l=t.autoFocus,h=t.disabled,p=t.form,d=t.maxLength,y=t.minLength,g=t.name,_=t.placeholder,v=t.readOnly,b=t.required,m=t.onFocus,k=t.onBlur,S=(t.onValueChange,t.tabSize,t.insertSpaces,t.ignoreTabKey,function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(t,["value","style","padding","highlight","autoFocus","disabled","form","maxLength","minLength","name","placeholder","readOnly","required","onFocus","onBlur","onValueChange","tabSize","insertSpaces","ignoreTabKey"])),E={paddingTop:a,paddingRight:a,paddingBottom:a,paddingLeft:a},C=s(n);return o.createElement("div",i({},S,{style:i({},f.container,r)}),o.createElement("textarea",{ref:function(t){return e._input=t},style:i({},f.editor,f.textarea,E),className:c+" "+(this.state.ie?c+"-ie":""),value:n,onChange:this._handleChange,onKeyDown:this._handleKeyDown,onFocus:m,onBlur:k,disabled:h,form:p,maxLength:d,minLength:y,name:g,placeholder:_,readOnly:v,required:b,autoFocus:l,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),o.createElement("pre",i({"aria-hidden":"true",style:i({},f.editor,f.highlight,E)},"string"===typeof C?{dangerouslySetInnerHTML:{__html:C+"<br />"}}:{children:C})),o.createElement("style",{type:"text/css"},u))}},{key:"session",get:function(){return{history:this._history}},set:function(e){this._history=e.history}}]),t}(o.Component);h.defaultProps={tabSize:2,insertSpaces:!0,ignoreTabKey:!1,padding:0},t.default=h;var f={container:{position:"relative",textAlign:"left",whiteSpace:"pre-wrap",wordBreak:"keep-all",boxSizing:"border-box",padding:0},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",margin:0,border:0,resize:"none",background:"none",overflow:"hidden",color:"inherit",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",margin:0,border:0,pointerEvents:"none"},editor:{boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"inherit",wordBreak:"inherit"}}}}]);
2//# sourceMappingURL=react-simple-code-editor.e3c163c0.chunk.js.map

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.