@modusoperandi/licit 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +54 -54
- package/.dockerignore +4 -4
- package/.eslintignore +3 -3
- package/.eslintrc.js +80 -80
- package/.flowconfig +37 -37
- package/.github/workflows/build.yml +29 -35
- package/.github/workflows/lint.yml +30 -30
- package/.prettierignore +5 -5
- package/.prettierrc +4 -4
- package/.stylelintignore +1 -1
- package/.stylelintrc.json +13 -13
- package/.travis.yml +18 -18
- package/CODEOWNERS +40 -40
- package/LICENSE +22 -22
- package/README.md +286 -286
- package/babel.config.json +54 -0
- package/build_collab_server.py +7 -7
- package/build_image_server.py +7 -7
- package/dist/BlockquoteInsertNewLineCommand.js.flow +55 -55
- package/dist/BlockquoteNodeSpec.js.flow +30 -30
- package/dist/BlockquoteToggleCommand.js.flow +34 -34
- package/dist/BookmarkNodeSpec.js.flow +39 -39
- package/dist/BulletListNodeSpec.js.flow +61 -61
- package/dist/CZIProseMirror.js.flow +90 -90
- package/dist/CodeBlockCommand.js +2 -2
- package/dist/CodeBlockCommand.js.flow +43 -43
- package/dist/CodeBlockNodeSpec.js.flow +24 -24
- package/dist/CodeMarkSpec.js.flow +14 -14
- package/dist/ContentPlaceholderPlugin.js.flow +187 -187
- package/dist/CursorPlaceholderPlugin.js.flow +115 -115
- package/dist/DocLayoutCommand.js +2 -4
- package/dist/DocLayoutCommand.js.flow +94 -94
- package/dist/DocNodeSpec.js.flow +64 -64
- package/dist/EMMarkSpec.js.flow +14 -14
- package/dist/EditorCommands.js +22 -34
- package/dist/EditorCommands.js.flow +128 -128
- package/dist/EditorKeyMap.js.flow +187 -187
- package/dist/EditorMarks.js.flow +71 -71
- package/dist/EditorNodes.js.flow +60 -60
- package/dist/EditorPageLayoutPlugin.js.flow +67 -67
- package/dist/EditorPlugins.js.flow +8 -8
- package/dist/EditorSchema.js.flow +12 -12
- package/dist/EditorState.js.flow +7 -7
- package/dist/FontSizeMarkSpec.js.flow +49 -49
- package/dist/FontTypeMarkSpec.js.flow +80 -80
- package/dist/HTMLMutator.js.flow +59 -59
- package/dist/HardBreakNodeSpec.js.flow +15 -15
- package/dist/HeadingNodeSpec.js.flow +54 -54
- package/dist/HistoryRedoCommand.js.flow +20 -20
- package/dist/HistoryUndoCommand.js.flow +20 -20
- package/dist/HorizontalRuleCommand.js.flow +49 -49
- package/dist/HorizontalRuleNodeSpec.js.flow +39 -39
- package/dist/ImageFromURLCommand.js.flow +14 -14
- package/dist/ImageNodeSpec.js.flow +90 -90
- package/dist/ImageSourceCommand.js +2 -4
- package/dist/ImageSourceCommand.js.flow +117 -117
- package/dist/ImageUploadCommand.js.flow +36 -36
- package/dist/ImageUploadPlaceholderPlugin.js.flow +192 -192
- package/dist/LinkMarkSpec.js.flow +32 -32
- package/dist/LinkSetURLCommand.js +4 -8
- package/dist/LinkSetURLCommand.js.flow +103 -103
- package/dist/LinkTooltipPlugin.js +9 -15
- package/dist/LinkTooltipPlugin.js.flow +203 -203
- package/dist/ListItemInsertNewLineCommand.js.flow +55 -55
- package/dist/ListItemMergeCommand.js.flow +177 -177
- package/dist/ListItemNodeSpec.js.flow +51 -51
- package/dist/ListSplitCommand.js.flow +32 -32
- package/dist/ListToggleCommand.js +4 -10
- package/dist/ListToggleCommand.js.flow +77 -77
- package/dist/MarkNames.js.flow +18 -18
- package/dist/MarksClearCommand.js +3 -3
- package/dist/MarksClearCommand.js.flow +42 -42
- package/dist/MathEditCommand.js +2 -2
- package/dist/MathEditCommand.js.flow +110 -110
- package/dist/MathNodeSpec.js.flow +46 -46
- package/dist/NodeNames.js.flow +23 -23
- package/dist/OrderedListNodeSpec.js.flow +132 -132
- package/dist/ParagraphNodeSpec.js +1 -3
- package/dist/ParagraphNodeSpec.js.flow +156 -160
- package/dist/ParagraphSpacingCommand.js.flow +121 -121
- package/dist/PrintCommand.js.flow +31 -31
- package/dist/SelectionPlaceholderPlugin.js.flow +131 -131
- package/dist/SpacerMarkSpec.js.flow +47 -47
- package/dist/StrikeMarkSpec.js.flow +21 -21
- package/dist/StrongMarkSpec.js.flow +25 -25
- package/dist/StyleView.js.flow +19 -19
- package/dist/TableBackgroundColorCommand.js +3 -7
- package/dist/TableBackgroundColorCommand.js.flow +75 -75
- package/dist/TableBorderColorCommand.js +3 -7
- package/dist/TableBorderColorCommand.js.flow +75 -75
- package/dist/TableCellColorCommand.js +3 -7
- package/dist/TableCellColorCommand.js.flow +71 -71
- package/dist/TableCellMenuPlugin.js +4 -6
- package/dist/TableCellMenuPlugin.js.flow +125 -125
- package/dist/TableInsertCommand.js +3 -5
- package/dist/TableInsertCommand.js.flow +112 -112
- package/dist/TableMergeCellsCommand.js.flow +90 -90
- package/dist/TableNodesSpecs.js.flow +78 -78
- package/dist/TablePlugins.js.flow +14 -14
- package/dist/TableResizePlugin.js.flow +631 -631
- package/dist/TextColorMarkSpec.js.flow +35 -35
- package/dist/TextHighlightMarkSpec.js.flow +38 -38
- package/dist/TextInsertTabSpaceCommand.js +2 -4
- package/dist/TextInsertTabSpaceCommand.js.flow +83 -83
- package/dist/TextNoWrapMarkSpec.js.flow +14 -14
- package/dist/TextNodeSpec.js.flow +7 -7
- package/dist/TextSelectionMarkSpec.js.flow +24 -24
- package/dist/TextSubMarkSpec.js.flow +20 -20
- package/dist/TextSuperMarkSpec.js.flow +20 -20
- package/dist/TextUnderlineMarkSpec.js.flow +27 -27
- package/dist/Types.js.flow +75 -75
- package/dist/WebFontLoader.js.flow +22 -22
- package/dist/blockQuoteInputRule.js.flow +36 -36
- package/dist/bom.xml +9097 -4707
- package/dist/browser.js.flow +7 -7
- package/dist/buildEditorPlugins.js.flow +51 -51
- package/dist/buildInputRules.js.flow +81 -81
- package/dist/client/CollabConnector.js +17 -2
- package/dist/client/CollabConnector.js.flow +86 -71
- package/dist/client/EditorConnection.js +15 -4
- package/dist/client/EditorConnection.js.flow +318 -307
- package/dist/client/Licit.js +97 -71
- package/dist/client/Licit.js.flow +592 -562
- package/dist/client/Licit.test.js +20 -19
- package/dist/client/Licit.test.js.flow +67 -65
- package/dist/client/Reporter.js.flow +37 -37
- package/dist/client/SimpleConnector.js +3 -1
- package/dist/client/SimpleConnector.js.flow +55 -53
- package/dist/client/http.js.flow +66 -66
- package/dist/client/licit.css +12 -12
- package/dist/client/throttle.js.flow +27 -27
- package/dist/convertFromDOMElement.js.flow +36 -36
- package/dist/convertFromHTML.js.flow +19 -19
- package/dist/convertFromJSON.js.flow +78 -78
- package/dist/convertToCSSPTValue.js.flow +22 -22
- package/dist/convertToJSON.js.flow +7 -7
- package/dist/createCommand.js.flow +40 -40
- package/dist/createEditorKeyMap.js.flow +94 -94
- package/dist/createEmptyEditorState.js +3 -6
- package/dist/createEmptyEditorState.js.flow +35 -41
- package/dist/createTableResizingPlugin.js.flow +86 -86
- package/dist/findActionableCell.js.flow +74 -74
- package/dist/findActiveMark.js.flow +32 -32
- package/dist/hyphenize.js.flow +17 -17
- package/dist/index.js.flow +10 -10
- package/dist/insertTable.js.flow +56 -56
- package/dist/isEditorStateEmpty.js.flow +32 -32
- package/dist/isTableNode.js.flow +15 -15
- package/dist/joinDown.js.flow +27 -27
- package/dist/joinListNode.js +2 -2
- package/dist/joinListNode.js.flow +55 -55
- package/dist/joinUp.js.flow +39 -39
- package/dist/keymaps.js.flow +185 -185
- package/dist/lookUpElement.js.flow +14 -14
- package/dist/nodeAt.js.flow +12 -12
- package/dist/normalizeHTML.js.flow +78 -78
- package/dist/patchAnchorElements.js.flow +38 -38
- package/dist/patchBreakElements.js.flow +22 -22
- package/dist/patchElementInlineStyles.js.flow +92 -92
- package/dist/patchListElements.js.flow +276 -276
- package/dist/patchMathElements.js.flow +60 -60
- package/dist/patchParagraphElements.js.flow +20 -20
- package/dist/patchStyleElements.js +2 -2
- package/dist/patchStyleElements.js.flow +194 -194
- package/dist/patchTableElements.js.flow +89 -89
- package/dist/rebaseDocWithSteps.js.flow +42 -42
- package/dist/sanitizeURL.js.flow +13 -13
- package/dist/splitListItem.js.flow +191 -191
- package/dist/styles.css +19 -19
- package/dist/styles0.css +29 -29
- package/dist/toClosestFontPtSize.js.flow +22 -22
- package/dist/toSafeHTMLDocument.js.flow +9 -9
- package/dist/toggleBlockquote.js +6 -14
- package/dist/toggleBlockquote.js.flow +91 -91
- package/dist/toggleCodeBlock.js +4 -10
- package/dist/toggleCodeBlock.js.flow +102 -102
- package/dist/ui/AlertInfo.js.flow +64 -64
- package/dist/ui/BookmarkNodeView.js.flow +66 -66
- package/dist/ui/CommandButton.js +2 -4
- package/dist/ui/CommandButton.js.flow +68 -68
- package/dist/ui/CommandMenu.js.flow +75 -75
- package/dist/ui/CommandMenuButton.js +3 -5
- package/dist/ui/CommandMenuButton.js.flow +131 -131
- package/dist/ui/CustomEditorView.js.flow +28 -28
- package/dist/ui/CustomMenu.js.flow +17 -17
- package/dist/ui/CustomMenuItem.js +3 -5
- package/dist/ui/CustomMenuItem.js.flow +36 -36
- package/dist/ui/CustomNodeView.js.flow +200 -200
- package/dist/ui/CustomRadioButton.js +6 -6
- package/dist/ui/CustomRadioButton.js.flow +65 -65
- package/dist/ui/DocLayoutEditor.js +4 -6
- package/dist/ui/DocLayoutEditor.js.flow +146 -146
- package/dist/ui/Editor.js +0 -1
- package/dist/ui/Editor.js.flow +290 -291
- package/dist/ui/EditorFrameset.js.flow +81 -81
- package/dist/ui/EditorToolbar.js +2 -2
- package/dist/ui/EditorToolbar.js.flow +211 -211
- package/dist/ui/EditorToolbarConfig.js.flow +172 -172
- package/dist/ui/FontSizeCommandMenuButton.js +3 -3
- package/dist/ui/FontSizeCommandMenuButton.js.flow +66 -66
- package/dist/ui/FontTypeCommandMenuButton.js +3 -3
- package/dist/ui/FontTypeCommandMenuButton.js.flow +49 -49
- package/dist/ui/Frag.js.flow +13 -13
- package/dist/ui/Icon.js.flow +89 -89
- package/dist/ui/ImageAlignEditor.js +4 -4
- package/dist/ui/ImageAlignEditor.js.flow +60 -60
- package/dist/ui/ImageInlineEditor.js +4 -4
- package/dist/ui/ImageInlineEditor.js.flow +67 -67
- package/dist/ui/ImageNodeView.js +3 -5
- package/dist/ui/ImageNodeView.js.flow +404 -404
- package/dist/ui/ImageResizeBox.js +3 -3
- package/dist/ui/ImageResizeBox.js.flow +219 -219
- package/dist/ui/ImageURLEditor.js +4 -6
- package/dist/ui/ImageURLEditor.js.flow +119 -119
- package/dist/ui/ImageUploadEditor.js +3 -5
- package/dist/ui/ImageUploadEditor.js.flow +117 -117
- package/dist/ui/KeyCodes.js.flow +12 -12
- package/dist/ui/LinkTooltip.js +4 -4
- package/dist/ui/LinkTooltip.js.flow +85 -85
- package/dist/ui/LinkURLEditor.js +4 -6
- package/dist/ui/LinkURLEditor.js.flow +111 -111
- package/dist/ui/ListItemNodeView.js.flow +98 -98
- package/dist/ui/ListTypeButton.js +3 -5
- package/dist/ui/ListTypeButton.js.flow +131 -131
- package/dist/ui/ListTypeCommandButton.js.flow +85 -85
- package/dist/ui/ListTypeMenu.js.flow +70 -70
- package/dist/ui/LoadingIndicator.js.flow +20 -20
- package/dist/ui/MathEditor.js +4 -6
- package/dist/ui/MathEditor.js.flow +78 -78
- package/dist/ui/MathInlineEditor.js +4 -6
- package/dist/ui/MathInlineEditor.js.flow +102 -102
- package/dist/ui/MathNodeView.js +3 -5
- package/dist/ui/MathNodeView.js.flow +175 -175
- package/dist/ui/PasteMenu.js.flow +57 -57
- package/dist/ui/ResizeObserver.js.flow +106 -106
- package/dist/ui/RichTextEditor.js.flow +133 -133
- package/dist/ui/SelectionObserver.js.flow +134 -134
- package/dist/ui/TableCellMenu.js.flow +38 -38
- package/dist/ui/TableGridSizeEditor.js +6 -8
- package/dist/ui/TableGridSizeEditor.js.flow +184 -184
- package/dist/ui/TableNodeView.js.flow +22 -22
- package/dist/ui/bindScrollHandler.js.flow +46 -46
- package/dist/ui/canUseCSSFont.js.flow +43 -43
- package/dist/ui/czi-body-layout-editor.css +16 -16
- package/dist/ui/czi-bookmark-view.css +10 -10
- package/dist/ui/czi-cursor-placeholder.css +36 -36
- package/dist/ui/czi-custom-menu-button.css +18 -18
- package/dist/ui/czi-custom-menu-item.css +30 -30
- package/dist/ui/czi-custom-menu.css +8 -8
- package/dist/ui/czi-custom-radio-button.css +80 -80
- package/dist/ui/czi-custom-scrollbar.css +21 -21
- package/dist/ui/czi-editor-frameset.css +81 -81
- package/dist/ui/czi-editor-toolbar.css +122 -122
- package/dist/ui/czi-editor.css +220 -220
- package/dist/ui/czi-form.css +104 -104
- package/dist/ui/czi-frag.css +3 -3
- package/dist/ui/czi-heading.css +40 -40
- package/dist/ui/czi-icon.css +72 -72
- package/dist/ui/czi-image-resize-box.css +165 -165
- package/dist/ui/czi-image-upload-editor.css +57 -57
- package/dist/ui/czi-image-upload-placeholder.css +50 -50
- package/dist/ui/czi-image-url-editor.css +38 -38
- package/dist/ui/czi-image-view.css +125 -125
- package/dist/ui/czi-indent.css +137 -137
- package/dist/ui/czi-inline-editor.css +20 -20
- package/dist/ui/czi-link-tooltip.css +71 -71
- package/dist/ui/czi-list.css +410 -410
- package/dist/ui/czi-loading-indicator.css +111 -111
- package/dist/ui/czi-math-view.css +62 -62
- package/dist/ui/czi-selection-placeholder.css +24 -24
- package/dist/ui/czi-table-cell-menu.css +14 -14
- package/dist/ui/czi-table-grid-size-editor.css +37 -37
- package/dist/ui/czi-table.css +86 -86
- package/dist/ui/czi-vars.css +2 -46
- package/dist/ui/findActiveFontSize.js.flow +58 -58
- package/dist/ui/findActiveFontType.js.flow +38 -38
- package/dist/ui/fonts.css +471 -471
- package/dist/ui/handleEditorDrop.js.flow +28 -28
- package/dist/ui/handleEditorKeyDown.js.flow +39 -39
- package/dist/ui/handleEditorPaste.js.flow +33 -33
- package/dist/ui/htmlElementToRect.js.flow +18 -18
- package/dist/ui/icon-font.css +10 -10
- package/dist/ui/injectStyleSheet.js.flow +42 -42
- package/dist/ui/isElementFullyVisible.js +2 -2
- package/dist/ui/isElementFullyVisible.js.flow +23 -23
- package/dist/ui/isOffline.js.flow +8 -8
- package/dist/ui/isReactClass.js.flow +12 -12
- package/dist/ui/listType.css +21 -21
- package/dist/ui/mathquill-editor/MathQuillEditor.js.flow +159 -159
- package/dist/ui/mathquill-editor/MathQuillEditorSymbols.js.flow +483 -483
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +2 -2
- package/dist/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js.flow +48 -48
- package/dist/ui/mathquill-editor/czi-mathquill-editor-symbols-panel.css +39 -39
- package/dist/ui/mathquill-editor/czi-mathquill-editor.css +50 -50
- package/dist/ui/mathquill-editor/mathquill-import-kludge.js.flow +24 -24
- package/dist/ui/renderLaTeXAsHTML.js.flow +46 -46
- package/dist/ui/resolveImage.js.flow +123 -123
- package/dist/ui/toCSSColor.js.flow +51 -51
- package/dist/ui/toCSSLineSpacing.js +1 -36
- package/dist/ui/toCSSLineSpacing.js.flow +55 -82
- package/dist/ui/toHexColor.js.flow +26 -26
- package/dist/ui/uuid.js.flow +9 -9
- package/dist/uuid.js.flow +9 -9
- package/flow-typed/@modusoperandilicit-customstyles.js +5 -5
- package/flow-typed/@modusoperandilicit-doc-attrs-step.js +5 -5
- package/flow-typed/@modusoperandilicit-ui-commands.js +5 -0
- package/flow-typed/create-emotion.js +5 -5
- package/flow-typed/docs-editor.js +3 -3
- package/flow-typed/draft-convert.js +3 -3
- package/flow-typed/draft-js.js +3 -3
- package/flow-typed/flatted.js +5 -5
- package/flow-typed/jquery.js +5 -5
- package/flow-typed/katex.js +6 -6
- package/flow-typed/mathquill.js +5 -5
- package/flow-typed/prosemirror-collab.js +5 -5
- package/flow-typed/prosemirror-commands.js +5 -5
- package/flow-typed/prosemirror-dev-tools.js +5 -5
- package/flow-typed/prosemirror-dropcursor.js +5 -5
- package/flow-typed/prosemirror-gapcursor.js +5 -5
- package/flow-typed/prosemirror-history.js +5 -5
- package/flow-typed/prosemirror-inputrules.js +5 -5
- package/flow-typed/prosemirror-keymap.js +5 -5
- package/flow-typed/prosemirror-model.js +5 -5
- package/flow-typed/prosemirror-state.js +5 -5
- package/flow-typed/prosemirror-tables.js +5 -5
- package/flow-typed/prosemirror-transform.js +5 -5
- package/flow-typed/prosemirror-utils.js +5 -5
- package/flow-typed/prosemirror-view.js +5 -5
- package/flow-typed/resize-observer-polyfill.js +5 -5
- package/flow-typed/uuid.js +5 -5
- package/jest.config.js +207 -0
- package/jest.setup.js +5 -5
- package/licit/client/CustomLicitRuntime.js +95 -95
- package/licit/client/CustomStyleRuntime.js +136 -136
- package/licit/client/index.js +366 -366
- package/licit/index.html +11 -11
- package/licit/server/collab/instance.js +221 -221
- package/licit/server/collab/route.js +69 -69
- package/licit/server/collab/server.js +297 -297
- package/licit/server/collab/start.js +13 -13
- package/licit/server/image/start.js +58 -58
- package/lint.sh +4 -4
- package/node_modules/prosemirror-utils/LICENSE +13 -0
- package/{dist/ui/PopUpTypes.js.flow → node_modules/prosemirror-utils/README.md} +0 -0
- package/node_modules/prosemirror-utils/dist/helpers.js +119 -0
- package/node_modules/prosemirror-utils/dist/index.js +17 -0
- package/node_modules/prosemirror-utils/dist/index.js.map +1 -0
- package/node_modules/prosemirror-utils/dist/node.js +106 -0
- package/node_modules/prosemirror-utils/dist/selection.js +168 -0
- package/node_modules/prosemirror-utils/dist/transforms.js +257 -0
- package/node_modules/prosemirror-utils/package.json +81 -0
- package/node_modules/prosemirror-utils/typings.d.ts +79 -0
- package/package.json +171 -163
- package/run_collab_server.py +21 -21
- package/run_image_server.py +20 -20
- package/run_web_server.py +25 -25
- package/scripts/build_bin.js +10 -10
- package/scripts/build_bin.py +103 -103
- package/scripts/ci_check_dist.sh +13 -13
- package/scripts/env.js +6 -6
- package/scripts/webserver.js +35 -35
- package/sonar-project.properties +11 -11
- package/src/BlockquoteInsertNewLineCommand.js +55 -55
- package/src/BlockquoteNodeSpec.js +30 -30
- package/src/BlockquoteToggleCommand.js +34 -34
- package/src/BookmarkNodeSpec.js +39 -39
- package/src/BulletListNodeSpec.js +61 -61
- package/src/CZIProseMirror.js +90 -90
- package/src/CodeBlockCommand.js +43 -43
- package/src/CodeBlockNodeSpec.js +24 -24
- package/src/CodeMarkSpec.js +14 -14
- package/src/ContentPlaceholderPlugin.js +187 -187
- package/src/CursorPlaceholderPlugin.js +115 -115
- package/src/DocLayoutCommand.js +94 -94
- package/src/DocNodeSpec.js +64 -64
- package/src/EMMarkSpec.js +14 -14
- package/src/EditorCommands.js +128 -128
- package/src/EditorKeyMap.js +187 -187
- package/src/EditorMarks.js +71 -71
- package/src/EditorNodes.js +60 -60
- package/src/EditorPageLayoutPlugin.js +67 -67
- package/src/EditorPlugins.js +8 -8
- package/src/EditorSchema.js +12 -12
- package/src/EditorState.js +7 -7
- package/src/FontSizeMarkSpec.js +49 -49
- package/src/FontTypeMarkSpec.js +80 -80
- package/src/HTMLMutator.js +59 -59
- package/src/HardBreakNodeSpec.js +15 -15
- package/src/HeadingNodeSpec.js +54 -54
- package/src/HistoryRedoCommand.js +20 -20
- package/src/HistoryUndoCommand.js +20 -20
- package/src/HorizontalRuleCommand.js +49 -49
- package/src/HorizontalRuleNodeSpec.js +39 -39
- package/src/ImageFromURLCommand.js +14 -14
- package/src/ImageNodeSpec.js +90 -90
- package/src/ImageSourceCommand.js +117 -117
- package/src/ImageUploadCommand.js +36 -36
- package/src/ImageUploadPlaceholderPlugin.js +192 -192
- package/src/LinkMarkSpec.js +32 -32
- package/src/LinkSetURLCommand.js +103 -103
- package/src/LinkTooltipPlugin.js +203 -203
- package/src/ListItemInsertNewLineCommand.js +55 -55
- package/src/ListItemMergeCommand.js +177 -177
- package/src/ListItemNodeSpec.js +51 -51
- package/src/ListSplitCommand.js +32 -32
- package/src/ListToggleCommand.js +77 -77
- package/src/MarkNames.js +18 -18
- package/src/MarksClearCommand.js +42 -42
- package/src/MathEditCommand.js +110 -110
- package/src/MathNodeSpec.js +46 -46
- package/src/NodeNames.js +23 -23
- package/src/OrderedListNodeSpec.js +132 -132
- package/src/ParagraphNodeSpec.js +156 -160
- package/src/ParagraphSpacingCommand.js +121 -121
- package/src/PrintCommand.js +31 -31
- package/src/SelectionPlaceholderPlugin.js +131 -131
- package/src/SpacerMarkSpec.js +47 -47
- package/src/StrikeMarkSpec.js +21 -21
- package/src/StrongMarkSpec.js +25 -25
- package/src/StyleView.js +19 -19
- package/src/TableBackgroundColorCommand.js +75 -75
- package/src/TableBorderColorCommand.js +75 -75
- package/src/TableCellColorCommand.js +71 -71
- package/src/TableCellMenuPlugin.js +125 -125
- package/src/TableInsertCommand.js +112 -112
- package/src/TableMergeCellsCommand.js +90 -90
- package/src/TableNodesSpecs.js +78 -78
- package/src/TablePlugins.js +14 -14
- package/src/TableResizePlugin.js +631 -631
- package/src/TextColorMarkSpec.js +35 -35
- package/src/TextHighlightMarkSpec.js +38 -38
- package/src/TextInsertTabSpaceCommand.js +83 -83
- package/src/TextNoWrapMarkSpec.js +14 -14
- package/src/TextNodeSpec.js +7 -7
- package/src/TextSelectionMarkSpec.js +24 -24
- package/src/TextSubMarkSpec.js +20 -20
- package/src/TextSuperMarkSpec.js +20 -20
- package/src/TextUnderlineMarkSpec.js +27 -27
- package/src/Types.js +75 -75
- package/src/WebFontLoader.js +22 -22
- package/src/blockQuoteInputRule.js +36 -36
- package/src/browser.js +7 -7
- package/src/buildEditorPlugins.js +51 -51
- package/src/buildInputRules.js +81 -81
- package/src/client/CollabConnector.js +86 -71
- package/src/client/EditorConnection.js +318 -307
- package/src/client/Licit.js +592 -562
- package/src/client/Licit.test.js +67 -65
- package/src/client/Reporter.js +37 -37
- package/src/client/SimpleConnector.js +55 -53
- package/src/client/http.js +66 -66
- package/src/client/licit.css +12 -12
- package/src/client/throttle.js +27 -27
- package/src/convertFromDOMElement.js +36 -36
- package/src/convertFromHTML.js +19 -19
- package/src/convertFromJSON.js +78 -78
- package/src/convertToCSSPTValue.js +22 -22
- package/src/convertToJSON.js +7 -7
- package/src/createCommand.js +40 -40
- package/src/createEditorKeyMap.js +94 -94
- package/src/createEmptyEditorState.js +35 -41
- package/src/createTableResizingPlugin.js +86 -86
- package/src/findActionableCell.js +74 -74
- package/src/findActiveMark.js +32 -32
- package/src/hyphenize.js +17 -17
- package/src/index.js +10 -10
- package/src/insertTable.js +56 -56
- package/src/isEditorStateEmpty.js +32 -32
- package/src/isTableNode.js +15 -15
- package/src/joinDown.js +27 -27
- package/src/joinListNode.js +55 -55
- package/src/joinUp.js +39 -39
- package/src/keymaps.js +185 -185
- package/src/lookUpElement.js +14 -14
- package/src/nodeAt.js +12 -12
- package/src/normalizeHTML.js +78 -78
- package/src/patchAnchorElements.js +38 -38
- package/src/patchBreakElements.js +22 -22
- package/src/patchElementInlineStyles.js +92 -92
- package/src/patchListElements.js +276 -276
- package/src/patchMathElements.js +60 -60
- package/src/patchParagraphElements.js +20 -20
- package/src/patchStyleElements.js +194 -194
- package/src/patchTableElements.js +89 -89
- package/src/rebaseDocWithSteps.js +42 -42
- package/src/sanitizeURL.js +13 -13
- package/src/splitListItem.js +191 -191
- package/src/styles.css +19 -19
- package/src/styles0.css +29 -29
- package/src/toClosestFontPtSize.js +22 -22
- package/src/toSafeHTMLDocument.js +9 -9
- package/src/toggleBlockquote.js +91 -91
- package/src/toggleCodeBlock.js +102 -102
- package/src/ui/AlertInfo.js +64 -64
- package/src/ui/BookmarkNodeView.js +66 -66
- package/src/ui/CommandButton.js +68 -68
- package/src/ui/CommandMenu.js +75 -75
- package/src/ui/CommandMenuButton.js +131 -131
- package/src/ui/CustomEditorView.js +28 -28
- package/src/ui/CustomMenu.js +17 -17
- package/src/ui/CustomMenuItem.js +36 -36
- package/src/ui/CustomNodeView.js +200 -200
- package/src/ui/CustomRadioButton.js +65 -65
- package/src/ui/DocLayoutEditor.js +146 -146
- package/src/ui/Editor.js +290 -291
- package/src/ui/EditorFrameset.js +81 -81
- package/src/ui/EditorToolbar.js +211 -211
- package/src/ui/EditorToolbarConfig.js +172 -172
- package/src/ui/FontSizeCommandMenuButton.js +66 -66
- package/src/ui/FontTypeCommandMenuButton.js +49 -49
- package/src/ui/Frag.js +13 -13
- package/src/ui/Icon.js +89 -89
- package/src/ui/ImageAlignEditor.js +60 -60
- package/src/ui/ImageInlineEditor.js +67 -67
- package/src/ui/ImageNodeView.js +404 -404
- package/src/ui/ImageResizeBox.js +219 -219
- package/src/ui/ImageURLEditor.js +119 -119
- package/src/ui/ImageUploadEditor.js +117 -117
- package/src/ui/KeyCodes.js +12 -12
- package/src/ui/LinkTooltip.js +85 -85
- package/src/ui/LinkURLEditor.js +111 -111
- package/src/ui/ListItemNodeView.js +98 -98
- package/src/ui/ListTypeButton.js +131 -131
- package/src/ui/ListTypeCommandButton.js +85 -85
- package/src/ui/ListTypeMenu.js +70 -70
- package/src/ui/LoadingIndicator.js +20 -20
- package/src/ui/MathEditor.js +78 -78
- package/src/ui/MathInlineEditor.js +102 -102
- package/src/ui/MathNodeView.js +175 -175
- package/src/ui/PasteMenu.js +57 -57
- package/src/ui/ResizeObserver.js +106 -106
- package/src/ui/RichTextEditor.js +133 -133
- package/src/ui/SelectionObserver.js +134 -134
- package/src/ui/TableCellMenu.js +38 -38
- package/src/ui/TableGridSizeEditor.js +184 -184
- package/src/ui/TableNodeView.js +22 -22
- package/src/ui/bindScrollHandler.js +46 -46
- package/src/ui/canUseCSSFont.js +43 -43
- package/src/ui/czi-body-layout-editor.css +16 -16
- package/src/ui/czi-bookmark-view.css +10 -10
- package/src/ui/czi-cursor-placeholder.css +36 -36
- package/src/ui/czi-custom-menu-button.css +18 -18
- package/src/ui/czi-custom-menu-item.css +30 -30
- package/src/ui/czi-custom-menu.css +8 -8
- package/src/ui/czi-custom-radio-button.css +80 -80
- package/src/ui/czi-custom-scrollbar.css +21 -21
- package/src/ui/czi-editor-frameset.css +81 -81
- package/src/ui/czi-editor-toolbar.css +122 -122
- package/src/ui/czi-editor.css +220 -220
- package/src/ui/czi-form.css +104 -104
- package/src/ui/czi-frag.css +3 -3
- package/src/ui/czi-heading.css +40 -40
- package/src/ui/czi-icon.css +72 -72
- package/src/ui/czi-image-resize-box.css +165 -165
- package/src/ui/czi-image-upload-editor.css +57 -57
- package/src/ui/czi-image-upload-placeholder.css +50 -50
- package/src/ui/czi-image-url-editor.css +38 -38
- package/src/ui/czi-image-view.css +125 -125
- package/src/ui/czi-indent.css +137 -137
- package/src/ui/czi-inline-editor.css +20 -20
- package/src/ui/czi-link-tooltip.css +71 -71
- package/src/ui/czi-list.css +410 -410
- package/src/ui/czi-loading-indicator.css +111 -111
- package/src/ui/czi-math-view.css +62 -62
- package/src/ui/czi-selection-placeholder.css +24 -24
- package/src/ui/czi-table-cell-menu.css +14 -14
- package/src/ui/czi-table-grid-size-editor.css +37 -37
- package/src/ui/czi-table.css +86 -86
- package/src/ui/czi-vars.css +2 -46
- package/src/ui/findActiveFontSize.js +58 -58
- package/src/ui/findActiveFontType.js +38 -38
- package/src/ui/fonts.css +471 -471
- package/src/ui/handleEditorDrop.js +28 -28
- package/src/ui/handleEditorKeyDown.js +39 -39
- package/src/ui/handleEditorPaste.js +33 -33
- package/src/ui/htmlElementToRect.js +18 -18
- package/src/ui/icon-font.css +10 -10
- package/src/ui/injectStyleSheet.js +42 -42
- package/src/ui/isElementFullyVisible.js +23 -23
- package/src/ui/isOffline.js +8 -8
- package/src/ui/isReactClass.js +12 -12
- package/src/ui/listType.css +21 -21
- package/src/ui/mathquill-editor/MathQuillEditor.js +159 -159
- package/src/ui/mathquill-editor/MathQuillEditorSymbols.js +483 -483
- package/src/ui/mathquill-editor/MathQuillEditorSymbolsPanel.js +48 -48
- package/src/ui/mathquill-editor/czi-mathquill-editor-symbols-panel.css +39 -39
- package/src/ui/mathquill-editor/czi-mathquill-editor.css +50 -50
- package/src/ui/mathquill-editor/mathquill-import-kludge.js +24 -24
- package/src/ui/renderLaTeXAsHTML.js +46 -46
- package/src/ui/resolveImage.js +123 -123
- package/src/ui/toCSSColor.js +51 -51
- package/src/ui/toCSSLineSpacing.js +55 -82
- package/src/ui/toHexColor.js +26 -26
- package/src/ui/uuid.js +9 -9
- package/src/uuid.js +9 -9
- package/style-service.Dockerfile +26 -26
- package/utils/build_bin.js +9 -9
- package/utils/build_image_server.js +71 -69
- package/utils/build_licit_collab_server.js +75 -73
- package/utils/build_web_server.js +40 -40
- package/utils/env.js +6 -6
- package/webpack.config.js +126 -120
- package/build_customstyle_server.py +0 -7
- package/dist/FontSizeCommand.js +0 -80
- package/dist/FontSizeCommand.js.flow +0 -57
- package/dist/FontTypeCommand.js +0 -137
- package/dist/FontTypeCommand.js.flow +0 -100
- package/dist/HeadingCommand.js +0 -65
- package/dist/HeadingCommand.js.flow +0 -51
- package/dist/IndentCommand.js +0 -57
- package/dist/IndentCommand.js.flow +0 -41
- package/dist/MarkToggleCommand.js +0 -90
- package/dist/MarkToggleCommand.js.flow +0 -66
- package/dist/TextAlignCommand.js +0 -151
- package/dist/TextAlignCommand.js.flow +0 -122
- package/dist/TextColorCommand.js +0 -114
- package/dist/TextColorCommand.js.flow +0 -87
- package/dist/TextHighlightCommand.js +0 -118
- package/dist/TextHighlightCommand.js.flow +0 -91
- package/dist/TextLineSpacingCommand.js +0 -177
- package/dist/TextLineSpacingCommand.js.flow +0 -157
- package/dist/applyMark.js +0 -84
- package/dist/applyMark.js.flow +0 -61
- package/dist/clearMarks.js +0 -160
- package/dist/clearMarks.js.flow +0 -128
- package/dist/compareNumber.js +0 -18
- package/dist/compareNumber.js.flow +0 -11
- package/dist/consolidateListNodes.js +0 -291
- package/dist/consolidateListNodes.js.flow +0 -281
- package/dist/coverage/lcov-report/block-navigation.js +0 -82
- package/dist/coverage/lcov-report/block-navigation.js.flow +0 -87
- package/dist/coverage/lcov-report/prettify.js +0 -994
- package/dist/coverage/lcov-report/prettify.js.flow +0 -2
- package/dist/coverage/lcov-report/sorter.js +0 -211
- package/dist/coverage/lcov-report/sorter.js.flow +0 -196
- package/dist/findNodesWithSameMark.js +0 -89
- package/dist/findNodesWithSameMark.js.flow +0 -89
- package/dist/isBulletListNode.js +0 -14
- package/dist/isBulletListNode.js.flow +0 -9
- package/dist/isInsideListItem.js +0 -19
- package/dist/isInsideListItem.js.flow +0 -13
- package/dist/isListNode.js +0 -22
- package/dist/isListNode.js.flow +0 -13
- package/dist/isNodeSelectionForNodeType.js +0 -19
- package/dist/isNodeSelectionForNodeType.js.flow +0 -15
- package/dist/isOrderedListNode.js +0 -14
- package/dist/isOrderedListNode.js.flow +0 -9
- package/dist/isTextStyleMarkCommandEnabled.js +0 -59
- package/dist/isTextStyleMarkCommandEnabled.js.flow +0 -49
- package/dist/noop.js +0 -11
- package/dist/noop.js.flow +0 -5
- package/dist/toggleHeading.js +0 -135
- package/dist/toggleHeading.js.flow +0 -113
- package/dist/toggleList.js +0 -431
- package/dist/toggleList.js.flow +0 -450
- package/dist/transformAndPreserveTextSelection.js +0 -173
- package/dist/transformAndPreserveTextSelection.js.flow +0 -151
- package/dist/ui/ColorEditor.js +0 -118
- package/dist/ui/ColorEditor.js.flow +0 -101
- package/dist/ui/CustomButton.js +0 -64
- package/dist/ui/CustomButton.js.flow +0 -33
- package/dist/ui/PointerSurface.js +0 -173
- package/dist/ui/PointerSurface.js.flow +0 -141
- package/dist/ui/PopUp.js +0 -129
- package/dist/ui/PopUp.js.flow +0 -77
- package/dist/ui/PopUpManager.js +0 -266
- package/dist/ui/PopUpManager.js.flow +0 -213
- package/dist/ui/PopUpPosition.js +0 -156
- package/dist/ui/PopUpPosition.js.flow +0 -104
- package/dist/ui/PopUpTypes.js +0 -1
- package/dist/ui/TooltipSurface.js +0 -99
- package/dist/ui/TooltipSurface.js.flow +0 -76
- package/dist/ui/clamp.js +0 -18
- package/dist/ui/clamp.js.flow +0 -11
- package/dist/ui/createPopUp.js +0 -199
- package/dist/ui/createPopUp.js.flow +0 -205
- package/dist/ui/czi-animations.css +0 -15
- package/dist/ui/czi-color-editor.css +0 -56
- package/dist/ui/czi-custom-button.css +0 -93
- package/dist/ui/czi-pop-up.css +0 -32
- package/dist/ui/czi-tooltip-surface.css +0 -45
- package/dist/ui/preventEventDefault.js +0 -10
- package/dist/ui/preventEventDefault.js.flow +0 -5
- package/dist/ui/rects.js +0 -58
- package/dist/ui/rects.js.flow +0 -47
- package/dist/updateIndentLevel.js +0 -232
- package/dist/updateIndentLevel.js.flow +0 -211
- package/flow-typed/@molicit-citation.js +0 -5
- package/licit/server/customstyles/start.js +0 -184
- package/run_customstyle_server.py +0 -20
- package/src/FontSizeCommand.js +0 -57
- package/src/FontTypeCommand.js +0 -100
- package/src/HeadingCommand.js +0 -51
- package/src/IndentCommand.js +0 -41
- package/src/MarkToggleCommand.js +0 -66
- package/src/TextAlignCommand.js +0 -122
- package/src/TextColorCommand.js +0 -87
- package/src/TextHighlightCommand.js +0 -91
- package/src/TextLineSpacingCommand.js +0 -157
- package/src/applyMark.js +0 -61
- package/src/clearMarks.js +0 -128
- package/src/compareNumber.js +0 -11
- package/src/consolidateListNodes.js +0 -281
- package/src/findNodesWithSameMark.js +0 -89
- package/src/isBulletListNode.js +0 -9
- package/src/isInsideListItem.js +0 -13
- package/src/isListNode.js +0 -13
- package/src/isNodeSelectionForNodeType.js +0 -15
- package/src/isOrderedListNode.js +0 -9
- package/src/isTextStyleMarkCommandEnabled.js +0 -49
- package/src/noop.js +0 -5
- package/src/toggleHeading.js +0 -113
- package/src/toggleList.js +0 -450
- package/src/transformAndPreserveTextSelection.js +0 -151
- package/src/ui/ColorEditor.js +0 -101
- package/src/ui/CustomButton.js +0 -33
- package/src/ui/PointerSurface.js +0 -141
- package/src/ui/PopUp.js +0 -77
- package/src/ui/PopUpManager.js +0 -213
- package/src/ui/PopUpPosition.js +0 -104
- package/src/ui/PopUpTypes.js +0 -0
- package/src/ui/TooltipSurface.js +0 -76
- package/src/ui/clamp.js +0 -11
- package/src/ui/createPopUp.js +0 -205
- package/src/ui/czi-animations.css +0 -15
- package/src/ui/czi-color-editor.css +0 -56
- package/src/ui/czi-custom-button.css +0 -93
- package/src/ui/czi-pop-up.css +0 -32
- package/src/ui/czi-tooltip-surface.css +0 -45
- package/src/ui/preventEventDefault.js +0 -5
- package/src/ui/rects.js +0 -47
- package/src/updateIndentLevel.js +0 -211
- package/utils/build_customstyle_server.js +0 -70
|
@@ -1,994 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
window.PR_SHOULD_USE_CONTINUATION = true;
|
|
5
|
-
|
|
6
|
-
(function () {
|
|
7
|
-
var h = ["break,continue,do,else,for,if,return,while"];
|
|
8
|
-
var u = [h, "auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
|
|
9
|
-
var p = [u, "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];
|
|
10
|
-
var l = [p, "alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];
|
|
11
|
-
var x = [p, "abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];
|
|
12
|
-
var R = [x, "as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];
|
|
13
|
-
var r = "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,true,try,unless,until,when,while,yes";
|
|
14
|
-
var w = [p, "debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];
|
|
15
|
-
var 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";
|
|
16
|
-
var I = [h, "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"];
|
|
17
|
-
var f = [h, "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"];
|
|
18
|
-
var H = [h, "case,done,elif,esac,eval,fi,function,in,local,set,then,until"];
|
|
19
|
-
var A = [l, R, w, s + I, f, H];
|
|
20
|
-
var e = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
|
|
21
|
-
var C = "str";
|
|
22
|
-
var z = "kwd";
|
|
23
|
-
var j = "com";
|
|
24
|
-
var O = "typ";
|
|
25
|
-
var G = "lit";
|
|
26
|
-
var L = "pun";
|
|
27
|
-
var F = "pln";
|
|
28
|
-
var m = "tag";
|
|
29
|
-
var E = "dec";
|
|
30
|
-
var J = "src";
|
|
31
|
-
var P = "atn";
|
|
32
|
-
var n = "atv";
|
|
33
|
-
var N = "nocode";
|
|
34
|
-
var M = "(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";
|
|
35
|
-
|
|
36
|
-
function k(Z) {
|
|
37
|
-
var ad = 0;
|
|
38
|
-
var S = false;
|
|
39
|
-
var ac = false;
|
|
40
|
-
|
|
41
|
-
for (var V = 0, U = Z.length; V < U; ++V) {
|
|
42
|
-
var ae = Z[V];
|
|
43
|
-
|
|
44
|
-
if (ae.ignoreCase) {
|
|
45
|
-
ac = true;
|
|
46
|
-
} else {
|
|
47
|
-
if (/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ""))) {
|
|
48
|
-
S = true;
|
|
49
|
-
ac = false;
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
var Y = {
|
|
56
|
-
b: 8,
|
|
57
|
-
t: 9,
|
|
58
|
-
n: 10,
|
|
59
|
-
v: 11,
|
|
60
|
-
f: 12,
|
|
61
|
-
r: 13
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
function ab(ah) {
|
|
65
|
-
var ag = ah.charCodeAt(0);
|
|
66
|
-
|
|
67
|
-
if (ag !== 92) {
|
|
68
|
-
return ag;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
var af = ah.charAt(1);
|
|
72
|
-
ag = Y[af];
|
|
73
|
-
|
|
74
|
-
if (ag) {
|
|
75
|
-
return ag;
|
|
76
|
-
} else {
|
|
77
|
-
if ("0" <= af && af <= "7") {
|
|
78
|
-
return parseInt(ah.substring(1), 8);
|
|
79
|
-
} else {
|
|
80
|
-
if (af === "u" || af === "x") {
|
|
81
|
-
return parseInt(ah.substring(2), 16);
|
|
82
|
-
} else {
|
|
83
|
-
return ah.charCodeAt(1);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function T(af) {
|
|
90
|
-
if (af < 32) {
|
|
91
|
-
return (af < 16 ? "\\x0" : "\\x") + af.toString(16);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
var ag = String.fromCharCode(af);
|
|
95
|
-
|
|
96
|
-
if (ag === "\\" || ag === "-" || ag === "[" || ag === "]") {
|
|
97
|
-
ag = "\\" + ag;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return ag;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function X(am) {
|
|
104
|
-
var aq = am.substring(1, am.length - 1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]", "g"));
|
|
105
|
-
var ak = [];
|
|
106
|
-
var af = [];
|
|
107
|
-
var ao = aq[0] === "^";
|
|
108
|
-
|
|
109
|
-
for (var ar = ao ? 1 : 0, aj = aq.length; ar < aj; ++ar) {
|
|
110
|
-
var ah = aq[ar];
|
|
111
|
-
|
|
112
|
-
if (/\\[bdsw]/i.test(ah)) {
|
|
113
|
-
ak.push(ah);
|
|
114
|
-
} else {
|
|
115
|
-
var ag = ab(ah);
|
|
116
|
-
var al;
|
|
117
|
-
|
|
118
|
-
if (ar + 2 < aj && "-" === aq[ar + 1]) {
|
|
119
|
-
al = ab(aq[ar + 2]);
|
|
120
|
-
ar += 2;
|
|
121
|
-
} else {
|
|
122
|
-
al = ag;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
af.push([ag, al]);
|
|
126
|
-
|
|
127
|
-
if (!(al < 65 || ag > 122)) {
|
|
128
|
-
if (!(al < 65 || ag > 90)) {
|
|
129
|
-
af.push([Math.max(65, ag) | 32, Math.min(al, 90) | 32]);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if (!(al < 97 || ag > 122)) {
|
|
133
|
-
af.push([Math.max(97, ag) & ~32, Math.min(al, 122) & ~32]);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
af.sort(function (av, au) {
|
|
140
|
-
return av[0] - au[0] || au[1] - av[1];
|
|
141
|
-
});
|
|
142
|
-
var ai = [];
|
|
143
|
-
var ap = [NaN, NaN];
|
|
144
|
-
|
|
145
|
-
for (var ar = 0; ar < af.length; ++ar) {
|
|
146
|
-
var at = af[ar];
|
|
147
|
-
|
|
148
|
-
if (at[0] <= ap[1] + 1) {
|
|
149
|
-
ap[1] = Math.max(ap[1], at[1]);
|
|
150
|
-
} else {
|
|
151
|
-
ai.push(ap = at);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
var an = ["["];
|
|
156
|
-
|
|
157
|
-
if (ao) {
|
|
158
|
-
an.push("^");
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
an.push.apply(an, ak);
|
|
162
|
-
|
|
163
|
-
for (var ar = 0; ar < ai.length; ++ar) {
|
|
164
|
-
var at = ai[ar];
|
|
165
|
-
an.push(T(at[0]));
|
|
166
|
-
|
|
167
|
-
if (at[1] > at[0]) {
|
|
168
|
-
if (at[1] + 1 > at[0]) {
|
|
169
|
-
an.push("-");
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
an.push(T(at[1]));
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
an.push("]");
|
|
177
|
-
return an.join("");
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function W(al) {
|
|
181
|
-
var aj = al.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"));
|
|
182
|
-
var ah = aj.length;
|
|
183
|
-
var an = [];
|
|
184
|
-
|
|
185
|
-
for (var ak = 0, am = 0; ak < ah; ++ak) {
|
|
186
|
-
var ag = aj[ak];
|
|
187
|
-
|
|
188
|
-
if (ag === "(") {
|
|
189
|
-
++am;
|
|
190
|
-
} else {
|
|
191
|
-
if ("\\" === ag.charAt(0)) {
|
|
192
|
-
var af = +ag.substring(1);
|
|
193
|
-
|
|
194
|
-
if (af && af <= am) {
|
|
195
|
-
an[af] = -1;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
for (var ak = 1; ak < an.length; ++ak) {
|
|
202
|
-
if (-1 === an[ak]) {
|
|
203
|
-
an[ak] = ++ad;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
for (var ak = 0, am = 0; ak < ah; ++ak) {
|
|
208
|
-
var ag = aj[ak];
|
|
209
|
-
|
|
210
|
-
if (ag === "(") {
|
|
211
|
-
++am;
|
|
212
|
-
|
|
213
|
-
if (an[am] === undefined) {
|
|
214
|
-
aj[ak] = "(?:";
|
|
215
|
-
}
|
|
216
|
-
} else {
|
|
217
|
-
if ("\\" === ag.charAt(0)) {
|
|
218
|
-
var af = +ag.substring(1);
|
|
219
|
-
|
|
220
|
-
if (af && af <= am) {
|
|
221
|
-
aj[ak] = "\\" + an[am];
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
for (var ak = 0, am = 0; ak < ah; ++ak) {
|
|
228
|
-
if ("^" === aj[ak] && "^" !== aj[ak + 1]) {
|
|
229
|
-
aj[ak] = "";
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (al.ignoreCase && S) {
|
|
234
|
-
for (var ak = 0; ak < ah; ++ak) {
|
|
235
|
-
var ag = aj[ak];
|
|
236
|
-
var ai = ag.charAt(0);
|
|
237
|
-
|
|
238
|
-
if (ag.length >= 2 && ai === "[") {
|
|
239
|
-
aj[ak] = X(ag);
|
|
240
|
-
} else {
|
|
241
|
-
if (ai !== "\\") {
|
|
242
|
-
aj[ak] = ag.replace(/[a-zA-Z]/g, function (ao) {
|
|
243
|
-
var ap = ao.charCodeAt(0);
|
|
244
|
-
return "[" + String.fromCharCode(ap & ~32, ap | 32) + "]";
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
return aj.join("");
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
var aa = [];
|
|
255
|
-
|
|
256
|
-
for (var V = 0, U = Z.length; V < U; ++V) {
|
|
257
|
-
var ae = Z[V];
|
|
258
|
-
|
|
259
|
-
if (ae.global || ae.multiline) {
|
|
260
|
-
throw new Error("" + ae);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
aa.push("(?:" + W(ae) + ")");
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
return new RegExp(aa.join("|"), ac ? "gi" : "g");
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
function a(V) {
|
|
270
|
-
var U = /(?:^|\s)nocode(?:\s|$)/;
|
|
271
|
-
var X = [];
|
|
272
|
-
var T = 0;
|
|
273
|
-
var Z = [];
|
|
274
|
-
var W = 0;
|
|
275
|
-
var S;
|
|
276
|
-
|
|
277
|
-
if (V.currentStyle) {
|
|
278
|
-
S = V.currentStyle.whiteSpace;
|
|
279
|
-
} else {
|
|
280
|
-
if (window.getComputedStyle) {
|
|
281
|
-
S = document.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
var Y = S && "pre" === S.substring(0, 3);
|
|
286
|
-
|
|
287
|
-
function aa(ab) {
|
|
288
|
-
switch (ab.nodeType) {
|
|
289
|
-
case 1:
|
|
290
|
-
if (U.test(ab.className)) {
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
for (var ae = ab.firstChild; ae; ae = ae.nextSibling) {
|
|
295
|
-
aa(ae);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
var ad = ab.nodeName;
|
|
299
|
-
|
|
300
|
-
if ("BR" === ad || "LI" === ad) {
|
|
301
|
-
X[W] = "\n";
|
|
302
|
-
Z[W << 1] = T++;
|
|
303
|
-
Z[W++ << 1 | 1] = ab;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
break;
|
|
307
|
-
|
|
308
|
-
case 3:
|
|
309
|
-
case 4:
|
|
310
|
-
var ac = ab.nodeValue;
|
|
311
|
-
|
|
312
|
-
if (ac.length) {
|
|
313
|
-
if (!Y) {
|
|
314
|
-
ac = ac.replace(/[ \t\r\n]+/g, " ");
|
|
315
|
-
} else {
|
|
316
|
-
ac = ac.replace(/\r\n?/g, "\n");
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
X[W] = ac;
|
|
320
|
-
Z[W << 1] = T;
|
|
321
|
-
T += ac.length;
|
|
322
|
-
Z[W++ << 1 | 1] = ab;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
break;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
aa(V);
|
|
330
|
-
return {
|
|
331
|
-
sourceCode: X.join("").replace(/\n$/, ""),
|
|
332
|
-
spans: Z
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
function B(S, U, W, T) {
|
|
337
|
-
if (!U) {
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
var V = {
|
|
342
|
-
sourceCode: U,
|
|
343
|
-
basePos: S
|
|
344
|
-
};
|
|
345
|
-
W(V);
|
|
346
|
-
T.push.apply(T, V.decorations);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
var v = /\S/;
|
|
350
|
-
|
|
351
|
-
function o(S) {
|
|
352
|
-
var V = undefined;
|
|
353
|
-
|
|
354
|
-
for (var U = S.firstChild; U; U = U.nextSibling) {
|
|
355
|
-
var T = U.nodeType;
|
|
356
|
-
V = T === 1 ? V ? S : U : T === 3 ? v.test(U.nodeValue) ? S : V : V;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
return V === S ? undefined : V;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
function g(U, T) {
|
|
363
|
-
var S = {};
|
|
364
|
-
var V;
|
|
365
|
-
|
|
366
|
-
(function () {
|
|
367
|
-
var ad = U.concat(T);
|
|
368
|
-
var ah = [];
|
|
369
|
-
var ag = {};
|
|
370
|
-
|
|
371
|
-
for (var ab = 0, Z = ad.length; ab < Z; ++ab) {
|
|
372
|
-
var Y = ad[ab];
|
|
373
|
-
var ac = Y[3];
|
|
374
|
-
|
|
375
|
-
if (ac) {
|
|
376
|
-
for (var ae = ac.length; --ae >= 0;) {
|
|
377
|
-
S[ac.charAt(ae)] = Y;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
var af = Y[1];
|
|
382
|
-
var aa = "" + af;
|
|
383
|
-
|
|
384
|
-
if (!ag.hasOwnProperty(aa)) {
|
|
385
|
-
ah.push(af);
|
|
386
|
-
ag[aa] = null;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
ah.push(/[\0-\uffff]/);
|
|
391
|
-
V = k(ah);
|
|
392
|
-
})();
|
|
393
|
-
|
|
394
|
-
var X = T.length;
|
|
395
|
-
|
|
396
|
-
var W = function (ah) {
|
|
397
|
-
var Z = ah.sourceCode,
|
|
398
|
-
Y = ah.basePos;
|
|
399
|
-
var ad = [Y, F];
|
|
400
|
-
var af = 0;
|
|
401
|
-
var an = Z.match(V) || [];
|
|
402
|
-
var aj = {};
|
|
403
|
-
|
|
404
|
-
for (var ae = 0, aq = an.length; ae < aq; ++ae) {
|
|
405
|
-
var ag = an[ae];
|
|
406
|
-
var ap = aj[ag];
|
|
407
|
-
var ai = void 0;
|
|
408
|
-
var am;
|
|
409
|
-
|
|
410
|
-
if (typeof ap === "string") {
|
|
411
|
-
am = false;
|
|
412
|
-
} else {
|
|
413
|
-
var aa = S[ag.charAt(0)];
|
|
414
|
-
|
|
415
|
-
if (aa) {
|
|
416
|
-
ai = ag.match(aa[1]);
|
|
417
|
-
ap = aa[0];
|
|
418
|
-
} else {
|
|
419
|
-
for (var ao = 0; ao < X; ++ao) {
|
|
420
|
-
aa = T[ao];
|
|
421
|
-
ai = ag.match(aa[1]);
|
|
422
|
-
|
|
423
|
-
if (ai) {
|
|
424
|
-
ap = aa[0];
|
|
425
|
-
break;
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
if (!ai) {
|
|
430
|
-
ap = F;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
am = ap.length >= 5 && "lang-" === ap.substring(0, 5);
|
|
435
|
-
|
|
436
|
-
if (am && !(ai && typeof ai[1] === "string")) {
|
|
437
|
-
am = false;
|
|
438
|
-
ap = J;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
if (!am) {
|
|
442
|
-
aj[ag] = ap;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
var ab = af;
|
|
447
|
-
af += ag.length;
|
|
448
|
-
|
|
449
|
-
if (!am) {
|
|
450
|
-
ad.push(Y + ab, ap);
|
|
451
|
-
} else {
|
|
452
|
-
var al = ai[1];
|
|
453
|
-
var ak = ag.indexOf(al);
|
|
454
|
-
var ac = ak + al.length;
|
|
455
|
-
|
|
456
|
-
if (ai[2]) {
|
|
457
|
-
ac = ag.length - ai[2].length;
|
|
458
|
-
ak = ac - al.length;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
var ar = ap.substring(5);
|
|
462
|
-
B(Y + ab, ag.substring(0, ak), W, ad);
|
|
463
|
-
B(Y + ab + ak, al, q(ar, al), ad);
|
|
464
|
-
B(Y + ab + ac, ag.substring(ac), W, ad);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
ah.decorations = ad;
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
return W;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
function i(T) {
|
|
475
|
-
var W = [],
|
|
476
|
-
S = [];
|
|
477
|
-
|
|
478
|
-
if (T.tripleQuotedStrings) {
|
|
479
|
-
W.push([C, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/, null, "'\""]);
|
|
480
|
-
} else {
|
|
481
|
-
if (T.multiLineStrings) {
|
|
482
|
-
W.push([C, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/, null, "'\"`"]);
|
|
483
|
-
} else {
|
|
484
|
-
W.push([C, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, "\"'"]);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
if (T.verbatimStrings) {
|
|
489
|
-
S.push([C, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
var Y = T.hashComments;
|
|
493
|
-
|
|
494
|
-
if (Y) {
|
|
495
|
-
if (T.cStyleComments) {
|
|
496
|
-
if (Y > 1) {
|
|
497
|
-
W.push([j, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, "#"]);
|
|
498
|
-
} else {
|
|
499
|
-
W.push([j, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, "#"]);
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
S.push([C, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null]);
|
|
503
|
-
} else {
|
|
504
|
-
W.push([j, /^#[^\r\n]*/, null, "#"]);
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
if (T.cStyleComments) {
|
|
509
|
-
S.push([j, /^\/\/[^\r\n]*/, null]);
|
|
510
|
-
S.push([j, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
if (T.regexLiterals) {
|
|
514
|
-
var X = "/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/";
|
|
515
|
-
S.push(["lang-regex", new RegExp("^" + M + "(" + X + ")")]);
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
var V = T.types;
|
|
519
|
-
|
|
520
|
-
if (V) {
|
|
521
|
-
S.push([O, V]);
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
var U = ("" + T.keywords).replace(/^ | $/g, "");
|
|
525
|
-
|
|
526
|
-
if (U.length) {
|
|
527
|
-
S.push([z, new RegExp("^(?:" + U.replace(/[\s,]+/g, "|") + ")\\b"), null]);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
W.push([F, /^\s+/, null, " \r\n\t\xA0"]);
|
|
531
|
-
S.push([G, /^@[a-z_$][a-z_$@0-9]*/i, null], [O, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null], [F, /^[a-z_$][a-z_$@0-9]*/i, null], [G, new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*", "i"), null, "0123456789"], [F, /^\\[\s\S]?/, null], [L, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
|
|
532
|
-
return g(W, S);
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
var K = i({
|
|
536
|
-
keywords: A,
|
|
537
|
-
hashComments: true,
|
|
538
|
-
cStyleComments: true,
|
|
539
|
-
multiLineStrings: true,
|
|
540
|
-
regexLiterals: true
|
|
541
|
-
});
|
|
542
|
-
|
|
543
|
-
function Q(V, ag) {
|
|
544
|
-
var U = /(?:^|\s)nocode(?:\s|$)/;
|
|
545
|
-
var ab = /\r\n?|\n/;
|
|
546
|
-
var ac = V.ownerDocument;
|
|
547
|
-
var S;
|
|
548
|
-
|
|
549
|
-
if (V.currentStyle) {
|
|
550
|
-
S = V.currentStyle.whiteSpace;
|
|
551
|
-
} else {
|
|
552
|
-
if (window.getComputedStyle) {
|
|
553
|
-
S = ac.defaultView.getComputedStyle(V, null).getPropertyValue("white-space");
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
var Z = S && "pre" === S.substring(0, 3);
|
|
558
|
-
var af = ac.createElement("LI");
|
|
559
|
-
|
|
560
|
-
while (V.firstChild) {
|
|
561
|
-
af.appendChild(V.firstChild);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
var W = [af];
|
|
565
|
-
|
|
566
|
-
function ae(al) {
|
|
567
|
-
switch (al.nodeType) {
|
|
568
|
-
case 1:
|
|
569
|
-
if (U.test(al.className)) {
|
|
570
|
-
break;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
if ("BR" === al.nodeName) {
|
|
574
|
-
ad(al);
|
|
575
|
-
|
|
576
|
-
if (al.parentNode) {
|
|
577
|
-
al.parentNode.removeChild(al);
|
|
578
|
-
}
|
|
579
|
-
} else {
|
|
580
|
-
for (var an = al.firstChild; an; an = an.nextSibling) {
|
|
581
|
-
ae(an);
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
break;
|
|
586
|
-
|
|
587
|
-
case 3:
|
|
588
|
-
case 4:
|
|
589
|
-
if (Z) {
|
|
590
|
-
var am = al.nodeValue;
|
|
591
|
-
var aj = am.match(ab);
|
|
592
|
-
|
|
593
|
-
if (aj) {
|
|
594
|
-
var ai = am.substring(0, aj.index);
|
|
595
|
-
al.nodeValue = ai;
|
|
596
|
-
var ah = am.substring(aj.index + aj[0].length);
|
|
597
|
-
|
|
598
|
-
if (ah) {
|
|
599
|
-
var ak = al.parentNode;
|
|
600
|
-
ak.insertBefore(ac.createTextNode(ah), al.nextSibling);
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
ad(al);
|
|
604
|
-
|
|
605
|
-
if (!ai) {
|
|
606
|
-
al.parentNode.removeChild(al);
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
break;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
function ad(ak) {
|
|
616
|
-
while (!ak.nextSibling) {
|
|
617
|
-
ak = ak.parentNode;
|
|
618
|
-
|
|
619
|
-
if (!ak) {
|
|
620
|
-
return;
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
function ai(al, ar) {
|
|
625
|
-
var aq = ar ? al.cloneNode(false) : al;
|
|
626
|
-
var ao = al.parentNode;
|
|
627
|
-
|
|
628
|
-
if (ao) {
|
|
629
|
-
var ap = ai(ao, 1);
|
|
630
|
-
var an = al.nextSibling;
|
|
631
|
-
ap.appendChild(aq);
|
|
632
|
-
|
|
633
|
-
for (var am = an; am; am = an) {
|
|
634
|
-
an = am.nextSibling;
|
|
635
|
-
ap.appendChild(am);
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
return aq;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
var ah = ai(ak.nextSibling, 0);
|
|
643
|
-
|
|
644
|
-
for (var aj; (aj = ah.parentNode) && aj.nodeType === 1;) {
|
|
645
|
-
ah = aj;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
W.push(ah);
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
for (var Y = 0; Y < W.length; ++Y) {
|
|
652
|
-
ae(W[Y]);
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
if (ag === (ag | 0)) {
|
|
656
|
-
W[0].setAttribute("value", ag);
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
var aa = ac.createElement("OL");
|
|
660
|
-
aa.className = "linenums";
|
|
661
|
-
var X = Math.max(0, ag - 1 | 0) || 0;
|
|
662
|
-
|
|
663
|
-
for (var Y = 0, T = W.length; Y < T; ++Y) {
|
|
664
|
-
af = W[Y];
|
|
665
|
-
af.className = "L" + (Y + X) % 10;
|
|
666
|
-
|
|
667
|
-
if (!af.firstChild) {
|
|
668
|
-
af.appendChild(ac.createTextNode("\xA0"));
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
aa.appendChild(af);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
V.appendChild(aa);
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
function D(ac) {
|
|
678
|
-
var aj = /\bMSIE\b/.test(navigator.userAgent);
|
|
679
|
-
var am = /\n/g;
|
|
680
|
-
var al = ac.sourceCode;
|
|
681
|
-
var an = al.length;
|
|
682
|
-
var V = 0;
|
|
683
|
-
var aa = ac.spans;
|
|
684
|
-
var T = aa.length;
|
|
685
|
-
var ah = 0;
|
|
686
|
-
var X = ac.decorations;
|
|
687
|
-
var Y = X.length;
|
|
688
|
-
var Z = 0;
|
|
689
|
-
X[Y] = an;
|
|
690
|
-
var ar, aq;
|
|
691
|
-
|
|
692
|
-
for (aq = ar = 0; aq < Y;) {
|
|
693
|
-
if (X[aq] !== X[aq + 2]) {
|
|
694
|
-
X[ar++] = X[aq++];
|
|
695
|
-
X[ar++] = X[aq++];
|
|
696
|
-
} else {
|
|
697
|
-
aq += 2;
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
Y = ar;
|
|
702
|
-
|
|
703
|
-
for (aq = ar = 0; aq < Y;) {
|
|
704
|
-
var at = X[aq];
|
|
705
|
-
var ab = X[aq + 1];
|
|
706
|
-
var W = aq + 2;
|
|
707
|
-
|
|
708
|
-
while (W + 2 <= Y && X[W + 1] === ab) {
|
|
709
|
-
W += 2;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
X[ar++] = at;
|
|
713
|
-
X[ar++] = ab;
|
|
714
|
-
aq = W;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
Y = X.length = ar;
|
|
718
|
-
var ae = null;
|
|
719
|
-
|
|
720
|
-
while (ah < T) {
|
|
721
|
-
var af = aa[ah];
|
|
722
|
-
var S = aa[ah + 2] || an;
|
|
723
|
-
var ag = X[Z];
|
|
724
|
-
var ap = X[Z + 2] || an;
|
|
725
|
-
var W = Math.min(S, ap);
|
|
726
|
-
var ak = aa[ah + 1];
|
|
727
|
-
var U;
|
|
728
|
-
|
|
729
|
-
if (ak.nodeType !== 1 && (U = al.substring(V, W))) {
|
|
730
|
-
if (aj) {
|
|
731
|
-
U = U.replace(am, "\r");
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
ak.nodeValue = U;
|
|
735
|
-
var ai = ak.ownerDocument;
|
|
736
|
-
var ao = ai.createElement("SPAN");
|
|
737
|
-
ao.className = X[Z + 1];
|
|
738
|
-
var ad = ak.parentNode;
|
|
739
|
-
ad.replaceChild(ao, ak);
|
|
740
|
-
ao.appendChild(ak);
|
|
741
|
-
|
|
742
|
-
if (V < S) {
|
|
743
|
-
aa[ah + 1] = ak = ai.createTextNode(al.substring(W, S));
|
|
744
|
-
ad.insertBefore(ak, ao.nextSibling);
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
V = W;
|
|
749
|
-
|
|
750
|
-
if (V >= S) {
|
|
751
|
-
ah += 2;
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
if (V >= ap) {
|
|
755
|
-
Z += 2;
|
|
756
|
-
}
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
var t = {};
|
|
761
|
-
|
|
762
|
-
function c(U, V) {
|
|
763
|
-
for (var S = V.length; --S >= 0;) {
|
|
764
|
-
var T = V[S];
|
|
765
|
-
|
|
766
|
-
if (!t.hasOwnProperty(T)) {
|
|
767
|
-
t[T] = U;
|
|
768
|
-
} else {
|
|
769
|
-
if (window.console) {
|
|
770
|
-
console.warn("cannot override language handler %s", T);
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
function q(T, S) {
|
|
777
|
-
if (!(T && t.hasOwnProperty(T))) {
|
|
778
|
-
T = /^\s*</.test(S) ? "default-markup" : "default-code";
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
return t[T];
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
c(K, ["default-code"]);
|
|
785
|
-
c(g([], [[F, /^[^<?]+/], [E, /^<!\w[^>]*(?:>|$)/], [j, /^<\!--[\s\S]*?(?:-\->|$)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], [L, /^(?:<[%?]|[%?]>)/], ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i], ["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i]]), ["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]);
|
|
786
|
-
c(g([[F, /^[\s]+/, null, " \t\r\n"], [n, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"]], [[m, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i], [P, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i], ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/], [L, /^[=<>\/]+/], ["lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i], ["lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i], ["lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i], ["lang-css", /^style\s*=\s*\"([^\"]+)\"/i], ["lang-css", /^style\s*=\s*\'([^\']+)\'/i], ["lang-css", /^style\s*=\s*([^\"\'>\s]+)/i]]), ["in.tag"]);
|
|
787
|
-
c(g([], [[n, /^[\s\S]+/]]), ["uq.val"]);
|
|
788
|
-
c(i({
|
|
789
|
-
keywords: l,
|
|
790
|
-
hashComments: true,
|
|
791
|
-
cStyleComments: true,
|
|
792
|
-
types: e
|
|
793
|
-
}), ["c", "cc", "cpp", "cxx", "cyc", "m"]);
|
|
794
|
-
c(i({
|
|
795
|
-
keywords: "null,true,false"
|
|
796
|
-
}), ["json"]);
|
|
797
|
-
c(i({
|
|
798
|
-
keywords: R,
|
|
799
|
-
hashComments: true,
|
|
800
|
-
cStyleComments: true,
|
|
801
|
-
verbatimStrings: true,
|
|
802
|
-
types: e
|
|
803
|
-
}), ["cs"]);
|
|
804
|
-
c(i({
|
|
805
|
-
keywords: x,
|
|
806
|
-
cStyleComments: true
|
|
807
|
-
}), ["java"]);
|
|
808
|
-
c(i({
|
|
809
|
-
keywords: H,
|
|
810
|
-
hashComments: true,
|
|
811
|
-
multiLineStrings: true
|
|
812
|
-
}), ["bsh", "csh", "sh"]);
|
|
813
|
-
c(i({
|
|
814
|
-
keywords: I,
|
|
815
|
-
hashComments: true,
|
|
816
|
-
multiLineStrings: true,
|
|
817
|
-
tripleQuotedStrings: true
|
|
818
|
-
}), ["cv", "py"]);
|
|
819
|
-
c(i({
|
|
820
|
-
keywords: s,
|
|
821
|
-
hashComments: true,
|
|
822
|
-
multiLineStrings: true,
|
|
823
|
-
regexLiterals: true
|
|
824
|
-
}), ["perl", "pl", "pm"]);
|
|
825
|
-
c(i({
|
|
826
|
-
keywords: f,
|
|
827
|
-
hashComments: true,
|
|
828
|
-
multiLineStrings: true,
|
|
829
|
-
regexLiterals: true
|
|
830
|
-
}), ["rb"]);
|
|
831
|
-
c(i({
|
|
832
|
-
keywords: w,
|
|
833
|
-
cStyleComments: true,
|
|
834
|
-
regexLiterals: true
|
|
835
|
-
}), ["js"]);
|
|
836
|
-
c(i({
|
|
837
|
-
keywords: r,
|
|
838
|
-
hashComments: 3,
|
|
839
|
-
cStyleComments: true,
|
|
840
|
-
multilineStrings: true,
|
|
841
|
-
tripleQuotedStrings: true,
|
|
842
|
-
regexLiterals: true
|
|
843
|
-
}), ["coffee"]);
|
|
844
|
-
c(g([], [[C, /^[\s\S]+/]]), ["regex"]);
|
|
845
|
-
|
|
846
|
-
function d(V) {
|
|
847
|
-
var U = V.langExtension;
|
|
848
|
-
|
|
849
|
-
try {
|
|
850
|
-
var S = a(V.sourceNode);
|
|
851
|
-
var T = S.sourceCode;
|
|
852
|
-
V.sourceCode = T;
|
|
853
|
-
V.spans = S.spans;
|
|
854
|
-
V.basePos = 0;
|
|
855
|
-
q(U, T)(V);
|
|
856
|
-
D(V);
|
|
857
|
-
} catch (W) {
|
|
858
|
-
if ("console" in window) {
|
|
859
|
-
console.log(W && W.stack ? W.stack : W);
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
function y(W, V, U) {
|
|
865
|
-
var S = document.createElement("PRE");
|
|
866
|
-
S.innerHTML = W;
|
|
867
|
-
|
|
868
|
-
if (U) {
|
|
869
|
-
Q(S, U);
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
var T = {
|
|
873
|
-
langExtension: V,
|
|
874
|
-
numberLines: U,
|
|
875
|
-
sourceNode: S
|
|
876
|
-
};
|
|
877
|
-
d(T);
|
|
878
|
-
return S.innerHTML;
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
function b(ad) {
|
|
882
|
-
function Y(af) {
|
|
883
|
-
return document.getElementsByTagName(af);
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
var ac = [Y("pre"), Y("code"), Y("xmp")];
|
|
887
|
-
var T = [];
|
|
888
|
-
|
|
889
|
-
for (var aa = 0; aa < ac.length; ++aa) {
|
|
890
|
-
for (var Z = 0, V = ac[aa].length; Z < V; ++Z) {
|
|
891
|
-
T.push(ac[aa][Z]);
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
|
|
895
|
-
ac = null;
|
|
896
|
-
var W = Date;
|
|
897
|
-
|
|
898
|
-
if (!W.now) {
|
|
899
|
-
W = {
|
|
900
|
-
now: function () {
|
|
901
|
-
return +new Date();
|
|
902
|
-
}
|
|
903
|
-
};
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
var X = 0;
|
|
907
|
-
var S;
|
|
908
|
-
var ab = /\blang(?:uage)?-([\w.]+)(?!\S)/;
|
|
909
|
-
var ae = /\bprettyprint\b/;
|
|
910
|
-
|
|
911
|
-
function U() {
|
|
912
|
-
var ag = window.PR_SHOULD_USE_CONTINUATION ? W.now() + 250 : Infinity;
|
|
913
|
-
|
|
914
|
-
for (; X < T.length && W.now() < ag; X++) {
|
|
915
|
-
var aj = T[X];
|
|
916
|
-
var ai = aj.className;
|
|
917
|
-
|
|
918
|
-
if (ai.indexOf("prettyprint") >= 0) {
|
|
919
|
-
var ah = ai.match(ab);
|
|
920
|
-
var am;
|
|
921
|
-
|
|
922
|
-
if (!ah && (am = o(aj)) && "CODE" === am.tagName) {
|
|
923
|
-
ah = am.className.match(ab);
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
if (ah) {
|
|
927
|
-
ah = ah[1];
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
var al = false;
|
|
931
|
-
|
|
932
|
-
for (var ak = aj.parentNode; ak; ak = ak.parentNode) {
|
|
933
|
-
if ((ak.tagName === "pre" || ak.tagName === "code" || ak.tagName === "xmp") && ak.className && ak.className.indexOf("prettyprint") >= 0) {
|
|
934
|
-
al = true;
|
|
935
|
-
break;
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
if (!al) {
|
|
940
|
-
var af = aj.className.match(/\blinenums\b(?::(\d+))?/);
|
|
941
|
-
af = af ? af[1] && af[1].length ? +af[1] : true : false;
|
|
942
|
-
|
|
943
|
-
if (af) {
|
|
944
|
-
Q(aj, af);
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
S = {
|
|
948
|
-
langExtension: ah,
|
|
949
|
-
sourceNode: aj,
|
|
950
|
-
numberLines: af
|
|
951
|
-
};
|
|
952
|
-
d(S);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
if (X < T.length) {
|
|
958
|
-
setTimeout(U, 250);
|
|
959
|
-
} else {
|
|
960
|
-
if (ad) {
|
|
961
|
-
ad();
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
|
|
966
|
-
U();
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
window.prettyPrintOne = y;
|
|
970
|
-
window.prettyPrint = b;
|
|
971
|
-
window.PR = {
|
|
972
|
-
createSimpleLexer: g,
|
|
973
|
-
registerLangHandler: c,
|
|
974
|
-
sourceDecorator: i,
|
|
975
|
-
PR_ATTRIB_NAME: P,
|
|
976
|
-
PR_ATTRIB_VALUE: n,
|
|
977
|
-
PR_COMMENT: j,
|
|
978
|
-
PR_DECLARATION: E,
|
|
979
|
-
PR_KEYWORD: z,
|
|
980
|
-
PR_LITERAL: G,
|
|
981
|
-
PR_NOCODE: N,
|
|
982
|
-
PR_PLAIN: F,
|
|
983
|
-
PR_PUNCTUATION: L,
|
|
984
|
-
PR_SOURCE: J,
|
|
985
|
-
PR_STRING: C,
|
|
986
|
-
PR_TAG: m,
|
|
987
|
-
PR_TYPE: O
|
|
988
|
-
};
|
|
989
|
-
})();
|
|
990
|
-
|
|
991
|
-
PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_DECLARATION, /^<!\w[^>]*(?:>|$)/], [PR.PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/], [PR.PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/], ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/], ["lang-", /^<%([\s\S]+?)(?:%>|$)/], ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i], ["lang-handlebars", /^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i], ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i], ["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i], [PR.PR_DECLARATION, /^{{[#^>/]?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{&?\s*[\w.][^}]*}}/], [PR.PR_DECLARATION, /^{{{>?\s*[\w.][^}]*}}}/], [PR.PR_COMMENT, /^{{![^}]*}}/]]), ["handlebars", "hbs"]);
|
|
992
|
-
PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN, /^[ \t\r\n\f]+/, null, " \t\r\n\f"]], [[PR.PR_STRING, /^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null], [PR.PR_STRING, /^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null], ["lang-css-str", /^url\(([^\)\"\']*)\)/i], [PR.PR_KEYWORD, /^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i, null], ["lang-css-kw", /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i], [PR.PR_COMMENT, /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//], [PR.PR_COMMENT, /^(?:<!--|-->)/], [PR.PR_LITERAL, /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i], [PR.PR_LITERAL, /^#(?:[0-9a-f]{3}){1,2}/i], [PR.PR_PLAIN, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i], [PR.PR_PUNCTUATION, /^[^\s\w\'\"]+/]]), ["css"]);
|
|
993
|
-
PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_KEYWORD, /^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]), ["css-kw"]);
|
|
994
|
-
PR.registerLangHandler(PR.createSimpleLexer([], [[PR.PR_STRING, /^[^\)\"\']+/]]), ["css-str"]);
|