<editor-fold desc="// = = = =   P R O T E C T E D   S T A T I C   M E T H O D S   = = = = = = = = = = = = = = =">
976825
protected static function _DecToDDMS( $degfloat, $isLongi = false )
   {

      if ( ! \is_double( $degfloat ) )
      {
         // $degfloat must be of type double/float
         $degfloat = \doubleval( $degfloat );
      }

      // Remember if $degfloat is negative
      $isNegative = ( $degfloat < 0 );

      // Init the result array
      $res        = array( 'DIR' => '', 'DEG' => 0, 'MIN' => 0,'SEC' => 0.0 );
      if ( $isNegative )
      {
         $res[ 'DIR' ] = $isLongi ? 'W' : 'S';
         $degfloat     = \abs( $degfloat );
      }
      else
      {
         $res[ 'DIR' ] = $isLongi ? 'E' : 'N';
      }

      $degfloatStr  = self::extractDec( $degfloat );
      $res[ 'DEG' ] = $degfloatStr[ 0 ];
      $minfloat     = 60.0 * ( $degfloat - $res[ 'DEG' ] );
      $minfloatStr  = self::extractDec( $minfloat );
      $res[ 'MIN' ] = $minfloatStr[ 0 ];
      $secfloat     = 60.0 * ( $minfloat - $res[ 'MIN' ] );
      $secfloat     = \round( $secfloat, 5 );
      if ( $secfloat == 60.0 )
      {
         ++$res[ 'MIN' ];
         $secfloat = 0.0;
      }
      while ( $res[ 'MIN' ] >= 60 )
      {
         $res[ 'DEG' ]++;
         $res[ 'MIN' ] = $res[ 'MIN' ] - 60;
      }
      $res[ 'SEC' ] = $secfloat;
      return $res;
   }
491241
function pJson(events, top = '') {
    Object.keys(events).forEach((i) => {
      if (typeof events[i] === 'object' && events[i] != null) {
        let rtn;
        if (Object.prototype.toString.call(events) === '[object Array]') {
          rtn = (`${top}[${i}]`);
        } else { rtn = (`${top}.${i}`); }
          pJson(events[i], rtn);
      } else if (Object.prototype.toString.call(events) === '[object Array]') {
        tmp += `{}${top}[${i}] = ${events[i]}\n`;
      } else {
        tmp += `{}${top}.${i} = ${events[i]}\n`;
      }
    });
  }
1130771
public void setPatternStroke(PdfPatternPainter p, Color color, float tint) {
        checkWriter();
        if (!p.isStencil())
            throw new RuntimeException("An uncolored pattern was expected.");
        PageResources prs = getPageResources();
        PdfName name = writer.addSimplePattern(p);
        name = prs.addPattern(name, p.getIndirectReference());
        ColorDetails csDetail = writer.addSimplePatternColorspace(color);
        PdfName cName = prs.addColor(csDetail.getColorName(), csDetail.getIndirectReference());
        content.append(cName.getBytes()).append(" CS").append_i(separator);
        outputColorNumbers(color, tint);
        content.append(' ').append(name.getBytes()).append(" SCN").append_i(separator);
    }
742932
@Override
    public R visitMemberReference(MemberReferenceTree node, P p) {
        R r = scan(node.getQualifierExpression(), p);
        r = scanAndReduce(node.getTypeArguments(), p, r);
        return r;
    }
