@coorpacademy/player-web 4.22.5 → 4.22.7

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.
Files changed (157) hide show
  1. package/package.json +3 -4
  2. package/es/map-state-to-props/test/answer.js +0 -391
  3. package/es/map-state-to-props/test/answer.js.map +0 -1
  4. package/es/map-state-to-props/test/fixtures/player/clue.json +0 -131
  5. package/es/map-state-to-props/test/fixtures/player/loading-clue.json +0 -131
  6. package/es/map-state-to-props/test/fixtures/player/no-clue.json +0 -118
  7. package/es/map-state-to-props/test/fixtures/player/slide-no-lessons.json +0 -115
  8. package/es/map-state-to-props/test/fixtures/player/slide.json +0 -127
  9. package/es/map-state-to-props/test/fixtures/popin-correction/popin-extra-life.json +0 -139
  10. package/es/map-state-to-props/test/fixtures/popin-correction/popin-failure.json +0 -145
  11. package/es/map-state-to-props/test/fixtures/popin-correction/popin-next-level.json +0 -282
  12. package/es/map-state-to-props/test/fixtures/popin-correction/popin-revival.json +0 -140
  13. package/es/map-state-to-props/test/fixtures/popin-correction/popin-success-node.json +0 -154
  14. package/es/map-state-to-props/test/fixtures/popin-correction/popin-success.json +0 -268
  15. package/es/map-state-to-props/test/fixtures/popin-correction/state-fail-multiple-answers.json +0 -473
  16. package/es/map-state-to-props/test/fixtures/popin-end/fail.json +0 -205
  17. package/es/map-state-to-props/test/fixtures/popin-end/learner-adaptive-failure.json +0 -209
  18. package/es/map-state-to-props/test/fixtures/popin-end/learner-failure-with-redirection.json +0 -211
  19. package/es/map-state-to-props/test/fixtures/popin-end/learner-failure.json +0 -211
  20. package/es/map-state-to-props/test/fixtures/popin-end/learner-success-with-redirection.json +0 -278
  21. package/es/map-state-to-props/test/fixtures/popin-end/learner-success.json +0 -275
  22. package/es/map-state-to-props/test/fixtures/popin-end/success.json +0 -223
  23. package/es/map-state-to-props/test/fixtures/progression-learner.json +0 -102
  24. package/es/map-state-to-props/test/fixtures/progression-state.json +0 -45
  25. package/es/map-state-to-props/test/fixtures/slides/basic.json +0 -60
  26. package/es/map-state-to-props/test/fixtures/slides/plop.json +0 -56
  27. package/es/map-state-to-props/test/fixtures/slides/qcm-drag.json +0 -56
  28. package/es/map-state-to-props/test/fixtures/slides/qcm-graphic.json +0 -49
  29. package/es/map-state-to-props/test/fixtures/slides/qcm.json +0 -43
  30. package/es/map-state-to-props/test/fixtures/slides/slider.json +0 -57
  31. package/es/map-state-to-props/test/fixtures/slides/template.json +0 -49
  32. package/es/map-state-to-props/test/fixtures/slides/videos.json +0 -163
  33. package/es/map-state-to-props/test/fixtures/slides/with-context.json +0 -69
  34. package/es/map-state-to-props/test/header.js +0 -131
  35. package/es/map-state-to-props/test/header.js.map +0 -1
  36. package/es/map-state-to-props/test/index.js +0 -107
  37. package/es/map-state-to-props/test/index.js.map +0 -1
  38. package/es/map-state-to-props/test/player.js +0 -680
  39. package/es/map-state-to-props/test/player.js.map +0 -1
  40. package/es/map-state-to-props/test/popin-correction.create-header-cta.js +0 -301
  41. package/es/map-state-to-props/test/popin-correction.create-header-cta.js.map +0 -1
  42. package/es/map-state-to-props/test/popin-correction.js +0 -80
  43. package/es/map-state-to-props/test/popin-correction.js.map +0 -1
  44. package/es/map-state-to-props/test/popin-end.js +0 -313
  45. package/es/map-state-to-props/test/popin-end.js.map +0 -1
  46. package/es/map-state-to-props/test/popin-error.js +0 -77
  47. package/es/map-state-to-props/test/popin-error.js.map +0 -1
  48. package/es/map-state-to-props/test/resources.js +0 -31
  49. package/es/map-state-to-props/test/resources.js.map +0 -1
  50. package/es/test/add-timeout.js +0 -8
  51. package/es/test/add-timeout.js.map +0 -1
  52. package/es/test/helpers/css-register.js +0 -3
  53. package/es/test/helpers/css-register.js.map +0 -1
  54. package/es/test/helpers/macro.js +0 -6
  55. package/es/test/helpers/macro.js.map +0 -1
  56. package/es/test/index.js +0 -39
  57. package/es/test/index.js.map +0 -1
  58. package/es/test/init-reducers.js +0 -50
  59. package/es/test/init-reducers.js.map +0 -1
  60. package/es/test/locales.js +0 -8
  61. package/es/test/locales.js.map +0 -1
  62. package/es/test/run-app.js +0 -20
  63. package/es/test/run-app.js.map +0 -1
  64. package/es/test/store.js +0 -38
  65. package/es/test/store.js.map +0 -1
  66. package/es/views/test/helpers/render.js +0 -13
  67. package/es/views/test/helpers/render.js.map +0 -1
  68. package/es/views/test/helpers/state-to-vnode.js +0 -7
  69. package/es/views/test/helpers/state-to-vnode.js.map +0 -1
  70. package/es/views/test/loading.js +0 -15
  71. package/es/views/test/loading.js.map +0 -1
  72. package/es/views/test/popin-correction.js +0 -223
  73. package/es/views/test/popin-correction.js.map +0 -1
  74. package/es/views/test/popin-end.js +0 -93
  75. package/es/views/test/popin-end.js.map +0 -1
  76. package/es/views/test/router.js +0 -22
  77. package/es/views/test/router.js.map +0 -1
  78. package/es/views/test/slide.js +0 -339
  79. package/es/views/test/slide.js.map +0 -1
  80. package/lib/map-state-to-props/test/answer.js +0 -409
  81. package/lib/map-state-to-props/test/answer.js.map +0 -1
  82. package/lib/map-state-to-props/test/fixtures/player/clue.json +0 -131
  83. package/lib/map-state-to-props/test/fixtures/player/loading-clue.json +0 -131
  84. package/lib/map-state-to-props/test/fixtures/player/no-clue.json +0 -118
  85. package/lib/map-state-to-props/test/fixtures/player/slide-no-lessons.json +0 -115
  86. package/lib/map-state-to-props/test/fixtures/player/slide.json +0 -127
  87. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-extra-life.json +0 -139
  88. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-failure.json +0 -145
  89. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-next-level.json +0 -282
  90. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-revival.json +0 -140
  91. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-success-node.json +0 -154
  92. package/lib/map-state-to-props/test/fixtures/popin-correction/popin-success.json +0 -268
  93. package/lib/map-state-to-props/test/fixtures/popin-correction/state-fail-multiple-answers.json +0 -473
  94. package/lib/map-state-to-props/test/fixtures/popin-end/fail.json +0 -205
  95. package/lib/map-state-to-props/test/fixtures/popin-end/learner-adaptive-failure.json +0 -209
  96. package/lib/map-state-to-props/test/fixtures/popin-end/learner-failure-with-redirection.json +0 -211
  97. package/lib/map-state-to-props/test/fixtures/popin-end/learner-failure.json +0 -211
  98. package/lib/map-state-to-props/test/fixtures/popin-end/learner-success-with-redirection.json +0 -278
  99. package/lib/map-state-to-props/test/fixtures/popin-end/learner-success.json +0 -275
  100. package/lib/map-state-to-props/test/fixtures/popin-end/success.json +0 -223
  101. package/lib/map-state-to-props/test/fixtures/progression-learner.json +0 -102
  102. package/lib/map-state-to-props/test/fixtures/progression-state.json +0 -45
  103. package/lib/map-state-to-props/test/fixtures/slides/basic.json +0 -60
  104. package/lib/map-state-to-props/test/fixtures/slides/plop.json +0 -56
  105. package/lib/map-state-to-props/test/fixtures/slides/qcm-drag.json +0 -56
  106. package/lib/map-state-to-props/test/fixtures/slides/qcm-graphic.json +0 -49
  107. package/lib/map-state-to-props/test/fixtures/slides/qcm.json +0 -43
  108. package/lib/map-state-to-props/test/fixtures/slides/slider.json +0 -57
  109. package/lib/map-state-to-props/test/fixtures/slides/template.json +0 -49
  110. package/lib/map-state-to-props/test/fixtures/slides/videos.json +0 -163
  111. package/lib/map-state-to-props/test/fixtures/slides/with-context.json +0 -69
  112. package/lib/map-state-to-props/test/header.js +0 -143
  113. package/lib/map-state-to-props/test/header.js.map +0 -1
  114. package/lib/map-state-to-props/test/index.js +0 -100
  115. package/lib/map-state-to-props/test/index.js.map +0 -1
  116. package/lib/map-state-to-props/test/player.js +0 -714
  117. package/lib/map-state-to-props/test/player.js.map +0 -1
  118. package/lib/map-state-to-props/test/popin-correction.create-header-cta.js +0 -315
  119. package/lib/map-state-to-props/test/popin-correction.create-header-cta.js.map +0 -1
  120. package/lib/map-state-to-props/test/popin-correction.js +0 -85
  121. package/lib/map-state-to-props/test/popin-correction.js.map +0 -1
  122. package/lib/map-state-to-props/test/popin-end.js +0 -328
  123. package/lib/map-state-to-props/test/popin-end.js.map +0 -1
  124. package/lib/map-state-to-props/test/popin-error.js +0 -85
  125. package/lib/map-state-to-props/test/popin-error.js.map +0 -1
  126. package/lib/map-state-to-props/test/resources.js +0 -42
  127. package/lib/map-state-to-props/test/resources.js.map +0 -1
  128. package/lib/test/add-timeout.js +0 -14
  129. package/lib/test/add-timeout.js.map +0 -1
  130. package/lib/test/helpers/css-register.js +0 -8
  131. package/lib/test/helpers/css-register.js.map +0 -1
  132. package/lib/test/helpers/macro.js +0 -12
  133. package/lib/test/helpers/macro.js.map +0 -1
  134. package/lib/test/index.js +0 -53
  135. package/lib/test/index.js.map +0 -1
  136. package/lib/test/init-reducers.js +0 -57
  137. package/lib/test/init-reducers.js.map +0 -1
  138. package/lib/test/locales.js +0 -18
  139. package/lib/test/locales.js.map +0 -1
  140. package/lib/test/run-app.js +0 -27
  141. package/lib/test/run-app.js.map +0 -1
  142. package/lib/test/store.js +0 -45
  143. package/lib/test/store.js.map +0 -1
  144. package/lib/views/test/helpers/render.js +0 -24
  145. package/lib/views/test/helpers/render.js.map +0 -1
  146. package/lib/views/test/helpers/state-to-vnode.js +0 -14
  147. package/lib/views/test/helpers/state-to-vnode.js.map +0 -1
  148. package/lib/views/test/loading.js +0 -22
  149. package/lib/views/test/loading.js.map +0 -1
  150. package/lib/views/test/popin-correction.js +0 -237
  151. package/lib/views/test/popin-correction.js.map +0 -1
  152. package/lib/views/test/popin-end.js +0 -105
  153. package/lib/views/test/popin-end.js.map +0 -1
  154. package/lib/views/test/router.js +0 -32
  155. package/lib/views/test/router.js.map +0 -1
  156. package/lib/views/test/slide.js +0 -363
  157. package/lib/views/test/slide.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"popin-end.js","names":["options","translate","mockTranslate","toVNode","stateToVNode","dispatch","test","t","vNode","success","testRendering","props","is","header","lives","count","summary","title","subtitle","failed","stars","rank","recommendation","cards","length","action","type","card","view","footer","exitHandler","onClick","notThrows","fail","cta","headerRetryHandler","button","retryHandler"],"sources":["../../../src/views/test/popin-end.js"],"sourcesContent":["import test from 'ava';\nimport {set, identity} from 'lodash/fp';\n\nimport {mockTranslate} from '@coorpacademy/translate';\nimport success from '../../map-state-to-props/test/fixtures/popin-end/success';\nimport fail from '../../map-state-to-props/test/fixtures/popin-end/fail';\nimport stateToVNode from './helpers/state-to-vnode';\nimport testRendering from './helpers/render';\n\nconst options = {\n translate: mockTranslate\n};\n\nconst toVNode = stateToVNode(options, {dispatch: identity});\n\ntest('should set properties for success popin for microlearning', async t => {\n const vNode = toVNode(success);\n testRendering(vNode);\n const {props} = vNode;\n\n t.is(props.header.lives.count, 0);\n t.is(props.summary.header.title, '');\n t.is(props.summary.header.subtitle, '__Congratulations!');\n t.is(props.summary.header.failed, false);\n t.is(props.summary.header.stars, '+10');\n t.is(props.summary.header.rank, '+10');\n\n t.is(props.summary.recommendation.title, '__Related subjects');\n t.is(props.summary.recommendation.cards.length, 3);\n\n t.is(props.summary.action.type, 'nextCourse');\n t.is(props.summary.action.title, 'Chapter 2');\n t.is(props.summary.action.card.view, 'grid');\n\n const card = props.summary.recommendation.cards[1];\n t.is(card.view, 'grid');\n\n t.is(props.summary.footer.title, '__Back to home');\n const exitHandler = props.summary.footer.onClick;\n await t.notThrows(exitHandler);\n});\n\ntest(\"should display +0 when user don't get higher score than his best score\", t => {\n const vNode = toVNode(\n set(['data', 'contents', 'chapter', 'entities', '1.B2', 'bestScore'], 20, success)\n );\n testRendering(vNode);\n const {props} = vNode;\n t.is(props.summary.header.stars, '+0');\n});\n\ntest('should set properties for failure popin', async t => {\n const vNode = toVNode(fail);\n testRendering(vNode);\n const {props} = vNode;\n\n t.is(props.header.lives.count, 0);\n t.is(props.summary.header.title, '__Ooops');\n t.is(props.summary.header.subtitle, '__You are out of lives!');\n t.is(props.summary.header.failed, true);\n t.is(props.summary.header.stars, null);\n t.is(props.summary.header.rank, null);\n\n t.is(props.summary.action.title, 'Les réseaux sociaux au service du crowdfunding');\n\n t.is(props.summary.recommendation.title, '__Related subjects');\n t.is(props.summary.recommendation.cards.length, 3);\n\n const card = props.summary.recommendation.cards[1];\n t.is(card.view, 'grid');\n\n t.is(props.summary.footer.title, '__Back to home');\n const exitHandler = props.summary.footer.onClick;\n await t.notThrows(exitHandler);\n\n t.is(props.summary.header.cta.title, '__Retry chapter');\n const headerRetryHandler = props.summary.header.cta.onClick;\n await t.notThrows(headerRetryHandler);\n\n t.is(props.summary.action.button.title, '__Retry chapter');\n const retryHandler = props.summary.action.button.onClick;\n await t.notThrows(retryHandler);\n});\n\ntest('should set properties for failure popin when losing rank', async t => {\n const vNode = toVNode(set('data.rank.start', 90, fail));\n testRendering(vNode);\n const {props} = vNode;\n\n t.is(props.header.lives.count, 0);\n t.is(props.summary.header.title, '__Ooops');\n t.is(props.summary.header.subtitle, '__You are out of lives!');\n t.is(props.summary.header.failed, true);\n t.is(props.summary.header.stars, null);\n t.is(props.summary.header.rank, '-10');\n\n t.is(props.summary.recommendation.title, '__Related subjects');\n t.is(props.summary.recommendation.cards.length, 3);\n\n const card = props.summary.recommendation.cards[1];\n t.is(card.view, 'grid');\n\n t.is(props.summary.footer.title, '__Back to home');\n const exitHandler = props.summary.footer.onClick;\n await t.notThrows(exitHandler);\n});\n"],"mappings":";;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG;EACdC,SAAS,EAAEC;AADG,CAAhB;AAIA,MAAMC,OAAO,GAAG,IAAAC,qBAAA,EAAaJ,OAAb,EAAsB;EAACK,QAAQ;AAAT,CAAtB,CAAhB;AAEA,IAAAC,YAAA,EAAK,2DAAL,EAAkE,MAAMC,CAAN,IAAW;EAC3E,MAAMC,KAAK,GAAGL,OAAO,CAACM,gBAAD,CAArB;EACA,IAAAC,eAAA,EAAcF,KAAd;EACA,MAAM;IAACG;EAAD,IAAUH,KAAhB;EAEAD,CAAC,CAACK,EAAF,CAAKD,KAAK,CAACE,MAAN,CAAaC,KAAb,CAAmBC,KAA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,MAAd,CAAqBZ,KAA1B,EAAiC,gBAAjC;EACA,MAAMa,WAAW,GAAGnB,KAAK,CAACK,OAAN,CAAca,MAAd,CAAqBE,OAAzC;EACA,MAAMxB,CAAC,CAACyB,SAAF,CAAYF,WAAZ,CAAN;AACD,CArBD"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- var _get2 = _interopRequireDefault(require("lodash/fp/get"));
