hyperbook 0.49.4 → 0.50.1
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/dist/assets/directive-geogebra/client.js +37 -0
- package/dist/assets/directive-geogebra/style.css +1 -8
- package/dist/assets/directive-h5p/client.js +55 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-29.eot +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-29.svg +599 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-29.ttf +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-29.woff +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-29.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-30.eot +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-30.svg +123 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-30.ttf +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-30.woff +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-core-30.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-hub-publish.eot +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-hub-publish.svg +38 -0
- package/dist/assets/directive-h5p/fonts/h5p-hub-publish.ttf +0 -0
- package/dist/assets/directive-h5p/fonts/h5p-hub-publish.woff +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/LICENSE-2.0.txt +202 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-400-600-700-v28-cyrillic-ext.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-400-600-700-v28-cyrillic.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-400-600-700-v28-greek-ext.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-400-600-700-v28-greek.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-400-600-700-v28-hebrew.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-400-600-700-v28-latin-ext.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-400-600-700-v28-latin.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-400-600-700-v28-vietnamese.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-italic-400-600-700-v28-cyrillic-ext.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-italic-400-600-700-v28-cyrillic.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-italic-400-600-700-v28-greek-ext.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-italic-400-600-700-v28-greek.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-italic-400-600-700-v28-hebrew.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-italic-400-600-700-v28-latin-ext.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-italic-400-600-700-v28-latin.woff2 +0 -0
- package/dist/assets/directive-h5p/fonts/open-sans/opensans-italic-400-600-700-v28-vietnamese.woff2 +0 -0
- package/dist/assets/directive-h5p/frame.bundle.js +1 -0
- package/dist/assets/directive-h5p/frame.d.ts +0 -0
- package/dist/assets/directive-h5p/h5p-integration.d.ts +2 -0
- package/dist/assets/directive-h5p/h5p-standalone.d.ts +72 -0
- package/dist/assets/directive-h5p/h5p.d.ts +264 -0
- package/dist/assets/directive-h5p/images/h5p.svg +16 -0
- package/dist/assets/directive-h5p/images/throbber.gif +0 -0
- package/dist/assets/directive-h5p/index.d.ts +5 -0
- package/dist/assets/directive-h5p/main.bundle.js +1 -0
- package/dist/assets/directive-h5p/style.css +11 -0
- package/dist/assets/directive-h5p/styles/font-open-sans.css +494 -0
- package/dist/assets/directive-h5p/styles/h5p.css +995 -0
- package/dist/assets/directive-h5p/utils.d.ts +6 -0
- package/dist/assets/store.js +4 -2
- package/dist/index.js +13 -13
- package/package.json +4 -3
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* H5PIntegration Interface
|
|
3
|
+
*/
|
|
4
|
+
export interface H5PIntegration {
|
|
5
|
+
baseUrl?: string; //should not include a trailing slash
|
|
6
|
+
url: string; //should not include trailing slash
|
|
7
|
+
|
|
8
|
+
urlLibraries?: string; //url to override where to fetch content libraries
|
|
9
|
+
|
|
10
|
+
ajaxPath?: string; //deprecated - used only by older content types
|
|
11
|
+
|
|
12
|
+
user?: User; //provide only if user account is available - form part of xAPI actor
|
|
13
|
+
siteUrl?: string; //user site homepage on xAPI actor property. Used if user data is not provided.
|
|
14
|
+
|
|
15
|
+
reportingIsEnabled?: boolean; //Enable submit button on Interactive book https://github.com/h5p/h5p-interactive-book/blob/6373b8440b0ef5eaf25fe21cae8ad57e9f8d8a9e/src/scripts/app.js#L60
|
|
16
|
+
|
|
17
|
+
saveFreq?: false | number;
|
|
18
|
+
postUserStatistics?: boolean; //makes sense if user is available
|
|
19
|
+
ajax: {
|
|
20
|
+
/**
|
|
21
|
+
* endpoint where to post results on completion.
|
|
22
|
+
* postUserStatistics has to be true
|
|
23
|
+
*/
|
|
24
|
+
setFinished?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Endpoint to update,restore,or delete user state.
|
|
27
|
+
* H5P core provides placeholders which must start with full colon to work i.e
|
|
28
|
+
* :contentId; :dataType, and :subContentId
|
|
29
|
+
*
|
|
30
|
+
* example endpoint api/v1/h5p/content-user-data/:contentId/:dataType/:subContentId
|
|
31
|
+
*/
|
|
32
|
+
contentUserData?: string;
|
|
33
|
+
|
|
34
|
+
crossoriginCacheBuster?: boolean;
|
|
35
|
+
|
|
36
|
+
},
|
|
37
|
+
l10n: {
|
|
38
|
+
H5P: H5Pl10n
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
core?: { //required only when Embed Type = iframe
|
|
42
|
+
scripts: string[];
|
|
43
|
+
styles: string[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
loadedJs?: string[];//required only when Embed Type = div
|
|
47
|
+
loadedCss?: string[];
|
|
48
|
+
|
|
49
|
+
contents: { [key: `cid-${string}`]: H5PContent }
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface User {
|
|
53
|
+
name: string;
|
|
54
|
+
mail: string; //unique user email
|
|
55
|
+
id?: number;
|
|
56
|
+
canToggleViewOthersH5PContents?: 0 | 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface H5PContent {
|
|
60
|
+
title: string; //content title
|
|
61
|
+
url: string; //content URI (absolute + canonical) used to generate xAPI statement.object.id
|
|
62
|
+
|
|
63
|
+
contentUrl?: string; //storage path to override location of the content files
|
|
64
|
+
|
|
65
|
+
library: string; //main content library
|
|
66
|
+
fullScreen: boolean; //if to enable fullscreen button
|
|
67
|
+
jsonContent: string; //content start parameters as a JSON string (content.json)
|
|
68
|
+
scripts: string[]; // content libraries scripts
|
|
69
|
+
styles: string[]; //content libraries styles
|
|
70
|
+
displayOptions: H5PPlayerDisplayOptions;
|
|
71
|
+
exportUrl: string; //path to download the H5P
|
|
72
|
+
embedCode: string; //code to show on embed dialog
|
|
73
|
+
resizeCode?: string; // script to use for resize. h5p standalone already bundles one by default
|
|
74
|
+
|
|
75
|
+
contentUserData?: { [subContentId: string]: 'RESET' | { 'state': string } }[];/* user preloaded data where RESET: will delete previous user state, and state: exp*/
|
|
76
|
+
|
|
77
|
+
metadata?: { // any content metadata
|
|
78
|
+
title: string,
|
|
79
|
+
license: string
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface H5PPlayerDisplayOptions {
|
|
84
|
+
frame: boolean;
|
|
85
|
+
export: boolean;
|
|
86
|
+
embed: boolean;
|
|
87
|
+
copyright: boolean;
|
|
88
|
+
icon: boolean;
|
|
89
|
+
copy: boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface H5Pl10n {
|
|
93
|
+
|
|
94
|
+
//h5p-confirmation-dialog.js
|
|
95
|
+
confirmDialogHeader: string;
|
|
96
|
+
confirmDialogBody: string;
|
|
97
|
+
cancelLabel: string;
|
|
98
|
+
confirmLabel: string;
|
|
99
|
+
|
|
100
|
+
//h5-action-bar.js
|
|
101
|
+
reuse: string;
|
|
102
|
+
copyrights: string;
|
|
103
|
+
embed: string;
|
|
104
|
+
reuseDescription: string;
|
|
105
|
+
copyrightsDescription: string;
|
|
106
|
+
embedDescription: string;
|
|
107
|
+
h5pDescription: string;
|
|
108
|
+
|
|
109
|
+
//request-queue.js
|
|
110
|
+
offlineDialogHeader: string;
|
|
111
|
+
offlineDialogBody: string;
|
|
112
|
+
offlineDialogRetryMessage: string;
|
|
113
|
+
offlineDialogRetryButtonLabel: string;
|
|
114
|
+
offlineSuccessfulSubmit: string
|
|
115
|
+
|
|
116
|
+
//h5p.js
|
|
117
|
+
fullscreen: string;
|
|
118
|
+
disableFullscreen: string;
|
|
119
|
+
contentChanged: string;
|
|
120
|
+
startingOver: string;
|
|
121
|
+
copyrightInformation: string;
|
|
122
|
+
close: string;
|
|
123
|
+
reuseContent: string;
|
|
124
|
+
contentCopied: string;
|
|
125
|
+
hideAdvanced: string;
|
|
126
|
+
showAdvanced: string;
|
|
127
|
+
advancedHelp: string;
|
|
128
|
+
thumbnail: string;
|
|
129
|
+
contentType: string;
|
|
130
|
+
title: string;
|
|
131
|
+
author: string;
|
|
132
|
+
year: string;
|
|
133
|
+
source: string;
|
|
134
|
+
changes: string;
|
|
135
|
+
license: string;
|
|
136
|
+
licenseExtras: string;
|
|
137
|
+
licenseU: string;
|
|
138
|
+
licenseCCBY: string;
|
|
139
|
+
licenseCCBYSA: string;
|
|
140
|
+
licenseCCBYND: string;
|
|
141
|
+
licenseCCBYNC: string;
|
|
142
|
+
licenseCCBYNCSA: string;
|
|
143
|
+
licenseCCBYNCND: string;
|
|
144
|
+
licenseCC10: string;
|
|
145
|
+
licenseCC20: string;
|
|
146
|
+
licenseCC25: string;
|
|
147
|
+
licenseCC30: string;
|
|
148
|
+
licenseCC40: string;
|
|
149
|
+
licenseGPL: string;
|
|
150
|
+
licenseV1: string;
|
|
151
|
+
licenseV2: string;
|
|
152
|
+
licenseV3: string;
|
|
153
|
+
licenseC: string;
|
|
154
|
+
licenseCC010: string;
|
|
155
|
+
licensePD: string;
|
|
156
|
+
licensePDM: string;
|
|
157
|
+
|
|
158
|
+
//deprecated
|
|
159
|
+
download?: string;
|
|
160
|
+
downloadDescription?: string;
|
|
161
|
+
size?: string;
|
|
162
|
+
noCopyrights?: string;
|
|
163
|
+
by?: string;
|
|
164
|
+
showMore?: string;
|
|
165
|
+
showLess?: string;
|
|
166
|
+
subLevel?: string;
|
|
167
|
+
connectionLost?: string;
|
|
168
|
+
connectionReestablished?: string;
|
|
169
|
+
resubmitScores?: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* library.json interface
|
|
175
|
+
*/
|
|
176
|
+
interface H5PLibraryDefinition {
|
|
177
|
+
title: string; //textual human readable library name
|
|
178
|
+
machineName: string; //Include only characters, numbers, dashes, & periods. Start with character
|
|
179
|
+
majorVersion: number; //positive non-fractional integer
|
|
180
|
+
minorVersion: number; //Neutral or positive non-fractional integer
|
|
181
|
+
patchVersion: number; //Neutral or positive non-fractional integer. Update only on error fixes
|
|
182
|
+
runnable: 0 | 1; //1 if library can run alone
|
|
183
|
+
|
|
184
|
+
description?: string //textual description of the library
|
|
185
|
+
contentType?: 'Font' | 'Utility';
|
|
186
|
+
fullscreen?: 1; //enables integrated fullscreen button
|
|
187
|
+
license?: keyof License; //content licence
|
|
188
|
+
author?: string;
|
|
189
|
+
embedTypes?: ['iframe' | 'div']; //possible ways to embed the package in the page
|
|
190
|
+
coreApi?: { //required core API version
|
|
191
|
+
majorVersion: number; //defaults to 1
|
|
192
|
+
minorVersion: number; //defaults to 0
|
|
193
|
+
};
|
|
194
|
+
preloadedCss?: { path: string }[];//paths (relative to root folder) to required CSS files
|
|
195
|
+
preloadedJs?: { path: string }[]; //paths (relative to root folder) to required JS files
|
|
196
|
+
preloadedDependencies?: LibraryDependency[]; //required libraries for it to work
|
|
197
|
+
dynamicDependencies?: LibraryDependency[]; //libs that may be loaded dynamically during execution
|
|
198
|
+
editorDependencies?: LibraryDependency[];
|
|
199
|
+
metadataSettings?: {
|
|
200
|
+
disable?: 0 | 1; //disable metadata completely
|
|
201
|
+
disableExtraTitleField?: 1 | 0 //hide title field from contenty type form
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* h5p.json interface
|
|
207
|
+
*/
|
|
208
|
+
interface H5PPackageDefinition {
|
|
209
|
+
title: string;
|
|
210
|
+
language: string; // ISO-639-1
|
|
211
|
+
mainLibrary: string; //without version
|
|
212
|
+
embedTypes: ['div'] | ['iframe'] | ['div', 'iframe'];
|
|
213
|
+
preloadedDependencies: LibraryDependency[];
|
|
214
|
+
license?: keyof License;
|
|
215
|
+
authors?: { name: string, role: 'Author' | 'Editor' | 'Licensee' | 'Originator' }[];
|
|
216
|
+
source?: string; //source url of the licensed material
|
|
217
|
+
licenseVersion?: keyof LicenseVersion;
|
|
218
|
+
licenseExtras?: string; //any additional license info
|
|
219
|
+
yearFrom?: string; //license valid since
|
|
220
|
+
yearTo?: string; // license valid end year
|
|
221
|
+
changes?: { [key: string]: string }[]; //changelog
|
|
222
|
+
authorComments?: string; //comments for the editor
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
interface LibraryDependency {
|
|
226
|
+
machineName: string
|
|
227
|
+
minorVersion: number
|
|
228
|
+
majorVersion: number
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
interface License { //enum would have been better
|
|
232
|
+
'CC-BY': 'CC-BY',
|
|
233
|
+
'CC BY-SA': 'CC BY-SA',
|
|
234
|
+
'CC BY-ND': 'CC BY-ND',
|
|
235
|
+
'CC BY-NC': 'CC BY-NC',
|
|
236
|
+
'CC BY-NC-SA': 'CC BY-NC-SA',
|
|
237
|
+
'CC CC-BY-NC-CD': 'CC CC-BY-NC-CD',
|
|
238
|
+
'CC0 1.0': 'CC0 1.0',
|
|
239
|
+
'GNU GPL': 'GNU GPL',
|
|
240
|
+
'PD': 'PD',
|
|
241
|
+
'ODC PDDL': 'ODC PDDL',
|
|
242
|
+
'CC PDM': 'CC PDM',
|
|
243
|
+
'C': 'C',
|
|
244
|
+
'U': 'U'
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
interface LicenseVersion {
|
|
248
|
+
//CC
|
|
249
|
+
'1.0': '1.0',
|
|
250
|
+
'2.0': '2.0',
|
|
251
|
+
'2.5': '2.5', //number cannot be enum key 😔
|
|
252
|
+
'3.0': '3.0',
|
|
253
|
+
'4.0': '4.0',
|
|
254
|
+
|
|
255
|
+
//GNU GPL
|
|
256
|
+
'v1': 'v1',
|
|
257
|
+
'v2': 'v2',
|
|
258
|
+
'v3': 'v3',
|
|
259
|
+
|
|
260
|
+
//PD
|
|
261
|
+
'-': '-',
|
|
262
|
+
'CCO 1.0': 'CCO 1.0',
|
|
263
|
+
'CC PDM': 'CC PDM',
|
|
264
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
5
|
+
viewBox="0 0 345 150" enable-background="new 0 0 345 150" xml:space="preserve">
|
|
6
|
+
<g>
|
|
7
|
+
<path fill="#FFFFFF" d="M325.7,14.7C317.6,6.9,305.3,3,289,3h-43.5H234v31h-66l-5.4,22.2c4.5-2.1,10.9-4.2,15.3-5.3
|
|
8
|
+
c4.4-1.1,8.8-0.9,13.1-0.9c14.6,0,26.5,4.5,35.6,13.3c9.1,8.8,13.6,20,13.6,33.4c0,9.4-2.3,18.5-7,27.2c-4.7,8.7-11.3,15.4-19.9,20
|
|
9
|
+
c-3.1,1.6-6.5,3.1-10.2,4.1h42.4H259V95h25c18.2,0,31.7-4.2,40.6-12.5c8.9-8.3,13.3-19.9,13.3-34.6
|
|
10
|
+
C337.9,33.6,333.8,22.5,325.7,14.7z M288.7,60.6c-3.5,3-9.6,4.4-18.3,4.4H259V33h13.2c8.4,0,14.2,1.5,17.2,4.7
|
|
11
|
+
c3.1,3.2,4.6,6.9,4.6,11.5C294,53.9,292.2,57.6,288.7,60.6z"/>
|
|
12
|
+
<path fill="#FFFFFF" d="M176.5,76.3c-7.9,0-14.7,4.6-18,11.2L119,81.9L136.8,3h-23.6H101v62H51V3H7v145h44V95h50v53h12.2h42
|
|
13
|
+
c-6.7-2-12.5-4.6-17.2-8.1c-4.8-3.6-8.7-7.7-11.7-12.3c-3-4.6-5.3-9.7-7.3-16.5l39.6-5.7c3.3,6.6,10.1,11.1,17.9,11.1
|
|
14
|
+
c11.1,0,20.1-9,20.1-20.1S187.5,76.3,176.5,76.3z"/>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["h5p-standalone"]=n():e.H5PStandalone=n()}(self,(()=>(()=>{var e={633:e=>{function n(e,n){var t=e.length,r=new Array(t),o={},i=t,a=function(e){for(var n=new Map,t=0,r=e.length;t<r;t++){var o=e[t];n.has(o[0])||n.set(o[0],new Set),n.has(o[1])||n.set(o[1],new Set),n.get(o[0]).add(o[1])}return n}(n),s=function(e){for(var n=new Map,t=0,r=e.length;t<r;t++)n.set(e[t],t);return n}(e);for(n.forEach((function(e){if(!s.has(e[0])||!s.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));i--;)o[i]||c(e[i],i,new Set);return r;function c(e,n,i){if(i.has(e)){var l;try{l=", node was:"+JSON.stringify(e)}catch(e){l=""}throw new Error("Cyclic dependency"+l)}if(!s.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!o[n]){o[n]=!0;var u=a.get(e)||new Set;if(n=(u=Array.from(u)).length){i.add(e);do{var d=u[--n];c(d,s.get(d),i)}while(n);i.delete(e)}r[--t]=e}}}e.exports=function(e){return n(function(e){for(var n=new Set,t=0,r=e.length;t<r;t++){var o=e[t];n.add(o[0]),n.add(o[1])}return Array.from(n)}(e),e)},e.exports.array=n}},n={};function t(r){var o=n[r];if(void 0!==o)return o.exports;var i=n[r]={exports:{}};return e[r](i,i.exports,t),i.exports}t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var r={};return(()=>{"use strict";t.d(r,{default:()=>m});var e=function(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,s)}c((r=r.apply(e,n||[])).next())}))},n=function(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=n.call(e,a)}catch(e){s=[6,e],r=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}};function o(e){if((e=e.trim()).match(/^(https?:\/\/)?([a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*|localhost)(:\d{1,5})?(\/[^\s]*)?$/i))return e;if(e.startsWith("//"))return window.location.protocol+e;if(e.startsWith("/"))return window.location.origin+e;var n="".concat(window.location.protocol,"//").concat(window.location.host);return window.location.pathname.indexOf("/")>-1?n+=window.location.pathname.split("/").slice(0,-1).join("/"):n+=window.location.pathname,"".concat(n,"/").concat(e)}function i(t,r){return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return r||(r={credentials:"same-origin"}),[4,fetch(t,r)];case 1:return[2,e.sent().json()]}}))}))}function a(t,r){return e(this,void 0,void 0,(function(){var e,o,i,a;return n(this,(function(n){switch(n.label){case 0:for(e=t.getElementsByTagName("script"),o=[],i=0;i<e.length;i++)e[i].dataset.h5p&&o.push(e[i]);return a=[],r.forEach((function(e){if(!o.some((function(n){return n.dataset.h5p===e}))){var n=document.createElement("script");n.src=e,n.async=!1,n.defer=!1,n.dataset.h5p=e;var r=new Promise((function(e){n.onload=e}));t.append(n),a.push(r)}})),[4,Promise.all(a)];case 1:return n.sent(),[2]}}))}))}function s(e,n){for(var t=e.getElementsByTagName("link"),r=[],o=0;o<t.length;o++)t[o].dataset.h5p&&r.push(t[o]);n.forEach((function(n){if(!r.some((function(e){return e.dataset.h5p===n}))){var t=document.createElement("link");t.href=n,t.dataset.h5p=n,t.rel="stylesheet",t.type="text/css",e.append(t)}}))}function c(e){return e instanceof Object&&!Array.isArray(e)}function l(e){for(var n,t,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(!r.length)return e;var i=r.shift();if(c(e)&&c(i))for(var a in i)c(i[a])?(e[a]||Object.assign(e,((n={})[a]={},n)),l(e[a],i[a])):Object.assign(e,((t={})[a]=i[a],t));return l.apply(void 0,function(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}([e],r,!1))}function u(e,n){return n.filter((function(n){return e.indexOf(n)<0})).concat(e)}var d=function(e,n,t,r){return new(t||(t=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(a,s)}c((r=r.apply(e,n||[])).next())}))},p=function(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(t=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=n.call(e,a)}catch(e){s=[6,e],r=0}finally{t=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},f=t(633),h=function(){function e(e,n){var t=this;this.libraryFolderContainsVersion=!0;var r=n.id||Math.random().toString(36).substr(2,9);return this.prepareH5PEnvironment(r,n).then((function(o){window.H5P||(window.H5P={}),window.H5P.preventInit=!0;var i=n.embedType?n.embedType:"iframe";return t.renderPlayerFrame({anchorElement:e,contentId:r,embedType:i,H5PIntegration:o}).then((function(){return(void 0===n.preventH5PInit||n.preventH5PInit)&&("function"==typeof window.H5P.init&&window.H5P.init(),window.H5P.preventInit=!1),r}))}))}return e.prototype.renderPlayerFrame=function(e){return d(this,void 0,void 0,(function(){var n,t,r,o,i,c;return p(this,(function(l){switch(l.label){case 0:if(!(e.anchorElement instanceof HTMLElement))throw new Error("createH5P must be passed an element");return"iframe"!==e.embedType?[3,2]:((t=document.createElement("div")).classList.add("h5p-iframe-wrapper"),t.style.backgroundColor="#DDD;",(n=document.createElement("iframe")).id="h5p-iframe-".concat(e.contentId),n.src="about:blank",n.classList.add("h5p-iframe"),n.setAttribute("scrolling","no"),n.setAttribute("data-content-id",e.contentId),n.setAttribute("frameBorder","0"),n.style.width="100%",n.style.height="100%",n.style.border="none",n.style.display="block",t.append(n),e.anchorElement.append(t),s(document.head||document.body||e.anchorElement,e.H5PIntegration.core.styles),[4,a(n,e.H5PIntegration.core.scripts)]);case 1:return l.sent(),[3,4];case 2:return(t=document.createElement("div")).classList.add("h5p-iframe"),(r=document.createElement("div")).classList.add("h5p-content"),r.setAttribute("data-content-id",e.contentId),t.append(r),e.anchorElement.append(t),o=document.head||document.body||e.anchorElement,i=(e.H5PIntegration.core.styles||[]).concat(e.H5PIntegration.contents["cid-".concat(e.contentId)].styles),s(o,i),c=(e.H5PIntegration.core.scripts||[]).concat(e.H5PIntegration.contents["cid-".concat(e.contentId)].scripts),[4,a(o,c)];case 3:l.sent(),l.label=4;case 4:return[2]}}))}))},e.prototype.prepareH5PEnvironment=function(e,n){var t,r;return d(this,void 0,void 0,(function(){var a,s,c,d,f,h,m,y,b,v,w,g,C,P,D,F,N;return p(this,(function(p){switch(p.label){case 0:return a=this.getH5PPaths(n),s=a.h5pJsonPath,c=a.contentJsonPath,d=a.librariesPath,[4,i("".concat(s,"/h5p.json"),null==n?void 0:n.assetsRequestFetchOptions)];case 1:return f=p.sent(),h=this,[4,this.libraryFolderNameIncludesVersion(d,f.preloadedDependencies[0],null==n?void 0:n.assetsRequestFetchOptions)];case 2:return h.libraryFolderContainsVersion=p.sent(),[4,i("".concat(c,"/content.json"),null==n?void 0:n.assetsRequestFetchOptions)];case 3:return m=p.sent(),[4,this.findMainLibrary(f,d,null==n?void 0:n.assetsRequestFetchOptions)];case 4:return y=p.sent(),[4,this.findAllDependencies(f,d,null==n?void 0:n.assetsRequestFetchOptions)];case 5:return b=p.sent(),v=this.sortDependencies(b,d),w=v.styles,g=v.scripts,C={baseUrl:window.location.origin,url:"",contents:{},saveFreq:!1,postUserStatistics:!1,ajax:{},l10n:{H5P:{fullscreen:"Fullscreen",disableFullscreen:"Disable fullscreen",download:"Download",copyrights:"Rights of use",embed:"Embed",size:"Size",showAdvanced:"Show advanced",hideAdvanced:"Hide advanced",advancedHelp:"Include this script on your website if you want dynamic sizing of the embedded content:",copyrightInformation:"Rights of use",close:"Close",title:"Title",author:"Author",year:"Year",source:"Source",license:"License",thumbnail:"Thumbnail",noCopyrights:"No copyright information available for this content.",reuse:"Reuse",reuseContent:"Reuse Content",reuseDescription:"Reuse this content.",downloadDescription:"Download this content as a H5P file.",copyrightsDescription:"View copyright information for this content.",embedDescription:"View the embed code for this content.",h5pDescription:"Visit H5P.org to check out more cool content.",contentChanged:"This content has changed since you last used it.",startingOver:"You'll be starting over.",by:"by",showMore:"Show more",showLess:"Show less",subLevel:"Sublevel",confirmDialogHeader:"Confirm action",confirmDialogBody:"Please confirm that you wish to proceed. This action is not reversible.",cancelLabel:"Cancel",confirmLabel:"Confirm",licenseU:"Undisclosed",licenseCCBY:"Attribution",licenseCCBYSA:"Attribution-ShareAlike",licenseCCBYND:"Attribution-NoDerivs",licenseCCBYNC:"Attribution-NonCommercial",licenseCCBYNCSA:"Attribution-NonCommercial-ShareAlike",licenseCCBYNCND:"Attribution-NonCommercial-NoDerivs",licenseCC40:"4.0 International",licenseCC30:"3.0 Unported",licenseCC25:"2.5 Generic",licenseCC20:"2.0 Generic",licenseCC10:"1.0 Generic",licenseGPL:"General Public License",licenseV3:"Version 3",licenseV2:"Version 2",licenseV1:"Version 1",licensePD:"Public Domain",licenseCC010:"CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",licensePDM:"Public Domain Mark",licenseC:"Copyright",contentType:"Content Type",licenseExtras:"License Extras",changes:"Changelog",contentCopied:"Content is copied to the clipboard",connectionLost:"Connection lost. Results will be stored and sent when you regain connection.",connectionReestablished:"Connection reestablished.",resubmitScores:"Attempting to submit stored results.",offlineDialogHeader:"Your connection to the server was lost",offlineDialogBody:"We were unable to send information about your completion of this task. Please check your internet connection.",offlineDialogRetryMessage:"Retrying in :num....",offlineDialogRetryButtonLabel:"Retry now",offlineSuccessfulSubmit:"Successfully submitted results."}}},window&&window.H5PIntegration&&(C=l(C,window.H5PIntegration)),P=[o("./frame.bundle.js")],D=[o("./styles/h5p.css")],n.frameJs&&(P=[o(n.frameJs)]),n.frameCss&&(D=[o(n.frameCss)]),C.core?(C.core.styles=u(C.core.styles,D),C.core.scripts=u(C.core.scripts,P)):C.core={styles:D,scripts:P},C.url=e,C.urlLibraries=d,C.postUserStatistics=!!n.postUserStatistics,C.reportingIsEnabled=!!n.reportingIsEnabled,n.saveFreq&&"number"==typeof n.saveFreq&&(C.saveFreq=n.saveFreq),n.user&&(C.user=n.user),(null===(t=n.ajax)||void 0===t?void 0:t.contentUserDataUrl)&&(C.ajax.contentUserData=n.ajax.contentUserDataUrl),(null===(r=n.ajax)||void 0===r?void 0:r.setFinishedUrl)&&(C.ajax.setFinished=n.ajax.setFinishedUrl),n.translations&&(C.l10n=l(C.l10n,n.translations)),n.customCss&&"string"==typeof n.customCss&&(n.customCss=[n.customCss]),n.customJs&&"string"==typeof n.customJs&&(n.customJs=[n.customJs]),w=w.concat((n.customCss||[]).map((function(e){return o(e)}))),g=g.concat((n.customJs||[]).map((function(e){return o(e)}))),F={copyright:!!n.copyright,embed:!!n.embed,export:!!n.export,frame:!!n.frame,icon:!!n.icon,copy:!!n.copy},N="".concat(y.machineName," "),y.majorVersion&&(N+=y.majorVersion),y.minorVersion&&(N+=".".concat(y.minorVersion)),C.contents||(C.contents={}),(null==n?void 0:n.metadata)||(n.metadata={title:n.title?n.title:"",license:"U"}),C.contents["cid-".concat(e)]={library:N,title:n.title?n.title:"",url:s,contentUrl:c,jsonContent:JSON.stringify(m),styles:w,scripts:g,fullScreen:!!n.fullScreen,exportUrl:n.downloadUrl?o(n.downloadUrl):void 0,embedCode:n.embedCode?n.embedCode:"",resizeCode:n.resizeCode?n.resizeCode:"",displayOptions:F,contentUserData:n.contentUserData,metadata:n.metadata},n.xAPIObjectIRI&&(C.contents["cid-".concat(e)].url=n.xAPIObjectIRI),window.H5PIntegration=C,[2,C]}}))}))},e.prototype.getH5PPaths=function(e){var n=o("workspace");e.h5pJsonPath&&(n=o(e.h5pJsonPath));var t="".concat(n,"/content");e.contentJsonPath&&(t=o(e.contentJsonPath));var r=n;return e.librariesPath&&(r=o(e.librariesPath)),{h5pJsonPath:n,contentJsonPath:t,librariesPath:r}},e.prototype.libraryFolderNameIncludesVersion=function(e,n,t){return d(this,void 0,void 0,(function(){var r,o;return p(this,(function(a){switch(a.label){case 0:r=this.libraryToFolderName(n),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,i("".concat(e,"/").concat(r,"/library.json"),t)];case 2:return a.sent(),o=!0,[3,4];case 3:return a.sent(),o=!1,[3,4];case 4:return[2,o]}}))}))},e.prototype.libraryToFolderName=function(e){var n=e.machineName;return this.libraryFolderContainsVersion&&(void 0!==e.majorVersion&&(n+="-".concat(e.majorVersion)),void 0!==e.minorVersion&&(n+=".".concat(e.minorVersion))),n},e.prototype.findMainLibrary=function(e,n,t){return d(this,void 0,void 0,(function(){var r,o;return p(this,(function(a){return r=e.preloadedDependencies.find((function(n){return n.machineName===e.mainLibrary})),o=this.libraryToFolderName(r),[2,i("".concat(n,"/").concat(o,"/library.json"),t)]}))}))},e.prototype.findAllDependencies=function(e,n,t){return d(this,void 0,void 0,(function(){var r,o=this;return p(this,(function(i){return r=e.preloadedDependencies.map((function(e){return o.libraryToFolderName(e)})),[2,this.loadDependencies(r,[],n,t)]}))}))},e.prototype.loadDependencies=function(e,n,t,r){return d(this,void 0,void 0,(function(){var o,i,a,s,c=this;return p(this,(function(l){switch(l.label){case 0:return o=n,i=[],a=e.map((function(e){return c.findLibraryDependencies(e,t,r)})),[4,Promise.all(a)];case 1:return(s=l.sent()).forEach((function(e){o.push(e),e.dependencies.forEach((function(e){var n=o.find((function(n){return n.libraryFolderName===e})),t=s.find((function(n){return n.libraryFolderName===e}));n||t||i.push(e)}))})),i.length>0?[2,this.loadDependencies(i,o,t,r)]:[2,o]}}))}))},e.prototype.findLibraryDependencies=function(e,n,t){return d(this,void 0,void 0,(function(){var r,o,a=this;return p(this,(function(s){switch(s.label){case 0:return[4,i("".concat(n,"/").concat(e,"/library.json"),t)];case 1:return r=s.sent(),o=[],r.preloadedDependencies&&(o=r.preloadedDependencies.map((function(e){return a.libraryToFolderName(e)}))),[2,{libraryFolderName:e,dependencies:o,preloadedCss:r.preloadedCss,preloadedJs:r.preloadedJs}]}}))}))},e.prototype.sortDependencies=function(e,n){var t=[],r={},o={};e.forEach((function(e){0===e.dependencies.length&&t.push([e.libraryFolderName]),e.dependencies.forEach((function(n){t.push([e.libraryFolderName,n])})),e.preloadedCss&&(r[e.libraryFolderName]=[],r[e.libraryFolderName]&&(r[e.libraryFolderName]=r[e.libraryFolderName]),e.preloadedCss.forEach((function(t){var o="".concat(n,"/").concat(e.libraryFolderName,"/").concat(t.path);r[e.libraryFolderName].push(o)}))),e.preloadedJs&&(o[e.libraryFolderName]=[],o[e.libraryFolderName]&&(o[e.libraryFolderName]=o[e.libraryFolderName]),e.preloadedJs.forEach((function(t){var r="".concat(n,"/").concat(e.libraryFolderName,"/").concat(t.path);o[e.libraryFolderName].push(r)})))}));var i=[],a=[];return f(t).reverse().forEach((function(e){Array.prototype.push.apply(i,r[e]),Array.prototype.push.apply(a,o[e])})),{styles:i,scripts:a}},e}();h.EventDispatcher=function(){};const m={H5P:h}})(),r.default})()));
|