1030452
function cloudSprite(contextAndRatio, d, data, di) {
  if (d.sprite) return;
  var c = contextAndRatio.context,
      ratio = contextAndRatio.ratio;

  c.clearRect(0, 0, (cw << 5) / ratio, ch / ratio);
  var x = 0,
      y = 0,
      maxh = 0,
      n = data.length,
      w, w32, h, i, j;
  --di;
  while (++di < n) {
    d = data[di];
    c.save();
    c.font = d.style + " " + d.weight + " " + ~~((d.size + 1) / ratio) + "px " + d.font;
    w = c.measureText(d.text + "m").width * ratio;
    h = d.size << 1;
    if (d.rotate) {
      var sr = Math.sin(d.rotate * cloudRadians),
          cr = Math.cos(d.rotate * cloudRadians),
          wcr = w * cr,
          wsr = w * sr,
          hcr = h * cr,
          hsr = h * sr;
      w = (Math.max(Math.abs(wcr + hsr), Math.abs(wcr - hsr)) + 0x1f) >> 5 << 5;
      h = ~~Math.max(Math.abs(wsr + hcr), Math.abs(wsr - hcr));
    } else {
      w = (w + 0x1f) >> 5 << 5;
    }
    if (h > maxh) maxh = h;
    if (x + w >= (cw << 5)) {
      x = 0;
      y += maxh;
      maxh = 0;
    }
    if (y + h >= ch) break;
    c.translate((x + (w >> 1)) / ratio, (y + (h >> 1)) / ratio);
    if (d.rotate) c.rotate(d.rotate * cloudRadians);
    c.fillText(d.text, 0, 0);
    if (d.padding) {
      c.lineWidth = 2 * d.padding;
      c.strokeText(d.text, 0, 0);
    }
    c.restore();
    d.width = w;
    d.height = h;
    d.xoff = x;
    d.yoff = y;
    d.x1 = w >> 1;
    d.y1 = h >> 1;
    d.x0 = -d.x1;
    d.y0 = -d.y1;
    d.hasText = true;
    x += w;
  }
  var pixels = c.getImageData(0, 0, (cw << 5) / ratio, ch / ratio).data,
      sprite = [];
  while (--di >= 0) {
    d = data[di];
    if (!d.hasText) continue;
    w = d.width;
    w32 = w >> 5;
    h = d.y1 - d.y0;
    // Zero the buffer
    for (i = 0; i < h * w32; i++) sprite[i] = 0;
    x = d.xoff;
    if (x == null) return;
    y = d.yoff;
    var seen = 0,
        seenRow = -1;
    for (j = 0; j < h; j++) {
      for (i = 0; i < w; i++) {
        var k = w32 * j + (i >> 5),
            m = pixels[((y + j) * (cw << 5) + (x + i)) << 2] ? 1 << (31 - (i % 32)) : 0;
        sprite[k] |= m;
        seen |= m;
      }
      if (seen) seenRow = j;
      else {
        d.y0++;
        h--;
        j--;
        y++;
      }
    }
    d.y1 = d.y0 + seenRow;
    d.sprite = sprite.slice(0, (d.y1 - d.y0) * w32);
  }
}
897715
function(){
        var prev=this.s1Link.prev;
        var next=this.s1Link.next;
        if(prev!==null)prev.next=next;
        if(next!==null)next.prev=prev;
        if(this.shape1.contactLink==this.s1Link)this.shape1.contactLink=next;
        this.s1Link.prev=null;
        this.s1Link.next=null;
        this.s1Link.shape=null;
        this.s1Link.body=null;
        this.shape1.numContacts--;

        prev=this.s2Link.prev;
        next=this.s2Link.next;
        if(prev!==null)prev.next=next;
        if(next!==null)next.prev=prev;
        if(this.shape2.contactLink==this.s2Link)this.shape2.contactLink=next;
        this.s2Link.prev=null;
        this.s2Link.next=null;
        this.s2Link.shape=null;
        this.s2Link.body=null;
        this.shape2.numContacts--;

        prev=this.b1Link.prev;
        next=this.b1Link.next;
        if(prev!==null)prev.next=next;
        if(next!==null)next.prev=prev;
        if(this.body1.contactLink==this.b1Link)this.body1.contactLink=next;
        this.b1Link.prev=null;
        this.b1Link.next=null;
        this.b1Link.shape=null;
        this.b1Link.body=null;
        this.body1.numContacts--;

        prev=this.b2Link.prev;
        next=this.b2Link.next;
        if(prev!==null)prev.next=next;
        if(next!==null)next.prev=prev;
        if(this.body2.contactLink==this.b2Link)this.body2.contactLink=next;
        this.b2Link.prev=null;
        this.b2Link.next=null;
        this.b2Link.shape=null;
        this.b2Link.body=null;
        this.body2.numContacts--;

        this.manifold.body1=null;
        this.manifold.body2=null;
        this.constraint.body1=null;
        this.constraint.body2=null;
        this.constraint.detach();

        this.shape1=null;
        this.shape2=null;
        this.body1=null;
        this.body2=null;
    }
