"use strict";(self.webpackChunkjupyter_web=self.webpackChunkjupyter_web||[]).push([[2830],{12830:(J,x,z)=>{function k(o){return new RegExp("^(("+o.join(")|(")+"))\\b")}z.r(x),z.d(x,{cython:()=>B,mkPython:()=>s,python:()=>R});var I=k(["and","or","not","is"]),S=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in","False","True"],_=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function c(o){return o.scopes[o.scopes.length-1]}function s(o){for(var p="error",D=o.delimiters||o.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,h=[o.singleOperators,o.doubleOperators,o.doubleDelimiters,o.tripleDelimiters,o.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],y=0;yi?A(n,e):u0&&O(n,e)&&(t+=" "+p),t}return w(n,e)}function w(n,e,r){if(n.eatSpace())return null;if(!r&&n.match(/^#.*/))return"comment";if(n.match(/^[0-9\.]/,!1)){var i=!1;if(n.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),n.match(/^[\d_]+\.\d*/)&&(i=!0),n.match(/^\.\d+/)&&(i=!0),i)return n.eat(/J/i),"number";var u=!1;if(n.match(/^0x[0-9a-f_]+/i)&&(u=!0),n.match(/^0b[01_]+/i)&&(u=!0),n.match(/^0o[0-7_]+/i)&&(u=!0),n.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(n.eat(/J/i),u=!0),n.match(/^0(?![\dx])/i)&&(u=!0),u)return n.eat(/L/i),"number"}if(n.match(E))return-1!==n.current().toLowerCase().indexOf("f")?(e.tokenize=function j(n,e){for(;"rubf".indexOf(n.charAt(0).toLowerCase())>=0;)n=n.substr(1);var r=1==n.length,i="string";function u(l){return function(f,b){var m=w(f,b,!0);return"punctuation"==m&&("{"==f.current()?b.tokenize=u(l+1):"}"==f.current()&&(b.tokenize=l>1?u(l-1):t)),m}}function t(l,f){for(;!l.eol();)if(l.eatWhile(/[^'"\{\}\\]/),l.eat("\\")){if(l.next(),r&&l.eol())return i}else{if(l.match(n))return f.tokenize=e,i;if(l.match("{{"))return i;if(l.match("{",!1))return f.tokenize=u(0),l.current()?i:f.tokenize(l,f);if(l.match("}}"))return i;if(l.match("}"))return p;l.eat(/['"]/)}if(r){if(o.singleLineStringErrors)return p;f.tokenize=e}return i}return t.isString=!0,t}(n.current(),e.tokenize),e.tokenize(n,e)):(e.tokenize=function P(n,e){for(;"rubf".indexOf(n.charAt(0).toLowerCase())>=0;)n=n.substr(1);var r=1==n.length,i="string";function u(t,l){for(;!t.eol();)if(t.eatWhile(/[^'"\\]/),t.eat("\\")){if(t.next(),r&&t.eol())return i}else{if(t.match(n))return l.tokenize=e,i;t.eat(/['"]/)}if(r){if(o.singleLineStringErrors)return p;l.tokenize=e}return i}return u.isString=!0,u}(n.current(),e.tokenize),e.tokenize(n,e));for(var l=0;l1&&c(e).offset>r;){if("py"!=c(e).type)return!0;e.scopes.pop()}return c(e).offset!=r}function $(n,e){n.sol()&&(e.beginningOfLine=!0,e.dedent=!1);var r=e.tokenize(n,e),i=n.current();if(e.beginningOfLine&&"@"==i)return n.match(g,!1)?"meta":T?"operator":p;if(/\S/.test(i)&&(e.beginningOfLine=!1),("variable"==r||"builtin"==r)&&"meta"==e.lastToken&&(r="meta"),("pass"==i||"return"==i)&&(e.dedent=!0),"lambda"==i&&(e.lambda=!0),":"==i&&!e.lambda&&"py"==c(e).type&&n.match(/^\s*(?:#|$)/,!1)&&A(n,e),1==i.length&&!/string|comment/.test(r)){var u="[({".indexOf(i);if(-1!=u&&function Z(n,e,r){var i=n.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:n.column()+1;e.scopes.push({offset:e.indent+(v||n.indentUnit),type:r,align:i})}(n,e,"])}".slice(u,u+1)),-1!=(u="])}".indexOf(i))){if(c(e).type!=i)return p;e.indent=e.scopes.pop().offset-(v||n.indentUnit)}}return e.dedent&&n.eol()&&"py"==c(e).type&&e.scopes.length>1&&e.scopes.pop(),r}return{name:"python",startState:function(){return{tokenize:F,scopes:[{offset:0,type:"py",align:null}],indent:0,lastToken:null,lambda:!1,dedent:0}},token:function(n,e){var r=e.errorToken;r&&(e.errorToken=!1);var i=$(n,e);return i&&"comment"!=i&&(e.lastToken="keyword"==i||"punctuation"==i?n.current():i),"punctuation"==i&&(i=null),n.eol()&&e.lambda&&(e.lambda=!1),r?p:i},indent:function(n,e,r){if(n.tokenize!=F)return n.tokenize.isString?null:0;var i=c(n),u=i.type==e.charAt(0)||"py"==i.type&&!n.dedent&&/^(else:|elif |except |finally:)/.test(e);return null!=i.align?i.align-(u?1:0):i.offset-(u?v||r.unit:0)},languageData:{autocomplete:S.concat(_).concat(["exec","print"]),indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,commentTokens:{line:"#"},closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""']}}}}const R=s({}),B=s({extra_keywords:(o="by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE",o.split(" "))});var o}}]);