4
-
5
- var _identity2 = _interopRequireDefault(require("lodash/fp/identity"));
6
-
7
- var _ava = _interopRequireDefault(require("ava"));
8
-
9
- var _translate = require("@coorpacademy/translate");
10
-
11
- var _popinCorrection = require("../../map-state-to-props/popin-correction");
12
-
13
- var _popinExtraLife = _interopRequireDefault(require("../../map-state-to-props/test/fixtures/popin-correction/popin-extra-life"));
14
-
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
-
17
- const Vimeo = {
18
- Player: () => true
19
- };
20
- const options = {
21
- translate: _translate.mockTranslate,
22
- Vimeo
23
- };
24
- const mapStateToProps = (0, _popinCorrection.popinCorrectionStateToProps)(options, {
25
- dispatch: _identity2.default
26
- });
27
- (0, _ava.default)('should open popin-correction if current content ref is extraLife', t => {
28
- const props = mapStateToProps(_popinExtraLife.default);
29
- t.is((0, _get2.default)('header.lives', props), 0);
30
- t.is((0, _get2.default)('quit.cta.title', props), '__Quit');
31
- });
32
- //# sourceMappingURL=router.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"router.js","names":["Vimeo","Player","options","translate","mockTranslate","mapStateToProps","popinCorrectionStateToProps","dispatch","test","t","props","statePopinExtraLife","is"],"sources":["../../../src/views/test/router.js"],"sourcesContent":["import test from 'ava';\nimport {mockTranslate} from '@coorpacademy/translate';\nimport {identity, get} from 'lodash/fp';\n\nimport {popinCorrectionStateToProps} from '../../map-state-to-props/popin-correction';\nimport statePopinExtraLife from '../../map-state-to-props/test/fixtures/popin-correction/popin-extra-life';\n\nconst Vimeo = {Player: () => true};\nconst options = {\n translate: mockTranslate,\n Vimeo\n};\n\nconst mapStateToProps = popinCorrectionStateToProps(options, {dispatch: identity});\n\ntest('should open popin-correction if current content ref is extraLife', t => {\n const props = mapStateToProps(statePopinExtraLife);\n\n t.is(get('header.lives', props), 0);\n t.is(get('quit.cta.title', props), '__Quit');\n});\n"],"mappings":";;;;;;AAAA;;AACA;;AAGA;;AACA;;;;AAEA,MAAMA,KAAK,GAAG;EAACC,MAAM,EAAE,MAAM;AAAf,CAAd;AACA,MAAMC,OAAO,GAAG;EACdC,SAAS,EAAEC,wBADG;EAEdJ;AAFc,CAAhB;AAKA,MAAMK,eAAe,GAAG,IAAAC,4CAAA,EAA4BJ,OAA5B,EAAqC;EAACK,QAAQ;AAAT,CAArC,CAAxB;AAEA,IAAAC,YAAA,EAAK,kEAAL,EAAyEC,CAAC,IAAI;EAC5E,MAAMC,KAAK,GAAGL,eAAe,CAACM,uBAAD,CAA7B;EAEAF,CAAC,CAACG,EAAF,CAAK,mBAAI,cAAJ,EAAoBF,KAApB,CAAL,EAAiC,CAAjC;EACAD,CAAC,CAACG,EAAF,CAAK,mBAAI,gBAAJ,EAAsBF,KAAtB,CAAL,EAAmC,QAAnC;AACD,CALD"}
@@ -1,363 +0,0 @@
1
- "use strict";
2
-
3
- var _isFunction2 = _interopRequireDefault(require("lodash/fp/isFunction"));
4
-
5
- var _omit2 = _interopRequireDefault(require("lodash/fp/omit"));
6
-
7
- var _map2 = _interopRequireDefault(require("lodash/fp/map"));
8
-
9
- var _identity2 = _interopRequireDefault(require("lodash/fp/identity"));
10
-
11
- var _ava = _interopRequireDefault(require("ava"));
12
-
13
- var _translate = require("@coorpacademy/translate");
14
-
15
- var _playerServices = require("@coorpacademy/player-services");
16
-
17
- var _progressionState = _interopRequireDefault(require("../../map-state-to-props/test/fixtures/progression-state"));
18
-
19
- var _progressionLearner = _interopRequireDefault(require("../../map-state-to-props/test/fixtures/progression-learner"));
20
-
21
- var _slide = _interopRequireDefault(require("../../map-state-to-props/test/fixtures/player/slide"));
22
-
23
- var _slideNoLessons = _interopRequireDefault(require("../../map-state-to-props/test/fixtures/player/slide-no-lessons"));
24
-
25
- var _noClue = _interopRequireDefault(require("../../map-state-to-props/test/fixtures/player/no-clue"));
26
-
27
- var _clue = _interopRequireDefault(require("../../map-state-to-props/test/fixtures/player/clue"));
28
-
29
- var _loadingClue = _interopRequireDefault(require("../../map-state-to-props/test/fixtures/player/loading-clue"));
30
-
31
- var fixtures = _interopRequireWildcard(require("../../../sandbox/fixtures"));
32
-
33
- var _stateToVnode = _interopRequireDefault(require("./helpers/state-to-vnode"));
34
-
35
- var _render = _interopRequireDefault(require("./helpers/render"));
36
-
37
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
38
-
39
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
40
-
41
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42
-
43
- const services = {
44
- Analytics: _playerServices.Analytics,
45
- Answers: (0, _playerServices.Answers)(fixtures),
46
- Clues: (0, _playerServices.Clues)(fixtures),
47
- Coach: _playerServices.Coach,
48
- Comments: _playerServices.Comments,
49
- Content: (0, _playerServices.Content)(fixtures),
50
- ExitNodes: (0, _playerServices.ExitNodes)(fixtures),
51
- LeaderBoard: _playerServices.LeaderBoard,
52
- Location: _playerServices.Location,
53
- Logger: console,
54
- Progressions: (0, _playerServices.Progressions)(fixtures),
55
- Recommendations: (0, _playerServices.Recommendations)(fixtures)
56
- };
57
- const options = {
58
- translate: _translate.mockTranslate,
59
- services
60
- };
61
- const store = {
62
- dispatch: _identity2.default
63
- };
64
- const mapStateToVNode = (0, _stateToVnode.default)(options, store);
65
- (0, _ava.default)('should display microlearning header', t => {
66
- const vNode = mapStateToVNode(_progressionState.default);
67
- (0, _render.default)(vNode);
68
- const {
69
- props: {
70
- player: {
71
- header: headerProps
72
- }
73
- }
74
- } = vNode;
75
- t.is(headerProps.type, 'microlearning');
76
- t.is(headerProps.content.title, 'Les réseaux sociaux au service du crowdfunding');
77
- t.is(headerProps.subcontent, null);
78
- t.deepEqual(headerProps.lives, {
79
- count: 3
80
- });
81
- const onClick = headerProps.content.onClick;
82
- t.true((0, _isFunction2.default)(onClick));
83
- const actionOnClick = onClick();
84
- t.true((0, _isFunction2.default)(actionOnClick));
85
- });
86
- (0, _ava.default)('should display learner header with chapter num', t => {
87
- const vNode = mapStateToVNode(_progressionLearner.default);
88
- (0, _render.default)(vNode);
89
- const {
90
- props: {
91
- player: {
92
- header: headerProps
93
- }
94
- }
95
- } = vNode;
96
- t.is(headerProps.type, 'learner');
97
- t.is(headerProps.content.title, 'level1');
98
- t.is(headerProps.content.details, 'base-translation');
99
- t.is(headerProps.subcontent.title, 'chapter2!');
100
- t.is(headerProps.subcontent.details, '2/2');
101
- t.deepEqual(headerProps.lives, {
102
- count: 3
103
- });
104
- const onClick = headerProps.content.onClick;
105
- t.true((0, _isFunction2.default)(onClick));
106
- const actionOnClick = onClick();
107
- t.true((0, _isFunction2.default)(actionOnClick));
108
- });
109
- (0, _ava.default)('should display learner header with no chapter nums', t => {
110
- const state = (0, _omit2.default)('data.contents.level.entities.1.chapterIds', _progressionLearner.default);
111
- const vNode = mapStateToVNode(state);
112
- (0, _render.default)(vNode);
113
- const {
114
- props: {
115
- player: {
116
- header: headerProps
117
- }
118
- }
119
- } = vNode;
120
- t.is(headerProps.type, 'learner');
121
- t.is(headerProps.content.title, 'level1');
122
- t.is(headerProps.content.details, 'base-translation');
123
- t.is(headerProps.subcontent.title, 'chapter2!');
124
- t.is(headerProps.subcontent.details, null);
125
- t.deepEqual(headerProps.lives, {
126
- count: 3
127
- });
128
- const onClick = headerProps.content.onClick;
129
- t.true((0, _isFunction2.default)(onClick));
130
- const actionOnClick = onClick();
131
- t.true((0, _isFunction2.default)(actionOnClick));
132
- });
133
- (0, _ava.default)('should display slide', async t => {
134
- const vNode = mapStateToVNode(_slide.default);
135
- (0, _render.default)(vNode);
136
- const {
137
- props: {
138
- player: playerProps
139
- }
140
- } = vNode;
141
- t.is(playerProps.typeClue, 'answer');
142
- t.is(playerProps.text, null);
143
- t.deepEqual(playerProps.step, {
144
- current: 2,
145
- total: 4
146
- });
147
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
148
- t.deepEqual((0, _omit2.default)('onClick', playerProps.cta), {
149
- 'aria-label': '__Validate. __Submit your Answer',
150
- submitValue: '__Validate',
151
- disabled: true,
152
- name: 'validateAnswerCTA',
153
- light: false,
154
- small: false,
155
- secondary: false,
156
- useButtonTag: true
157
- });
158
- await t.notThrows(playerProps.cta.onClick);
159
- t.is(playerProps.help, 'Saisissez votre réponse.');
160
- t.truthy(playerProps.answerType);
161
- t.deepEqual((0, _map2.default)((0, _omit2.default)('onClick'), playerProps.buttons), [{
162
- title: '__Question',
163
- type: 'question',
164
- selected: true
165
- }, {
166
- notify: true,
167
- disabled: false,
168
- title: '__Media',
169
- type: 'media',
170
- selected: false
171
- }, {
172
- title: '__Clue',
173
- type: 'clue',
174
- selected: false,
175
- disabled: false
176
- }, {
177
- disabled: true,
178
- title: '__Coach',
179
- type: 'coach'
180
- }]);
181
- t.is(playerProps.showNewMedia, true);
182
- t.is(playerProps.showReviewLesson, false);
183
- return Promise.all((0, _map2.default)(button => t.notThrows(button.onClick), playerProps.buttons));
184
- });
185
- (0, _ava.default)('should disable lesson button if slide has no lessons', async t => {
186
- const vNode = mapStateToVNode(_slideNoLessons.default);
187
- (0, _render.default)(vNode);
188
- const {
189
- props: {
190
- player: playerProps
191
- }
192
- } = vNode;
193
- t.is(playerProps.typeClue, 'answer');
194
- t.is(playerProps.text, null);
195
- t.deepEqual(playerProps.step, {
196
- current: 2,
197
- total: 4
198
- });
199
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
200
- t.deepEqual((0, _omit2.default)('onClick', playerProps.cta), {
201
- 'aria-label': '__Validate. __Submit your Answer',
202
- submitValue: '__Validate',
203
- disabled: true,
204
- name: 'validateAnswerCTA',
205
- light: false,
206
- small: false,
207
- secondary: false,
208
- useButtonTag: true
209
- });
210
- await t.notThrows(playerProps.cta.onClick);
211
- t.is(playerProps.help, 'Saisissez votre réponse.');
212
- t.truthy(playerProps.answerType);
213
- t.deepEqual((0, _map2.default)((0, _omit2.default)('onClick'), playerProps.buttons), [{
214
- title: '__Question',
215
- type: 'question',
216
- selected: true
217
- }, {
218
- notify: false,
219
- disabled: true,
220
- title: '__Media',
221
- type: 'media',
222
- selected: false
223
- }, {
224
- title: '__Clue',
225
- type: 'clue',
226
- selected: false,
227
- disabled: false
228
- }, {
229
- disabled: true,
230
- title: '__Coach',
231
- type: 'coach'
232
- }]);
233
- t.is(playerProps.showNewMedia, false);
234
- t.is(playerProps.showReviewLesson, false);
235
- return Promise.all((0, _map2.default)(button => t.notThrows(button.onClick), playerProps.buttons));
236
- });
237
- (0, _ava.default)('should display loading clue', async t => {
238
- const vNode = mapStateToVNode(_loadingClue.default);
239
- (0, _render.default)(vNode);
240
- const {
241
- props: {
242
- player: playerProps
243
- }
244
- } = vNode;
245
- t.is(playerProps.typeClue, 'clue');
246
- t.is(playerProps.text, null);
247
- t.deepEqual(playerProps.step, {
248
- current: 1,
249
- total: 1
250
- });
251
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
252
- t.deepEqual((0, _omit2.default)('onClick', playerProps.cta), {
253
- submitValue: '__Back to question',
254
- name: 'backToQuestionCTA',
255
- light: false,
256
- small: false,
257
- secondary: true,
258
- disabled: false
259
- });
260
- await t.notThrows(playerProps.cta.onClick);
261
- t.is(playerProps.help, 'Saisissez votre réponse.');
262
- t.truthy(playerProps.answerType);
263
- t.deepEqual((0, _map2.default)((0, _omit2.default)('onClick'), playerProps.buttons), [{
264
- title: '__Question',
265
- type: 'question',
266
- selected: false
267
- }, {
268
- notify: true,
269
- disabled: false,
270
- title: '__Media',
271
- type: 'media',
272
- selected: false
273
- }, {
274
- title: '__Clue',
275
- type: 'clue',
276
- selected: true,
277
- disabled: false
278
- }, {
279
- disabled: true,
280
- title: '__Coach',
281
- type: 'coach'
282
- }]);
283
- return Promise.all((0, _map2.default)(button => t.notThrows(button.onClick), playerProps.buttons));
284
- });
285
- (0, _ava.default)('should display clue', async t => {
286
- const vNode = mapStateToVNode(_clue.default);
287
- (0, _render.default)(vNode);
288
- const {
289
- props: {
290
- player: playerProps
291
- }
292
- } = vNode;
293
- t.is(playerProps.typeClue, 'clue');
294
- t.is(playerProps.text, 'Clue');
295
- t.deepEqual(playerProps.step, {
296
- current: 2,
297
- total: 4
298
- });
299
- t.is(playerProps.question, "Écrivez le mot Text dans l'input.\n");
300
- t.deepEqual((0, _omit2.default)('onClick', playerProps.cta), {
301
- submitValue: '__Back to question',
302
- name: 'backToQuestionCTA',
303
- light: false,
304
- small: false,
305
- secondary: true,
306
- disabled: false
307
- });
308
- await t.notThrows(playerProps.cta.onClick);
309
- t.is(playerProps.help, 'Saisissez votre réponse.');
310
- t.truthy(playerProps.answerType);
311
- t.deepEqual((0, _map2.default)((0, _omit2.default)('onClick'), playerProps.buttons), [{
312
- title: '__Question',
313
- type: 'question',
314
- selected: false
315
- }, {
316
- notify: true,
317
- disabled: false,
318
- title: '__Media',
319
- type: 'media',
320
- selected: false
321
- }, {
322
- title: '__Clue',
323
- type: 'clue',
324
- selected: true,
325
- disabled: false
326
- }, {
327
- disabled: true,
328
- title: '__Coach',
329
- type: 'coach'
330
- }]);
331
- return Promise.all((0, _map2.default)(button => t.notThrows(button.onClick), playerProps.buttons));
332
- });
333
- (0, _ava.default)('should disable clue button if slide has no clue', t => {
334
- const vNode = mapStateToVNode(_noClue.default);
335
- (0, _render.default)(vNode);
336
- const {
337
- props: {
338
- player: playerProps
339
- }
340
- } = vNode;
341
- t.deepEqual((0, _map2.default)((0, _omit2.default)('onClick'), playerProps.buttons), [{
342
- title: '__Question',
343
- type: 'question',
344
- selected: true
345
- }, {
346
- notify: true,
347
- disabled: false,
348
- title: '__Media',
349
- type: 'media',
350
- selected: false
351
- }, {
352
- title: '__Clue',
353
- type: 'clue',
354
- selected: false,
355
- disabled: true
356
- }, {
357
- disabled: true,
358
- title: '__Coach',
359
- type: 'coach'
360
- }]);
361
- return Promise.all((0, _map2.default)(button => t.notThrows(button.onClick), playerProps.buttons));
362
- });
363
- //# sourceMappingURL=slide.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"slide.js","names":["services","Analytics","AnalyticsService","Answers","AnswersService","fixtures","Clues","CluesService","Coach","CoachService","Comments","CommentsService","Content","ContentService","ExitNodes","ExitNodesService","LeaderBoard","LeaderBoardService","Location","LocationService","Logger","console","Progressions","ProgressionsService","Recommendations","RecommendationsService","options","translate","mockTranslate","store","dispatch","mapStateToVNode","stateToVNode","test","t","vNode","microlearningHeader","testRendering","props","player","header","headerProps","is","type","content","title","subcontent","deepEqual","lives","count","onClick","true","actionOnClick","learnerHeader","details","state","stateSlide","playerProps","typeClue","text","step","current","total","question","cta","submitValue","disabled","name","light","small","secondary","useButtonTag","notThrows","help","truthy","answerType","buttons","selected","notify","showNewMedia","showReviewLesson","Promise","all","button","stateSlideNoLessons","stateLoadingClue","stateClue","stateNoClue"],"sources":["../../../src/views/test/slide.js"],"sourcesContent":["import test from 'ava';\nimport {identity, map, omit, isFunction} from 'lodash/fp';\n\nimport {mockTranslate} from '@coorpacademy/translate';\nimport {\n Analytics as AnalyticsService,\n Answers as AnswersService,\n Clues as CluesService,\n Coach as CoachService,\n Comments as CommentsService,\n Content as ContentService,\n ExitNodes as ExitNodesService,\n LeaderBoard as LeaderBoardService,\n Location as LocationService,\n Progressions as ProgressionsService,\n Recommendations as RecommendationsService\n} from '@coorpacademy/player-services';\nimport microlearningHeader from '../../map-state-to-props/test/fixtures/progression-state';\nimport learnerHeader from '../../map-state-to-props/test/fixtures/progression-learner';\nimport stateSlide from '../../map-state-to-props/test/fixtures/player/slide';\nimport stateSlideNoLessons from '../../map-state-to-props/test/fixtures/player/slide-no-lessons';\nimport stateNoClue from '../../map-state-to-props/test/fixtures/player/no-clue';\nimport stateClue from '../../map-state-to-props/test/fixtures/player/clue';\nimport stateLoadingClue from '../../map-state-to-props/test/fixtures/player/loading-clue';\nimport * as fixtures from '../../../sandbox/fixtures';\nimport stateToVNode from './helpers/state-to-vnode';\nimport testRendering from './helpers/render';\n\nconst services = {\n Analytics: AnalyticsService,\n Answers: AnswersService(fixtures),\n Clues: CluesService(fixtures),\n Coach: CoachService,\n Comments: CommentsService,\n Content: ContentService(fixtures),\n ExitNodes: ExitNodesService(fixtures),\n LeaderBoard: LeaderBoardService,\n Location: LocationService,\n Logger: console,\n Progressions: ProgressionsService(fixtures),\n Recommendations: RecommendationsService(fixtures)\n};\n\nconst options = {translate: mockTranslate, services};\nconst store = {dispatch: identity};\nconst mapStateToVNode = stateToVNode(options, store);\n\ntest('should display microlearning header', t => {\n const vNode = mapStateToVNode(microlearningHeader);\n testRendering(vNode);\n const {\n props: {\n player: {header: headerProps}\n }\n } = vNode;\n t.is(headerProps.type, 'microlearning');\n t.is(headerProps.content.title, 'Les réseaux sociaux au service du crowdfunding');\n t.is(headerProps.subcontent, null);\n t.deepEqual(headerProps.lives, {count: 3});\n const onClick = headerProps.content.onClick;\n t.true(isFunction(onClick));\n const actionOnClick = onClick();\n t.true(isFunction(actionOnClick));\n});\n\ntest('should display learner header with chapter num', t => {\n const vNode = mapStateToVNode(learnerHeader);\n testRendering(vNode);\n const {\n props: {\n player: {header: headerProps}\n }\n } = vNode;\n\n t.is(headerProps.type, 'learner');\n t.is(headerProps.content.title, 'level1');\n t.is(headerProps.content.details, 'base-translation');\n t.is(headerProps.subcontent.title, 'chapter2!');\n t.is(headerProps.subcontent.details, '2/2');\n t.deepEqual(headerProps.lives, {count: 3});\n\n const onClick = headerProps.content.onClick;\n t.true(isFunction(onClick));\n const actionOnClick = onClick();\n t.true(isFunction(actionOnClick));\n});\n\ntest('should display learner header with no chapter nums', t => {\n const state = omit('data.contents.level.entities.1.chapterIds', learnerHeader);\n\n const vNode = mapStateToVNode(state);\n testRendering(vNode);\n const {\n props: {\n player: {header: headerProps}\n }\n } = vNode;\n\n t.is(headerProps.type, 'learner');\n t.is(headerProps.content.title, 'level1');\n t.is(headerProps.content.details, 'base-translation');\n t.is(headerProps.subcontent.title, 'chapter2!');\n t.is(headerProps.subcontent.details, null);\n t.deepEqual(headerProps.lives, {count: 3});\n\n const onClick = headerProps.content.onClick;\n t.true(isFunction(onClick));\n const actionOnClick = onClick();\n t.true(isFunction(actionOnClick));\n});\n\ntest('should display slide', async t => {\n const vNode = mapStateToVNode(stateSlide);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.is(playerProps.typeClue, 'answer');\n t.is(playerProps.text, null);\n\n t.deepEqual(playerProps.step, {current: 2, total: 4});\n\n t.is(playerProps.question, \"Écrivez le mot Text dans l'input.\\n\");\n t.deepEqual(omit('onClick', playerProps.cta), {\n 'aria-label': '__Validate. __Submit your Answer',\n submitValue: '__Validate',\n disabled: true,\n name: 'validateAnswerCTA',\n light: false,\n small: false,\n secondary: false,\n useButtonTag: true\n });\n await t.notThrows(playerProps.cta.onClick);\n t.is(playerProps.help, 'Saisissez votre réponse.');\n t.truthy(playerProps.answerType);\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: true\n },\n {\n notify: true,\n disabled: false,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: false,\n disabled: false\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n t.is(playerProps.showNewMedia, true);\n t.is(playerProps.showReviewLesson, false);\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n\ntest('should disable lesson button if slide has no lessons', async t => {\n const vNode = mapStateToVNode(stateSlideNoLessons);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.is(playerProps.typeClue, 'answer');\n t.is(playerProps.text, null);\n\n t.deepEqual(playerProps.step, {current: 2, total: 4});\n\n t.is(playerProps.question, \"Écrivez le mot Text dans l'input.\\n\");\n t.deepEqual(omit('onClick', playerProps.cta), {\n 'aria-label': '__Validate. __Submit your Answer',\n submitValue: '__Validate',\n disabled: true,\n name: 'validateAnswerCTA',\n light: false,\n small: false,\n secondary: false,\n useButtonTag: true\n });\n await t.notThrows(playerProps.cta.onClick);\n t.is(playerProps.help, 'Saisissez votre réponse.');\n t.truthy(playerProps.answerType);\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: true\n },\n {\n notify: false,\n disabled: true,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: false,\n disabled: false\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n t.is(playerProps.showNewMedia, false);\n t.is(playerProps.showReviewLesson, false);\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n\ntest('should display loading clue', async t => {\n const vNode = mapStateToVNode(stateLoadingClue);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.is(playerProps.typeClue, 'clue');\n t.is(playerProps.text, null);\n\n t.deepEqual(playerProps.step, {current: 1, total: 1});\n\n t.is(playerProps.question, \"Écrivez le mot Text dans l'input.\\n\");\n t.deepEqual(omit('onClick', playerProps.cta), {\n submitValue: '__Back to question',\n name: 'backToQuestionCTA',\n light: false,\n small: false,\n secondary: true,\n disabled: false\n });\n await t.notThrows(playerProps.cta.onClick);\n t.is(playerProps.help, 'Saisissez votre réponse.');\n t.truthy(playerProps.answerType);\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: false\n },\n {\n notify: true,\n disabled: false,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: true,\n disabled: false\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n\ntest('should display clue', async t => {\n const vNode = mapStateToVNode(stateClue);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.is(playerProps.typeClue, 'clue');\n t.is(playerProps.text, 'Clue');\n\n t.deepEqual(playerProps.step, {current: 2, total: 4});\n\n t.is(playerProps.question, \"Écrivez le mot Text dans l'input.\\n\");\n t.deepEqual(omit('onClick', playerProps.cta), {\n submitValue: '__Back to question',\n name: 'backToQuestionCTA',\n light: false,\n small: false,\n secondary: true,\n disabled: false\n });\n await t.notThrows(playerProps.cta.onClick);\n t.is(playerProps.help, 'Saisissez votre réponse.');\n t.truthy(playerProps.answerType);\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: false\n },\n {\n notify: true,\n disabled: false,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: true,\n disabled: false\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n\ntest('should disable clue button if slide has no clue', t => {\n const vNode = mapStateToVNode(stateNoClue);\n testRendering(vNode);\n const {\n props: {player: playerProps}\n } = vNode;\n\n t.deepEqual(map(omit('onClick'), playerProps.buttons), [\n {\n title: '__Question',\n type: 'question',\n selected: true\n },\n {\n notify: true,\n disabled: false,\n title: '__Media',\n type: 'media',\n selected: false\n },\n {\n title: '__Clue',\n type: 'clue',\n selected: false,\n disabled: true\n },\n {\n disabled: true,\n title: '__Coach',\n type: 'coach'\n }\n ]);\n\n return Promise.all(map(button => t.notThrows(button.onClick), playerProps.buttons));\n});\n"],"mappings":";;;;;;;;;;AAAA;;AAGA;;AACA;;AAaA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,QAAQ,GAAG;EACfC,SAAS,EAAEC,yBADI;EAEfC,OAAO,EAAE,IAAAC,uBAAA,EAAeC,QAAf,CAFM;EAGfC,KAAK,EAAE,IAAAC,qBAAA,EAAaF,QAAb,CAHQ;EAIfG,KAAK,EAAEC,qBAJQ;EAKfC,QAAQ,EAAEC,wBALK;EAMfC,OAAO,EAAE,IAAAC,uBAAA,EAAeR,QAAf,CANM;EAOfS,SAAS,EAAE,IAAAC,yBAAA,EAAiBV,QAAjB,CAPI;EAQfW,WAAW,EAAEC,2BARE;EASfC,QAAQ,EAAEC,wBATK;EAUfC,MAAM,EAAEC,OAVO;EAWfC,YAAY,EAAE,IAAAC,4BAAA,EAAoBlB,QAApB,CAXC;EAYfmB,eAAe,EAAE,IAAAC,+BAAA,EAAuBpB,QAAvB;AAZF,CAAjB;AAeA,MAAMqB,OAAO,GAAG;EAACC,SAAS,EAAEC,wBAAZ;EAA2B5B;AAA3B,CAAhB;AACA,MAAM6B,KAAK,GAAG;EAACC,QAAQ;AAAT,CAAd;AACA,MAAMC,eAAe,GAAG,IAAAC,qBAAA,EAAaN,OAAb,EAAsBG,KAAtB,CAAxB;AAEA,IAAAI,YAAA,EAAK,qCAAL,EAA4CC,CAAC,IAAI;EAC/C,MAAMC,KAAK,GAAGJ,eAAe,C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