373459
protected void init() {

        // 読み込み用の登録
        registerForReading(conversionHandler);
        registerForReading(new ParseProcessorFactory<>());
        registerForReading(constraintHandler);

        // 書き込み用の登録
        registerForWriting(constraintHandler);
        registerForWriting(new PrintProcessorFactory<>());
        registerForWriting(conversionHandler);

        // 変換用の登録
        registerForConversion(CsvNullConvert.class, new NullConvertFactory());
        registerForConversion(CsvDefaultValue.class, new DefaultValueFactory());
        registerForConversion(CsvTrim.class, new TrimFactory());
        registerForConversion(CsvUpper.class, new UpperFactory());
        registerForConversion(CsvLower.class, new LowerFactory());
        registerForConversion(CsvRegexReplace.class, new RegexReplaceFactory());
        registerForConversion(CsvWordReplace.class, new WordReplaceFactory());
        registerForConversion(CsvFullChar.class, new FullCharFactory());
        registerForConversion(CsvHalfChar.class, new HalfCharFactory());
        registerForConversion(CsvLeftPad.class, new LeftPadFactory());
        registerForConversion(CsvRightPad.class, new RightPadFactory());
        registerForConversion(CsvMultiPad.class, new MultiPadFactory());
        registerForConversion(CsvOneSideTrim.class, new OneSideTrimFactory());

        // 制約用の登録
        registerForConstraint(CsvRequire.class, new RequireFactory());
        registerForConstraint(CsvUnique.class, new UniqueFactory<>());
        registerForConstraint(CsvUniqueHashCode.class, new UniqueHashCodeFactory<>());
        registerForConstraint(CsvEquals.class, new EqualsFactory<>());

    }
227089
@Override
    public void spr(char order, char Uplo, double alpha, INDArray X, INDArray Ap) {
        if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL)
            OpProfiler.getInstance().processBlasCall(false, Ap, X);


        // FIXME: int cast

        if (X.data().dataType() == DataType.DOUBLE) {
            DefaultOpExecutioner.validateDataType(DataType.DOUBLE, X);
            dspr(order, Uplo, (int) X.length(), alpha, X, X.stride(-1), Ap);
        } else {
            DefaultOpExecutioner.validateDataType(DataType.FLOAT, X);
            sspr(order, Uplo, (int) X.length(), (float) alpha, X, X.stride(-1), Ap);
        }

        OpExecutionerUtil.checkForAny(Ap);
    }
729828
@Override
  public final void write(final Map<String, Object> pAddParam, final T pObject,
    final Object pFieldVal, final String pFieldName) throws Exception {
    Method fldSetter = this.settersMap.get(pFieldName);
    fldSetter.invoke(pObject, pFieldVal);
  }
