@univerjs-pro/docs-code 1.0.0-alpha.2 → 1.0.0-alpha.3

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.
@@ -0,0 +1,48 @@
1
+ import type { IDocumentBlockRange, IDocumentBody, IDocumentData } from '@univerjs/core';
2
+ import type { IDocsCodeActionBuildResult, IDocsCodeConfig, IDocsCodeMetadataResource } from './type';
3
+ export declare class InvalidInsertRangeError extends Error {
4
+ constructor(message?: string);
5
+ }
6
+ export interface IInsertCodeActionParams {
7
+ documentData: IDocumentData;
8
+ metadata?: IDocsCodeMetadataResource;
9
+ blockId: string;
10
+ startOffset?: number;
11
+ endOffset?: number;
12
+ insertionMode?: 'convert-paragraph' | 'insert-new';
13
+ config?: Partial<IDocsCodeConfig>;
14
+ }
15
+ export interface IUpdateCodeActionParams {
16
+ documentData: IDocumentData;
17
+ metadata?: IDocsCodeMetadataResource;
18
+ blockId: string;
19
+ config: Partial<IDocsCodeConfig>;
20
+ }
21
+ export interface IExitCodeActionParams {
22
+ documentData: IDocumentData;
23
+ metadata?: IDocsCodeMetadataResource;
24
+ blockId: string;
25
+ }
26
+ export interface IRemoveCodeActionParams {
27
+ documentData: IDocumentData;
28
+ metadata?: IDocsCodeMetadataResource;
29
+ blockId: string;
30
+ }
31
+ export interface ICancelEmptyCodeParagraphActionParams {
32
+ documentData: IDocumentData;
33
+ cursorOffset: number;
34
+ paragraphStartIndex?: number;
35
+ }
36
+ export interface ICodeBoundaryDeleteParams {
37
+ documentData: IDocumentData;
38
+ cursorOffset: number;
39
+ direction: 'left' | 'right';
40
+ }
41
+ export declare function buildInsertCodeActions(params: IInsertCodeActionParams): IDocsCodeActionBuildResult;
42
+ export declare function buildUpdateCodeActions(params: IUpdateCodeActionParams): IDocsCodeActionBuildResult;
43
+ export declare function buildExitCodeActions(params: IExitCodeActionParams): IDocsCodeActionBuildResult | null;
44
+ export declare function buildRemoveCodeActions(params: IRemoveCodeActionParams): IDocsCodeActionBuildResult | null;
45
+ export declare function buildCancelEmptyCodeParagraphActions(params: ICancelEmptyCodeParagraphActionParams): IDocsCodeActionBuildResult | null;
46
+ export declare function findCodeRangeAtOffset(body: IDocumentBody | undefined, offset: number): IDocumentBlockRange | undefined;
47
+ export declare function findCodeRangeById(body: IDocumentBody | undefined, blockId: string): IDocumentBlockRange | undefined;
48
+ export declare function isCodeBoundaryDelete(params: ICodeBoundaryDeleteParams): boolean;
@@ -0,0 +1 @@
1
+ export declare const DOCS_CODE_PLUGIN = "DOC_CODE_PLUGIN";
@@ -0,0 +1,6 @@
1
+ import type { IDocsCodeConfig, IDocsCodeMetadataResource } from './type';
2
+ export declare const DEFAULT_CODE_CONFIG: IDocsCodeConfig;
3
+ export declare function normalizeDocsCodeConfig(config?: Partial<IDocsCodeConfig> | null): IDocsCodeConfig;
4
+ export declare function normalizeDocsCodeMetadataResource(resource?: Partial<IDocsCodeMetadataResource> | null): IDocsCodeMetadataResource;
5
+ export declare function setCodeConfigInMetadata(resource: IDocsCodeMetadataResource | undefined, blockId: string, config: Partial<IDocsCodeConfig>): IDocsCodeMetadataResource;
6
+ export declare function removeCodeConfigFromMetadata(resource: IDocsCodeMetadataResource | undefined, blockId: string): IDocsCodeMetadataResource;
@@ -0,0 +1,15 @@
1
+ import type { IDocumentData } from '@univerjs/core';
2
+ export interface IDocsCodeConfig {
3
+ language: string;
4
+ showLineNumbers: boolean;
5
+ tabSize: number;
6
+ wrap: boolean;
7
+ }
8
+ export interface IDocsCodeMetadataResource {
9
+ codes: Record<string, IDocsCodeConfig>;
10
+ }
11
+ export interface IDocsCodeActionBuildResult {
12
+ nextDocumentData: IDocumentData;
13
+ nextMetadata?: IDocsCodeMetadataResource;
14
+ cursorOffset: number;
15
+ }
@@ -0,0 +1,5 @@
1
+ export declare const DOCS_CODE_PLUGIN_CONFIG_KEY = "docs-code.config";
2
+ export declare const configSymbol: unique symbol;
3
+ export interface IUniverDocsCodeConfig {
4
+ }
5
+ export declare const defaultPluginConfig: IUniverDocsCodeConfig;
@@ -0,0 +1,8 @@
1
+ import { Disposable, IResourceManagerService } from '@univerjs/core';
2
+ import { DocsCodeModel } from '../models/docs-code-model';
3
+ export declare class DocsCodeResourceController extends Disposable {
4
+ private readonly _resourceManagerService;
5
+ private readonly _docsCodeModel;
6
+ constructor(_resourceManagerService: IResourceManagerService, _docsCodeModel: DocsCodeModel);
7
+ private _initResource;
8
+ }
@@ -0,0 +1,150 @@
1
+ import type { IDocsCodeConfig } from '@univerjs-pro/docs-code';
2
+ import type { FDocument } from '@univerjs/docs/facade';
3
+ import type { IDocsCodeInfo, IDocsCodeRange, IDocsCodeUpdateFacadeOptions } from './types';
4
+ import { Injector } from '@univerjs/core';
5
+ /**
6
+ * Facade object for a single docs code block.
7
+ * @example
8
+ * ```ts
9
+ * const fDocument = univerAPI.getActiveDocument();
10
+ * const codes = fDocument.getCodes();
11
+ * console.log(codes);
12
+ *
13
+ * const code = fDocument.findCodeByText('function');
14
+ * console.log(code?.getText());
15
+ * console.log(code?.getConfig());
16
+ *
17
+ * code?.updateConfig({ language: 'javascript', lineNumbers: true });
18
+ * console.log(code?.describe());
19
+ *
20
+ * code?.unwrap();
21
+ * code?.remove();
22
+ * ```
23
+ */
24
+ export declare class FDocumentCode {
25
+ private _document;
26
+ private _blockId;
27
+ protected readonly _injector: Injector;
28
+ private readonly _unitId;
29
+ constructor(_document: FDocument, _blockId: string, _injector: Injector);
30
+ /**
31
+ * Returns the code block id.
32
+ * @returns {string} The code block range id.
33
+ * @example
34
+ * const fDocument = univerAPI.getActiveDocument();
35
+ * const codes = fDocument.getCodes();
36
+ *
37
+ * // Get the id of the first code block.
38
+ * if (codes.length > 0) {
39
+ * const code = codes[0];
40
+ * console.log(code.getId());
41
+ * }
42
+ * ```
43
+ */
44
+ getId(): string;
45
+ /**
46
+ * Returns the code block range in the document data stream.
47
+ * @returns {IDocsCodeRange | null} The code range, or `null` if it no longer exists.
48
+ * @example
49
+ * const fDocument = univerAPI.getActiveDocument();
50
+ * const codes = fDocument.getCodes();
51
+ *
52
+ * // Get the range of the first code block.
53
+ * if (codes.length > 0) {
54
+ * const code = codes[0];
55
+ * console.log(code.getRange());
56
+ * }
57
+ * ```
58
+ */
59
+ getRange(): IDocsCodeRange | null;
60
+ /**
61
+ * Returns plain text inside the code.
62
+ * @returns {string} The code text with block tokens removed.
63
+ * @example
64
+ * const fDocument = univerAPI.getActiveDocument();
65
+ * const code = fDocument.findCodeByText('function');
66
+ *
67
+ * if (code) {
68
+ * console.log(code.getText());
69
+ * }
70
+ * ```
71
+ */
72
+ getText(): string;
73
+ /**
74
+ * Returns an agent-friendly description of the code.
75
+ * @returns {IDocsCodeInfo | null} The code id, range, and text, or `null` if it no longer exists.
76
+ * @example
77
+ * ```ts
78
+ * const fDocument = univerAPI.getActiveDocument();
79
+ * const code = fDocument.findCodeByText('function');
80
+ *
81
+ * if (code) {
82
+ * console.log(code.describe());
83
+ * }
84
+ * ```
85
+ */
86
+ describe(): IDocsCodeInfo | null;
87
+ /**
88
+ * Returns the code block configuration.
89
+ * @returns {IDocsCodeConfig} Language, wrapping, line number, and tab-size settings.
90
+ * @example
91
+ * ```ts
92
+ * const fDocument = univerAPI.getActiveDocument();
93
+ * const code = fDocument.findCodeByText('function');
94
+ *
95
+ * if (code) {
96
+ * console.log(code.getConfig());
97
+ * }
98
+ * ```
99
+ */
100
+ getConfig(): IDocsCodeConfig;
101
+ /**
102
+ * Updates the code block configuration.
103
+ * @param {IDocsCodeUpdateFacadeOptions} options Code block configuration patch.
104
+ * @returns {boolean} Whether the update command succeeded.
105
+ * @example
106
+ * ```ts
107
+ * const fDocument = univerAPI.getActiveDocument();
108
+ * const code = fDocument.findCodeByText('function');
109
+ *
110
+ * if (code) {
111
+ * code.updateConfig({ config: { language: 'typescript' } });
112
+ * }
113
+ * ```
114
+ * ```
115
+ */
116
+ updateConfig(options: IDocsCodeUpdateFacadeOptions): boolean;
117
+ /**
118
+ * Unwraps this code block by removing only the code block formatting.
119
+ * @returns {boolean} Whether the code block formatting was removed.
120
+ * @example
121
+ * ```ts
122
+ * const fDocument = univerAPI.getActiveDocument();
123
+ * const code = fDocument.findCodeByText('function');
124
+ *
125
+ * if (code) {
126
+ * // Remove code block formatting from this block.
127
+ * const success = code.unwrap();
128
+ * console.log(success);
129
+ * }
130
+ * ```
131
+ */
132
+ unwrap(): boolean;
133
+ /**
134
+ * Removes this code block and its content.
135
+ * @returns {boolean} Whether the code block was removed.
136
+ * @example
137
+ * ```ts
138
+ * const fDocument = univerAPI.getActiveDocument();
139
+ * const code = fDocument.findCodeByText('function');
140
+ *
141
+ * if (code) {
142
+ * const success = code.remove();
143
+ * console.log(success);
144
+ * }
145
+ * ```
146
+ */
147
+ remove(): boolean;
148
+ private _getBlockRange;
149
+ private _getDocumentData;
150
+ }
@@ -0,0 +1,132 @@
1
+ import type { FDocumentParagraph } from '@univerjs/docs/facade';
2
+ import type { IDocsCodeFindQuery, IDocsCodeInsertFacadeOptions, IDocsCodeInsertParagraphFacadeOptions } from './types';
3
+ import { FDocument } from '@univerjs/docs/facade';
4
+ import { FDocumentCode } from './f-document-code';
5
+ export interface IFDocumentCodeMixin {
6
+ /**
7
+ * Returns all code block ranges in this document.
8
+ * @returns {FDocumentCode[]} An array of FDocumentCode instances, or an empty array if no code block ranges exist in the document.
9
+ * @example
10
+ * ```ts
11
+ * const fDocument = univerAPI.getActiveDocument();
12
+ * const codes = fDocument.getCodes();
13
+ * console.log(codes);
14
+ * ```
15
+ */
16
+ getCodes(): FDocumentCode[];
17
+ /**
18
+ * Returns a code block range by its block id.
19
+ * @param {string} blockId The code block range id.
20
+ * @returns {FDocumentCode | null} The FDocumentCode instance, or `null` if no code block range with the id exists in the document.
21
+ * @example
22
+ * ```ts
23
+ * const fDocument = univerAPI.getActiveDocument();
24
+ * const code = fDocument.getCode('block-id-123');
25
+ * console.log(code);
26
+ * ```
27
+ */
28
+ getCode(blockId: string): FDocumentCode | null;
29
+ /**
30
+ * Returns the code that contains a document data stream offset.
31
+ * @param {number} offset The document data stream offset.
32
+ * @returns {FDocumentCode | null} The FDocumentCode instance, or `null` if no code block range contains the offset.
33
+ * @example
34
+ * ```ts
35
+ * const fDocument = univerAPI.getActiveDocument();
36
+ * const code = fDocument.getCodeAt(150);
37
+ * console.log(code);
38
+ * ```
39
+ */
40
+ getCodeAt(offset: number): FDocumentCode | null;
41
+ /**
42
+ * Finds the first code whose text contains the given string.
43
+ * @param {string} text Text to search inside code content.
44
+ * @returns {FDocumentCode | null} The first matching FDocumentCode instance, or `null` if no match is found.
45
+ * @example
46
+ * ```ts
47
+ * const fDocument = univerAPI.getActiveDocument();
48
+ * const code = fDocument.findCodeByText('function');
49
+ * console.log(code);
50
+ * ```
51
+ */
52
+ findCodeByText(text: string): FDocumentCode | null;
53
+ /**
54
+ * Finds codes by text or block id.
55
+ * @param {string | IDocsCodeFindQuery} query A plain text query or a structured code query.
56
+ * @returns {FDocumentCode[]} An array of matching FDocumentCode instances, or an empty array if no match is found.
57
+ * @example
58
+ * ```ts
59
+ * const fDocument = univerAPI.getActiveDocument();
60
+ * const codesWithText = fDocument.findCodes('function');
61
+ * const codesWithId = fDocument.findCodes({ blockId: 'block-id-123' });
62
+ * console.log(codesWithText, codesWithId);
63
+ * ```
64
+ */
65
+ findCodes(query: string | IDocsCodeFindQuery): FDocumentCode[];
66
+ /**
67
+ * Inserts a code block around a paragraph element.
68
+ * The paragraph wrapper is resolved by persisted `paragraphId` before the command runs, so facade edits
69
+ * inserted before the paragraph do not require recalculating offsets.
70
+ * @param {FDocumentParagraph} paragraph The paragraph to convert to a code block.
71
+ * @param {IDocsCodeInsertParagraphFacadeOptions} [options] Optional block id and code config.
72
+ * @returns {FDocumentCode | null} The newly inserted FDocumentCode instance, or `null` if the insert code failed.
73
+ * @example
74
+ * ```ts
75
+ * const fDocument = univerAPI.getActiveDocument();
76
+ *
77
+ * // Insert a code block around a paragraph with TypeScript language config.
78
+ * const paragraph = fDocument.appendParagraph('const total = rows.length;');
79
+ * const code = fDocument.insertCode(paragraph, {
80
+ * config: { language: 'typescript' },
81
+ * });
82
+ * console.log(code?.getConfig()?.language);
83
+ * ```
84
+ */
85
+ insertCode(paragraph: FDocumentParagraph, options?: IDocsCodeInsertParagraphFacadeOptions): FDocumentCode | null;
86
+ /**
87
+ * Inserts a code around a document range, or inserts an empty code when the range is collapsed.
88
+ * Prefer the paragraph overload for agent-authored code.
89
+ * @param {IDocsCodeInsertFacadeOptions} [options] Optional block id and start/end offsets.
90
+ * @returns {FDocumentCode | null} The newly inserted FDocumentCode instance, or `null` if the insert code failed.
91
+ * @example
92
+ * ```ts
93
+ * const fDocument = univerAPI.getActiveDocument();
94
+ *
95
+ * // Insert a code block around the text "Snippet" in a table cell with TypeScript language config.
96
+ * const table = fDocument.findTableByText('Snippet');
97
+ * const range = table?.getCell(1, 0)?.getContentRange();
98
+ * const code = range ? fDocument.insertCode({ ...range, config: { language: 'typescript' } }) : null;
99
+ * console.log(code);
100
+ *
101
+ * // Insert a code block around the text "const" and the next three paragraphs with TypeScript language config.
102
+ * // const cell = {
103
+ * // width: 960,
104
+ * // blocks: ['code', 'callout', 'quote']
105
+ * // };
106
+ * const paragraph = fDocument.findParagraphByText('const');
107
+ * if (paragraph) {
108
+ * const paragraphs = fDocument.getParagraphs();
109
+ * const { paragraphIndex, startOffset } = paragraph.getInfo();
110
+ * const { endOffset } = paragraphs[paragraphIndex + 3].getInfo();
111
+ * const code2 = fDocument.insertCode({ startOffset, endOffset, config: { language: 'typescript' } });
112
+ * console.log(code2);
113
+ * }
114
+ * ```
115
+ */
116
+ insertCode(options?: IDocsCodeInsertFacadeOptions): FDocumentCode | null;
117
+ }
118
+ export declare class FDocumentCodeMixin extends FDocument implements IFDocumentCodeMixin {
119
+ getCodes(): FDocumentCode[];
120
+ getCode(blockId: string): FDocumentCode | null;
121
+ getCodeAt(offset: number): FDocumentCode | null;
122
+ findCodeByText(text: string): FDocumentCode | null;
123
+ findCodes(query: string | IDocsCodeFindQuery): FDocumentCode[];
124
+ insertCode(paragraph: FDocumentParagraph, options?: IDocsCodeInsertParagraphFacadeOptions): FDocumentCode | null;
125
+ insertCode(options?: IDocsCodeInsertFacadeOptions): FDocumentCode | null;
126
+ private _getBlockRanges;
127
+ private _createFDocumentCode;
128
+ }
129
+ declare module '@univerjs/docs/facade' {
130
+ interface FDocument extends IFDocumentCodeMixin {
131
+ }
132
+ }
@@ -0,0 +1,3 @@
1
+ import './f-document';
2
+ export { FDocumentCode } from './f-document-code';
3
+ export * from './types';
@@ -0,0 +1,26 @@
1
+ import type { IDocsCodeConfig } from '@univerjs-pro/docs-code';
2
+ import type { DocumentBlockRangeType } from '@univerjs/core';
3
+ export interface IDocsCodeInsertFacadeOptions {
4
+ blockId?: string;
5
+ startOffset?: number;
6
+ endOffset?: number;
7
+ config?: Partial<IDocsCodeConfig>;
8
+ }
9
+ export type IDocsCodeInsertParagraphFacadeOptions = Omit<IDocsCodeInsertFacadeOptions, 'startOffset' | 'endOffset'>;
10
+ export interface IDocsCodeUpdateFacadeOptions {
11
+ config: Partial<IDocsCodeConfig>;
12
+ }
13
+ export interface IDocsCodeFindQuery {
14
+ blockId?: string;
15
+ text?: string;
16
+ }
17
+ export interface IDocsCodeRange {
18
+ blockId: string;
19
+ startIndex: number;
20
+ endIndex: number;
21
+ }
22
+ export interface IDocsCodeInfo extends IDocsCodeRange {
23
+ config?: IDocsCodeConfig;
24
+ type: DocumentBlockRangeType.CODE;
25
+ text: string;
26
+ }
@@ -0,0 +1,8 @@
1
+ export { DocsCodeCancelEmptyParagraphCommand, DocsCodeConsumeBoundaryDeleteCommand, DocsCodeInsertBelowCommand, DocsCodeInsertCommand, DocsCodeRemoveCommand, DocsCodeUnwrapCommand, DocsCodeUpdateCommand, } from './commands/code.command';
2
+ export type { IDocsCodeInsertCommandParams, IDocsCodeRemoveCommandParams, IDocsCodeUnwrapCommandParams, IDocsCodeUpdateCommandParams, } from './commands/code.command';
3
+ export { buildCancelEmptyCodeParagraphActions, isCodeBoundaryDelete, } from './common/actions';
4
+ export { DOCS_CODE_PLUGIN } from './common/const';
5
+ export { normalizeDocsCodeConfig } from './common/metadata';
6
+ export type { IDocsCodeConfig } from './common/type';
7
+ export { DocsCodeModel } from './models/docs-code-model';
8
+ export { UniverDocsCodePlugin } from './plugin';
@@ -0,0 +1,18 @@
1
+ import type { IDocsCodeConfig, IDocsCodeMetadataResource } from '../common/type';
2
+ import { Disposable } from '@univerjs/core';
3
+ export declare class DocsCodeModel extends Disposable {
4
+ private readonly _resources;
5
+ private readonly _change$;
6
+ readonly change$: import("rxjs").Observable<{
7
+ unitId: string;
8
+ blockId?: string;
9
+ }>;
10
+ getCodeConfig(unitId: string, blockId: string): IDocsCodeConfig | undefined;
11
+ setCodeConfig(unitId: string, blockId: string, config: Partial<IDocsCodeConfig>): void;
12
+ removeCode(unitId: string, blockId: string): void;
13
+ serialize(unitId: string): IDocsCodeMetadataResource;
14
+ deserialize(unitId: string, resource: IDocsCodeMetadataResource): void;
15
+ removeUnit(unitId: string): void;
16
+ dispose(): void;
17
+ private _setResource;
18
+ }
@@ -0,0 +1,14 @@
1
+ import type { IUniverDocsCodeConfig } from './config/config';
2
+ import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
3
+ export declare class UniverDocsCodePlugin extends Plugin {
4
+ private readonly _config;
5
+ readonly _injector: Injector;
6
+ private readonly _commandService;
7
+ private readonly _configService;
8
+ static pluginName: string;
9
+ static packageName: string;
10
+ static version: string;
11
+ static type: UniverInstanceType;
12
+ constructor(_config: IUniverDocsCodeConfig | undefined, _injector: Injector, _commandService: ICommandService, _configService: IConfigService);
13
+ onStarting(): void;
14
+ }
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x40fe(_0x31a7be,_0xa8a1fb){_0x31a7be=_0x31a7be-0xd2;var _0x4b8e71=_0x4b8e();var _0x40fe53=_0x4b8e71[_0x31a7be];return _0x40fe53;}(function(_0xcf6637,_0x1f20f6){var _0xec8620=_0x40fe,_0x6dd1ed=_0xcf6637();while(!![]){try{var _0x371a11=-parseInt(_0xec8620(0x126))/0x1+parseInt(_0xec8620(0x122))/0x2*(-parseInt(_0xec8620(0x112))/0x3)+parseInt(_0xec8620(0xe0))/0x4*(-parseInt(_0xec8620(0xe9))/0x5)+parseInt(_0xec8620(0x107))/0x6*(parseInt(_0xec8620(0xe2))/0x7)+parseInt(_0xec8620(0x11a))/0x8+parseInt(_0xec8620(0xeb))/0x9+-parseInt(_0xec8620(0x10d))/0xa*(-parseInt(_0xec8620(0xd9))/0xb);if(_0x371a11===_0x1f20f6)break;else _0x6dd1ed['push'](_0x6dd1ed['shift']());}catch(_0x460236){_0x6dd1ed['push'](_0x6dd1ed['shift']());}}}(_0x4b8e,0x6aa4f),function(_0x5deb3d,_0x1b69c3){var _0xa01e70=_0x40fe;typeof exports==_0xa01e70(0x125)&&typeof module<'u'?_0x1b69c3(exports,require('@univerjs-pro/docs-code'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define==_0xa01e70(0x115)&&define[_0xa01e70(0x11b)]?define(['exports',_0xa01e70(0xf5),_0xa01e70(0xfb),'@univerjs/docs/facade'],_0x1b69c3):(_0x5deb3d=typeof globalThis<'u'?globalThis:_0x5deb3d||self,_0x1b69c3(_0x5deb3d[_0xa01e70(0xdf)]={},_0x5deb3d[_0xa01e70(0x10a)],_0x5deb3d[_0xa01e70(0x119)],_0x5deb3d[_0xa01e70(0x129)]));}(this,function(_0x19d192,_0x4f669a,_0x527875,_0xa8265){var _0x301038=_0x40fe;Object['defineProperty'](_0x19d192,Symbol[_0x301038(0xf9)],{'value':_0x301038(0xdd)});function _0x15cd94(_0x4498fc){'@babel/helpers - typeof';var _0x3f40aa=_0x301038;return _0x15cd94=typeof Symbol=='function'&&typeof Symbol[_0x3f40aa(0xe7)]==_0x3f40aa(0x102)?function(_0x10cf33){return typeof _0x10cf33;}:function(_0x1fc013){var _0x30b1ca=_0x3f40aa;return _0x1fc013&&typeof Symbol==_0x30b1ca(0x115)&&_0x1fc013['constructor']===Symbol&&_0x1fc013!==Symbol['prototype']?_0x30b1ca(0x102):typeof _0x1fc013;},_0x15cd94(_0x4498fc);}function _0x29fc15(_0x5e4d5a,_0x1873ec){var _0x26f84f=_0x301038;if(_0x15cd94(_0x5e4d5a)!=_0x26f84f(0x125)||!_0x5e4d5a)return _0x5e4d5a;var _0x585512=_0x5e4d5a[Symbol[_0x26f84f(0x11c)]];if(_0x585512!==void 0x0){var _0x17dab2=_0x585512[_0x26f84f(0xe4)](_0x5e4d5a,_0x1873ec||_0x26f84f(0xfe));if(_0x15cd94(_0x17dab2)!='object')return _0x17dab2;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x1873ec===_0x26f84f(0x111)?String:Number)(_0x5e4d5a);}function _0x4ff01e(_0x16dea8){var _0x595cfa=_0x301038,_0x353cf7=_0x29fc15(_0x16dea8,_0x595cfa(0x111));return _0x15cd94(_0x353cf7)==_0x595cfa(0x102)?_0x353cf7:_0x353cf7+'';}function _0x117428(_0x26f437,_0x40e998,_0x49a092){var _0x1cfddc=_0x301038;return(_0x40e998=_0x4ff01e(_0x40e998))in _0x26f437?Object[_0x1cfddc(0x10c)](_0x26f437,_0x40e998,{'value':_0x49a092,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x26f437[_0x40e998]=_0x49a092,_0x26f437;}function _0x2cdf04(_0x11a40d,_0x76f55b){return function(_0x545a48,_0x443c36){_0x76f55b(_0x545a48,_0x443c36,_0x11a40d);};}function _0x32c3f7(_0x2cafc0,_0x1c3c3e,_0x583f07,_0x40d7f8){var _0x357976=_0x301038,_0x46d473=arguments[_0x357976(0xf8)],_0x35cf91=_0x46d473<0x3?_0x1c3c3e:_0x40d7f8===null?_0x40d7f8=Object[_0x357976(0xd8)](_0x1c3c3e,_0x583f07):_0x40d7f8,_0x12ade6;if(typeof Reflect==_0x357976(0x125)&&typeof Reflect[_0x357976(0x10f)]==_0x357976(0x115))_0x35cf91=Reflect[_0x357976(0x10f)](_0x2cafc0,_0x1c3c3e,_0x583f07,_0x40d7f8);else{for(var _0x3c2be1=_0x2cafc0['length']-0x1;_0x3c2be1>=0x0;_0x3c2be1--)(_0x12ade6=_0x2cafc0[_0x3c2be1])&&(_0x35cf91=(_0x46d473<0x3?_0x12ade6(_0x35cf91):_0x46d473>0x3?_0x12ade6(_0x1c3c3e,_0x583f07,_0x35cf91):_0x12ade6(_0x1c3c3e,_0x583f07))||_0x35cf91);}return _0x46d473>0x3&&_0x35cf91&&Object[_0x357976(0x10c)](_0x1c3c3e,_0x583f07,_0x35cf91),_0x35cf91;}let _0x34672e=class{constructor(_0x5e4a8d,_0x48587e,_0x503a35){var _0x5db257=_0x301038;this['_document']=_0x5e4a8d,this['_blockId']=_0x48587e,this[_0x5db257(0x110)]=_0x503a35,_0x117428(this,'_unitId',void 0x0),this[_0x5db257(0xd3)]=this[_0x5db257(0x116)]['getId']();}[_0x301038(0xf2)](){var _0x54fcaf=_0x301038;return this[_0x54fcaf(0xe1)];}['getRange'](){var _0x4e4de5=_0x301038;let _0x4d252f=this[_0x4e4de5(0xde)]();return _0x4d252f?{'blockId':_0x4d252f[_0x4e4de5(0xd4)],'endIndex':_0x4d252f[_0x4e4de5(0xdb)],'startIndex':_0x4d252f[_0x4e4de5(0x128)]}:null;}[_0x301038(0x120)](){var _0xb0dc58=_0x301038,_0x3dfa3d;let _0x3f80b9=this[_0xb0dc58(0xde)](),_0x3b091f=(_0x3dfa3d=this[_0xb0dc58(0x100)]()[_0xb0dc58(0xe6)])==null?void 0x0:_0x3dfa3d[_0xb0dc58(0xd5)];return!_0x3f80b9||!_0x3b091f?'':_0x5a500e(_0x3b091f['slice'](_0x3f80b9['startIndex']+0x1,_0x3f80b9['endIndex']));}[_0x301038(0xf7)](){var _0x444af8=_0x301038;let _0x1b1c19=this[_0x444af8(0xd2)]();return _0x1b1c19?{..._0x1b1c19,'config':this[_0x444af8(0x105)](),'text':this[_0x444af8(0x120)](),'type':_0x527875['DocumentBlockRangeType'][_0x444af8(0xd6)]}:null;}[_0x301038(0x105)](){var _0x423cee=_0x301038;return(0x0,_0x4f669a[_0x423cee(0xec)])(this[_0x423cee(0x110)][_0x423cee(0x127)](_0x4f669a[_0x423cee(0x108)])[_0x423cee(0x123)](this[_0x423cee(0xd3)],this['_blockId']));}['updateConfig'](_0x558549){var _0x4e8b27=_0x301038;return this[_0x4e8b27(0x110)][_0x4e8b27(0x127)](_0x527875[_0x4e8b27(0x11d)])[_0x4e8b27(0xfd)](_0x4f669a[_0x4e8b27(0x109)]['id'],{'blockId':this['_blockId'],'config':_0x558549[_0x4e8b27(0x104)],'unitId':this[_0x4e8b27(0xd3)]});}[_0x301038(0xf6)](){var _0x25d2e2=_0x301038;return this['_injector']['get'](_0x527875[_0x25d2e2(0x11d)])[_0x25d2e2(0xfd)](_0x4f669a[_0x25d2e2(0xea)]['id'],{'blockId':this[_0x25d2e2(0xe1)],'unitId':this['_unitId']});}['remove'](){var _0x51d435=_0x301038;return this[_0x51d435(0x110)][_0x51d435(0x127)](_0x527875[_0x51d435(0x11d)])[_0x51d435(0xfd)](_0x4f669a[_0x51d435(0xf1)]['id'],{'blockId':this[_0x51d435(0xe1)],'unitId':this[_0x51d435(0xd3)]});}[_0x301038(0xde)](){var _0x2e3216=_0x301038,_0x458b6c;let _0x4b8a59=(_0x458b6c=this[_0x2e3216(0x100)]()['body'])==null||(_0x458b6c=_0x458b6c[_0x2e3216(0xe3)])==null?void 0x0:_0x458b6c[_0x2e3216(0x103)](_0x242f29=>_0x242f29['blockId']===this[_0x2e3216(0xe1)]&&_0x242f29[_0x2e3216(0xf4)]===_0x527875['DocumentBlockRangeType'][_0x2e3216(0xd6)]);return _0x4b8a59==null?null:_0x4b8a59;}[_0x301038(0x100)](){var _0x30a6aa=_0x301038;return this[_0x30a6aa(0x116)][_0x30a6aa(0x11e)]();}};_0x34672e=_0x32c3f7([_0x2cdf04(0x2,(0x0,_0x527875[_0x301038(0x10e)])(_0x527875['Injector']))],_0x34672e);function _0x5a500e(_0x15a1f7){var _0x45f2ea=_0x301038;return Array[_0x45f2ea(0xfc)](_0x15a1f7)[_0x45f2ea(0xff)](_0x61f782=>_0x61f782===_0x527875[_0x45f2ea(0x10b)][_0x45f2ea(0x121)]?'\x0a':_0x61f782)['filter'](_0x4be2e8=>_0x4be2e8!==_0x527875['DataStreamTreeTokenType']['BLOCK_START']&&_0x4be2e8!==_0x527875['DataStreamTreeTokenType'][_0x45f2ea(0xe8)]&&_0x4be2e8!==_0x527875['DataStreamTreeTokenType'][_0x45f2ea(0xfa)])[_0x45f2ea(0x117)]('')['replace'](/\n$/,'');}var _0x4e72bf=class extends _0xa8265[_0x301038(0xd7)]{[_0x301038(0x114)](){var _0xf93c86=_0x301038;return this[_0xf93c86(0xe5)]()['filter'](_0x1fc64b=>_0x1fc64b[_0xf93c86(0xf4)]===_0x527875['DocumentBlockRangeType'][_0xf93c86(0xd6)])[_0xf93c86(0xff)](_0x39e3e0=>this[_0xf93c86(0x118)](_0x39e3e0[_0xf93c86(0xd4)]));}[_0x301038(0x113)](_0xaa03b2){var _0x4deb20=_0x301038;return this[_0x4deb20(0xe5)]()['some'](_0x28fca4=>_0x28fca4[_0x4deb20(0xd4)]===_0xaa03b2&&_0x28fca4['blockType']===_0x527875[_0x4deb20(0x11f)][_0x4deb20(0xd6)])?this['_createFDocumentCode'](_0xaa03b2):null;}[_0x301038(0xed)](_0x2a35a7){var _0x3ba045=_0x301038;let _0x204388=this['_getBlockRanges']()[_0x3ba045(0x103)](_0x32f4c9=>_0x32f4c9[_0x3ba045(0xf4)]===_0x527875['DocumentBlockRangeType']['CODE']&&_0x32f4c9[_0x3ba045(0x128)]<=_0x2a35a7&&_0x2a35a7<=_0x32f4c9[_0x3ba045(0xdb)]);return _0x204388?this['_createFDocumentCode'](_0x204388['blockId']):null;}['findCodeByText'](_0x4f0e9e){var _0x528de4=_0x301038,_0x49f191;return(_0x49f191=this[_0x528de4(0xdc)](_0x4f0e9e)[0x0])==null?null:_0x49f191;}[_0x301038(0xdc)](_0x16fb30){var _0x577aa8=_0x301038;let _0x29058a=typeof _0x16fb30==_0x577aa8(0x111)?{'text':_0x16fb30}:_0x16fb30;return this[_0x577aa8(0x114)]()[_0x577aa8(0xda)](_0x408c9b=>!(_0x29058a['blockId']&&_0x408c9b[_0x577aa8(0xf2)]()!==_0x29058a[_0x577aa8(0xd4)]||_0x29058a[_0x577aa8(0x124)]&&!_0x408c9b[_0x577aa8(0x120)]()[_0x577aa8(0xef)](_0x29058a[_0x577aa8(0x124)])));}[_0x301038(0xee)](_0x197846={},_0x395326={}){var _0x66585=_0x301038,_0x596b71;let _0x3a4b16=this[_0x66585(0x110)]['get'](_0x527875[_0x66585(0x11d)]),_0x29789c=(0x0,_0xa8265['isParagraphFacade'])(_0x197846)?{..._0x395326,..._0x197846['getRange']()}:_0x197846,_0x2829ff=(_0x596b71=_0x29789c[_0x66585(0xd4)])==null?(0x0,_0x527875[_0x66585(0xf3)])(0x6):_0x596b71;return _0x3a4b16[_0x66585(0xfd)](_0x4f669a[_0x66585(0x101)]['id'],{..._0x29789c,'blockId':_0x2829ff,'unitId':this[_0x66585(0xf2)]()})?this['getCode'](_0x2829ff):null;}[_0x301038(0xe5)](){var _0x129703=_0x301038,_0x58ebef,_0x16402d;return(_0x58ebef=(_0x16402d=this['save']()['body'])==null?void 0x0:_0x16402d[_0x129703(0xe3)])==null?[]:_0x58ebef;}[_0x301038(0x118)](_0x33f411){var _0x3d2ffe=_0x301038;return this[_0x3d2ffe(0x110)][_0x3d2ffe(0x106)](_0x34672e,this,_0x33f411);}};_0xa8265['FDocument']['extend'](_0x4e72bf),Object['defineProperty'](_0x19d192,_0x301038(0xf0),{'enumerable':!0x0,'get':function(){return _0x34672e;}});}));function _0x4b8e(){var _0x100aec=['getRange','_unitId','blockId','dataStream','CODE','FDocument','getOwnPropertyDescriptor','5687NndxVE','filter','endIndex','findCodes','Module','_getBlockRange','UniverProDocsCodeFacade','168452sbYHpA','_blockId','289744tJMqSH','blockRanges','call','_getBlockRanges','body','iterator','BLOCK_END','95PrOPVV','DocsCodeUnwrapCommand','2890305PMyYiE','normalizeDocsCodeConfig','getCodeAt','insertCode','includes','FDocumentCode','DocsCodeRemoveCommand','getId','generateRandomId','blockType','@univerjs-pro/docs-code','unwrap','describe','length','toStringTag','SECTION_BREAK','@univerjs/core','from','syncExecuteCommand','default','map','_getDocumentData','DocsCodeInsertCommand','symbol','find','config','getConfig','createInstance','114syptmA','DocsCodeModel','DocsCodeUpdateCommand','UniverProDocsCode','DataStreamTreeTokenType','defineProperty','12910URzptL','Inject','decorate','_injector','string','3UfqtqK','getCode','getCodes','function','_document','join','_createFDocumentCode','UniverCore','2960248bvZSpH','amd','toPrimitive','ICommandService','save','DocumentBlockRangeType','getText','PARAGRAPH','1031404uXgPri','getCodeConfig','text','object','392407wzdHYk','get','startIndex','UniverDocsFacade'];_0x4b8e=function(){return _0x100aec;};return _0x4b8e();}
1
+ function _0x10a7(_0x264979,_0x58e68b){_0x264979=_0x264979-0x125;var _0x2bfc60=_0x2bfc();var _0x10a7c3=_0x2bfc60[_0x264979];return _0x10a7c3;}function _0x2bfc(){var _0x3d0cfa=['getId','_unitId','1197966LguXBD','text','10uesFbN','startIndex','_getBlockRange','amd','blockId','48060HqDSxK','20700IudsdK','join','DocsCodeInsertCommand','DocsCodeUnwrapCommand','_getBlockRanges','string','object','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','CODE','config','21bHzMxL','from','17958CYEllR','toStringTag','includes','find','defineProperty','_blockId','iterator','_getDocumentData','exports','1633509ehLCVI','get','describe','194794GSYIkD','getCodeConfig','Module','call','symbol','_createFDocumentCode','@univerjs/docs/facade','getCode','filter','decorate','endIndex','save','getCodeAt','BLOCK_START','syncExecuteCommand','unwrap','remove','_injector','blockType','function','length','replace','Inject','DocsCodeRemoveCommand','ICommandService','getText','DocumentBlockRangeType','191552VGQOMw','slice','DataStreamTreeTokenType','BLOCK_END','UniverCore','14Inacdu','body','prototype','@univerjs-pro/docs-code','map','isParagraphFacade','getCodes','_document','findCodes','getRange','PARAGRAPH','UniverProDocsCode','default','getOwnPropertyDescriptor','40uQRwIb','FDocument','blockRanges'];_0x2bfc=function(){return _0x3d0cfa;};return _0x2bfc();}(function(_0xf83460,_0x2b03d6){var _0x9cfe0f=_0x10a7,_0x47389b=_0xf83460();while(!![]){try{var _0x56e27a=parseInt(_0x9cfe0f(0x149))/0x1+-parseInt(_0x9cfe0f(0x131))/0x2*(-parseInt(_0x9cfe0f(0x13b))/0x3)+parseInt(_0x9cfe0f(0x177))/0x4*(-parseInt(_0x9cfe0f(0x130))/0x5)+-parseInt(_0x9cfe0f(0x13d))/0x6+-parseInt(_0x9cfe0f(0x169))/0x7*(parseInt(_0x9cfe0f(0x164))/0x8)+parseInt(_0x9cfe0f(0x146))/0x9*(parseInt(_0x9cfe0f(0x12b))/0xa)+-parseInt(_0x9cfe0f(0x129))/0xb;if(_0x56e27a===_0x2b03d6)break;else _0x47389b['push'](_0x47389b['shift']());}catch(_0x4e78db){_0x47389b['push'](_0x47389b['shift']());}}}(_0x2bfc,0x2f146),function(_0x3da630,_0x3fec1d){var _0x35b0ab=_0x10a7;typeof exports=='object'&&typeof module<'u'?_0x3fec1d(exports,require('@univerjs-pro/docs-code'),require('@univerjs/core'),require('@univerjs/docs/facade')):typeof define==_0x35b0ab(0x15c)&&define[_0x35b0ab(0x12e)]?define([_0x35b0ab(0x145),_0x35b0ab(0x16c),'@univerjs/core',_0x35b0ab(0x14f)],_0x3fec1d):(_0x3da630=typeof globalThis<'u'?globalThis:_0x3da630||self,_0x3fec1d(_0x3da630['UniverProDocsCodeFacade']={},_0x3da630[_0x35b0ab(0x174)],_0x3da630[_0x35b0ab(0x168)],_0x3da630['UniverDocsFacade']));}(this,function(_0x2c1b3a,_0x30e95e,_0x1b20fe,_0x47a7ad){var _0x2f2609=_0x10a7;Object[_0x2f2609(0x141)](_0x2c1b3a,Symbol[_0x2f2609(0x13e)],{'value':_0x2f2609(0x14b)});function _0x1b989d(_0x234904){'@babel/helpers - typeof';var _0x143c07=_0x2f2609;return _0x1b989d=typeof Symbol==_0x143c07(0x15c)&&typeof Symbol[_0x143c07(0x143)]==_0x143c07(0x14d)?function(_0x300946){return typeof _0x300946;}:function(_0x374bb7){var _0x1aa38d=_0x143c07;return _0x374bb7&&typeof Symbol==_0x1aa38d(0x15c)&&_0x374bb7['constructor']===Symbol&&_0x374bb7!==Symbol[_0x1aa38d(0x16b)]?'symbol':typeof _0x374bb7;},_0x1b989d(_0x234904);}function _0x2eb9a2(_0x378002,_0x48c49c){var _0x441f9b=_0x2f2609;if(_0x1b989d(_0x378002)!=_0x441f9b(0x137)||!_0x378002)return _0x378002;var _0x3a7dda=_0x378002[Symbol['toPrimitive']];if(_0x3a7dda!==void 0x0){var _0x27eb97=_0x3a7dda[_0x441f9b(0x14c)](_0x378002,_0x48c49c||_0x441f9b(0x175));if(_0x1b989d(_0x27eb97)!='object')return _0x27eb97;throw TypeError(_0x441f9b(0x138));}return(_0x48c49c===_0x441f9b(0x136)?String:Number)(_0x378002);}function _0x36f3c7(_0x137acc){var _0x4e35d6=_0x2f2609,_0x40935f=_0x2eb9a2(_0x137acc,_0x4e35d6(0x136));return _0x1b989d(_0x40935f)=='symbol'?_0x40935f:_0x40935f+'';}function _0x2b237c(_0x3f4039,_0x14b9c3,_0x60bd88){var _0x2b1c28=_0x2f2609;return(_0x14b9c3=_0x36f3c7(_0x14b9c3))in _0x3f4039?Object[_0x2b1c28(0x141)](_0x3f4039,_0x14b9c3,{'value':_0x60bd88,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3f4039[_0x14b9c3]=_0x60bd88,_0x3f4039;}function _0x50512e(_0x2f33f0,_0x38773c){return function(_0x373197,_0x261b49){_0x38773c(_0x373197,_0x261b49,_0x2f33f0);};}function _0x3c9db7(_0x5d0ed8,_0x191c7e,_0x557d23,_0x369b48){var _0x15a71a=_0x2f2609,_0x2edbab=arguments[_0x15a71a(0x15d)],_0x32efca=_0x2edbab<0x3?_0x191c7e:_0x369b48===null?_0x369b48=Object[_0x15a71a(0x176)](_0x191c7e,_0x557d23):_0x369b48,_0x110183;if(typeof Reflect==_0x15a71a(0x137)&&typeof Reflect['decorate']==_0x15a71a(0x15c))_0x32efca=Reflect[_0x15a71a(0x152)](_0x5d0ed8,_0x191c7e,_0x557d23,_0x369b48);else{for(var _0x1a949b=_0x5d0ed8['length']-0x1;_0x1a949b>=0x0;_0x1a949b--)(_0x110183=_0x5d0ed8[_0x1a949b])&&(_0x32efca=(_0x2edbab<0x3?_0x110183(_0x32efca):_0x2edbab>0x3?_0x110183(_0x191c7e,_0x557d23,_0x32efca):_0x110183(_0x191c7e,_0x557d23))||_0x32efca);}return _0x2edbab>0x3&&_0x32efca&&Object[_0x15a71a(0x141)](_0x191c7e,_0x557d23,_0x32efca),_0x32efca;}let _0x155004=class{constructor(_0x51a5c8,_0x1d1013,_0x13e186){var _0x4544aa=_0x2f2609;this[_0x4544aa(0x170)]=_0x51a5c8,this[_0x4544aa(0x142)]=_0x1d1013,this[_0x4544aa(0x15a)]=_0x13e186,_0x2b237c(this,_0x4544aa(0x128),void 0x0),this[_0x4544aa(0x128)]=this[_0x4544aa(0x170)]['getId']();}[_0x2f2609(0x127)](){var _0x2aa272=_0x2f2609;return this[_0x2aa272(0x142)];}[_0x2f2609(0x172)](){var _0x1a6b58=_0x2f2609;let _0x56b5ce=this[_0x1a6b58(0x12d)]();return _0x56b5ce?{'blockId':_0x56b5ce[_0x1a6b58(0x12f)],'endIndex':_0x56b5ce[_0x1a6b58(0x153)],'startIndex':_0x56b5ce[_0x1a6b58(0x12c)]}:null;}[_0x2f2609(0x162)](){var _0x416d77=_0x2f2609,_0xbbc743;let _0x4da3fa=this[_0x416d77(0x12d)](),_0x3ebc50=(_0xbbc743=this['_getDocumentData']()[_0x416d77(0x16a)])==null?void 0x0:_0xbbc743['dataStream'];return!_0x4da3fa||!_0x3ebc50?'':_0x57875d(_0x3ebc50[_0x416d77(0x165)](_0x4da3fa[_0x416d77(0x12c)]+0x1,_0x4da3fa[_0x416d77(0x153)]));}[_0x2f2609(0x148)](){var _0x12d191=_0x2f2609;let _0x2e2124=this[_0x12d191(0x172)]();return _0x2e2124?{..._0x2e2124,'config':this['getConfig'](),'text':this[_0x12d191(0x162)](),'type':_0x1b20fe[_0x12d191(0x163)][_0x12d191(0x139)]}:null;}['getConfig'](){var _0xc85822=_0x2f2609;return(0x0,_0x30e95e['normalizeDocsCodeConfig'])(this[_0xc85822(0x15a)][_0xc85822(0x147)](_0x30e95e['DocsCodeModel'])[_0xc85822(0x14a)](this[_0xc85822(0x128)],this[_0xc85822(0x142)]));}['updateConfig'](_0x49e1dd){var _0x303a23=_0x2f2609;return this['_injector'][_0x303a23(0x147)](_0x1b20fe['ICommandService'])[_0x303a23(0x157)](_0x30e95e['DocsCodeUpdateCommand']['id'],{'blockId':this[_0x303a23(0x142)],'config':_0x49e1dd[_0x303a23(0x13a)],'unitId':this[_0x303a23(0x128)]});}[_0x2f2609(0x158)](){var _0x43175a=_0x2f2609;return this[_0x43175a(0x15a)][_0x43175a(0x147)](_0x1b20fe[_0x43175a(0x161)])[_0x43175a(0x157)](_0x30e95e[_0x43175a(0x134)]['id'],{'blockId':this[_0x43175a(0x142)],'unitId':this[_0x43175a(0x128)]});}[_0x2f2609(0x159)](){var _0xc38de8=_0x2f2609;return this[_0xc38de8(0x15a)]['get'](_0x1b20fe[_0xc38de8(0x161)])[_0xc38de8(0x157)](_0x30e95e[_0xc38de8(0x160)]['id'],{'blockId':this[_0xc38de8(0x142)],'unitId':this[_0xc38de8(0x128)]});}[_0x2f2609(0x12d)](){var _0x4f8cb6=_0x2f2609,_0xc2d99c;let _0x270358=(_0xc2d99c=this['_getDocumentData']()[_0x4f8cb6(0x16a)])==null||(_0xc2d99c=_0xc2d99c[_0x4f8cb6(0x126)])==null?void 0x0:_0xc2d99c[_0x4f8cb6(0x140)](_0x3d8b54=>_0x3d8b54[_0x4f8cb6(0x12f)]===this[_0x4f8cb6(0x142)]&&_0x3d8b54[_0x4f8cb6(0x15b)]===_0x1b20fe[_0x4f8cb6(0x163)][_0x4f8cb6(0x139)]);return _0x270358==null?null:_0x270358;}[_0x2f2609(0x144)](){var _0x923951=_0x2f2609;return this[_0x923951(0x170)][_0x923951(0x154)]();}};_0x155004=_0x3c9db7([_0x50512e(0x2,(0x0,_0x1b20fe[_0x2f2609(0x15f)])(_0x1b20fe['Injector']))],_0x155004);function _0x57875d(_0x4bb6a5){var _0x443f02=_0x2f2609;return Array[_0x443f02(0x13c)](_0x4bb6a5)[_0x443f02(0x16d)](_0x2f32cf=>_0x2f32cf===_0x1b20fe[_0x443f02(0x166)][_0x443f02(0x173)]?'\x0a':_0x2f32cf)[_0x443f02(0x151)](_0x40845c=>_0x40845c!==_0x1b20fe[_0x443f02(0x166)][_0x443f02(0x156)]&&_0x40845c!==_0x1b20fe[_0x443f02(0x166)][_0x443f02(0x167)]&&_0x40845c!==_0x1b20fe[_0x443f02(0x166)]['SECTION_BREAK'])[_0x443f02(0x132)]('')[_0x443f02(0x15e)](/\n$/,'');}var _0x5b56d8=class extends _0x47a7ad[_0x2f2609(0x125)]{[_0x2f2609(0x16f)](){var _0x31390a=_0x2f2609;return this[_0x31390a(0x135)]()[_0x31390a(0x151)](_0x53b88a=>_0x53b88a[_0x31390a(0x15b)]===_0x1b20fe[_0x31390a(0x163)][_0x31390a(0x139)])[_0x31390a(0x16d)](_0x1373c3=>this[_0x31390a(0x14e)](_0x1373c3['blockId']));}[_0x2f2609(0x150)](_0x13012a){var _0x25aa1a=_0x2f2609;return this['_getBlockRanges']()['some'](_0x17ce42=>_0x17ce42[_0x25aa1a(0x12f)]===_0x13012a&&_0x17ce42[_0x25aa1a(0x15b)]===_0x1b20fe[_0x25aa1a(0x163)][_0x25aa1a(0x139)])?this[_0x25aa1a(0x14e)](_0x13012a):null;}[_0x2f2609(0x155)](_0x357d0b){var _0x47b344=_0x2f2609;let _0x73c95f=this[_0x47b344(0x135)]()['find'](_0x4654f9=>_0x4654f9[_0x47b344(0x15b)]===_0x1b20fe[_0x47b344(0x163)]['CODE']&&_0x4654f9['startIndex']<=_0x357d0b&&_0x357d0b<=_0x4654f9[_0x47b344(0x153)]);return _0x73c95f?this['_createFDocumentCode'](_0x73c95f[_0x47b344(0x12f)]):null;}['findCodeByText'](_0x204edd){var _0x2f08cb;return(_0x2f08cb=this['findCodes'](_0x204edd)[0x0])==null?null:_0x2f08cb;}[_0x2f2609(0x171)](_0x5b9d30){var _0x2897dd=_0x2f2609;let _0xcf7a4a=typeof _0x5b9d30==_0x2897dd(0x136)?{'text':_0x5b9d30}:_0x5b9d30;return this[_0x2897dd(0x16f)]()[_0x2897dd(0x151)](_0x1dad28=>!(_0xcf7a4a['blockId']&&_0x1dad28[_0x2897dd(0x127)]()!==_0xcf7a4a[_0x2897dd(0x12f)]||_0xcf7a4a['text']&&!_0x1dad28['getText']()[_0x2897dd(0x13f)](_0xcf7a4a[_0x2897dd(0x12a)])));}['insertCode'](_0x3dde7d={},_0x4b9309={}){var _0x4ae277=_0x2f2609,_0xc79b19;let _0x55feae=this[_0x4ae277(0x15a)][_0x4ae277(0x147)](_0x1b20fe[_0x4ae277(0x161)]),_0x3660d8=(0x0,_0x47a7ad[_0x4ae277(0x16e)])(_0x3dde7d)?{..._0x4b9309,..._0x3dde7d[_0x4ae277(0x172)]()}:_0x3dde7d,_0x27fb49=(_0xc79b19=_0x3660d8[_0x4ae277(0x12f)])==null?(0x0,_0x1b20fe['generateRandomId'])(0x6):_0xc79b19;return _0x55feae[_0x4ae277(0x157)](_0x30e95e[_0x4ae277(0x133)]['id'],{..._0x3660d8,'blockId':_0x27fb49,'unitId':this[_0x4ae277(0x127)]()})?this[_0x4ae277(0x150)](_0x27fb49):null;}[_0x2f2609(0x135)](){var _0x3de8c0=_0x2f2609,_0x17880a,_0x512f09;return(_0x17880a=(_0x512f09=this[_0x3de8c0(0x154)]()[_0x3de8c0(0x16a)])==null?void 0x0:_0x512f09[_0x3de8c0(0x126)])==null?[]:_0x17880a;}[_0x2f2609(0x14e)](_0x38c85f){var _0x51e9bf=_0x2f2609;return this[_0x51e9bf(0x15a)]['createInstance'](_0x155004,this,_0x38c85f);}};_0x47a7ad['FDocument']['extend'](_0x5b56d8),Object[_0x2f2609(0x141)](_0x2c1b3a,'FDocumentCode',{'enumerable':!0x0,'get':function(){return _0x155004;}});}));