(window.webpackJsonp=window.webpackJsonp||[]).push([[179,9],{"2kAv":function(We,ke,ee){We.exports={wrap:"wrap___CCio_",link:"link___PWIh8"}},"55Ip":function(We,ke,ee){"use strict";ee.d(ke,"a",function(){return a});var ne=ee("Ty5D"),k=ee("dI71"),E=ee("q1tI"),I=ee.n(E),C=ee("YS25"),A=ee("17x9"),M=ee.n(A),w=ee("wx14"),R=ee("zLVn"),S=ee("9R94"),g=function(n){Object(k.a)(t,n);function t(){for(var c,f=arguments.length,b=new Array(f),L=0;L=B.length?W.slice(B.length):W}).join(`
`)}var s=[],e=[""],a=new v.a.Renderer,i=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function h(){s.length=0,e=[""]}var l={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function u(j,_,P,B){if(_>=j.length||j[_].level<=P)return _;var W=j[_];B.push(""+W.text+" "),_++;var O=[];return _=u(j,_,W.level,O),O.length>0&&(B.push(""),O.forEach(function(U){B.push(U)}),B.push(" ")),B.push(" "),_=u(j,_,P,B),_}function m(){return u(s,0,0,e),e.push(" "),e.join("")}var d={heading:function(_){var P=i.exec(_);if(P)return{type:"heading",raw:P[0],depth:P[1].length,text:P[2]}},fences:function(_){var P=this.rules.block.fences.exec(_);if(P){var B=P[0],W=p(B,P[3]||""),O=P[2]?P[2].trim():P[2];if(["latex","katex","math"].indexOf(O)>=0){var U=t(),H=W;W=U,r[U]={type:"block",expression:H}}return{type:"code",raw:B,lang:O,text:W}}}},o=/(?:\${2})([^\n`]+?)(?:\${2})/gi,n=0,t=function(){return"__special_katext_id_".concat(n++,"__")},r={};function c(){return r}function f(){n=0,r={}}function b(j){return j=j.replace(o,function(_,P){var B=t();return r[B]={type:"inline",expression:P},B}),j}var L=a.listitem;a.listitem=function(j){return L(b(j))};var D=a.paragraph;a.paragraph=function(j){return D(b(j))};var F=a.tablecell;a.tablecell=function(j,_){return F(b(j),_)},a.code=function(j,_,P){var B=(_||"").match(/\S*/)[0];return B?["latex","katex","math"].indexOf(B)>=0?"".concat(j,"
"):' ').concat(P?j:Object(y.escape)(j,!0),`
`):''+(P?j:Object(y.escape)(j,!0))+" "},a.heading=function(j,_,P){var B=this.options.headerPrefix+P.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:B,level:_,text:j}),"'+j+" "},v.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),v.a.use({tokenizer:d,renderer:a});var N=v.a,K=ee("SJMd"),V=ee("ulZh"),z=ee.n(V),$=ee("m3rI"),q=ee("Oy/b"),J=ee("p5ED"),he=ee("ErOA"),te=ee("STEk");/* **********************************
cropro version 1.2.0
@license SEE LICENSE IN LICENSE
copyright Alan Mendelevich
see README and LICENSE for details
********************************** *//*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var le=function(j,_){return(le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,B){P.__proto__=B}||function(P,B){for(var W in B)Object.prototype.hasOwnProperty.call(B,W)&&(P[W]=B[W])})(j,_)};function re(j,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");function P(){this.constructor=j}le(j,_),j.prototype=_===null?Object.create(_):(P.prototype=_.prototype,new P)}function ae(j,_,P,B){return new(P||(P=Promise))(function(W,O){function U(Q){try{G(B.next(Q))}catch(Y){O(Y)}}function H(Q){try{G(B.throw(Q))}catch(Y){O(Y)}}function G(Q){var Y;Q.done?W(Q.value):(Y=Q.value,Y instanceof P?Y:new P(function(se){se(Y)})).then(U,H)}G((B=B.apply(j,_||[])).next())})}function X(j,_){var P,B,W,O,U={label:0,sent:function(){if(1&W[0])throw W[1];return W[1]},trys:[],ops:[]};return O={next:H(0),throw:H(1),return:H(2)},typeof Symbol=="function"&&(O[Symbol.iterator]=function(){return this}),O;function H(G){return function(Q){return function(Y){if(P)throw new TypeError("Generator is already executing.");for(;U;)try{if(P=1,B&&(W=2&Y[0]?B.return:Y[0]?B.throw||((W=B.return)&&W.call(B),0):B.next)&&!(W=W.call(B,Y[1])).done)return W;switch(B=0,W&&(Y=[2&Y[0],W.value]),Y[0]){case 0:case 1:W=Y;break;case 4:return U.label++,{value:Y[1],done:!1};case 5:U.label++,B=Y[1],Y=[0];continue;case 7:Y=U.ops.pop(),U.trys.pop();continue;default:if(!(W=U.trys,(W=W.length>0&&W[W.length-1])||Y[0]!==6&&Y[0]!==2)){U=0;continue}if(Y[0]===3&&(!W||Y[1]>W[0]&&Y[1]0&&P>0){var B=new ye(_,P),W=B.ratio>=1?20:B.getHorizontalLength(20),O=B.ratio<1?20:B.getVerticalLength(20),U=document.createElementNS("http://www.w3.org/2000/svg","svg");U.setAttribute("xmlns","http://www.w3.org/2000/svg"),U.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(U);var H=ie.createDefs();U.appendChild(H);var G=ie.createElement("clipPath",[["id","text-bg-clip"]]);H.appendChild(G);var Q=ie.createPath(ie.getHollowRectanglePath((24-W)/2,(24-O)/2,W,O,(24-W)/2+2,(24-O)/2+2,W-4,O-4));U.appendChild(Q);var Y=ie.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Y.appendChild(ie.createTSpan(_+":"+P)),U.appendChild(Y);var se=Y.getBBox();ie.setAttributes(Y,[["x",((24-se.width)/2).toString()],["y",((24-se.height)/2-se.y).toString()]]);var Ee=ie.createPath(ie.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(se.width))/2,(24-Math.ceil(se.height))/2,Math.ceil(se.width),Math.ceil(se.height)));return G.appendChild(Ee),ie.setAttributes(Q,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(U),U.outerHTML}return' '},j}(),fe=function(j){function _(P,B,W){var O=j.call(this,P,B)||this;return O.isDropdownOpen=!1,O.onClick=O.dropdownButtonClicked,O.dropdownButtons=W,O}return re(_,j),_.prototype.setupDropdown=function(){var P=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(B){B.className=P.className,B.colorsClassName=P.colorsClassName,P.dropdownBlock.appendChild(B.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},_.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},_.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},_.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},_.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},_.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},_}(ce),we=function(){function j(_,P){this.GRIP_SIZE=10,this.color=_,this.fillColor=P,this.visual=ie.createGroup(),this.visual.appendChild(ie.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ie.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return j.prototype.ownsTarget=function(_){return _===this.visual||_===this.visual.childNodes[0]||_===this.visual.childNodes[1]},j.prototype.setCenter=function(_,P){this.visual.childNodes.forEach(function(B){return ie.setAttributes(B,[["cx",_.toString()],["cy",P.toString()]])})},j}(),Ce=function(){function j(_,P,B,W){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=_,this.canvasHeight=P,this.margin=B,this.container=W,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(j.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(_){this._aspectRatio=_,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(_){this._isGridVisible=_,this.gridContainer&&ie.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(_){this._zoomFactor=_,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),j.prototype.open=function(){var _=this;this.cropShadeElement=ie.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ie.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var P=0;Pthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-P.height/2),ie.setAttributes(this.cropRectElement,[["x",P.x.toString()],["y",P.y.toString()],["width",P.width.toString()],["height",P.height.toString()]]);var B=P.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(O,U){var H=P.y+B*(U+1);ie.setAttributes(O,[["x1",""+P.x],["y1",""+H],["x2",""+(P.x+P.width)],["y2",""+H]])});var W=P.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(O,U){var H=P.x+W*(U+1);ie.setAttributes(O,[["x1",""+H],["y1",""+P.y],["x2",""+H],["y2",""+(P.y+P.height)]])}),ie.setAttributes(this.cropShadeElement,[["d",ie.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,P.x,P.y,P.width,P.height)]]),this.topLeftGrip.setCenter(P.x,P.y),this.topRightGrip.setCenter(P.x+P.width,P.y),this.bottomLeftGrip.setCenter(P.x,P.y+P.height),this.bottomRightGrip.setCenter(P.x+P.width,P.y+P.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},j.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},j.prototype.clientToLocalCoordinates=function(_,P){var B=this.container.getBoundingClientRect();return{x:_-B.left+this.margin,y:P-B.top+this.margin}},j.prototype.onPointerDown=function(_){this.container.setPointerCapture(_.pointerId),this.previousPoint=this.clientToLocalCoordinates(_.clientX,_.clientY),this.cropRectElement===_.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(_.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(_.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(_.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(_.target)&&(this.activeGrip=this.bottomRightGrip)},j.prototype.onPointerMove=function(_){if(this.isMoving)this.move(this.clientToLocalCoordinates(_.clientX,_.clientY));else if(this.activeGrip){var P=this.clientToLocalCoordinates(_.clientX,_.clientY);this.resize(P)}_.preventDefault()},j.prototype.onPointerUp=function(_){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(_.pointerId)},j.prototype.move=function(_){var P=_.x-this.previousPoint.x,B=_.y-this.previousPoint.y;this.zoomFactor!==1&&(P=-P/this.zoomFactor,B=-B/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+P),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+B),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=_},j.prototype.resize=function(_){var P=Object.assign({},this.cropRect),B=_.x-this.previousPoint.x,W=_.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:P.x+Bthis.canvasWidth*this.zoomFactor&&(B=this.canvasWidth*this.zoomFactor-P.width),P.width+=B}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(P.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(B),P.height=this.aspectRatio.getVerticalLength(P.width)):(P.y+=W,P.height=this.cropRect.y+this.cropRect.height-P.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?P.height=this.aspectRatio.getVerticalLength(P.width):P.height+=W}P.width<10&&(P.x=this.cropRect.x,P.width=10),P.height<10&&(P.y=this.cropRect.y,P.height=10),this.previousPoint=_,P.x>=this.margin&&P.y>=this.margin&&P.x-this.margin+P.width<=this.canvasWidth&&P.y-this.margin+P.height<=this.canvasHeight&&(this.cropRect=P,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},j.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var _=this.cropRect.x+this.cropRect.width/2,P=this.cropRect.y+this.cropRect.height/2,B=this.aspectRatio.getHorizontalLength(this.cropRect.height),W=this.aspectRatio.getVerticalLength(this.cropRect.width);B/this.canvasWidththis.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=_-this.cropRect.width/2,this.cropRect.y=P-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},j.prototype.getRescaledRect=function(_,P,B,W,O,U){var H=B/_,G=W/P;return{x:(O.x-U)*H+U,y:(O.y-U)*G+U,width:O.width*H,height:O.height*G}},j.prototype.scaleCanvas=function(_,P){var B=this.getRescaledRect(this.canvasWidth,this.canvasHeight,_,P,this.cropRect,this.margin);this.canvasWidth=_,this.canvasHeight=P,this.onCropChange&&this.onCropChange(B),this.setCropRectangle(B)},j}(),be=function(){function j(_){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=_,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(j.prototype,"angle",{get:function(){return this._angle},set:function(_){this._angle=_,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),j.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},j.prototype.onPointerDown=function(_){this.controlContainer.setPointerCapture(_.pointerId),this.isDragging=!0,this.previousPoint={x:_.clientX,y:_.clientY}},j.prototype.onPointerMove=function(_){this.isDragging&&(this.onAngleChange&&this.onAngleChange((_.clientX-this.previousPoint.x)/5),this.previousPoint.x=_.clientX)},j.prototype.onPointerUp=function(_){this.isDragging&&this.onAngleChange&&this.onAngleChange((_.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(_.pointerId)},j.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var _=this.angleLabelText.getBBox();ie.setAttributes(this.angleLabelElement,[["x",((this.width-_.width)/2).toString()],["y",(this.height/2).toString()]])}},j.prototype.positionScaleShape=function(){if(this.scaleShape){var _=this.scaleShape.transform.baseVal.getItem(0);_.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(_,0)}},j.prototype.getVisual=function(){var _=document.createElementNS("http://www.w3.org/2000/svg","svg");_.setAttribute("xmlns","http://www.w3.org/2000/svg"),_.setAttribute("width",this.width+"px"),_.setAttribute("height",this.height+"px"),_.setAttribute("viewBox","0 0 "+this.width+" "+this.height),_.style.flexShrink="0",document.body.appendChild(_);for(var P="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,B=1;B<=this.width/5+10;B++){var W=B%5==0?this.height/3:this.height/6;P+="h4v"+-W+"h1v"+W}P+="v1H0Z",this.scaleShape=ie.createPath(P);var O=ie.createTransform();this.scaleShape.transform.baseVal.appendItem(O),_.appendChild(this.scaleShape),this.angleLabelElement=ie.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ie.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var U=ie.createTSpan("");return U.innerHTML="°",this.angleLabelElement.appendChild(U),_.appendChild(this.angleLabelElement),document.body.removeChild(_),_},j}(),Ae=function(){function j(){this.naturalSize=!1,this.imageType="image/png"}return j.prototype.rasterize=function(_,P,B,W,O,U,H){var G=this;return new Promise(function(Q){var Y=document.createElement("canvas");Y.width=_.width.baseVal.value-2*W,Y.height=_.height.baseVal.value-2*W;var se=1,Ee=1;G.naturalSize===!0?(se=P.naturalWidth/(_.width.baseVal.value-2*W)/U,Ee=P.naturalHeight/(_.height.baseVal.value-2*W)/H,Y.width=P.naturalWidth/U,Y.height=P.naturalHeight/H):G.width!==void 0&&G.height!==void 0&&(se=G.width/B.width,Ee=G.height/B.height,Y.width*=se,Y.height*=Ee);var Ie=Y.getContext("2d");Ie.translate(Y.width/2,Y.height/2),Ie.rotate(O*Math.PI/180),Ie.scale(U,H),Ie.translate(-Y.width/2,-Y.height/2),Ie.drawImage(P,0,0,Y.width,Y.height);var Pe=document.createElement("canvas");Pe.width=B.width*se,Pe.height=B.height*Ee,Pe.getContext("2d").putImageData(Ie.getImageData((B.x-W)*se,(B.y-W)*Ee,B.width*se,B.height*Ee),0,0),Q(Pe.toDataURL(G.imageType,G.imageQuality))})},j}(),xe=function(){function j(_){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=j.instanceCounter++,this.styles=new Re(this.instanceNo),this.target=_,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(j.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(_){this._zoomToCropEnabled=_,_?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(_){this._isGridVisible=_,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"gridLines",{get:function(){return this._gridLines},set:function(_){this._gridLines=_,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(_){this._rotationAngle=_,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"aspectRatio",{get:function(){var _;return(_=this._aspectRatio)!==null&&_!==void 0?_:this.aspectRatios[0]},set:function(_){this._aspectRatio=_},enumerable:!1,configurable:!0}),j.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},j.prototype.show=function(){this.showUI(),this.open()},j.prototype.close=function(_){_===void 0&&(_=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),_||this.closeEventListeners.forEach(function(P){return P()}),this._isOpen=!1)},j.prototype.addRenderEventListener=function(_){this.renderEventListeners.push(_)},j.prototype.removeRenderEventListener=function(_){this.renderEventListeners.indexOf(_)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(_),1)},j.prototype.addCloseEventListener=function(_){this.closeEventListeners.push(_)},j.prototype.removeCloseEventListener=function(_){this.closeEventListeners.indexOf(_)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(_),1)},j.prototype.setupResizeObserver=function(){var _=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){_.resize(_.target.clientWidth,_.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},j.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var _=1*this.target.clientWidth/this.target.clientHeight,P=this.contentDiv.clientWidth/_>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*_:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,B=P+2*this.CANVAS_MARGIN_+this.CANVAS_MARGIN?this.target.offsetTop-(_+this.CANVAS_MARGIN):0;this.coverDiv.style.top=P+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},j.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},j.prototype.addTopToolbar=function(){var _=this;this.topToolbar=new De,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var P=new ue;P.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(P);var B=[];this.aspectRatios.forEach(function(Ee){var Ie=new ce(ve.getIcon(Ee.horizontal,Ee.vertical),Ee.horizontal===0&&Ee.vertical===0?"FREE":Ee.horizontal+":"+Ee.vertical);Ie.onClick=function(){return _.ratioButtonClicked(Ee)},B.push(Ie)}),this.aspectRatioButton=new fe(ve.getIcon(0,0),"Aspect ratio",B),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,P.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var W=new ce(' ',"Toggle grid");W.isActive=this.isGridVisible,W.onClick=function(){_.isGridVisible=!_.isGridVisible,W.isActive=_.isGridVisible},P.addButton(W);var O=new ce(' ',"Zoom to selection");if(O.isActive=this.zoomToCropEnabled,O.onClick=function(){_.zoomToCropEnabled=!_.zoomToCropEnabled,O.isActive=_.zoomToCropEnabled},P.addButton(O),!Z.isLicensed){var U=new ge;this.topToolbar.addElementBlock(U);var H=document.createElement("div");H.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var G=document.createElement("a");G.style.color="currentColor",G.href="https://markerjs.com/products/cropro",G.target="_blank",G.innerHTML=' ',H.appendChild(G),U.addElement(H)}var Q=new ue;Q.minWidth=3*this.toolbarHeight+"px",Q.contentAlign="end",this.topToolbar.addButtonBlock(Q);var Y=new ce(' ',"OK");Y.onClick=this.startRenderAndClose,Q.addButton(Y),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Y.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var se=new ce(' ',"Close");se.onClick=this.close,Q.addButton(se),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(se.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},j.prototype.addBottomToolbar=function(){var _=this;this.bottomToolbar=new De,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var P=new ue;P.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(P);var B=new ce(' ',"Rotate left");B.onClick=this.rotateLeftButtonClicked,P.addButton(B);var W=new ce(' ',"Rotate right");W.onClick=this.rotateRightButtonClicked,P.addButton(W);var O=new ge;O.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(O),this.straightener=new be("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(Q){_.rotateBy(Q),_.straightener.angle=_.rotationAngle},O.addElement(this.straightener.getUI());var U=new ue;U.minWidth=2*this.toolbarHeight+"px",U.contentAlign="end",this.bottomToolbar.addButtonBlock(U);var H=new ce(' ',"Flip horizontal");H.onClick=this.flipHorizontallyButtonClicked,U.addButton(H);var G=new ce(' ',"Flip vertical");G.onClick=this.flipVerticallyButtonClicked,U.addButton(G)},j.prototype.ratioButtonClicked=function(_){this.aspectRatio=_,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},j.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ve.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},j.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new ye(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},j.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},j.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},j.prototype.restoreState=function(_){if(_){var P=this.cropLayer.getRescaledRect(_.width,_.height,this.imageWidth,this.imageHeight,_.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(P),this.cropRectChanged(P),this.flippedHorizontally=_.flippedHorizontally,this.flippedVertically=_.flippedVertically,this.applyFlip(),this.rotationAngle=_.rotationAngle,this.applyRotation()}},j.prototype.clientToLocalCoordinates=function(_,P){var B=this.cropImage.getBoundingClientRect();return{x:_-B.left,y:P-B.top}},j.prototype.onWindowResize=function(){this.positionUI()},j.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var _=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=_+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},j.prototype.rotateLeftButtonClicked=function(){var _=this.rotationAngle-90;this.rotationAngle%90!=0&&(_+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(_)},j.prototype.rotateRightButtonClicked=function(){var _=this.rotationAngle+90;this.rotationAngle%90!=0&&(_-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(_)},j.prototype.rotateTo=function(_){_=(_=_>180?_-360:_)<=-180?_+360:_,this.rotationAngle=_,this.applyRotation()},j.prototype.rotateBy=function(_){this.rotateTo((this.rotationAngle+_)%360)},j.prototype.applyRotation=function(){var _=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var P=this.editingTargetRotationContainer.transform.baseVal.getItem(0);P.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(P,0);var B=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/B.width,this.imageHeight/B.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=_},j.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},j.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},j.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},j.prototype.startRenderAndClose=function(){return ae(this,void 0,void 0,function(){var _,P;return X(this,function(B){switch(B.label){case 0:return[4,this.render()];case 1:return _=B.sent(),P=this.getState(),this.renderEventListeners.forEach(function(W){return W(_,P)}),this.close(!0),[2]}})})},j.prototype.render=function(){return ae(this,void 0,void 0,function(){var _;return X(this,function(P){switch(P.label){case 0:return(_=new Ae).naturalSize=this.renderAtNaturalSize,_.imageType=this.renderImageType,_.imageQuality=this.renderImageQuality,_.width=this.renderWidth,_.height=this.renderHeight,this.unzoomFromCrop(),ie.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,_.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return P.sent(),[4,_.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,P.sent()]}})})},j.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new pe("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new pe("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new pe("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var _=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new pe("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*_)+`px;
height: `+(this.toolbarHeight-2*_)+`px;
padding: `+_+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new pe("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new pe("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new me("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new me("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new pe("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new pe("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new pe("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new pe("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*_)+`px;
padding: `+_+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new pe("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},j.instanceCounter=0,j}(),Te=ee("8hTe"),Se=ee.n(Te),de=/]*>/g;function Le(j){var _=document.createElement("div");return _.innerHTML=j,_.childNodes.length===0?"":_.childNodes[0].nodeValue}var _e=ke.a=function(j){var _=j.value,P=_===void 0?"":_,B=j.edit,W=B===void 0?!1:B,O=j.className,U=j.showTextOnly,H=j.showLines,G=j.replaces,Q=j.zoomImg,Y=j.hasMask,se=j.style,Ee=se===void 0?{}:se,Ie=j.stylesPrev,Pe=Ie===void 0?{}:Ie,Ne=String(P),Me=Object(S.useRef)(),Oe=Object(S.useRef)(),Ge=Object(S.useState)(""),je=Object(M.a)(Ge,2),ze=je[0],Ke=je[1],Fe=Object(S.useState)("office"),Ze=Object(M.a)(Fe,2),qe=Ze[0],Qe=Ze[1],et=function(){var Be=new xe(Oe.current);Be.displayMode="popup",Be.addRenderEventListener(function(){var $e=Object(A.a)(R.a.mark(function Ue(Ye){var He;return R.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Me.current.style.display="none",Xe.next=3,Object(he.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ye}});case 3:He=Xe.sent,He!=null&&He.id&&G(Oe.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(He==null?void 0:He.id,"?type=").concat(He.content_type));case 5:case"end":return Xe.stop()}},Ue)}));return function(Ue){return $e.apply(this,arguments)}}()),Be.show()},tt=function(){var Be=new te.a(Oe.current);Be.settings.displayMode="popup",Be.addEventListener("render",function(){var $e=Object(A.a)(R.a.mark(function Ue(Ye){var He;return R.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(Me.current.style.display="none",!Oe.current){Xe.next=6;break}return Xe.next=4,Object(he.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Ye.dataUrl}});case 4:He=Xe.sent,He!=null&&He.id&&G(Oe.current.getAttribute("src").replace($.a.API_SERVER,""),"/api/attachments/".concat(He==null?void 0:He.id,"?type=").concat(He.content_type));case 6:case"end":return Xe.stop()}},Ue)}));return function(Ue){return $e.apply(this,arguments)}}()),Be.show(),window.markerArea=Be},rt=Object(S.useMemo)(function(){Me.current&&(Me.current.style.zIndex=-1);try{var Ve=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Be=/\"\/api\/attachments\/|\"\/attachments\/download\//g,$e=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ne=Ne.replace(Ve,"("+$.a.API_SERVER+"/api/attachments/").replace(Be,'"'+$.a.API_SERVER+"/api/attachments/").replace($e,'"'+$.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`)}catch(nt){}var Ue=N(Ne),Ye=c();if(Ne.match(/\[TOC\]/)&&(Ue=Ue.replace("[TOC]
",m()),h()),Ue=Ue.replace(/(__special_katext_id_\d+__)/g,function(nt,Xe){var at=Ye[Xe],lt=at.type,ut=at.expression;return Object(q.renderToString)(Le(ut)||"",{displayMode:lt==="block",throwOnError:!1,output:"html"})}),Ue=Ue.replace(/▁/g,"\u2581\u2581\u2581"),f(),U){var He=document.createElement("div");return He.innerHTML=Ue,He.innerText}return setTimeout(function(){return st()},500),Ue},[Ne]),Je=Object(S.useRef)();l.WebkitLineClamp=H,H&&(Ee=Object(C.a)(Object(C.a)({},Ee),l));function it(Ve){var Be=Ve.target;if(Be.tagName.toUpperCase()==="IMG"){if(Q){var $e=Be.getAttribute("src");Ke($e),Qe("image")}}else if(Be.tagName.toUpperCase()==="A"){var Ue=Be.getAttribute("href");if(Ue.indexOf("office")>-1)Ve.preventDefault(),Ke(Ue),Qe("office");else if(Ue.indexOf("application/pdf")>-1)Ve.preventDefault(),Ke(Ue),Qe("pdf");else if(Ue.indexOf("text/html")>-1)Ve.preventDefault(),Ke(Ue),Qe("html");else if(Ue.startsWith("#")){Ve.preventDefault();var Ye=document.getElementById(Ue.replace("#",""));Ye&&Ye.scrollIntoView(!0)}}}var st=function(){var Be,$e=(Be=Je.current)===null||Be===void 0?void 0:Be.querySelectorAll("video");$e==null||$e.forEach(function(Ue){if(Ue.oncontextmenu=function(){return!1},Ue.src.indexOf(".m3u8")>-1&&!Ue.canPlayType("application/vnd.apple.mpegurl")){if(z.a.isSupported()){var Ye=new z.a;Ye.loadSource(Ue.src),Ye.attachMedia(Ue)}}})};Object(S.useEffect)(function(){if(Je.current&&rt&&(rt.match(de)&&window.PR.prettyPrint()),Je.current)return Je.current.addEventListener("click",it),function(){Je.current.removeEventListener("click",it),f(),h()}},[rt,Je.current,it]);var ot=function(Be){if(!W)return;Be.target.nodeName==="IMG"?(Me.current.style.zIndex=1,Me.current.style.display="flex",Me.current.style.width=Be.target.clientWidth+"px",Me.current.style.height=Be.target.clientHeight+"px",Me.current.style.top=Be.target.offsetTop+"px",Me.current.style.left=Be.target.offsetLeft+"px",Oe.current.src=Be.target.getAttribute("src")):Me.current.style.display="none"};return g.a.createElement("div",{style:{position:"relative"}},g.a.createElement("div",{ref:Je,style:Object(C.a)({},Ee),className:"".concat(O||""," markdown-body ").concat(Se.a.mdBody),onMouseOver:ot,dangerouslySetInnerHTML:{__html:rt}}),g.a.createElement("div",{ref:Me,className:Se.a.button},g.a.createElement(k.a,null,g.a.createElement(I.a,{onClick:function(){return et()}},"\u88C1\u526A"),g.a.createElement(I.a,{onClick:function(){return tt()}},"\u7F16\u8F91"))),g.a.createElement("img",{ref:Oe,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),g.a.createElement(J.a,{close:!0,data:ze,type:ze!=null&&ze.length?qe:"",style:Object(C.a)({},Pe),onClose:function(){return Ke("")}}))}},DlQD:function(We,ke,ee){(function(ne,k){We.exports=k()})(this,function(){"use strict";function ne(P,B){for(var W=0;WP.length)&&(B=P.length);for(var W=0,O=new Array(B);W=P.length?{done:!0}:{done:!1,value:P[O++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return W=P[Symbol.iterator](),W.next.bind(W)}function A(P,B){return B={exports:{}},P(B,B.exports),B.exports}var M=A(function(P){function B(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function W(O){P.exports.defaults=O}P.exports={defaults:B(),getDefaults:B,changeDefaults:W}}),w=M.defaults,R=M.getDefaults,S=M.changeDefaults,g=/[&<>"']/,x=/[&<>"']/g,T=/[<>"']|&(?!#?\w+;)/,v=/[<>"']|&(?!#?\w+;)/g,y={"&":"&","<":"<",">":">",'"':""","'":"'"},p=function(B){return y[B]};function s(P,B){if(B){if(g.test(P))return P.replace(x,p)}else if(T.test(P))return P.replace(v,p);return P}var e=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function a(P){return P.replace(e,function(B,W){return W=W.toLowerCase(),W==="colon"?":":W.charAt(0)==="#"?W.charAt(1)==="x"?String.fromCharCode(parseInt(W.substring(2),16)):String.fromCharCode(+W.substring(1)):""})}var i=/(^|[^\[])\^/g;function h(P,B){P=P.source||P,B=B||"";var W={replace:function(U,H){return H=H.source||H,H=H.replace(i,"$1"),P=P.replace(U,H),W},getRegex:function(){return new RegExp(P,B)}};return W}var l=/[^\w:]/g,u=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m(P,B,W){if(P){var O;try{O=decodeURIComponent(a(W)).replace(l,"").toLowerCase()}catch(U){return null}if(O.indexOf("javascript:")===0||O.indexOf("vbscript:")===0||O.indexOf("data:")===0)return null}B&&!u.test(W)&&(W=r(B,W));try{W=encodeURI(W).replace(/%25/g,"%")}catch(U){return null}return W}var d={},o=/^[^:]+:\/*[^/]*$/,n=/^([^:]+:)[\s\S]*$/,t=/^([^:]+:\/*[^/]*)[\s\S]*$/;function r(P,B){d[" "+P]||(o.test(P)?d[" "+P]=P+"/":d[" "+P]=L(P,"/",!0)),P=d[" "+P];var W=P.indexOf(":")===-1;return B.substring(0,2)==="//"?W?B:P.replace(n,"$1")+B:B.charAt(0)==="/"?W?B:P.replace(t,"$1")+B:P+B}var c={exec:function(){}};function f(P){for(var B=1,W,O;B=0&&Q[se]==="\\";)Y=!Y;return Y?"|":" |"}),O=W.split(/ \|/),U=0;if(O.length>B)O.splice(B);else for(;O.length=O.length?U.slice(O.length):U}).join(`
`)}var te=function(){function P(W){this.options=W||K}var B=P.prototype;return B.space=function(O){var U=this.rules.block.newline.exec(O);if(U)return U[0].length>1?{type:"space",raw:U[0]}:{raw:`
`}},B.code=function(O,U){var H=this.rules.block.code.exec(O);if(H){var G=U[U.length-1];if(G&&G.type==="paragraph")return{raw:H[0],text:H[0].trimRight()};var Q=H[0].replace(/^ {4}/gm,"");return{type:"code",raw:H[0],codeBlockStyle:"indented",text:this.options.pedantic?Q:V(Q,`
`)}}},B.fences=function(O){var U=this.rules.block.fences.exec(O);if(U){var H=U[0],G=he(H,U[3]||"");return{type:"code",raw:H,lang:U[2]?U[2].trim():U[2],text:G}}},B.heading=function(O){var U=this.rules.block.heading.exec(O);if(U)return{type:"heading",raw:U[0],depth:U[1].length,text:U[2]}},B.nptable=function(O){var U=this.rules.block.nptable.exec(O);if(U){var H={type:"table",header:z(U[1].replace(/^ *| *\| *$/g,"")),align:U[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:U[3]?U[3].replace(/\n$/,"").split(`
`):[],raw:U[0]};if(H.header.length===H.align.length){var G=H.align.length,Q;for(Q=0;Q ?/gm,"");return{type:"blockquote",raw:U[0],text:H}}},B.list=function(O){var U=this.rules.block.list.exec(O);if(U){for(var H=U[0],G=U[2],Q=G.length>1,Y=G[G.length-1]===")",se={type:"list",raw:H,ordered:Q,start:Q?+G.slice(0,-1):"",loose:!1,items:[]},Ee=U[0].match(this.rules.block.item),Ie=!1,Pe,Ne,Me,Oe,Ge,je,ze,Ke=Ee.length,Fe=0;Fe1||this.options.smartLists&&Me!==G)&&(Oe=Ee.slice(Fe+1).join(`
`),se.raw=se.raw.substring(0,se.raw.length-Oe.length),Fe=Ke-1)),Ge=Ie||/\n\n(?!\s*$)/.test(Pe),Fe!==Ke-1&&(Ie=Pe.charAt(Pe.length-1)===`
`,Ge||(Ge=Ie)),Ge&&(se.loose=!0),je=/^\[[ xX]\] /.test(Pe),ze=void 0,je&&(ze=Pe[1]!==" ",Pe=Pe.replace(/^\[[ xX]\] +/,"")),se.items.push({type:"list_item",raw:H,task:je,checked:ze,loose:Ge,text:Pe});return se}},B.html=function(O){var U=this.rules.block.html.exec(O);if(U)return{type:this.options.sanitize?"paragraph":"html",raw:U[0],pre:!this.options.sanitizer&&(U[1]==="pre"||U[1]==="script"||U[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(U[0]):$(U[0]):U[0]}},B.def=function(O){var U=this.rules.block.def.exec(O);if(U){U[3]&&(U[3]=U[3].substring(1,U[3].length-1));var H=U[1].toLowerCase().replace(/\s+/g," ");return{tag:H,raw:U[0],href:U[2],title:U[3]}}},B.table=function(O){var U=this.rules.block.table.exec(O);if(U){var H={type:"table",header:z(U[1].replace(/^ *| *\| *$/g,"")),align:U[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:U[3]?U[3].replace(/\n$/,"").split(`
`):[]};if(H.header.length===H.align.length){H.raw=U[0];var G=H.align.length,Q;for(Q=0;Q/i.test(G[0])&&(U=!1),!H&&/^<(pre|code|kbd|script)(\s|>)/i.test(G[0])?H=!0:H&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(G[0])&&(H=!1),{type:this.options.sanitize?"text":"html",raw:G[0],inLink:U,inRawBlock:H,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(G[0]):$(G[0]):G[0]}},B.link=function(O){var U=this.rules.inline.link.exec(O);if(U){var H=q(U[2],"()");if(H>-1){var G=U[0].indexOf("!")===0?5:4,Q=G+U[1].length+H;U[2]=U[2].substring(0,H),U[0]=U[0].substring(0,Q).trim(),U[3]=""}var Y=U[2],se="";if(this.options.pedantic){var Ee=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Y);Ee?(Y=Ee[1],se=Ee[3]):se=""}else se=U[3]?U[3].slice(1,-1):"";Y=Y.trim().replace(/^<([\s\S]*)>$/,"$1");var Ie=J(U,{href:Y&&Y.replace(this.rules.inline._escapes,"$1"),title:se&&se.replace(this.rules.inline._escapes,"$1")},U[0]);return Ie}},B.reflink=function(O,U){var H;if((H=this.rules.inline.reflink.exec(O))||(H=this.rules.inline.nolink.exec(O))){var G=(H[2]||H[1]).replace(/\s+/g," ");if(G=U[G.toLowerCase()],!G||!G.href){var Q=H[0].charAt(0);return{type:"text",raw:Q,text:Q}}var Y=J(H,G,H[0]);return Y}},B.strong=function(O,U,H){H===void 0&&(H="");var G=this.rules.inline.strong.start.exec(O);if(G&&(!G[1]||G[1]&&(H===""||this.rules.inline.punctuation.exec(H)))){U=U.slice(-1*O.length);var Q=G[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Q.lastIndex=0;for(var Y;(G=Q.exec(U))!=null;)if(Y=this.rules.inline.strong.middle.exec(U.slice(0,G.index+3)),Y)return{type:"strong",raw:O.slice(0,Y[0].length),text:O.slice(2,Y[0].length-2)}}},B.em=function(O,U,H){H===void 0&&(H="");var G=this.rules.inline.em.start.exec(O);if(G&&(!G[1]||G[1]&&(H===""||this.rules.inline.punctuation.exec(H)))){U=U.slice(-1*O.length);var Q=G[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Q.lastIndex=0;for(var Y;(G=Q.exec(U))!=null;)if(Y=this.rules.inline.em.middle.exec(U.slice(0,G.index+2)),Y)return{type:"em",raw:O.slice(0,Y[0].length),text:O.slice(1,Y[0].length-1)}}},B.codespan=function(O){var U=this.rules.inline.code.exec(O);if(U){var H=U[2].replace(/\n/g," "),G=/[^ ]/.test(H),Q=H.startsWith(" ")&&H.endsWith(" ");return G&&Q&&(H=H.substring(1,H.length-1)),H=$(H,!0),{type:"codespan",raw:U[0],text:H}}},B.br=function(O){var U=this.rules.inline.br.exec(O);if(U)return{type:"br",raw:U[0]}},B.del=function(O){var U=this.rules.inline.del.exec(O);if(U)return{type:"del",raw:U[0],text:U[1]}},B.autolink=function(O,U){var H=this.rules.inline.autolink.exec(O);if(H){var G,Q;return H[2]==="@"?(G=$(this.options.mangle?U(H[1]):H[1]),Q="mailto:"+G):(G=$(H[1]),Q=G),{type:"link",raw:H[0],text:G,href:Q,tokens:[{type:"text",raw:G,text:G}]}}},B.url=function(O,U){var H;if(H=this.rules.inline.url.exec(O)){var G,Q;if(H[2]==="@")G=$(this.options.mangle?U(H[0]):H[0]),Q="mailto:"+G;else{var Y;do Y=H[0],H[0]=this.rules.inline._backpedal.exec(H[0])[0];while(Y!==H[0]);G=$(H[0]),H[1]==="www."?Q="http://"+G:Q=G}return{type:"link",raw:H[0],text:G,href:Q,tokens:[{type:"text",raw:G,text:G}]}}},B.inlineText=function(O,U,H){var G=this.rules.inline.text.exec(O);if(G){var Q;return U?Q=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(G[0]):$(G[0]):G[0]:Q=$(this.options.smartypants?H(G[0]):G[0]),{type:"text",raw:G[0],text:Q}}},P}(),le=N.noopTest,re=N.edit,ae=N.merge,X={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:le,table:le,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};X._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,X._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,X.def=re(X.def).replace("label",X._label).replace("title",X._title).getRegex(),X.bullet=/(?:[*+-]|\d{1,9}[.)])/,X.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,X.item=re(X.item,"gm").replace(/bull/g,X.bullet).getRegex(),X.list=re(X.list).replace(/bull/g,X.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+X.def.source+")").getRegex(),X._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",X._comment=//,X.html=re(X.html,"i").replace("comment",X._comment).replace("tag",X._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),X.paragraph=re(X._paragraph).replace("hr",X.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",X._tag).getRegex(),X.blockquote=re(X.blockquote).replace("paragraph",X.paragraph).getRegex(),X.normal=ae({},X),X.gfm=ae({},X.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),X.gfm.nptable=re(X.gfm.nptable).replace("hr",X.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",X._tag).getRegex(),X.gfm.table=re(X.gfm.table).replace("hr",X.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",X._tag).getRegex(),X.pedantic=ae({},X.normal,{html:re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",X._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:le,paragraph:re(X.normal._paragraph).replace("hr",X.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",X.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Z={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:le,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:le,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",Z.punctuation=re(Z.punctuation).replace(/punctuation/g,Z._punctuation).getRegex(),Z._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Z._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Z.em.start=re(Z.em.start).replace(/punctuation/g,Z._punctuation).getRegex(),Z.em.middle=re(Z.em.middle).replace(/punctuation/g,Z._punctuation).replace(/overlapSkip/g,Z._overlapSkip).getRegex(),Z.em.endAst=re(Z.em.endAst,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.em.endUnd=re(Z.em.endUnd,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.start=re(Z.strong.start).replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.middle=re(Z.strong.middle).replace(/punctuation/g,Z._punctuation).replace(/blockSkip/g,Z._blockSkip).getRegex(),Z.strong.endAst=re(Z.strong.endAst,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.strong.endUnd=re(Z.strong.endUnd,"g").replace(/punctuation/g,Z._punctuation).getRegex(),Z.blockSkip=re(Z._blockSkip,"g").getRegex(),Z.overlapSkip=re(Z._overlapSkip,"g").getRegex(),Z._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Z._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Z._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Z.autolink=re(Z.autolink).replace("scheme",Z._scheme).replace("email",Z._email).getRegex(),Z._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Z.tag=re(Z.tag).replace("comment",X._comment).replace("attribute",Z._attribute).getRegex(),Z._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Z._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Z._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Z.link=re(Z.link).replace("label",Z._label).replace("href",Z._href).replace("title",Z._title).getRegex(),Z.reflink=re(Z.reflink).replace("label",Z._label).getRegex(),Z.reflinkSearch=re(Z.reflinkSearch,"g").replace("reflink",Z.reflink).replace("nolink",Z.nolink).getRegex(),Z.normal=ae({},Z),Z.pedantic=ae({},Z.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:re(/^!?\[(label)\]\((.*?)\)/).replace("label",Z._label).getRegex(),reflink:re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Z._label).getRegex()}),Z.gfm=ae({},Z.normal,{escape:re(Z.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(O="x"+O.toString(16)),B+=""+O+";";return B}var ue=function(){function P(W){this.tokens=[],this.tokens.links=Object.create(null),this.options=W||Re,this.options.tokenizer=this.options.tokenizer||new te,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var O={block:me.normal,inline:pe.normal};this.options.pedantic?(O.block=me.pedantic,O.inline=pe.pedantic):this.options.gfm&&(O.block=me.gfm,this.options.breaks?O.inline=pe.breaks:O.inline=pe.gfm),this.tokenizer.rules=O}P.lex=function(O,U){var H=new P(U);return H.lex(O)};var B=P.prototype;return B.lex=function(O){return O=O.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(O,this.tokens,!0),this.inline(this.tokens),this.tokens},B.blockTokens=function(O,U,H){U===void 0&&(U=[]),H===void 0&&(H=!0),O=O.replace(/^ +$/gm,"");for(var G,Q,Y,se;O;){if(G=this.tokenizer.space(O)){O=O.substring(G.raw.length),G.type&&U.push(G);continue}if(G=this.tokenizer.code(O,U)){O=O.substring(G.raw.length),G.type?U.push(G):(se=U[U.length-1],se.raw+=`
`+G.raw,se.text+=`
`+G.text);continue}if(G=this.tokenizer.fences(O)){O=O.substring(G.raw.length),U.push(G);continue}if(G=this.tokenizer.heading(O)){O=O.substring(G.raw.length),U.push(G);continue}if(G=this.tokenizer.nptable(O)){O=O.substring(G.raw.length),U.push(G);continue}if(G=this.tokenizer.hr(O)){O=O.substring(G.raw.length),U.push(G);continue}if(G=this.tokenizer.blockquote(O)){O=O.substring(G.raw.length),G.tokens=this.blockTokens(G.text,[],H),U.push(G);continue}if(G=this.tokenizer.list(O)){for(O=O.substring(G.raw.length),Y=G.items.length,Q=0;Q0)for(;(Ee=this.tokenizer.rules.inline.reflinkSearch.exec(se))!=null;)Ie.includes(Ee[0].slice(Ee[0].lastIndexOf("[")+1,-1))&&(se=se.slice(0,Ee.index)+"["+"a".repeat(Ee[0].length-2)+"]"+se.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ee=this.tokenizer.rules.inline.blockSkip.exec(se))!=null;)se=se.slice(0,Ee.index)+"["+"a".repeat(Ee[0].length-2)+"]"+se.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;O;){if(Y=this.tokenizer.escape(O)){O=O.substring(Y.raw.length),U.push(Y);continue}if(Y=this.tokenizer.tag(O,H,G)){O=O.substring(Y.raw.length),H=Y.inLink,G=Y.inRawBlock,U.push(Y);continue}if(Y=this.tokenizer.link(O)){O=O.substring(Y.raw.length),Y.type==="link"&&(Y.tokens=this.inlineTokens(Y.text,[],!0,G)),U.push(Y);continue}if(Y=this.tokenizer.reflink(O,this.tokens.links)){O=O.substring(Y.raw.length),Y.type==="link"&&(Y.tokens=this.inlineTokens(Y.text,[],!0,G)),U.push(Y);continue}if(Y=this.tokenizer.strong(O,se,Q)){O=O.substring(Y.raw.length),Y.tokens=this.inlineTokens(Y.text,[],H,G),U.push(Y);continue}if(Y=this.tokenizer.em(O,se,Q)){O=O.substring(Y.raw.length),Y.tokens=this.inlineTokens(Y.text,[],H,G),U.push(Y);continue}if(Y=this.tokenizer.codespan(O)){O=O.substring(Y.raw.length),U.push(Y);continue}if(Y=this.tokenizer.br(O)){O=O.substring(Y.raw.length),U.push(Y);continue}if(Y=this.tokenizer.del(O)){O=O.substring(Y.raw.length),Y.tokens=this.inlineTokens(Y.text,[],H,G),U.push(Y);continue}if(Y=this.tokenizer.autolink(O,oe)){O=O.substring(Y.raw.length),U.push(Y);continue}if(!H&&(Y=this.tokenizer.url(O,oe))){O=O.substring(Y.raw.length),U.push(Y);continue}if(Y=this.tokenizer.inlineText(O,G,De)){O=O.substring(Y.raw.length),Q=Y.raw.slice(-1),U.push(Y);continue}if(O){var Pe="Infinite loop on byte: "+O.charCodeAt(0);if(this.options.silent){console.error(Pe);break}else throw new Error(Pe)}}return U},k(P,null,[{key:"rules",get:function(){return{block:me,inline:pe}}}]),P}(),ce=M.defaults,ge=N.cleanUrl,ye=N.escape,ve=function(){function P(W){this.options=W||ce}var B=P.prototype;return B.code=function(O,U,H){var G=(U||"").match(/\S*/)[0];if(this.options.highlight){var Q=this.options.highlight(O,G);Q!=null&&Q!==O&&(H=!0,O=Q)}return G?''+(H?O:ye(O,!0))+`
`:""+(H?O:ye(O,!0))+`
`},B.blockquote=function(O){return`
`+O+`
`},B.html=function(O){return O},B.heading=function(O,U,H,G){return this.options.headerIds?"
`:""+O+"
`},B.hr=function(){return this.options.xhtml?`
`:`
`},B.list=function(O,U,H){var G=U?"ol":"ul",Q=U&&H!==1?' start="'+H+'"':"";return"<"+G+Q+`>
`+O+""+G+`>
`},B.listitem=function(O){return""+O+`
`},B.checkbox=function(O){return" "},B.paragraph=function(O){return""+O+`
`},B.table=function(O,U){return U&&(U=""+U+" "),`
`},B.tablerow=function(O){return`
`+O+`
`},B.tablecell=function(O,U){var H=U.header?"th":"td",G=U.align?"<"+H+' align="'+U.align+'">':"<"+H+">";return G+O+""+H+`>
`},B.strong=function(O){return""+O+" "},B.em=function(O){return""+O+" "},B.codespan=function(O){return""+O+""},B.br=function(){return this.options.xhtml?" ":" "},B.del=function(O){return""+O+""},B.link=function(O,U,H){if(O=ge(this.options.sanitize,this.options.baseUrl,O),O===null)return H;var G='"+H+" ",G},B.image=function(O,U,H){if(O=ge(this.options.sanitize,this.options.baseUrl,O),O===null)return H;var G=' ":">",G},B.text=function(O){return O},P}(),fe=function(){function P(){}var B=P.prototype;return B.strong=function(O){return O},B.em=function(O){return O},B.codespan=function(O){return O},B.del=function(O){return O},B.html=function(O){return O},B.text=function(O){return O},B.link=function(O,U,H){return""+H},B.image=function(O,U,H){return""+H},B.br=function(){return""},P}(),we=function(){function P(){this.seen={}}var B=P.prototype;return B.slug=function(O){var U=O.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(U)){var H=U;do this.seen[H]++,U=H+"-"+this.seen[H];while(this.seen.hasOwnProperty(U))}return this.seen[U]=0,U},P}(),Ce=M.defaults,be=N.unescape,Ae=function(){function P(W){this.options=W||Ce,this.options.renderer=this.options.renderer||new ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new fe,this.slugger=new we}P.parse=function(O,U){var H=new P(U);return H.parse(O)};var B=P.prototype;return B.parse=function(O,U){U===void 0&&(U=!0);var H="",G,Q,Y,se,Ee,Ie,Pe,Ne,Me,Oe,Ge,je,ze,Ke,Fe,Ze,qe,Qe,et=O.length;for(G=0;G0&&Fe.tokens[0].type==="text"?(Fe.tokens[0].text=Qe+" "+Fe.tokens[0].text,Fe.tokens[0].tokens&&Fe.tokens[0].tokens.length>0&&Fe.tokens[0].tokens[0].type==="text"&&(Fe.tokens[0].tokens[0].text=Qe+" "+Fe.tokens[0].tokens[0].text)):Fe.tokens.unshift({type:"text",text:Qe}):Ke+=Qe),Ke+=this.parse(Fe.tokens,ze),Me+=this.renderer.listitem(Ke,qe,Ze);H+=this.renderer.list(Me,Ge,je);continue}case"html":{H+=this.renderer.html(Oe.text);continue}case"paragraph":{H+=this.renderer.paragraph(this.parseInline(Oe.tokens));continue}case"text":{for(Me=Oe.tokens?this.parseInline(Oe.tokens):Oe.text;G+1An error occurred:
"+Se(Y.message+"",!0)+" ";throw Y}}j.options=j.setOptions=function(P){return xe(j.defaults,P),Le(j.defaults),j},j.getDefaults=de,j.defaults=_e,j.use=function(P){var B=xe({},P);if(P.renderer&&function(){var O=j.defaults.renderer||new ve,U=function(Q){var Y=O[Q];O[Q]=function(){for(var se=arguments.length,Ee=new Array(se),Ie=0;Ie1&&arguments[1]!==void 0?arguments[1]:!1;return!!(e(d)&&a(o))},e=function(d){return Object(g.p)()?!0:(d({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},a=function(){var d,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=Object(S.c)()._store.getState(),t=n.user;return(d=t.userInfo)!==null&&d!==void 0&&d.profile_completed?!0:(C.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:o?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){S.d.push("/account/profile/edit")}}),!1)},i=function(){var d,o=Object(S.c)()._store.getState(),n=o.user;return(d=n.userInfo)!==null&&d!==void 0&&d.professional_certification?!0:(C.a.confirm({title:"\u63D0\u793A",centered:!0,content:R.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(x.S)("/account/certification")}}),!1)},h=function(){var d;if(Object(g.a)())return!0;var o=Object(S.c)()._store.getState(),n=o.user,t=o.globalSetting;return C.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:R.a.createElement("div",{className:"tc",style:{marginLeft:-38}},R.a.createElement("p",null,"\u626B\u7801\u6DFB\u52A0\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),R.a.createElement("img",{src:p.a.IMG_SERVER+(t==null||((d=t.setting)===null||d===void 0)?void 0:d.authority_qrcode_url),width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1},l=function(d,o){var n;if(d)return!0;var t=Object(S.c)()._store.getState(),r=t.user,c=t.globalSetting;return C.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:R.a.createElement("div",null,R.a.createElement("p",null,o||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),R.a.createElement("div",{style:{marginLeft:"110px"}},R.a.createElement("img",{src:p.a.IMG_SERVER+(c==null||((n=c.setting)===null||n===void 0)?void 0:n.authority_qrcode_url),width:200}),R.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(x.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1},u=function(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=Object(S.c)()._store.getState(),t=n.shixunsDetail.detail;return(t==null?void 0:t.public)===2||(t==null?void 0:t.public)===1||(t==null?void 0:t.shixun_status)===3?(C.a.info({centered:!0,icon:R.a.createElement(T.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:R.a.createElement("div",{className:"tc",style:{marginLeft:-38}},R.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},R.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(t==null?void 0:t.public)===2?"\u5DF2\u516C\u5F00":(t==null?void 0:t.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",o,"\u3002"),R.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),R.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:y.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(t==null?void 0:t.shixun_status)===2?(C.a.confirm({centered:!0,icon:R.a.createElement(T.a,null),title:"\u63D0\u793A",content:R.a.createElement("div",null,R.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",o,"\u3002"),R.a.createElement("br",null),R.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){C.a.confirm({width:440,centered:!0,icon:R.a.createElement(T.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var c=Object(E.a)(M.a.mark(function b(){var L;return M.a.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.next=2,d({type:"shixunsDetail/cancelRelease",payload:{id:t==null?void 0:t.identifier}});case 2:L=F.sent,L.status!==401&&(k.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),d({type:"shixunsDetail/getShixunsDetail",payload:{id:t==null?void 0:t.identifier}}),d({type:"practiceSetting/getCommonData",payload:{id:t==null?void 0:t.identifier}}));case 4:case"end":return F.stop()}},b)}));function f(){return c.apply(this,arguments)}return f}()})}}),!0):!1}},SJMd:function(We,ke){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var ee,ne,k,E=!1,I,C;window.PR_SHOULD_USE_CONTINUATION=!0;var A,M;(function(){var w=window,R=["break,continue,do,else,for,if,return,while"],S=[R,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],g=[S,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],x=[g,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],T=[g,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],v=[g,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],y="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",p=[g,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",e=[R,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],a=[R,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],i=[R,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],h=[x,v,T,p,s,e,a,i],l=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,u="str",m="kwd",d="com",o="typ",n="lit",t="pun",r="pln",c="tag",f="dec",b="src",L="atn",D="atv",F="nocode",N="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function K(oe){for(var ue=0,ce=!1,ge=!1,ye=0,ve=oe.length;ye122||(O<65||W>90||Le.push([Math.max(65,W)|32,Math.min(O,90)|32]),O<97||W>122||Le.push([Math.max(97,W)&~32,Math.min(O,122)&~32]))}}Le.sort(function(Q,Y){return Q[0]-Y[0]||Y[1]-Q[1]});for(var U=[],H=[],_=0;_G[0]&&(G[1]+1>G[0]&&j.push("-"),j.push(be(G[1])))}return j.push("]"),j.join("")}function xe(Se){for(var de=Se.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Le=de.length,_e=[],j=0,_=0;j=2&&W==="["?de[j]=Ae(P):W!=="\\"&&(de[j]=P.replace(/[a-zA-Z]/g,function(H){var G=H.charCodeAt(0);return"["+String.fromCharCode(G&~32,G|32)+"]"}))}return de.join("")}for(var Te=[],ye=0,ve=oe.length;ye=0;)ce[Te.charAt(Se)]=xe;var de=xe[1],Le=""+de;Ce.hasOwnProperty(Le)||(we.push(de),Ce[Le]=null)}we.push(/[\0-\uffff]/),ge=K(we)})();var ye=ue.length,ve=function(fe){for(var we=fe.sourceCode,Ce=fe.basePos,be=fe.sourceNode,Ae=[Ce,r],xe=0,Te=we.match(ge)||[],Se={},de=0,Le=Te.length;de=5&&j.substring(0,5)==="lang-",P&&!(_&&typeof _[1]=="string")&&(P=!1,j=b),P||(Se[_e]=j)}var O=xe;if(xe+=_e.length,!P)Ae.push(Ce+O,j);else{var U=_[1],H=_e.indexOf(U),G=H+U.length;_[2]&&(G=_e.length-_[2].length,H=G-U.length);var Q=j.substring(5);z(be,Ce+O,_e.substring(0,H),ve,Ae),z(be,Ce+O+H,U,Z(Q,U),Ae),z(be,Ce+O+G,_e.substring(G),ve,Ae)}}fe.decorations=Ae};return ve}function he(oe){var ue=[],ce=[];oe.tripleQuotedStrings?ue.push([u,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):oe.multiLineStrings?ue.push([u,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ue.push([u,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),oe.verbatimStrings&&ce.push([u,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ge=oe.hashComments;ge&&(oe.cStyleComments?(ge>1?ue.push([d,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ue.push([d,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ce.push([u,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ue.push([d,/^#[^\r\n]*/,null,"#"])),oe.cStyleComments&&(ce.push([d,/^\/\/[^\r\n]*/,null]),ce.push([d,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ye=oe.regexLiterals;if(ye){var ve=ye>1?"":`
\r`,fe=ve?".":"[\\S\\s]",we="/(?=[^/*"+ve+"])(?:[^/\\x5B\\x5C"+ve+"]|\\x5C"+fe+"|\\x5B(?:[^\\x5C\\x5D"+ve+"]|\\x5C"+fe+")*(?:\\x5D|$))+/";ce.push(["lang-regex",RegExp("^"+N+"("+we+")")])}var Ce=oe.types;Ce&&ce.push([o,Ce]);var be=(""+oe.keywords).replace(/^ | $/g,"");be.length&&ce.push([m,new RegExp("^(?:"+be.replace(/[\s,]+/g,"|")+")\\b"),null]),ue.push([r,/^\s+/,null,` \r
\xA0`]);var Ae="^.[^\\s\\w.$@'\"`/\\\\]*";return oe.regexLiterals&&(Ae+="(?!s*/)"),ce.push([n,/^@[a-z_$][a-z_$@0-9]*/i,null],[o,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[r,/^[a-z_$][a-z_$@0-9]*/i,null],[n,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[r,/^\\[\s\S]?/,null],[t,new RegExp(Ae),null]),J(ue,ce)}var te=he({keywords:h,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function le(oe,ue,ce){for(var ge=/(?:^|\s)nocode(?:\s|$)/,ye=/\r\n?|\n/,ve=oe.ownerDocument,fe=ve.createElement("li");oe.firstChild;)fe.appendChild(oe.firstChild);var we=[fe];function Ce(de){var Le=de.nodeType;if(Le==1&&!ge.test(de.className))if(de.nodeName==="br")be(de),de.parentNode&&de.parentNode.removeChild(de);else for(var _e=de.firstChild;_e;_e=_e.nextSibling)Ce(_e);else if((Le==3||Le==4)&&ce){var j=de.nodeValue,_=j.match(ye);if(_){var P=j.substring(0,_.index);de.nodeValue=P;var B=j.substring(_.index+_[0].length);if(B){var W=de.parentNode;W.insertBefore(ve.createTextNode(B),de.nextSibling)}be(de),P||de.parentNode.removeChild(de)}}}function be(de){for(;!de.nextSibling;)if(de=de.parentNode,!de)return;function Le(_,P){var B=P?_.cloneNode(!1):_,W=_.parentNode;if(W){var O=Le(W,1),U=_.nextSibling;O.appendChild(B);for(var H=U;H;H=U)U=H.nextSibling,O.appendChild(H)}return B}for(var _e=Le(de.nextSibling,0),j;(j=_e.parentNode)&&j.nodeType===1;)_e=j;we.push(_e)}for(var Ae=0;Ae=W&&(Ce+=2),ve>=O&&(xe+=2)}}finally{j&&(j.style.display=_)}}var ae={};function X(oe,ue){for(var ce=ue.length;--ce>=0;){var ge=ue[ce];ae.hasOwnProperty(ge)?w.console&&console.warn("cannot override language handler %s",ge):ae[ge]=oe}}function Z(oe,ue){return oe&&ae.hasOwnProperty(oe)||(oe=/^\s*]*(?:>|$)/],[d,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[t,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^