104953
function (element, name, methodName, key, method) {
/*Line 11 - 'AtomComponent.js' */                if (element == null)
/*Line 12 - 'AtomComponent.js' */                    return;
/*Line 13 - 'AtomComponent.js' */                if (typeof methodName == 'function') {
/*Line 14 - 'AtomComponent.js' */                    method = methodName;
/*Line 15 - 'AtomComponent.js' */                }
/*Line 16 - 'AtomComponent.js' */                method = method || AtomUI.createDelegate(this, methodName);
/*Line 17 - 'AtomComponent.js' */                var be = {
/*Line 18 - 'AtomComponent.js' */                    element: element,
/*Line 19 - 'AtomComponent.js' */                    name: name,
/*Line 20 - 'AtomComponent.js' */                    methodName: methodName,
/*Line 21 - 'AtomComponent.js' */                    handler: method
/*Line 22 - 'AtomComponent.js' */                };
/*Line 23 - 'AtomComponent.js' */                if (key) {
/*Line 24 - 'AtomComponent.js' */                    be.key = key;
/*Line 25 - 'AtomComponent.js' */                }
/*Line 26 - 'AtomComponent.js' */                if (AtomUI.isNode(element)) {
/*Line 27 - 'AtomComponent.js' */                    $(element).bind(name, null, method);
/*Line 28 - 'AtomComponent.js' */                } else {
/*Line 29 - 'AtomComponent.js' */                    if (element.addEventListener) {
/*Line 30 - 'AtomComponent.js' */                        element.addEventListener(name, method, false);
/*Line 31 - 'AtomComponent.js' */                    } else {
/*Line 32 - 'AtomComponent.js' */                        var f = element["add_" + name];
/*Line 33 - 'AtomComponent.js' */                        if (f == null) {
/*Line 34 - 'AtomComponent.js' */                            // try atom binder...
/*Line 35 - 'AtomComponent.js' */                            f = AtomBinder["add_" + name];
/*Line 36 - 'AtomComponent.js' */                            if (key) {
/*Line 37 - 'AtomComponent.js' */                                f.apply(AtomBinder, [element, key, method]);
/*Line 38 - 'AtomComponent.js' */                            }
/*Line 39 - 'AtomComponent.js' */                            else {
/*Line 40 - 'AtomComponent.js' */                                f.apply(AtomBinder, [element, method]);
/*Line 41 - 'AtomComponent.js' */                            }
/*Line 42 - 'AtomComponent.js' */                        } else {
/*Line 43 - 'AtomComponent.js' */                            f.apply(element, [method]);
/*Line 44 - 'AtomComponent.js' */                        }
/*Line 45 - 'AtomComponent.js' */                    }
/*Line 46 - 'AtomComponent.js' */                }
/*Line 47 - 'AtomComponent.js' */                this._eventHandlers.push(be);
/*Line 48 - 'AtomComponent.js' */            }
1248399
function( listArray, database, baseIndex, paragraphMode, dir ) {
			if ( !baseIndex )
				baseIndex = 0;
			if ( !listArray || listArray.length < baseIndex + 1 )
				return null;
			var i,
				doc = listArray[ baseIndex ].parent.getDocument(),
				retval = new CKEDITOR.dom.documentFragment( doc ),
				rootNode = null,
				currentIndex = baseIndex,
				indentLevel = Math.max( listArray[ baseIndex ].indent, 0 ),
				currentListItem = null,
				orgDir, block,
				paragraphName = ( paragraphMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
			while ( 1 ) {
				var item = listArray[ currentIndex ],
					itemGrandParent = item.grandparent;

				orgDir = item.element.getDirection( 1 );

				if ( item.indent == indentLevel ) {
					if ( !rootNode || listArray[ currentIndex ].parent.getName() != rootNode.getName() ) {
						rootNode = listArray[ currentIndex ].parent.clone( false, 1 );
						dir && rootNode.setAttribute( 'dir', dir );
						retval.append( rootNode );
					}
					currentListItem = rootNode.append( item.element.clone( 0, 1 ) );

					if ( orgDir != rootNode.getDirection( 1 ) )
						currentListItem.setAttribute( 'dir', orgDir );

					for ( i = 0; i < item.contents.length; i++ )
						currentListItem.append( item.contents[ i ].clone( 1, 1 ) );
					currentIndex++;
				} else if ( item.indent == Math.max( indentLevel, 0 ) + 1 ) {
					// Maintain original direction (#6861).
					var currDir = listArray[ currentIndex - 1 ].element.getDirection( 1 ),
						listData = CKEDITOR.plugins.list.arrayToList( listArray, null, currentIndex, paragraphMode, currDir != orgDir ? orgDir : null );

					// If the next block is an <li> with another list tree as the first
					// child, we'll need to append a filler (<br>/NBSP) or the list item
					// wouldn't be editable. (#6724)
					if ( !currentListItem.getChildCount() && CKEDITOR.env.needsNbspFiller && !( doc.$.documentMode > 7 ) )
						currentListItem.append( doc.createText( '\xa0' ) );
					currentListItem.append( listData.listNode );
					currentIndex = listData.nextIndex;
				} else if ( item.indent == -1 && !baseIndex && itemGrandParent ) {
					if ( listNodeNames[ itemGrandParent.getName() ] ) {
						currentListItem = item.element.clone( false, true );
						if ( orgDir != itemGrandParent.getDirection( 1 ) )
							currentListItem.setAttribute( 'dir', orgDir );
					} else
						currentListItem = new CKEDITOR.dom.documentFragment( doc );

					// Migrate all children to the new container,
					// apply the proper text direction.
					var dirLoose = itemGrandParent.getDirection( 1 ) != orgDir,
						li = item.element,
						className = li.getAttribute( 'class' ),
						style = li.getAttribute( 'style' );

					var needsBlock = currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT && ( paragraphMode != CKEDITOR.ENTER_BR || dirLoose || style || className );

					var child,
						count = item.contents.length,
						cachedBookmark;

					for ( i = 0; i < count; i++ ) {
						child = item.contents[ i ];

						// Append bookmark if we can, or cache it and append it when we'll know
						// what to do with it. Generally - we want to keep it next to its original neighbour.
						// Exception: if bookmark is the only child it hasn't got any neighbour, so handle it normally
						// (wrap with block if needed).
						if ( bookmarks( child ) && count > 1 ) {
							// If we don't need block, it's simple - append bookmark directly to the current list item.
							if ( !needsBlock )
								currentListItem.append( child.clone( 1, 1 ) );
							else
								cachedBookmark = child.clone( 1, 1 );
						}
						// Block content goes directly to the current list item, without wrapping.
						else if ( child.type == CKEDITOR.NODE_ELEMENT && child.isBlockBoundary() ) {
							// Apply direction on content blocks.
							if ( dirLoose && !child.getDirection() )
								child.setAttribute( 'dir', orgDir );

							inheirtInlineStyles( li, child );

							className && child.addClass( className );

							// Close the block which we started for inline content.
							block = null;
							// Append bookmark directly before current child.
							if ( cachedBookmark ) {
								currentListItem.append( cachedBookmark );
								cachedBookmark = null;
							}
							// Append this block element to the list item.
							currentListItem.append( child.clone( 1, 1 ) );
						}
						// Some inline content was found - wrap it with block and append that
						// block to the current list item or append it to the block previously created.
						else if ( needsBlock ) {
							// Establish new block to hold text direction and styles.
							if ( !block ) {
								block = doc.createElement( paragraphName );
								currentListItem.append( block );
								dirLoose && block.setAttribute( 'dir', orgDir );
							}

							// Copy over styles to new block;
							style && block.setAttribute( 'style', style );
							className && block.setAttribute( 'class', className );

							// Append bookmark directly before current child.
							if ( cachedBookmark ) {
								block.append( cachedBookmark );
								cachedBookmark = null;
							}
							block.append( child.clone( 1, 1 ) );
						}
						// E.g. BR mode - inline content appended directly to the list item.
						else
							currentListItem.append( child.clone( 1, 1 ) );
					}

					// No content after bookmark - append it to the block if we had one
					// or directly to the current list item if we finished directly in the current list item.
					if ( cachedBookmark ) {
						( block || currentListItem ).append( cachedBookmark );
						cachedBookmark = null;
					}

					if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT && currentIndex != listArray.length - 1 ) {
						var last;

						// Remove bogus <br> if this browser uses them.
						if ( CKEDITOR.env.needsBrFiller ) {
							last = currentListItem.getLast();
							if ( last && last.type == CKEDITOR.NODE_ELEMENT && last.is( 'br' ) )
								last.remove();
						}

						// If the last element is not a block, append <br> to separate merged list items.
						last = currentListItem.getLast( nonEmpty );
						if ( !( last && last.type == CKEDITOR.NODE_ELEMENT && last.is( CKEDITOR.dtd.$block ) ) )
							currentListItem.append( doc.createElement( 'br' ) );
					}

					var currentListItemName = currentListItem.$.nodeName.toLowerCase();
					if ( currentListItemName == 'div' || currentListItemName == 'p' )
						currentListItem.appendBogus();
					retval.append( currentListItem );
					rootNode = null;
					currentIndex++;
				} else
					return null;

				block = null;

				if ( listArray.length <= currentIndex || Math.max( listArray[ currentIndex ].indent, 0 ) < indentLevel )
					break;
			}

			if ( database ) {
				var currentNode = retval.getFirst(),
					listRoot = listArray[ 0 ].parent;

				while ( currentNode ) {
					if ( currentNode.type == CKEDITOR.NODE_ELEMENT ) {
						// Clear marker attributes for the new list tree made of cloned nodes, if any.
						CKEDITOR.dom.element.clearMarkers( database, currentNode );

						// Clear redundant direction attribute specified on list items.
						if ( currentNode.getName() in CKEDITOR.dtd.$listItem )
							cleanUpDirection( currentNode );
					}

					currentNode = currentNode.getNextSourceNode();
				}
			}

			return { listNode: retval, nextIndex: currentIndex };
		}
313700
function(content, depth = 0, options = {}) {
    var i, indent, isBoolean, isNull, isObj, j, k, out, prefix, ref, v;
    if (arguments.length === 2) {
      options = depth;
      depth = 0;
    }
    if (options.separator == null) {
      options.separator = ' = ';
    }
    if (options.eol == null) {
      options.eol = !options.ssh && process.platform === "win32" ? "\r\n" : "\n";
    }
    out = '';
    indent = options.indent != null ? options.indent : '  ';
    prefix = '';
    for (i = j = 0, ref = depth; (0 <= ref ? j < ref : j > ref); i = 0 <= ref ? ++j : --j) {
      prefix += indent;
    }
    for (k in content) {
      v = content[k];
      // isUndefined = typeof v is 'undefined'
      isBoolean = typeof v === 'boolean';
      isNull = v === null;
      isObj = typeof v === 'object' && !isNull;
      if (isObj) {
        continue;
      }
      if (isNull) {
        out += `${prefix}${k}`;
      } else if (isBoolean) {
        out += `${prefix}${k}${options.separator}${(v ? 'true' : 'false')}`;
      } else {
        out += `${prefix}${k}${options.separator}${v}`;
      }
      out += `${options.eol}`;
    }
    for (k in content) {
      v = content[k];
      isNull = v === null;
      isObj = typeof v === 'object' && !isNull;
      if (!isObj) {
        continue;
      }
      out += `${prefix}${string.repeat('[', depth + 1)}${k}${string.repeat(']', depth + 1)}${options.eol}`;
      out += module.exports.stringify_multi_brackets(v, depth + 1, options);
    }
    return out;
  }
559068
function processCompositionExpressions( composition, item, itemPointer, containingPageRef ) {

      const { name, definition } = composition;

      // Feature definitions in compositions may contain generated topics for default resource names or action
      // topics. As such these are generated before instantiating the composition's features.
      const ref = item.composition;
      const validate = validators.features.pages[ name ];

      if( validate && !validate( item, `${itemPointer}` ) ) {
         throw validators.error(
            `Validation of page ${containingPageRef} failed for ${ref} features`,
            validate.errors
         );
      }

      if( typeof definition.mergedFeatures === 'object' ) {
         const mergedFeatures = interpolator.interpolate( item, definition.mergedFeatures );
         Object.keys( mergedFeatures ).forEach( featurePath => {
            const currentValue = path( item.features, featurePath, [] );
            const values = mergedFeatures[ featurePath ];
            setPath( item.features, featurePath, values.concat( currentValue ) );
         } );
      }

      definition.areas = interpolator.interpolate( item, definition.areas );

      return composition;

   }
281404
function jsdocCommand( jsdoc ) {
	var cmd = [];
	cmd.unshift( jsdoc.options );
	if ( jsdoc.tutorials.length > 0 ) {
		cmd.push( "-u " + path.resolve( jsdoc.tutorials ) );
	}
	cmd.push( "-d " + path.resolve( jsdoc.dest ) );
	cmd.push( "-t " + path.resolve( jsdoc.template ) );
	cmd.push( "-c " + path.resolve( jsdoc.config ) );
	sys.each( jsdoc.src, function ( src ) {
		cmd.push( path.resolve( src ) );
	} );
	cmd.unshift( path.resolve( "./node_modules/jsdoc/jsdoc" ) );
	cmd.unshift( "node" );

	return cmd.join( " " );
}
711848
private void createPattern() {
        atomTypePatterns.add(Pattern.compile("[CSP]-[0-4][-]?+;[A-Za-z+-]{0,6}[(].*+"));
        //Csp3
        atomTypePatterns.add(Pattern.compile("[CS]-[0-3];[H]{0,2}+[A-Za-z]*+=[A-Z]{1,2}+.*+"));
        //Csp2
        atomTypePatterns.add(Pattern.compile("C-[0-3];=O.*+"));
        //C carbonyl
        atomTypePatterns.add(Pattern.compile("C-[1-2][-]?+;[H]{0,1}+%.*+"));
        //csp
        atomTypePatterns.add(Pattern.compile("H-[0-1];[C].*+"));
        //H
        atomTypePatterns.add(Pattern.compile("[OS]-[0-2][-]?+;[A-Za-z]{1,4}+[+]?+[(].*+"));
        //O Ether,Alcohol
        atomTypePatterns.add(Pattern.compile("O-[1-2][+]?+;[H]{0,1}+=[SPC].[^O]++.*+"));
        //=0 Carbonyl
        atomTypePatterns.add(Pattern.compile("N-[0-3][+-]?+;[A-Z &&[^=%]]{1,3}+.*+"));
        //nsp3
        atomTypePatterns.add(Pattern.compile("N-[1-3][-+]?+;=?+[ON]?+[+]?+[CH]*+.(=O)?+.*+"));
        //nsp2amide
        atomTypePatterns.add(Pattern.compile("N-[1-2][+]?+;%.*+"));
        //nsp (10)
        atomTypePatterns.add(Pattern.compile("F.*+"));
        //F
        atomTypePatterns.add(Pattern.compile("Cl.*+"));
        //Cl
        atomTypePatterns.add(Pattern.compile("Br.*+"));
        //Br
        atomTypePatterns.add(Pattern.compile("I.*+"));
        //I
        atomTypePatterns.add(Pattern.compile("S-[1-2][-]?+;[HCSON]{1,2}+[(].*+"));
        //S Sulfide
        atomTypePatterns.add(Pattern.compile("S-3+;.?+[A-Za-z]++.*+"));
        //S+Sulfonium
        atomTypePatterns.add(Pattern.compile("S-[1-2][+]?+;=[OCNP][A-Z]++.*+"));
        //S=0
        atomTypePatterns.add(Pattern.compile("S-4;=O=O[A-Za-z]++.*+"));
        //So2
        atomTypePatterns.add(Pattern.compile("Si.*+"));
        //Silane
        atomTypePatterns.add(Pattern.compile("LP.*+"));
        //Lonepair (20)
        atomTypePatterns.add(Pattern.compile("H-1;O[+-]?+.[PSCN]{0,2}+/.*+"));
        //H- OH
        atomTypePatterns.add(Pattern.compile("C-3;CCC..?+&?+[A-Za-z]?+,?+.?+&?+,?+.?+&?+.*+"));
        //C Cyclopropane
        atomTypePatterns.add(Pattern.compile("H-1;[NP][+]?+[(][H]{0,2}+=?+[A-Z]{0,2}+/.*+"));
        //H- NH amine
        atomTypePatterns.add(Pattern.compile("H-1;O[+]?+.=?+C/=?+[OCSP]{1,2}+/.*+"));
        //H- COOH
        atomTypePatterns.add(Pattern.compile("P-[0-3];[A-Za-z]{1,3}[(].*+"));
        //>P
        atomTypePatterns.add(Pattern.compile("B-[0-3];[A-Za-z]{1,2}.*+"));
        //>B
        atomTypePatterns.add(Pattern.compile("B-4;[A-Za-z]{1,4}.*+"));
        //>B<
        atomTypePatterns.add(Pattern.compile("SPECIAL DEFINITON "));
        //H- Amide/Enol
        atomTypePatterns.add(Pattern.compile("NOT Implemented"));
        //C* Carbonradical
        atomTypePatterns.add(Pattern.compile("C-[0-9][+];.*+"));
        //C+ (30)
        atomTypePatterns.add(Pattern.compile("Ge.*+"));
        //Ge
        atomTypePatterns.add(Pattern.compile("Sn.*+"));
        //Sn
        atomTypePatterns.add(Pattern.compile("Pb.*+"));
        //Pb
        atomTypePatterns.add(Pattern.compile("Se.*+"));
        //Se
        atomTypePatterns.add(Pattern.compile("Te.*+"));
        //Te
        atomTypePatterns.add(Pattern.compile("D-1;.*+"));
        //D
        atomTypePatterns.add(Pattern.compile("N-2;=CC..*+"));
        //-N= azo,Pyridin
        atomTypePatterns.add(Pattern.compile("C-2;=CC..?+[A-Za-z]?+,?+&?+,?+C?+&?+.*+"));
        //Csp2 Cyclopropene
        atomTypePatterns.add(Pattern.compile("N-4[+]?+;.*+"));
        //nsp3 ammonium
        atomTypePatterns.add(Pattern.compile("N-[2-3];H?+CC.[^(=O)].*+"));
        //nsp2pyrrole (40)
        atomTypePatterns.add(Pattern.compile("O-2;CC.=C.*+&.*+&.*+"));
        //osp2furan
        atomTypePatterns.add(Pattern.compile("S-2;CC.*+"));
        //s sp2 thiophene
        atomTypePatterns.add(Pattern.compile("N-[2-3][+]?+;=N.*+C?+O?+[-]?+.*+"));
        //-N=N-O
        atomTypePatterns.add(Pattern.compile("H-1;S.*+"));
        //H- S hiol
        atomTypePatterns.add(Pattern.compile("N-2[+];=?+%?+[NC][-=]{0,2}+[NC][-]?+.*+"));
        //Azide Center n
        atomTypePatterns.add(Pattern.compile("N-3[+];=O[A-Z]-?+[A-Z]-?+.*+"));
        //n no2
        atomTypePatterns.add(Pattern.compile("O-1-?+;=?+[CS][(][=0]?+[OCSNH]*+/.*+"));
        //0 carboxylate
        atomTypePatterns.add(Pattern.compile("H-1;N[+].[A-Z]{0,3}+/.*+"));
        //h ammonium
        atomTypePatterns.add(Pattern.compile("O-2;CC.H?+,?+H?+,?+&,&.*+"));
        //Epoxy
        atomTypePatterns.add(Pattern.compile("C-2;=CC.*+"));
        //C Benzene (50)
        atomTypePatterns.add(Pattern.compile("He.*+"));
        //He
        atomTypePatterns.add(Pattern.compile("Ne.*+"));
        //Ne
        atomTypePatterns.add(Pattern.compile("Ar.*+"));
        //Ar
        atomTypePatterns.add(Pattern.compile("Kr.*+"));
        //Kr
        atomTypePatterns.add(Pattern.compile("Xe.*+"));
        //Xe
        atomTypePatterns.add(Pattern.compile("NotImplemented"));
        atomTypePatterns.add(Pattern.compile("NotImplemented"));
        atomTypePatterns.add(Pattern.compile("NotImplemented"));
        atomTypePatterns.add(Pattern.compile("Mg.*+"));
        //Mg
        atomTypePatterns.add(Pattern.compile("P-[2-4];.*"));
        //P (60)
        atomTypePatterns.add(Pattern.compile("Fe.*+"));
        //Fe 2
        atomTypePatterns.add(Pattern.compile("Fe.*+"));
        //Fe 3
        atomTypePatterns.add(Pattern.compile("Ni.*+"));
        //Ni 2
        atomTypePatterns.add(Pattern.compile("Ni.*+"));
        //Ni 3
        atomTypePatterns.add(Pattern.compile("Co.*+"));
        //Co 2
        atomTypePatterns.add(Pattern.compile("Co.*+"));
        //Co 3
        atomTypePatterns.add(Pattern.compile("NotImplemented"));
        atomTypePatterns.add(Pattern.compile("NotImplemented"));
        atomTypePatterns.add(Pattern.compile("O-1[-]?+;=?+N.*+"));
        //Amineoxide
        atomTypePatterns.add(Pattern.compile("O-3[+];[H]{0,3}+[C]{0,3}+[(].*+"));
        //Ketoniumoxygen (70)
        atomTypePatterns.add(Pattern.compile("C-1NotImplemented"));
        //Ketoniumcarbon
        atomTypePatterns.add(Pattern.compile("N-2;=C[^CO].*+"));
        //N =N-Imine,Oxime
        atomTypePatterns.add(Pattern.compile("N-3[+];[H]{0,2}+=?+[C]{0,3}+[(].*+"));
        //N+ =N+Pyridinium
        atomTypePatterns.add(Pattern.compile("N-[2-3][+];=C[CO]{2}+.?+[(].*+"));
        //N+ =N+Imminium
        atomTypePatterns.add(Pattern.compile("N-[2-3][+]?+;=CO.*+"));
        //N-0H Oxime
        atomTypePatterns.add(Pattern.compile("H-1;N[(]{1}+[CH]{2,2}+/[H]{0,3}+[,]?+=OC.*+"));
        //H- Amide
        atomTypePatterns.add(Pattern.compile("H-1;O.C/=CC/.*+"));
        //H- AEnol (77)
        atomTypePatterns.add(Pattern.compile("N-[1-3];[CH]{1,3}.{1}+[A-Z]{0,3}+[,]?+=OC.*+"));
        //amid
    }
1313705
function clipPostChange(doc, change, pos) {
    if (!posLess(change.from, pos)) return clipPos(doc, pos);
    var diff = (change.text.length - 1) - (change.to.line - change.from.line);
    if (pos.line > change.to.line + diff) {
      var preLine = pos.line - diff, lastLine = doc.first + doc.size - 1;
      if (preLine > lastLine) return Pos(lastLine, getLine(doc, lastLine).text.length);
      return clipToLen(pos, getLine(doc, preLine).text.length);
    }
    if (pos.line == change.to.line + diff)
      return clipToLen(pos, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0) +
                       getLine(doc, change.to.line).text.length - change.to.ch);
    var inside = pos.line - change.from.line;
    return clipToLen(pos, change.text[inside].length + (inside ? 0 : change.from.ch));
  }
904062
function pHandle(e) {
            const $selectionElem = editor.selection.getSelectionContainerElem()
            const $parentElem = $selectionElem.parent()

            if ($parentElem.html() === '<code><br></code>') {
                // 回车之前光标所在一个 <p><code>.....</code></p> ，忽然回车生成一个空的 <p><code><br></code></p>
                // 而且继续回车跳不出去，因此只能特殊处理
                insertEmptyP($selectionElem)
                return
            }

            if (!$parentElem.equal($textElem)) {
                // 不是顶级标签
                return
            }

            const nodeName = $selectionElem.getNodeName()
            if (nodeName === 'P') {
                // 当前的标签是 P ，不用做处理
                return
            }

            if ($selectionElem.text()) {
                // 有内容，不做处理
                return
            }

            // 插入 <p> ，并将选取定位到 <p>，删除当前标签
            insertEmptyP($selectionElem)
        }