From 67955617d5834a6d5cbb7c29bef33fb94d85ad03 Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Thu, 19 Apr 2018 13:39:50 -0700 Subject: [PATCH 01/15] add conversation-update-es6 sample --- samples/conversation-update-es6/app.js | 27 ++++++++++++++++++++ samples/conversation-update-es6/package.json | 15 +++++++++++ 2 files changed, 42 insertions(+) create mode 100644 samples/conversation-update-es6/app.js create mode 100644 samples/conversation-update-es6/package.json diff --git a/samples/conversation-update-es6/app.js b/samples/conversation-update-es6/app.js new file mode 100644 index 0000000000..1b33e1c9c1 --- /dev/null +++ b/samples/conversation-update-es6/app.js @@ -0,0 +1,27 @@ +const { BotFrameworkAdapter } = require('botbuilder'); +const restify = require('restify'); + +// Create server +let server = restify.createServer(); +server.listen(process.env.port || process.env.PORT || 3978, function () { + console.log(`${server.name} listening to ${server.url}`); +}); + +// Create adapter +const adapter = new BotFrameworkAdapter({ + appId: process.env.MICROSOFT_APP_ID, + appPassword: process.env.MICROSOFT_APP_PASSWORD +}); + +// Listen for incoming requests +server.post('/api/messages/', (req, res) => { + adapter.processActivity(req, res, (context) => { + // On "conversationUpdate"-type activities this bot will send a greeting message to users joining the conversation. + if (context.activity.type === 'conversationUpdate' && context.activity.membersAdded[0].name !== 'Bot') { + return context.sendActivity(`Hello "${context.activity.membersAdded[0].name}"!`); + } + if (context.activity.type === 'message') { + return context.sendActivity(`Welcome to the conversationUpdate-bot! On a "conversationUpdate"-type activity, this bot will greet new users.`); + } + }); +}); \ No newline at end of file diff --git a/samples/conversation-update-es6/package.json b/samples/conversation-update-es6/package.json new file mode 100644 index 0000000000..20f6c025fc --- /dev/null +++ b/samples/conversation-update-es6/package.json @@ -0,0 +1,15 @@ +{ + "name": "conversation-update-es6", + "version": "1.0.0", + "description": "Bot Builder v4 example showing a simple bot that responds to conversationUpdate activities", + "main": "app.js", + "scripts": { + "start": "node app.js" + }, + "author": "Microsoft", + "license": "MIT", + "dependencies": { + "botbuilder": "^4.0.0-m3.0", + "restify": "^6.3.4" + } +} From 18ab16c8fff803a892cce3c14f01505eb469611c Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Thu, 19 Apr 2018 14:37:37 -0700 Subject: [PATCH 02/15] add single-prompt-bot-es6 sample --- samples/single-prompt-bot-es6/app.js | 54 ++++++++++++++++++++++ samples/single-prompt-bot-es6/package.json | 16 +++++++ 2 files changed, 70 insertions(+) create mode 100644 samples/single-prompt-bot-es6/app.js create mode 100644 samples/single-prompt-bot-es6/package.json diff --git a/samples/single-prompt-bot-es6/app.js b/samples/single-prompt-bot-es6/app.js new file mode 100644 index 0000000000..1b08f5cbe3 --- /dev/null +++ b/samples/single-prompt-bot-es6/app.js @@ -0,0 +1,54 @@ +const { BotFrameworkAdapter, MemoryStorage, ConversationState } = require('botbuilder'); +const { createTextPrompt } = require('botbuilder-prompts'); +const restify = require('restify'); + +// Create server +let server = restify.createServer(); +server.listen(process.env.port || process.env.PORT || 3978, function () { + console.log(`${server.name} listening to ${server.url}`); +}); + +// Create adapter +const adapter = new BotFrameworkAdapter({ + appId: process.env.MICROSOFT_APP_ID, + appPassword: process.env.MICROSOFT_APP_PASSWORD +}); + +// Add conversation state middleware +const conversationState = new ConversationState(new MemoryStorage()); +adapter.use(conversationState); + +// Create a validator for our namePrompt +function nameValidator(context, value) { + if (value.length < 2) { + return undefined; + } + return value; +} + +// Create our namePrompt with our validator +const namePrompt = createTextPrompt(nameValidator); + +// Listen for incoming requests +server.post('/api/messages', (req, res) => { + adapter.processActivity(req, res, async (context) => { + const state = conversationState.get(context); + if (context.activity.type === 'message') { + // If the user isn't in a prompt, ask for their name + if (!('prompt' in state)) { + state.prompt = 'name'; + await namePrompt.prompt(context, 'What is your name?') + } else { + // Attempt to recognize the users response + let name = await namePrompt.recognize(context); + if (name !== undefined) { + await context.sendActivity(`${name} is a great name!`); + state.prompt = undefined; + } else { + // The user provided an invalid response, so re-prompt the user + await namePrompt.prompt(context, 'Please provide a name longer than 2 characters.'); + } + } + } + }); +}); \ No newline at end of file diff --git a/samples/single-prompt-bot-es6/package.json b/samples/single-prompt-bot-es6/package.json new file mode 100644 index 0000000000..8781e0881c --- /dev/null +++ b/samples/single-prompt-bot-es6/package.json @@ -0,0 +1,16 @@ +{ + "name": "single-prompt-bot-es6", + "version": "1.0.0", + "description": "Bot Builder v4 example showing a simple bot prompting a user for their name", + "main": "app.js", + "scripts": { + "start": "node app.js" + }, + "author": "Microsoft", + "license": "MIT", + "dependencies": { + "botbuilder": "^4.0.0-m3.0", + "botbuilder-prompts": "^4.0.0-m3.0", + "restify": "^6.3.4" + } +} From c3cb4da75c7c8a125faae004a2904db82d94ca89 Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Thu, 19 Apr 2018 15:06:37 -0700 Subject: [PATCH 03/15] add echobot-console-es6 sample --- samples/echobot-console-es6/app.js | 21 +++++++++++++++++++++ samples/echobot-console-es6/package.json | 15 +++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 samples/echobot-console-es6/app.js create mode 100644 samples/echobot-console-es6/package.json diff --git a/samples/echobot-console-es6/app.js b/samples/echobot-console-es6/app.js new file mode 100644 index 0000000000..c0016a2498 --- /dev/null +++ b/samples/echobot-console-es6/app.js @@ -0,0 +1,21 @@ +const { ConsoleAdapter, ConversationState, MemoryStorage } = require('botbuilder'); + +// Create adapter +const adapter = new ConsoleAdapter(); + +// Add conversation state middleware +const conversationState = new ConversationState(new MemoryStorage()); +adapter.use(conversationState); + +// Greet user +console.log(`Hi... I'm an echobot. Whatever you say I'll echo back.`); + +adapter.listen(async (context) => { + if (context.activity.type === 'message') { + const state = conversationState.get(context); + const count = state.count === undefined ? state.count = 0 : ++state.count; + await context.sendActivity(`${count}: You said "${context.activity.text}"`); + } else { + await context.sendActivity(`[${context.activity.type} event detected]`); + } +}); \ No newline at end of file diff --git a/samples/echobot-console-es6/package.json b/samples/echobot-console-es6/package.json new file mode 100644 index 0000000000..b213d79239 --- /dev/null +++ b/samples/echobot-console-es6/package.json @@ -0,0 +1,15 @@ +{ + "name": "echobot-console-es6", + "version": "1.0.0", + "description": "Bot Builder v4 example showing a console echo bot", + "main": "app.js", + "scripts": { + "start": "node app.js" + }, + "author": "Microsoft", + "license": "MIT", + "dependencies": { + "botbuilder": "^4.0.0-m3.0", + "restify": "^6.3.4" + } +} From a24b4061e7549060b7355f18bd6dae633ed8ea5f Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Thu, 19 Apr 2018 15:22:32 -0700 Subject: [PATCH 04/15] add greeting message to single-prompt-bot-es6 --- samples/single-prompt-bot-es6/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/samples/single-prompt-bot-es6/app.js b/samples/single-prompt-bot-es6/app.js index 1b08f5cbe3..f664171faf 100644 --- a/samples/single-prompt-bot-es6/app.js +++ b/samples/single-prompt-bot-es6/app.js @@ -33,6 +33,11 @@ const namePrompt = createTextPrompt(nameValidator); server.post('/api/messages', (req, res) => { adapter.processActivity(req, res, async (context) => { const state = conversationState.get(context); + if (context.activity.type === 'conversationUpdate' && context.activity.membersAdded[0].name !== 'Bot') { + state.prompt = 'name'; + await namePrompt.prompt(context, "Hello, I'm the demo bot. What is your name?"); + } + if (context.activity.type === 'message') { // If the user isn't in a prompt, ask for their name if (!('prompt' in state)) { From cf6f40f9c9324a7dff86d8183fe8512d45f62c11 Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Thu, 19 Apr 2018 17:28:51 -0700 Subject: [PATCH 05/15] add multiple-prompts-bot-es6 sample --- samples/multiple-prompts-bot-es6/app.js | 74 +++++++++++++++++++ samples/multiple-prompts-bot-es6/package.json | 16 ++++ 2 files changed, 90 insertions(+) create mode 100644 samples/multiple-prompts-bot-es6/app.js create mode 100644 samples/multiple-prompts-bot-es6/package.json diff --git a/samples/multiple-prompts-bot-es6/app.js b/samples/multiple-prompts-bot-es6/app.js new file mode 100644 index 0000000000..30b687ca3a --- /dev/null +++ b/samples/multiple-prompts-bot-es6/app.js @@ -0,0 +1,74 @@ +const { BotFrameworkAdapter, MemoryStorage, ConversationState, UserState } = require('botbuilder'); +const { DialogSet, TextPrompt, NumberPrompt } = require('botbuilder-dialogs'); +const restify = require('restify'); + +// Create server +let server = restify.createServer(); +server.listen(process.env.port || process.env.PORT || 3978, function () { + console.log(`${server.name} listening to ${server.url}`); +}); + +// Create adapter +const adapter = new BotFrameworkAdapter({ + appId: process.env.MICROSOFT_APP_ID, + appPassword: process.env.MICROSOFT_APP_PASSWORD +}); + +// Add conversation state middleware +const conversationState = new ConversationState(new MemoryStorage()); +adapter.use(conversationState); + +var dialogs = new DialogSet(); + +// Create prompt for name with string length validation +dialogs.add('namePrompt', new TextPrompt(async (context, value) => { + if (value && value.length < 2) { + await context.sendActivity('Your name should be at least 2 characters long.'); + return undefined; + } + return value.trim(); +})); + +// Create prompt for age with number value validation +dialogs.add('agePrompt', new NumberPrompt(async (context, value) => { + if (0 > value || value > 122) { + await context.sendActivity('Your age should be between 0 and 122.'); + return undefined; + } + return value; +})); + +// Add a dialog that uses both prompts to gather information from the user +dialogs.add('gatherInfo', [ + async (dialogContext) => { + await dialogContext.prompt('namePrompt', 'What is your name?'); + }, + async (dialogContext, value) => { + const state = conversationState.get(dialogContext.context); + state.name = value; + await dialogContext.prompt('agePrompt', 'What is your age?'); + }, + async (dialogContext, value) => { + const state = conversationState.get(dialogContext.context); + state.age = value; + await dialogContext.context.sendActivity(`Your name is ${state.name} and your age is ${state.age}`); + await dialogContext.end(); + } +]); + + +// Listen for incoming requests +server.post('/api/messages', (req, res) => { + // Route received request to adapter for processing + adapter.processActivity(req, res, async (context) => { + const state = conversationState.get(context); + const dc = dialogs.createContext(context, state); + + if (context.activity.type === 'message') { + await dc.continue(); + if (!context.responded) { + await dc.begin('gatherInfo'); + } + } + }); +}); \ No newline at end of file diff --git a/samples/multiple-prompts-bot-es6/package.json b/samples/multiple-prompts-bot-es6/package.json new file mode 100644 index 0000000000..03847de5a3 --- /dev/null +++ b/samples/multiple-prompts-bot-es6/package.json @@ -0,0 +1,16 @@ +{ + "name": "multiple-prompts-bot-es6", + "version": "1.0.0", + "description": "Bot Builder v4 example showing a multi-turn prompt bot", + "main": "app.js", + "scripts": { + "start": "node app.js" + }, + "author": "Microsoft", + "license": "MIT", + "dependencies": { + "botbuilder": "^4.0.0-m3.0", + "botbuilder-dialogs": "^4.0.0-m3.0", + "restify": "^6.3.4" + } +} From fd2a733b0befd0d1653e96d03f4b7deb010a3d02 Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Fri, 20 Apr 2018 15:59:17 -0700 Subject: [PATCH 06/15] add rich-cards-es6 sample --- samples/rich-cards-es6/app.js | 466 ++++++++++++++++++++++++++++ samples/rich-cards-es6/package.json | 16 + 2 files changed, 482 insertions(+) create mode 100644 samples/rich-cards-es6/app.js create mode 100644 samples/rich-cards-es6/package.json diff --git a/samples/rich-cards-es6/app.js b/samples/rich-cards-es6/app.js new file mode 100644 index 0000000000..7026acbf0b --- /dev/null +++ b/samples/rich-cards-es6/app.js @@ -0,0 +1,466 @@ +const { BotFrameworkAdapter, MemoryStorage, ConversationState, CardFactory } = require('botbuilder'); +const { DialogSet, ChoicePrompt, ListStyle } = require('botbuilder-dialogs'); +const restify = require('restify'); + +// Create server +let server = restify.createServer(); +server.listen(process.env.port || process.env.PORT || 3978, function () { + console.log(`${server.name} listening to ${server.url}`); +}); + +// Create adapter +const adapter = new BotFrameworkAdapter({ + appId: process.env.MICROSOFT_APP_ID, + appPassword: process.env.MICROSOFT_APP_PASSWORD +}); + +// Add conversation state middleware +const conversationState = new ConversationState(new MemoryStorage()); +adapter.use(conversationState); + +var dialogs = new DialogSet(); + +// Create a choice prompt and change the list style +const cardPrompt = new ChoicePrompt().style(ListStyle.list); + +// Create our prompt's choices +const cardOptions = [ + { + value: 'Adaptive card', + synonyms: ['1', 'adaptive card'] + }, + { + value: 'Animation card', + synonyms: ['2', 'animation card'] + }, + { + value: 'Audio card', + synonyms: ['3', 'audio card'] + }, + { + value: 'Hero card', + synonyms: ['4', 'Hero card'] + }, + { + value: 'Receipt card', + synonyms: ['5', 'Receipt card'] + }, + { + value: 'Signin card', + synonyms: ['6', 'Signin card'] + }, + { + value: 'Thumbnail card', + synonyms: ['7', 'Thumbnail card'] + }, + { + value: 'Video card', + synonyms: ['8', 'video card'] + }, + { + value: 'All cards', + synonyms: ['9', 'all cards'] + } +] + +// Register the card prompt +dialogs.add('cardPrompt', cardPrompt); + +// Create a dialog for prompting the user +dialogs.add('cardSelector', [ + async (dialogContext) => { + await dialogContext.prompt( + 'cardPrompt', + 'Which card would you like to choose?', + cardOptions + ); + }, + async (dialogContext, results) => { + switch (results.value) { + case 'Adaptive card': + await dialogContext.context.sendActivity({ attachments: [createAdaptiveCard()] }); + break; + case 'Animation card': + await dialogContext.context.sendActivity({ attachments: [createAnimationCard()] }); + break; + case 'Audio card': + await dialogContext.context.sendActivity({ attachments: [createAudioCard()] }); + break; + case 'Hero card': + await dialogContext.context.sendActivity({ attachments: [createHeroCard()] }); + break; + case 'Receipt card': + await dialogContext.context.sendActivity({ attachments: [createReceiptCard()] }); + break; + case 'Signin card': + await dialogContext.context.sendActivity({ attachments: [createSignInCard()] }); + break; + case 'Thumbnail card': + await dialogContext.context.sendActivity({ attachments: [createThumbnailCard()] }); + break; + case 'Video card': + await dialogContext.context.sendActivity({ attachments: [createVideoCard()] }); + break; + case 'All cards': + await dialogContext.context.sendActivities([ + { attachments: [createAdaptiveCard()] }, + { attachments: [createAnimationCard()] }, + { attachments: [createAudioCard()] }, + { attachments: [createHeroCard()] }, + { attachments: [createReceiptCard()] }, + { attachments: [createSignInCard()] }, + { attachments: [createThumbnailCard()] }, + { attachments: [createVideoCard()] } + ]); + } + await dialogContext.end(); + } +]); + +// Listen for incoming requests +server.post('/api/messages', (req, res) => { + adapter.processActivity(req, res, async (context) => { + const state = conversationState.get(context); + const dc = dialogs.createContext(context, state); + + if (context.activity.type === 'message') { + await dc.continue(); + if (!context.responded) { + await dc.begin('cardSelector'); + } + } + }); +}); + +// Methods to generate cards +function createAdaptiveCard() { + return CardFactory.adaptiveCard({ + "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", + "version": "1.0", + "type": "AdaptiveCard", + "speak": "Your flight is confirmed for you and 3 other passengers from San Francisco to Amsterdam on Friday, October 10 8:30 AM", + "body": [ + { + "type": "TextBlock", + "text": "Passengers", + "weight": "bolder", + "isSubtle": false + }, + { + "type": "TextBlock", + "text": "Sarah Hum", + "separator": true + }, + { + "type": "TextBlock", + "text": "Jeremy Goldberg", + "spacing": "none" + }, + { + "type": "TextBlock", + "text": "Evan Litvak", + "spacing": "none" + }, + { + "type": "TextBlock", + "text": "2 Stops", + "weight": "bolder", + "spacing": "medium" + }, + { + "type": "TextBlock", + "text": "Fri, October 10 8:30 AM", + "weight": "bolder", + "spacing": "none" + }, + { + "type": "ColumnSet", + "separator": true, + "columns": [ + { + "type": "Column", + "width": 1, + "items": [ + { + "type": "TextBlock", + "text": "San Francisco", + "isSubtle": true + }, + { + "type": "TextBlock", + "size": "extraLarge", + "color": "accent", + "text": "SFO", + "spacing": "none" + } + ] + }, + { + "type": "Column", + "width": "auto", + "items": [ + { + "type": "TextBlock", + "text": " " + }, + { + "type": "Image", + "url": "http://messagecardplayground.azurewebsites.net/assets/airplane.png", + "size": "small", + "spacing": "none" + } + ] + }, + { + "type": "Column", + "width": 1, + "items": [ + { + "type": "TextBlock", + "horizontalAlignment": "right", + "text": "Amsterdam", + "isSubtle": true + }, + { + "type": "TextBlock", + "horizontalAlignment": "right", + "size": "extraLarge", + "color": "accent", + "text": "AMS", + "spacing": "none" + } + ] + } + ] + }, + { + "type": "TextBlock", + "text": "Non-Stop", + "weight": "bolder", + "spacing": "medium" + }, + { + "type": "TextBlock", + "text": "Fri, October 18 9:50 PM", + "weight": "bolder", + "spacing": "none" + }, + { + "type": "ColumnSet", + "separator": true, + "columns": [ + { + "type": "Column", + "width": 1, + "items": [ + { + "type": "TextBlock", + "text": "Amsterdam", + "isSubtle": true + }, + { + "type": "TextBlock", + "size": "extraLarge", + "color": "accent", + "text": "AMS", + "spacing": "none" + } + ] + }, + { + "type": "Column", + "width": "auto", + "items": [ + { + "type": "TextBlock", + "text": " " + }, + { + "type": "Image", + "url": "http://messagecardplayground.azurewebsites.net/assets/airplane.png", + "size": "small", + "spacing": "none" + } + ] + }, + { + "type": "Column", + "width": 1, + "items": [ + { + "type": "TextBlock", + "horizontalAlignment": "right", + "text": "San Francisco", + "isSubtle": true + }, + { + "type": "TextBlock", + "horizontalAlignment": "right", + "size": "extraLarge", + "color": "accent", + "text": "SFO", + "spacing": "none" + } + ] + } + ] + }, + { + "type": "ColumnSet", + "spacing": "medium", + "columns": [ + { + "type": "Column", + "width": "1", + "items": [ + { + "type": "TextBlock", + "text": "Total", + "size": "medium", + "isSubtle": true + } + ] + }, + { + "type": "Column", + "width": 1, + "items": [ + { + "type": "TextBlock", + "horizontalAlignment": "right", + "text": "$4,032.54", + "size": "medium", + "weight": "bolder" + } + ] + } + ] + } + ] + }); +} + +function createAnimationCard() { + return CardFactory.animationCard( + 'Microsoft Bot Framework', + [ + { url: 'http://i.giphy.com/Ki55RUbOV5njy.gif' } + ], + [], + { + subtitle: 'Animation Card' + } + ); +} + +function createAudioCard() { + return CardFactory.audioCard( + 'I am your father', + ['http://www.wavlist.com/movies/004/father.wav'], + CardFactory.actions([ + { + type: 'openUrl', + title: 'Read More', + value: 'https://en.wikipedia.org/wiki/The_Empire_Strikes_Back' + } + ]), + { + subtitle: 'Star Wars: Episode V - The Empire Strikes Back', + text: 'The Empire Strikes Back (also known as Star Wars: Episode V – The Empire Strikes Back) is a 1980 American epic space opera film directed by Irvin Kershner. Leigh Brackett and Lawrence Kasdan wrote the screenplay, with George Lucas writing the film\'s story and serving as executive producer. The second installment in the original Star Wars trilogy, it was produced by Gary Kurtz for Lucasfilm Ltd. and stars Mark Hamill, Harrison Ford, Carrie Fisher, Billy Dee Williams, Anthony Daniels, David Prowse, Kenny Baker, Peter Mayhew and Frank Oz.', + image: 'https://upload.wikimedia.org/wikipedia/en/3/3c/SW_-_Empire_Strikes_Back.jpg' + } + ); +} + +function createHeroCard() { + return CardFactory.heroCard( + 'BotFramework Hero Card', + CardFactory.images(['https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg']), + CardFactory.actions([ + { + type: 'openUrl', + title: 'Get Started', + value: 'https://docs.microsoft.com/en-us/azure/bot-service/' + } + ]) + ); +} + +function createReceiptCard() { + return CardFactory.receiptCard({ + title: "Your Receipt", + facts: [], + items: [ + { + title: 'Black Tea', + price: '$2.00', + quantity: 1 + }, + { + title: 'Salad', + price: '$9.50', + quantity: 1 + }, + { + title: 'Coffee', + price: '$3.00', + quantity: 1 + }, + { + title: 'Pizza', + subtitle: '_Pepperoni_', + price: '$11.00', + quantity: 1 + } + ], + tax: '$2.55', + total: '$28.05', + buttons: CardFactory.actions([ + { + type: 'openUrl', + title: 'More Information', + value: 'https://azure.microsoft.com/en-us/pricing/details/bot-service/' + } + ]), + }) +} + +function createSignInCard() { + return CardFactory.signinCard( + 'BotFramework Sign-in Card', + 'https://login.microsoftonline.com', + 'Sign-in' + ); +} + +function createThumbnailCard() { + return CardFactory.thumbnailCard( + 'BotFramework Thumbnail Card', + [{ url: 'https://sec.ch9.ms/ch9/7ff5/e07cfef0-aa3b-40bb-9baa-7c9ef8ff7ff5/buildreactionbotframework_960.jpg' }], + [{ + type: 'openUrl', + title: 'Get Started', + value: 'https://docs.microsoft.com/en-us/azure/bot-service/' + }], + { + subtitle: 'Your bots — wherever your users are talking', + text: 'Build and connect intelligent bots to interact with your users naturally wherever they are, from text/sms to Skype, Slack, Office 365 mail and other popular services.' + } + ) +} + +function createVideoCard() { + return CardFactory.videoCard( + 'Big Buck Bunny', + [{ url: 'http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4' }], + [{ + type: 'openUrl', + title: 'Lean More', + value: 'https://peach.blender.org/' + }], + { + subtitle: 'by the Blender Institute', + text: 'Big Buck Bunny (code-named Peach) is a short computer-animated comedy film by the Blender Institute, part of the Blender Foundation. Like the foundation\'s previous film Elephants Dream, the film was made using Blender, a free software application for animation made by the same foundation. It was released as an open-source film under Creative Commons License Attribution 3.0.' + } + ) +} \ No newline at end of file diff --git a/samples/rich-cards-es6/package.json b/samples/rich-cards-es6/package.json new file mode 100644 index 0000000000..9f6e798099 --- /dev/null +++ b/samples/rich-cards-es6/package.json @@ -0,0 +1,16 @@ +{ + "name": "rich-cards-es6", + "version": "1.0.0", + "description": "Bot Builder v4 example showing various Rich and Adaptive cards", + "main": "app.js", + "scripts": { + "start":"node app.js" + }, + "author": "Microsoft", + "license": "MIT", + "dependencies": { + "botbuilder": "^4.0.0-m3.0", + "botbuilder-dialogs": "^4.0.0-m3.0", + "restify": "^6.3.4" + } +} From ff3ee4e792d34f1379c459d8c9fedcb17f18d277 Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Sat, 21 Apr 2018 10:51:24 -0700 Subject: [PATCH 07/15] update receipt card in rich-cards-es6 sample --- samples/rich-cards-es6/app.js | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/samples/rich-cards-es6/app.js b/samples/rich-cards-es6/app.js index 7026acbf0b..a011a19673 100644 --- a/samples/rich-cards-es6/app.js +++ b/samples/rich-cards-es6/app.js @@ -388,40 +388,40 @@ function createHeroCard() { function createReceiptCard() { return CardFactory.receiptCard({ - title: "Your Receipt", - facts: [], - items: [ + title: "John Doe", + facts: [ { - title: 'Black Tea', - price: '$2.00', - quantity: 1 + key: 'Order Number', + value: '1234' }, { - title: 'Salad', - price: '$9.50', - quantity: 1 - }, + key: 'Payment Method', + value: 'VISA 5555-****' + } + ], + items: [ { - title: 'Coffee', - price: '$3.00', - quantity: 1 + title: 'Data Transfer', + price: '$38.45', + quantity: 368, + image: { url: 'https://github.com/amido/azure-vector-icons/raw/master/renders/traffic-manager.png' } }, { - title: 'Pizza', - subtitle: '_Pepperoni_', - price: '$11.00', - quantity: 1 + title: 'App Service', + price: '$45.00', + quantity: 720, + image: { url: 'https://github.com/amido/azure-vector-icons/raw/master/renders/cloud-service.png' } } ], - tax: '$2.55', - total: '$28.05', + tax: '$7.50', + total: '$90.95', buttons: CardFactory.actions([ { type: 'openUrl', title: 'More Information', value: 'https://azure.microsoft.com/en-us/pricing/details/bot-service/' } - ]), + ]) }) } From aa37e6a7a014efd4df12ffbfa01e908fc8187be3 Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Mon, 23 Apr 2018 11:04:17 -0700 Subject: [PATCH 08/15] add dispatch-es6 sample with LUIS apps and QnAMaker KB --- samples/dispatch-es6/app.js | 134 +++++ samples/dispatch-es6/dispatchSample.json | 389 ++++++++++++ samples/dispatch-es6/homeautomation.json | 588 +++++++++++++++++++ samples/dispatch-es6/package.json | 18 + samples/dispatch-es6/sampleKnowledgeBase.tsv | 8 + samples/dispatch-es6/weather.json | 303 ++++++++++ 6 files changed, 1440 insertions(+) create mode 100644 samples/dispatch-es6/app.js create mode 100644 samples/dispatch-es6/dispatchSample.json create mode 100644 samples/dispatch-es6/homeautomation.json create mode 100644 samples/dispatch-es6/package.json create mode 100644 samples/dispatch-es6/sampleKnowledgeBase.tsv create mode 100644 samples/dispatch-es6/weather.json diff --git a/samples/dispatch-es6/app.js b/samples/dispatch-es6/app.js new file mode 100644 index 0000000000..e2293cbf48 --- /dev/null +++ b/samples/dispatch-es6/app.js @@ -0,0 +1,134 @@ +const { BotFrameworkAdapter, ConversationState, MemoryStorage, TurnContext } = require('botbuilder'); +const { LuisRecognizer, QnAMaker } = require('botbuilder-ai'); +const { DialogSet } = require('botbuilder-dialogs'); +const restify = require('restify'); + +// Create server +let server = restify.createServer(); +server.listen(process.env.port || process.env.PORT || 3978, function () { + console.log(`${server.name} listening to ${server.url}`); +}); + +// Create adapter +const adapter = new BotFrameworkAdapter({ + appId: process.env.MICROSOFT_APP_ID, + appPassword: process.env.MICROSOFT_APP_PASSWORD +}); + +// Create LuisRecognizers and QnAMaker +// The LUIS applications are public, meaning you can use your own subscription key to test the applications. +// For QnAMaker, users are required to create their own knowledge base. +// The exported LUIS applications and QnAMaker knowledge base can be found adjacent to this sample bot. + +// The corresponding LUIS application JSON is `dispatchSample.json` +const dispatcher = new LuisRecognizer({ + appId: '0b18ab4f-5c3d-4724-8b0b-191015b48ea9', + subscriptionKey: process.env.LUIS_SUBSCRIPTION_KEY, + serviceEndpoint: 'https://westus.api.cognitive.microsoft.com/', + verbose: true +}); + +// The corresponding LUIS application JSON is `homeautomation.json` +const homeAutomation = new LuisRecognizer({ + appId: 'c6d161a5-e3e5-4982-8726-3ecec9b4ed8d', + subscriptionKey: process.env.LUIS_SUBSCRIPTION_KEY, + serviceEndpoint: 'https://westus.api.cognitive.microsoft.com/', + verbose: true +}); + +// The corresponding LUIS application JSON is `weather.json` +const weather = new LuisRecognizer({ + appId: '9d0c9e9d-ce04-4257-a08a-a612955f2fb5', + subscriptionKey: process.env.LUIS_SUBSCRIPTION_KEY, + serviceEndpoint: 'https://westus.api.cognitive.microsoft.com/', + verbose: true +}); + +// The QnAMaker knowledge base used in this sample is `sampleKnowledgeBase.tsv` +const faq = new QnAMaker({ + knowledgeBaseId: process.env.QNAMAKER_KNOWLEDGE_BASE, + subscriptionKey: process.env.QNAMAKER_SUBSCRIPTION_KEY, + serviceEndpoint: 'https://westus.api.cognitive.microsoft.com/' +}); + +// create conversation state +const conversationState = new ConversationState(new MemoryStorage()); +adapter.use(conversationState); + +// register some dialogs for usage with the LUIS apps that are being dispatched to +const dialogs = new DialogSet(); + +dialogs.add('HomeAutomation.TurnOff', [ + async (dialogContext) => { + const state = conversationState.get(dialogContext.context); + state.homeAutomationTurnOff = state.homeAutomationTurnOff ? state.homeAutomationTurnOff + 1 : 1; + await dialogContext.context.sendActivity(`${state.homeAutomationTurnOff}: You reached the "HomeAutomation.TurnOff" dialog.`); + + await dialogContext.end(); + } +]); + +dialogs.add('HomeAutomation.TurnOn', [ + async (dialogContext) => { + const state = conversationState.get(dialogContext.context); + state.homeAutomationTurnOn = state.homeAutomationTurnOn ? state.homeAutomationTurnOn + 1 : 1; + await dialogContext.context.sendActivity(`${state.homeAutomationTurnOn}: You reached the "HomeAutomation.TurnOn" dialog.`); + + await dialogContext.end(); + } +]); + +dialogs.add('Weather.GetForecast', [ + async (dialogContext) => { + const state = conversationState.get(dialogContext.context); + state.weatherGetForecast = state.weatherGetForecast ? state.weatherGetForecast + 1 : 1; + await dialogContext.context.sendActivity(`${state.weatherGetForecast}: You reached the "Weather.GetForecast" dialog.`); + + await dialogContext.end(); + } +]); + +dialogs.add('Weather.GetCondition', [ + async (dialogContext) => { + const state = conversationState.get(dialogContext.context); + state.weatherGetCondition = state.weatherGetCondition ? state.weatherGetCondition + 1 : 1; + await dialogContext.context.sendActivity(`${state.weatherGetCondition}: You reached the "Weather.GetCondition" dialog.`); + + await dialogContext.end(); + } +]); + +adapter.use(dispatcher); + +// Listen for incoming Activities +server.post('/api/messages', (req, res) => { + adapter.processActivity(req, res, async (context) => { + if (context.activity.type === 'message') { + const state = conversationState.get(context); + const dc = dialogs.createContext(context, state); + + // Retrieve the LUIS results from our dispatcher LUIS application + const luisResults = dispatcher.get(context); + + // Extract the top intent from LUIS and use it to select which LUIS application to dispatch to + const topIntent = LuisRecognizer.topIntent(luisResults); + + await dc.continue(); + + switch (topIntent) { + case 'l_homeautomation': + const topHomeAutoIntent = LuisRecognizer.topIntent(await homeAutomation.recognize(context)); + await dc.begin(topHomeAutoIntent); + break; + case 'l_weather': + const topWeatherIntent = LuisRecognizer.topIntent(await weather.recognize(context)); + await dc.begin(topWeatherIntent); + break; + case 'q_faq': + await faq.answer(context); + break; + } + } + }); +}); + diff --git a/samples/dispatch-es6/dispatchSample.json b/samples/dispatch-es6/dispatchSample.json new file mode 100644 index 0000000000..0fb31cbd23 --- /dev/null +++ b/samples/dispatch-es6/dispatchSample.json @@ -0,0 +1,389 @@ +{ + "luis_schema_version": "2.1.0", + "versionId": "Dispatch", + "name": "dispatchSample", + "desc": "Dispatch model for dispatchSample", + "culture": "en-us", + "intents": [ + { + "name": "l_homeautomation" + }, + { + "name": "l_weather" + }, + { + "name": "q_faq" + } + ], + "entities": [], + "composites": [], + "closedLists": [], + "bing_entities": [], + "model_features": [], + "regex_features": [], + "utterances": [ + { + "text": "make camera 1 off please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn off ac please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn off living room light", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "fish pond on please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "living room lamps off please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "set lights out bedroom", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn dimmer off", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "start master bedroom light .", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn on the internet in my bedroom please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn on my bedroom lights .", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn off staircase", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "fish pond off please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn on bathroom heater", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn off foyer lights", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "illuminate please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "lock the doors for me please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "set lights bright", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "silence the phone", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "set lights concentrate", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "make some coffee", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn on thermostat please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn thermostat on 70 .", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "change temperature to seventy two degrees", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "decrease temperature for me please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn on the furnace room lights", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "living room lamp on please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "lower your volume", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "coffee bar on please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "play dvd", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "dim kitchen lights to 25 .", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "shut down my work computer", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn on external speaker", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "snap switch fan fifty percent", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn the fan to high", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "turn off venice lamp", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "theater on please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "breezeway on please", + "intent": "l_homeautomation", + "entities": [] + }, + { + "text": "what ' s the weather going to be like in hawaii ?", + "intent": "l_weather", + "entities": [] + }, + { + "text": "what ' s the weather like in minneapolis", + "intent": "l_weather", + "entities": [] + }, + { + "text": "\\\" i need to know the temperature at bangor , sme \\", + "intent": "l_weather", + "entities": [] + }, + { + "text": "show average rainfall for boise", + "intent": "l_weather", + "entities": [] + }, + { + "text": "temperature of delhi in celsius please", + "intent": "l_weather", + "entities": [] + }, + { + "text": "get the daily temperature greenwood indiana", + "intent": "l_weather", + "entities": [] + }, + { + "text": "how much rain does chambersburg get a year", + "intent": "l_weather", + "entities": [] + }, + { + "text": "get florence temperature in september", + "intent": "l_weather", + "entities": [] + }, + { + "text": "get the forcast for me", + "intent": "l_weather", + "entities": [] + }, + { + "text": "show me the forecast at alabama", + "intent": "l_weather", + "entities": [] + }, + { + "text": "soliciting today ' s weather", + "intent": "l_weather", + "entities": [] + }, + { + "text": "current weather ?", + "intent": "l_weather", + "entities": [] + }, + { + "text": "what is the weather today at 10 day durham ?", + "intent": "l_weather", + "entities": [] + }, + { + "text": "get the weather at saint george utah", + "intent": "l_weather", + "entities": [] + }, + { + "text": "\\\" tell me perth weather , sclimate & temperature at australia \\", + "intent": "l_weather", + "entities": [] + }, + { + "text": "what is the rain volume in sonoma county ?", + "intent": "l_weather", + "entities": [] + }, + { + "text": "i want to know the temperature at death valley", + "intent": "l_weather", + "entities": [] + }, + { + "text": "was last year about this time as wet as it is now in the south ?", + "intent": "l_weather", + "entities": [] + }, + { + "text": "provide me by toronto weather please", + "intent": "l_weather", + "entities": [] + }, + { + "text": "get for me the weather conditions in sonoma county", + "intent": "l_weather", + "entities": [] + }, + { + "text": "do fl residents usually need ice scrapers", + "intent": "l_weather", + "entities": [] + }, + { + "text": "forecast in celcius", + "intent": "l_weather", + "entities": [] + }, + { + "text": "will it be raining in ranchi", + "intent": "l_weather", + "entities": [] + }, + { + "text": "what will the weather be tomorrow in accord new york ?", + "intent": "l_weather", + "entities": [] + }, + { + "text": "what is the weather in redmond ?", + "intent": "l_weather", + "entities": [] + }, + { + "text": "will it rain this weekend", + "intent": "l_weather", + "entities": [] + }, + { + "text": "will it snow today", + "intent": "l_weather", + "entities": [] + }, + { + "text": "what to wear in march in california", + "intent": "l_weather", + "entities": [] + }, + { + "text": "hi", + "intent": "q_faq", + "entities": [] + }, + { + "text": "what do you do?", + "intent": "q_faq", + "entities": [] + }, + { + "text": "what are you?", + "intent": "q_faq", + "entities": [] + }, + { + "text": "greetings", + "intent": "q_faq", + "entities": [] + }, + { + "text": "good morning", + "intent": "q_faq", + "entities": [] + }, + { + "text": "good evening", + "intent": "q_faq", + "entities": [] + }, + { + "text": "what?", + "intent": "q_faq", + "entities": [] + } + ], + "patterns": [], + "patternAnyEntities": [], + "prebuiltEntities": [] +} diff --git a/samples/dispatch-es6/homeautomation.json b/samples/dispatch-es6/homeautomation.json new file mode 100644 index 0000000000..c012ceda17 --- /dev/null +++ b/samples/dispatch-es6/homeautomation.json @@ -0,0 +1,588 @@ +{ + "luis_schema_version": "2.2.0", + "versionId": "0.1", + "name": "homeautomation", + "desc": "homeautomation", + "culture": "en-us", + "intents": [ + { + "name": "HomeAutomation.TurnOff", + "inherits": { + "domain_name": "HomeAutomation", + "model_name": "TurnOff" + } + }, + { + "name": "HomeAutomation.TurnOn", + "inherits": { + "domain_name": "HomeAutomation", + "model_name": "TurnOn" + } + }, + { + "name": "None" + } + ], + "entities": [ + { + "name": "HomeAutomation.Device", + "inherits": { + "domain_name": "HomeAutomation", + "model_name": "Device" + } + }, + { + "name": "HomeAutomation.Operation", + "inherits": { + "domain_name": "HomeAutomation", + "model_name": "Operation" + } + }, + { + "name": "HomeAutomation.Room", + "inherits": { + "domain_name": "HomeAutomation", + "model_name": "Room" + } + } + ], + "composites": [], + "closedLists": [], + "regex_entities": [], + "bing_entities": [], + "model_features": [], + "regex_features": [], + "utterances": [ + { + "text": "breezeway on please", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Room", + "startPos": 0, + "endPos": 8 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 10, + "endPos": 11 + } + ] + }, + { + "text": "change temperature to seventy two degrees", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 7, + "endPos": 17 + } + ] + }, + { + "text": "coffee bar on please", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 0, + "endPos": 9 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 11, + "endPos": 12 + } + ] + }, + { + "text": "decrease temperature for me please", + "intent": "None", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 9, + "endPos": 19 + } + ] + }, + { + "text": "dim kitchen lights to 25 .", + "intent": "None", + "entities": [ + { + "entity": "HomeAutomation.Room", + "startPos": 4, + "endPos": 10 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 12, + "endPos": 17 + } + ] + }, + { + "text": "fish pond off please", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 0, + "endPos": 8 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 10, + "endPos": 12 + } + ] + }, + { + "text": "fish pond on please", + "intent": "HomeAutomation.TurnOn", + "entities": [] + }, + { + "text": "illuminate please", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 0, + "endPos": 9 + } + ] + }, + { + "text": "living room lamp on please", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Room", + "startPos": 0, + "endPos": 10 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 12, + "endPos": 15 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 17, + "endPos": 18 + } + ] + }, + { + "text": "living room lamps off please", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Room", + "startPos": 0, + "endPos": 10 + } + ] + }, + { + "text": "lock the doors for me please", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 9, + "endPos": 13 + } + ] + }, + { + "text": "lower your volume", + "intent": "None", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 11, + "endPos": 16 + } + ] + }, + { + "text": "make camera 1 off please", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 5, + "endPos": 10 + } + ] + }, + { + "text": "make some coffee", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 10, + "endPos": 15 + } + ] + }, + { + "text": "play dvd", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 5, + "endPos": 7 + } + ] + }, + { + "text": "set lights bright", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 4, + "endPos": 9 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 11, + "endPos": 16 + } + ] + }, + { + "text": "set lights concentrate", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 4, + "endPos": 9 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 11, + "endPos": 21 + } + ] + }, + { + "text": "set lights out bedroom", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 4, + "endPos": 9 + }, + { + "entity": "HomeAutomation.Room", + "startPos": 15, + "endPos": 21 + } + ] + }, + { + "text": "shut down my work computer", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 18, + "endPos": 25 + } + ] + }, + { + "text": "silence the phone", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 12, + "endPos": 16 + } + ] + }, + { + "text": "snap switch fan fifty percent", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 12, + "endPos": 14 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 16, + "endPos": 28 + } + ] + }, + { + "text": "start master bedroom light .", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Room", + "startPos": 6, + "endPos": 19 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 21, + "endPos": 25 + } + ] + }, + { + "text": "theater on please", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Room", + "startPos": 0, + "endPos": 6 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 8, + "endPos": 9 + } + ] + }, + { + "text": "turn dimmer off", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 5, + "endPos": 10 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 12, + "endPos": 14 + } + ] + }, + { + "text": "turn off ac please", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 9, + "endPos": 10 + }, + { + "entity": "HomeAutomation.Operation", + "startPos": 5, + "endPos": 7 + } + ] + }, + { + "text": "turn off foyer lights", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 5, + "endPos": 7 + }, + { + "entity": "HomeAutomation.Room", + "startPos": 9, + "endPos": 13 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 15, + "endPos": 20 + } + ] + }, + { + "text": "turn off living room light", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Room", + "startPos": 9, + "endPos": 19 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 21, + "endPos": 25 + } + ] + }, + { + "text": "turn off staircase", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 5, + "endPos": 7 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 9, + "endPos": 17 + } + ] + }, + { + "text": "turn off venice lamp", + "intent": "HomeAutomation.TurnOff", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 5, + "endPos": 7 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 16, + "endPos": 19 + } + ] + }, + { + "text": "turn on bathroom heater", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 5, + "endPos": 6 + }, + { + "entity": "HomeAutomation.Room", + "startPos": 8, + "endPos": 15 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 17, + "endPos": 22 + } + ] + }, + { + "text": "turn on external speaker", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 5, + "endPos": 6 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 8, + "endPos": 23 + } + ] + }, + { + "text": "turn on my bedroom lights .", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 5, + "endPos": 6 + }, + { + "entity": "HomeAutomation.Room", + "startPos": 11, + "endPos": 17 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 19, + "endPos": 24 + } + ] + }, + { + "text": "turn on the furnace room lights", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Room", + "startPos": 12, + "endPos": 23 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 25, + "endPos": 30 + } + ] + }, + { + "text": "turn on the internet in my bedroom please", + "intent": "None", + "entities": [ + { + "entity": "HomeAutomation.Room", + "startPos": 27, + "endPos": 33 + } + ] + }, + { + "text": "turn on thermostat please", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Operation", + "startPos": 5, + "endPos": 6 + }, + { + "entity": "HomeAutomation.Device", + "startPos": 8, + "endPos": 17 + } + ] + }, + { + "text": "turn the fan to high", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 9, + "endPos": 11 + } + ] + }, + { + "text": "turn thermostat on 70 .", + "intent": "HomeAutomation.TurnOn", + "entities": [ + { + "entity": "HomeAutomation.Device", + "startPos": 5, + "endPos": 14 + } + ] + } + ] +} \ No newline at end of file diff --git a/samples/dispatch-es6/package.json b/samples/dispatch-es6/package.json new file mode 100644 index 0000000000..f63ae8ed66 --- /dev/null +++ b/samples/dispatch-es6/package.json @@ -0,0 +1,18 @@ +{ + "name": "dispatch", + "version": "1.0.0", + "description": "Bot Builder v4 example showing how to dispatch users' utterances between LUIS applications and QnAMaker knowledge bases", + "main": "app.js", + "scripts": { + "start": "node app.js" + }, + "author": "Microsoft", + "license": "MIT", + "dependencies": { + "botbuilder": "^4.0.0-m3.0", + "botbuilder-ai": "^4.0.0-m3.0", + "botbuilder-dialogs": "^4.0.0-m3.0", + "botdispatch": "0.0.1", + "restify": "^6.3.4" + } +} diff --git a/samples/dispatch-es6/sampleKnowledgeBase.tsv b/samples/dispatch-es6/sampleKnowledgeBase.tsv new file mode 100644 index 0000000000..9e765b0e9e --- /dev/null +++ b/samples/dispatch-es6/sampleKnowledgeBase.tsv @@ -0,0 +1,8 @@ +Question Answer Source +hi Hello! Editorial +greetings Hello! Editorial +good morning Hello! Editorial +good evening Hello! Editorial +What are you? I am the LUIS-QnAMaker Dispatch bot! I show how easy it is to use multiple LUIS models and a QnAMaker model inside of a chatbot. Editorial +What? I am the LUIS-QnAMaker Dispatch bot! I show how easy it is to use multiple LUIS models and a QnAMaker model inside of a chatbot. Editorial +What do you do? I am the LUIS-QnAMaker Dispatch bot! I show how easy it is to use multiple LUIS models and a QnAMaker model inside of a chatbot. Editorial diff --git a/samples/dispatch-es6/weather.json b/samples/dispatch-es6/weather.json new file mode 100644 index 0000000000..3c03670aba --- /dev/null +++ b/samples/dispatch-es6/weather.json @@ -0,0 +1,303 @@ +{ + "luis_schema_version": "2.2.0", + "versionId": "0.1", + "name": "weather", + "desc": "weather", + "culture": "en-us", + "intents": [ + { + "name": "None" + }, + { + "name": "Weather.GetCondition", + "inherits": { + "domain_name": "Weather", + "model_name": "GetCondition" + } + }, + { + "name": "Weather.GetForecast", + "inherits": { + "domain_name": "Weather", + "model_name": "GetForecast" + } + } + ], + "entities": [ + { + "name": "Weather.Location", + "inherits": { + "domain_name": "Weather", + "model_name": "Location" + } + } + ], + "composites": [], + "closedLists": [], + "regex_entities": [], + "bing_entities": [], + "model_features": [], + "regex_features": [], + "utterances": [ + { + "text": "\" i need to know the temperature at bangor , sme \"", + "intent": "Weather.GetForecast", + "entities": [] + }, + { + "text": "\" tell me perth weather , sclimate & temperature at australia \"", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 10, + "endPos": 14 + } + ] + }, + { + "text": "current weather ?", + "intent": "Weather.GetCondition", + "entities": [] + }, + { + "text": "do fl residents usually need ice scrapers", + "intent": "Weather.GetCondition", + "entities": [] + }, + { + "text": "forecast in celcius", + "intent": "Weather.GetForecast", + "entities": [] + }, + { + "text": "get florence temperature in september", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 4, + "endPos": 11 + } + ] + }, + { + "text": "get for me the weather conditions in sonoma county", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 37, + "endPos": 49 + } + ] + }, + { + "text": "get the daily temperature greenwood indiana", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 26, + "endPos": 42 + } + ] + }, + { + "text": "get the forcast for me", + "intent": "Weather.GetForecast", + "entities": [] + }, + { + "text": "get the weather at saint george utah", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 19, + "endPos": 35 + } + ] + }, + { + "text": "how much rain does chambersburg get a year", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 19, + "endPos": 30 + } + ] + }, + { + "text": "i want to know the temperature at death valley", + "intent": "Weather.GetForecast", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 34, + "endPos": 45 + } + ] + }, + { + "text": "provide me by toronto weather please", + "intent": "Weather.GetForecast", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 14, + "endPos": 20 + } + ] + }, + { + "text": "show average rainfall for boise", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 26, + "endPos": 30 + } + ] + }, + { + "text": "show me the forecast at alabama", + "intent": "Weather.GetForecast", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 24, + "endPos": 30 + } + ] + }, + { + "text": "soliciting today ' s weather", + "intent": "Weather.GetForecast", + "entities": [] + }, + { + "text": "temperature of delhi in celsius please", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 15, + "endPos": 19 + } + ] + }, + { + "text": "was last year about this time as wet as it is now in the south ?", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 57, + "endPos": 61 + } + ] + }, + { + "text": "what ' s the weather going to be like in hawaii ?", + "intent": "Weather.GetForecast", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 41, + "endPos": 46 + } + ] + }, + { + "text": "what ' s the weather like in minneapolis", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 29, + "endPos": 39 + } + ] + }, + { + "text": "what is the rain volume in sonoma county ?", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 27, + "endPos": 39 + } + ] + }, + { + "text": "what is the weather in redmond ?", + "intent": "Weather.GetForecast", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 23, + "endPos": 29 + } + ] + }, + { + "text": "what is the weather today at 10 day durham ?", + "intent": "Weather.GetForecast", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 36, + "endPos": 41 + } + ] + }, + { + "text": "what to wear in march in california", + "intent": "Weather.GetCondition", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 25, + "endPos": 34 + } + ] + }, + { + "text": "what will the weather be tomorrow in accord new york ?", + "intent": "Weather.GetForecast", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 37, + "endPos": 51 + } + ] + }, + { + "text": "will it be raining in ranchi", + "intent": "Weather.GetForecast", + "entities": [ + { + "entity": "Weather.Location", + "startPos": 22, + "endPos": 27 + } + ] + }, + { + "text": "will it rain this weekend", + "intent": "Weather.GetForecast", + "entities": [] + }, + { + "text": "will it snow today", + "intent": "Weather.GetForecast", + "entities": [] + } + ] +} \ No newline at end of file From 130a47a03e3fc93cc80f451aa9dd33f12a09d624 Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Wed, 25 Apr 2018 13:08:00 -0700 Subject: [PATCH 09/15] add qnamaker creds and entity support to dispatch sample --- samples/dispatch-es6/app.js | 73 ++++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 13 deletions(-) diff --git a/samples/dispatch-es6/app.js b/samples/dispatch-es6/app.js index e2293cbf48..caf1219651 100644 --- a/samples/dispatch-es6/app.js +++ b/samples/dispatch-es6/app.js @@ -46,8 +46,8 @@ const weather = new LuisRecognizer({ // The QnAMaker knowledge base used in this sample is `sampleKnowledgeBase.tsv` const faq = new QnAMaker({ - knowledgeBaseId: process.env.QNAMAKER_KNOWLEDGE_BASE, - subscriptionKey: process.env.QNAMAKER_SUBSCRIPTION_KEY, + knowledgeBaseId: '71df79a5-31ef-448e-91c5-4e04532e9fc8', + subscriptionKey: 'cd630cc7238a43a286d6e6de1c5682af', serviceEndpoint: 'https://westus.api.cognitive.microsoft.com/' }); @@ -58,42 +58,85 @@ adapter.use(conversationState); // register some dialogs for usage with the LUIS apps that are being dispatched to const dialogs = new DialogSet(); +function findEntities(entityName, entityResults) { + let entities = [] + if (entityName in entityResults) { + entityResults[entityName].forEach((entity, idx) => { + entities.push(entity); + }); + } + return entities.length > 0 ? entities : undefined; +} + dialogs.add('HomeAutomation.TurnOff', [ - async (dialogContext) => { + async (dialogContext, args) => { + const devices = findEntities('HomeAutomation_Device', args.entities); + const operations = findEntities('HomeAutomation_Operation', args.entities); + const state = conversationState.get(dialogContext.context); state.homeAutomationTurnOff = state.homeAutomationTurnOff ? state.homeAutomationTurnOff + 1 : 1; await dialogContext.context.sendActivity(`${state.homeAutomationTurnOff}: You reached the "HomeAutomation.TurnOff" dialog.`); - + if (devices) { + await dialogContext.context.sendActivity(`Found these "HomeAutomation_Device" entities:\n${devices.join(', ')}`); + } + if (operations) { + await dialogContext.context.sendActivity(`Found these "HomeAutomation_Operation" entities:\n${operations.join(', ')}`); + } await dialogContext.end(); } ]); dialogs.add('HomeAutomation.TurnOn', [ - async (dialogContext) => { + async (dialogContext, args) => { + const devices = findEntities('HomeAutomation_Device', args.entities); + const operations = findEntities('HomeAutomation_Operation', args.entities); + const state = conversationState.get(dialogContext.context); state.homeAutomationTurnOn = state.homeAutomationTurnOn ? state.homeAutomationTurnOn + 1 : 1; await dialogContext.context.sendActivity(`${state.homeAutomationTurnOn}: You reached the "HomeAutomation.TurnOn" dialog.`); - + if (devices) { + await dialogContext.context.sendActivity(`Found these "HomeAutomation_Device" entities:\n${devices.join(', ')}`); + } + if (operations) { + await dialogContext.context.sendActivity(`Found these "HomeAutomation_Operation" entities:\n${operations.join(', ')}`); + } await dialogContext.end(); } ]); dialogs.add('Weather.GetForecast', [ - async (dialogContext) => { + async (dialogContext, args) => { + const locations = findEntities('Weather_Location', args.entities); + const state = conversationState.get(dialogContext.context); state.weatherGetForecast = state.weatherGetForecast ? state.weatherGetForecast + 1 : 1; await dialogContext.context.sendActivity(`${state.weatherGetForecast}: You reached the "Weather.GetForecast" dialog.`); - + if (locations) { + await dialogContext.context.sendActivity(`Found these "Weather_Location" entities:\n${locations.join(', ')}`); + } await dialogContext.end(); } ]); dialogs.add('Weather.GetCondition', [ - async (dialogContext) => { + async (dialogContext, args) => { + const locations = findEntities('Weather_Location', args.entities); + const state = conversationState.get(dialogContext.context); state.weatherGetCondition = state.weatherGetCondition ? state.weatherGetCondition + 1 : 1; await dialogContext.context.sendActivity(`${state.weatherGetCondition}: You reached the "Weather.GetCondition" dialog.`); + if (locations) { + await dialogContext.context.sendActivity(`Found these "Weather_Location" entities:\n${locations.join(', ')}`); + } + await dialogContext.end(); + } +]); +dialogs.add('None', [ + async (dialogContext) => { + const state = conversationState.get(dialogContext.context); + state.noneIntent = state.noneIntent ? state.noneIntent + 1 : 1; + await dialogContext.context.sendActivity(`${state.noneIntent}: You reached the "None" dialog.`); await dialogContext.end(); } ]); @@ -117,16 +160,20 @@ server.post('/api/messages', (req, res) => { switch (topIntent) { case 'l_homeautomation': - const topHomeAutoIntent = LuisRecognizer.topIntent(await homeAutomation.recognize(context)); - await dc.begin(topHomeAutoIntent); + const homeAutoResults = await homeAutomation.recognize(context); + const topHomeAutoIntent = LuisRecognizer.topIntent(homeAutoResults); + await dc.begin(topHomeAutoIntent, homeAutoResults); break; case 'l_weather': - const topWeatherIntent = LuisRecognizer.topIntent(await weather.recognize(context)); - await dc.begin(topWeatherIntent); + const weatherResults = await weather.recognize(context); + const topWeatherIntent = LuisRecognizer.topIntent(weatherResults); + await dc.begin(topWeatherIntent, weatherResults); break; case 'q_faq': await faq.answer(context); break; + default: + await dc.begin('None'); } } }); From e31f5e2ccc4540745ebb2d912e1ca560871c940e Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Wed, 25 Apr 2018 16:03:03 -0700 Subject: [PATCH 10/15] repurpose qna-translator for qna-maker-bot-es6, add KB, refactor dispatch-es6 --- samples/dispatch-es6/app.js | 2 +- samples/qna-maker-bot-es6/app.js | 39 ++++++++ .../package.json | 6 +- samples/qna-maker-bot-es6/smartLightFAQ.tsv | 15 +++ samples/qna-translator-es6/app.js | 97 ------------------- 5 files changed, 58 insertions(+), 101 deletions(-) create mode 100644 samples/qna-maker-bot-es6/app.js rename samples/{qna-translator-es6 => qna-maker-bot-es6}/package.json (61%) create mode 100644 samples/qna-maker-bot-es6/smartLightFAQ.tsv delete mode 100644 samples/qna-translator-es6/app.js diff --git a/samples/dispatch-es6/app.js b/samples/dispatch-es6/app.js index caf1219651..0d508aaee8 100644 --- a/samples/dispatch-es6/app.js +++ b/samples/dispatch-es6/app.js @@ -61,7 +61,7 @@ const dialogs = new DialogSet(); function findEntities(entityName, entityResults) { let entities = [] if (entityName in entityResults) { - entityResults[entityName].forEach((entity, idx) => { + entityResults[entityName].forEach(entity => { entities.push(entity); }); } diff --git a/samples/qna-maker-bot-es6/app.js b/samples/qna-maker-bot-es6/app.js new file mode 100644 index 0000000000..a656e698f5 --- /dev/null +++ b/samples/qna-maker-bot-es6/app.js @@ -0,0 +1,39 @@ +const { BotFrameworkAdapter } = require('botbuilder'); +const { QnAMaker } = require('botbuilder-ai'); +const restify = require('restify'); + +// Create server +let server = restify.createServer(); +server.listen(process.env.port || process.env.PORT || 3978, function () { + console.log(`${server.name} listening to ${server.url}`); +}); + +// Create adapter +const adapter = new BotFrameworkAdapter({ + appId: process.env.MICROSOFT_APP_ID, + appPassword: process.env.MICROSOFT_APP_PASSWORD +}); + +// Add QnA Maker middleware +// The exported Knowledge Base can be found under `smartLightFAQ.tsv`. +const qnaMaker = new QnAMaker({ + knowledgeBaseId: "11b09dd1-687a-4784-9c8a-d6532e65535d", + subscriptionKey: "6f24c2ab835645c38e2b28b7c24e08fa", + answerBeforeNext: true +}); +adapter.use(qnaMaker); + +// Listen for incoming requests +server.post('/api/messages', (req, res) => { + // Route received request to adapter for processing + adapter.processActivity(req, res, async (context) => { + // If `!context.responded`, that means an answer wasn't found for the user's utterance. + // In this case, we send the user info about the bot, as well as an example question to retrieve an answer from QnA Maker. + if (context.activity.type === 'message' && !context.responded) { + return await context.sendActivity('No QnA Maker answers were found. This example uses a QnA Maker Knowledge Base that focuses on smart light bulbs. To see QnA Maker in action, ask the bot questions like "Why won\'t it turn on?" or say something like "I need help."'); + } + if (context.activity.type !== 'message') { + return await context.sendActivity(`[${context.activity.type} event detected]`); + } + }); +}); diff --git a/samples/qna-translator-es6/package.json b/samples/qna-maker-bot-es6/package.json similarity index 61% rename from samples/qna-translator-es6/package.json rename to samples/qna-maker-bot-es6/package.json index ff83c80b48..4892f0f93f 100644 --- a/samples/qna-translator-es6/package.json +++ b/samples/qna-maker-bot-es6/package.json @@ -1,12 +1,12 @@ { - "name": "qna-translator-es6", + "name": "qna-maker-bot-es6", "version": "1.0.0", - "description": "Bot Builder v4 example showing a bot using language translation and QnA Maker.", + "description": "Bot Builder v4 example showing a bot using QnA Maker.", "main": "app.js", "scripts": { "start": "node app.js" }, - "author": "", + "author": "Microsoft", "license": "MIT", "dependencies": { "botbuilder": "^4.0.0-m3.0", diff --git a/samples/qna-maker-bot-es6/smartLightFAQ.tsv b/samples/qna-maker-bot-es6/smartLightFAQ.tsv new file mode 100644 index 0000000000..1273b4b076 --- /dev/null +++ b/samples/qna-maker-bot-es6/smartLightFAQ.tsv @@ -0,0 +1,15 @@ +Question Answer Source Keywords +Question Answer 96207418-4609-48df-9cbc-dd35a71e83f7-KB.tsv Source +My Contoso smart light won't turn on. Check the connection to the wall outlet to make sure it's plugged in properly. 96207418-4609-48df-9cbc-dd35a71e83f7-KB.tsv Editorial +Light won't turn on. Check the connection to the wall outlet to make sure it's plugged in properly. 96207418-4609-48df-9cbc-dd35a71e83f7-KB.tsv Editorial +My smart light app stopped responding. Restart the app. If the problem persists, contact support. 96207418-4609-48df-9cbc-dd35a71e83f7-KB.tsv Editorial +How do I contact support? Email us at service@contoso.com 96207418-4609-48df-9cbc-dd35a71e83f7-KB.tsv Editorial +I need help. Email us at service@contoso.com 96207418-4609-48df-9cbc-dd35a71e83f7-KB.tsv Editorial +I upgraded the app and it doesn't work anymore. When you upgrade, you need to disable Bluetooth, then re-enable it. After re-enable, re-pair your light with the app. 96207418-4609-48df-9cbc-dd35a71e83f7-KB.tsv Editorial +Light doesn't work after upgrade. When you upgrade, you need to disable Bluetooth, then re-enable it. After re-enable, re-pair your light with the app. 96207418-4609-48df-9cbc-dd35a71e83f7-KB.tsv Editorial +Question Answer 890b1efc-27ad-4dca-8dcb-b20d29d50e14-KB.tsv Source +Who should I contact for customer service? Please direct all customer service questions to (202) 555-0164 \n 890b1efc-27ad-4dca-8dcb-b20d29d50e14-KB.tsv Editorial +Why does the light not work? The simplest way to troubleshoot your smart light is to turn it off and on. \n 890b1efc-27ad-4dca-8dcb-b20d29d50e14-KB.tsv Editorial +How long does the light's battery last for? The battery will last approximately 10 - 12 weeks with regular use.  \n 890b1efc-27ad-4dca-8dcb-b20d29d50e14-KB.tsv Editorial +What type of light bulb do I need? A 26-Watt compact fluorescent light bulb that features both energy savings and long-life performance. 890b1efc-27ad-4dca-8dcb-b20d29d50e14-KB.tsv Editorial +Hi Hello Editorial diff --git a/samples/qna-translator-es6/app.js b/samples/qna-translator-es6/app.js deleted file mode 100644 index 5f3b128d3d..0000000000 --- a/samples/qna-translator-es6/app.js +++ /dev/null @@ -1,97 +0,0 @@ -const { BotFrameworkAdapter, MemoryStorage, ConversationState } = require('botbuilder'); -const { LanguageTranslator, LocaleConverter, QnAMaker } = require('botbuilder-ai') -const restify = require('restify'); - -// Create server -let server = restify.createServer(); -server.listen(process.env.port || process.env.PORT || 3978, function () { - console.log(`${server.name} listening to ${server.url}`); -}); - -// Create adapter -const adapter = new BotFrameworkAdapter({ - appId: process.env.MICROSOFT_APP_ID, - appPassword: process.env.MICROSOFT_APP_PASSWORD -}); - -// Add conversation state middleware -const conversationState = new ConversationState(new MemoryStorage()); -adapter.use(conversationState); - -// Delegates for getting and setting user language -function getUserLanguage(context) { - const state = conversationState.get(context) - if (state.language == undefined) { - return 'en'; - } else { - return state.language; - } -} - -async function setUserLanguage(context) { - let state = conversationState.get(context) - if (context.activity.text.toLowerCase().startsWith('set my language to')) { - state.language = context.activity.text.toLowerCase().replace('set my language to', '').trim(); - await context.sendActivity(`Setting your language to ${state.language}`); - return Promise.resolve(true); - } else { - return Promise.resolve(false); - } -} - -// Delegates for getting and setting user locale -function getUserLocale(context) { - const state = conversationState.get(context) - if (state.locale == undefined) { - return 'en-us'; - } else { - return state.locale; - } -} - -async function setUserLocale(context) { - let state = conversationState.get(context) - if (context.activity.text.toLowerCase().startsWith('set my locale to')) { - state.locale = context.activity.text.toLowerCase().replace('set my locale to', '').trim(); - await context.sendActivity(`Setting your locale to ${state.locale}`); - return Promise.resolve(true); - } else { - return Promise.resolve(false); - } -} - -// Add language translator middleware -const languageTranslator = new LanguageTranslator({ - translatorKey: "xxxxxx ", - noTranslatePatterns: new Set(), - nativeLanguages: ['en'], - setUserLanguage: setUserLanguage, - getUserLanguage: getUserLanguage -}); -adapter.use(languageTranslator); - -// Add locale converter middleware -const localeConverter = new LocaleConverter({ - toLocale: 'en-us', - setUserLocale: setUserLocale, - getUserLocale: getUserLocale -}); -adapter.use(localeConverter); - -// Add Qna Maker middleware -const qnaMaker = new QnAMaker({ - knowledgeBaseId: "xxxxxx", - subscriptionKey: "xxxxxx", - answerBeforeNext: true -}); -adapter.use(qnaMaker); - -// Listen for incoming requests -server.post('/api/messages', (req, res) => { - // Route received request to adapter for processing - adapter.processActivity(req, res, (context) => { - if (context.activity.type != 'message') { - return context.sendActivity(`[${context.activity.type} event detected]`); - } - }); -}); From 4262dc69d315fb692fcd5bddcdb6ba6ecbeace3e Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Mon, 30 Apr 2018 10:38:29 -0700 Subject: [PATCH 11/15] add webChatAdapter sample --- .../echobot-es6-botframework-webchat/.babelrc | 13 ++++ .../README.md | 6 ++ .../index.html | 19 ++++++ .../package.json | 27 ++++++++ .../src/app.js | 65 +++++++++++++++++++ .../src/css/app.css | 44 +++++++++++++ .../src/webChatAdapter.js | 59 +++++++++++++++++ .../webpack.config.js | 38 +++++++++++ 8 files changed, 271 insertions(+) create mode 100644 samples/echobot-es6-botframework-webchat/.babelrc create mode 100644 samples/echobot-es6-botframework-webchat/README.md create mode 100644 samples/echobot-es6-botframework-webchat/index.html create mode 100644 samples/echobot-es6-botframework-webchat/package.json create mode 100644 samples/echobot-es6-botframework-webchat/src/app.js create mode 100644 samples/echobot-es6-botframework-webchat/src/css/app.css create mode 100644 samples/echobot-es6-botframework-webchat/src/webChatAdapter.js create mode 100644 samples/echobot-es6-botframework-webchat/webpack.config.js diff --git a/samples/echobot-es6-botframework-webchat/.babelrc b/samples/echobot-es6-botframework-webchat/.babelrc new file mode 100644 index 0000000000..7d4ee6afb1 --- /dev/null +++ b/samples/echobot-es6-botframework-webchat/.babelrc @@ -0,0 +1,13 @@ +{ + "presets": [ + ["env", { + "targets": { + "browsers": "current" + }, + "modules": "umd" + }] + ], + "ignore": [ + "node_modules/**/" + ] +} \ No newline at end of file diff --git a/samples/echobot-es6-botframework-webchat/README.md b/samples/echobot-es6-botframework-webchat/README.md new file mode 100644 index 0000000000..740757b254 --- /dev/null +++ b/samples/echobot-es6-botframework-webchat/README.md @@ -0,0 +1,6 @@ +The example shows the use of the botbuilder-js SDK for the browser using the [BotFramework-WebChat](https://github.com/Microsoft/BotFramework-WebChat) and a custom [WebChatAdapter](/src/webChatAdapter.js). + +### To Run: +1. from the root `echobot-es6-botframework-webchat` run `npm install` +2. start the dev server: `npm start` +2. navigate to `http://localhost:8080` \ No newline at end of file diff --git a/samples/echobot-es6-botframework-webchat/index.html b/samples/echobot-es6-botframework-webchat/index.html new file mode 100644 index 0000000000..1def6d3197 --- /dev/null +++ b/samples/echobot-es6-botframework-webchat/index.html @@ -0,0 +1,19 @@ + + + + + Example echo bot using botframework-webchat + + + +
+
+
+ + + \ No newline at end of file diff --git a/samples/echobot-es6-botframework-webchat/package.json b/samples/echobot-es6-botframework-webchat/package.json new file mode 100644 index 0000000000..28bc717484 --- /dev/null +++ b/samples/echobot-es6-botframework-webchat/package.json @@ -0,0 +1,27 @@ +{ + "name": "echobot-es6-botframework-webchat", + "version": "1.0.0", + "description": "Example echo bot using the botframework-webchat", + "main": "app.js", + "scripts": { + "start": "webpack-dev-server", + "build-sample": "webpack" + }, + "author": "Microsoft", + "license": "MIT", + "dependencies": { + "botbuilder": "^4.0.0-m3.0", + "botbuilder-azure": "^4.0.0-m4.0", + "botframework-webchat": "^0.11.4" + }, + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-preset-env": "^1.6.1", + "clean-webpack-plugin": "^0.1.18", + "copy-webpack-plugin": "^4.3.1", + "css-loader": "^0.28.9", + "style-loader": "^0.20.1", + "webpack": "^3.10.0", + "webpack-dev-server": "^2.11.1" + } +} diff --git a/samples/echobot-es6-botframework-webchat/src/app.js b/samples/echobot-es6-botframework-webchat/src/app.js new file mode 100644 index 0000000000..4fbb69c38c --- /dev/null +++ b/samples/echobot-es6-botframework-webchat/src/app.js @@ -0,0 +1,65 @@ +import './css/app.css'; +import { Bot, ConversationState, MemoryStorage } from 'botbuilder'; +import { BlobStorage, CosmosDbStorage, TableStorage } from 'botbuilder-azure'; +import 'botframework-webchat/botchat.css'; +import { App } from 'botframework-webchat/built/App'; +import { WebChatAdapter } from './webChatAdapter'; + +// Instantiate MemoryStorage for use with the ConversationState middleware +// Below are examples of different memory storage offerings that use Azure Blob, Table and Cosmos DB storage +const memory = new MemoryStorage(); + +// To use Azure Blob Storage to store memory, you can the BlobStorage class from `botbuilder-azure` +// When using BlobStorage either a host string or a `Host` interface must be provided for the host parameter, https://github.com/Microsoft/botbuilder-js/blob/master/libraries/botbuilder-azure/src/blobStorage.ts#L13L29 +// const blobStorageHost = { +// primaryHost: '', +// secondaryHost: '' +// } +// const memory = new BlobStorage({ +// storageAccountOrConnectionString: '', +// storageAccessKey: '', +// host: '' || blobStorageHost, +// containerName: '' +// }); + +// To use Azure Cosmos DB Storage to store memory, you can the CosmosDbStorage class from `botbuilder-azure` +// const memory = new CosmosDbStorage({ +// serviceEndpoint: '', +// authKey: '', +// databaseId: '', +// collectionId: '' +// }); + +// To use Azure Table Storage to store memory, you can the TableStorage class from `botbuilder-azure` +// const memory = new TableStorage({ +// tablename: '', +// storageAccessKey: '', // optional +// storageAccountOrConnectionString: '', // optional +// host: '' // optional +// }); + +// Add the instatiated storage into a new ConversationState +const conversationState = new ConversationState(memory); + +// Create the custom WebChatAdapter and add the ConversationState middleware +const webChatAdapter = new WebChatAdapter() + .use(conversationState) + +// Connect our BotFramework-WebChat App instance with the DOM +App({ + user: { id: "Me!" }, + bot: { id: "bot" }, + botConnection: webChatAdapter.botConnection, +}, document.getElementById('bot')); + +// Register the business logic of the bot through the WebChatAdapter's processActivity implementation. +webChatAdapter.processActivity(async (context) => { + const state = conversationState.get(context); + state.bump = state.bump ? state.bump + 1 : 1; + await context.sendActivity(`${state.bump}: You said, "${context.activity.text}"`); +}); + +// FOUC +document.addEventListener('DOMContentLoaded', function () { + requestAnimationFrame(() => document.body.style.visibility = 'visible'); +}); \ No newline at end of file diff --git a/samples/echobot-es6-botframework-webchat/src/css/app.css b/samples/echobot-es6-botframework-webchat/src/css/app.css new file mode 100644 index 0000000000..b0d5869ede --- /dev/null +++ b/samples/echobot-es6-botframework-webchat/src/css/app.css @@ -0,0 +1,44 @@ +body { + font-family: "Segoe UI", sans-serif; + font-size: 15px; + box-sizing: content-box; +} + +section { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: 10px; + padding: 10px; + border: 1px solid #d1d1d1; + display: flex; + overflow: hidden; +} + +section > div:first-child { + width: 100%; +} + +section > div:last-child { + min-width: 200px; +} + +input[type="text"] { + height: 39px; + width: calc(100% - 105px); + margin: 0; +} + +button.button-primary { + margin: 0; +} + +.border-left { + border-left: 1px solid #D1D1D1; +} + +#bot { + position: relative; +} diff --git a/samples/echobot-es6-botframework-webchat/src/webChatAdapter.js b/samples/echobot-es6-botframework-webchat/src/webChatAdapter.js new file mode 100644 index 0000000000..a7e9aba693 --- /dev/null +++ b/samples/echobot-es6-botframework-webchat/src/webChatAdapter.js @@ -0,0 +1,59 @@ +import { ConnectionStatus } from 'botframework-webchat'; +import { Subject, Observable, BehaviorSubject } from 'rxjs'; +import { BotAdapter, TurnContext } from 'botbuilder'; + +export class WebChatAdapter extends BotAdapter { + constructor() { + super(); + this.activity$ = new Subject(); + this.botConnection = { + connectionStatus$: new BehaviorSubject(ConnectionStatus.Online), + activity$: this.activity$.share(), + end() { + debugger + }, + postActivity: activity => { + const id = Date.now().toString(); + return Observable.fromPromise(this + .onReceive(Object.assign({}, activity, { + id, + conversation: { id: 'bot' }, + channelId: 'WebChat' + })) + .then(() => id) + ) + } + } + } + + // This WebChatAdapter implements the sendActivities method which is called by the TurnContext class + // See: https://github.com/Microsoft/botbuilder-js/blob/master/libraries/botbuilder-core/src/turnContext.ts#L222 + // It's also possible to write a custom Context class with different methods of accessing an adapter + sendActivities(context, activities) { + console.log(Date.now().toString()) + const sentActivities = activities.map(activity => Object.assign({}, activity, { + id: Date.now().toString(), + channelId: 'WebChat', + conversation: { id: 'bot' }, + from: { id: 'bot' }, + timestamp: Date.now() + })); + + sentActivities.forEach(activity => this.activity$.next(activity)); + + return Promise.resolve(sentActivities.map(activity => { + id: activity.id + })); + } + + // Used to register business logic for the bot, it takes a handler that takes a context object as a parameter + processActivity(logic) { + this.logic = logic; + return this; + } + + onReceive(activity) { + const context = new TurnContext(this, activity); + return this.runMiddleware(context, this.logic || function () { }); + } +} diff --git a/samples/echobot-es6-botframework-webchat/webpack.config.js b/samples/echobot-es6-botframework-webchat/webpack.config.js new file mode 100644 index 0000000000..3b099f2fd0 --- /dev/null +++ b/samples/echobot-es6-botframework-webchat/webpack.config.js @@ -0,0 +1,38 @@ +const path = require('path'); +const CleanWebpackPlugin = require('clean-webpack-plugin'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); +const webpack = require('webpack'); + +module.exports = { + entry: './src/app.js', + devtool: 'source-map', + devServer: { + contentBase: './dist', + hot: true + }, + module: { + rules: [ + { + test: /\.css$/, + use: [ 'style-loader', 'css-loader' ] + } + ] + }, + plugins: [ + new CleanWebpackPlugin(['dist']), + new webpack.NamedModulesPlugin(), + new webpack.HotModuleReplacementPlugin(), + new CopyWebpackPlugin([ + {from: path.resolve(__dirname, 'index.html'), to: ''}, + ]) + ], + output: { + filename: 'app.js', + path: path.resolve(__dirname, 'dist') + }, + node: { + fs: 'empty', + net: 'empty', + tls: 'empty' + } +}; \ No newline at end of file From 84badbc533165f30e54b18a3708ce61cd464f160 Mon Sep 17 00:00:00 2001 From: Steven Gum Date: Mon, 30 Apr 2018 12:40:47 -0700 Subject: [PATCH 12/15] cleanup of old samples --- .../.babelrc | 13 - .../README.md | 6 - .../dist/app.js | 62612 ---------------- .../dist/app.js.map | 1 - .../dist/index.html | 23 - .../index.html | 23 - .../package.json | 27 - .../src/alarmRenderer.js | 11 - .../src/alarms/addAlarm.js | 54 - .../src/alarms/cancel.js | 10 - .../src/alarms/deleteAlarm.js | 39 - .../src/alarms/showAlarms.js | 25 - .../src/alarmsListComponent.js | 61 - .../src/app.js | 30 - .../src/css/app.css | 91 - .../src/routes.js | 32 - .../src/webChatAdapter.js | 46 - .../webpack.config.js | 33 - samples/alarmbot-es6-custom-webchat/.babelrc | 13 - samples/alarmbot-es6-custom-webchat/README.md | 6 - .../alarmbot-es6-custom-webchat/dist/app.js | 2617 - .../dist/index.html | 34 - .../alarmbot-es6-custom-webchat/index.html | 34 - .../alarmbot-es6-custom-webchat/package.json | 27 - .../src/alarmRenderer.js | 11 - .../src/alarms/addAlarm.js | 54 - .../src/alarms/cancel.js | 10 - .../src/alarms/deleteAlarm.js | 39 - .../src/alarms/showAlarms.js | 25 - .../alarmbot-es6-custom-webchat/src/app.js | 25 - .../src/chatComponent.js | 125 - .../src/css/alarmBot.css | 161 - .../alarmbot-es6-custom-webchat/src/routes.js | 32 - .../src/webChatAdapter.js | 32 - .../webpack.config.js | 32 - samples/alarmbot-es6/addAlarm.js | 63 - samples/alarmbot-es6/app.js | 53 - samples/alarmbot-es6/botStateManager.js | 48 - samples/alarmbot-es6/cancel.js | 12 - samples/alarmbot-es6/deleteAlarm.js | 38 - samples/alarmbot-es6/package.json | 16 - samples/alarmbot-es6/showAlarms.js | 30 - samples/alarmbot-ts/lib/addAlarm.js | 73 - samples/alarmbot-ts/lib/addAlarm.js.map | 1 - samples/alarmbot-ts/lib/app.js | 67 - samples/alarmbot-ts/lib/app.js.map | 1 - samples/alarmbot-ts/lib/botStateManager.js | 27 - .../alarmbot-ts/lib/botStateManager.js.map | 1 - samples/alarmbot-ts/lib/cancel.js | 25 - samples/alarmbot-ts/lib/cancel.js.map | 1 - samples/alarmbot-ts/lib/deleteAlarm.js | 51 - samples/alarmbot-ts/lib/deleteAlarm.js.map | 1 - samples/alarmbot-ts/lib/showAlarms.js | 41 - samples/alarmbot-ts/lib/showAlarms.js.map | 1 - samples/alarmbot-ts/package-lock.json | 45 - samples/alarmbot-ts/package.json | 18 - samples/alarmbot-ts/src/addAlarm.ts | 60 - samples/alarmbot-ts/src/app.ts | 56 - samples/alarmbot-ts/src/botStateManager.ts | 44 - samples/alarmbot-ts/src/cancel.ts | 13 - samples/alarmbot-ts/src/deleteAlarm.ts | 39 - samples/alarmbot-ts/src/showAlarms.ts | 31 - samples/alarmbot-ts/tsconfig.json | 53 - samples/bot-handoff-es6/README.md | 8 - samples/bot-handoff-es6/app.js | 111 - samples/bot-handoff-es6/emulate-users.py | 42 - samples/bot-handoff-es6/package.json | 15 - samples/echobot-connector-es6/app.js | 65 - samples/echobot-connector-es6/package.json | 16 - samples/echobot-console-ts/lib/app.js | 29 - samples/echobot-console-ts/package-lock.json | 45 - samples/echobot-console-ts/package.json | 16 - samples/echobot-console-ts/src/app.ts | 27 - samples/echobot-console-ts/tsconfig.json | 53 - samples/echobot-ts/lib/app.js | 39 - samples/echobot-ts/package-lock.json | 45 - samples/echobot-ts/package.json | 18 - samples/echobot-ts/src/app.ts | 37 - samples/echobot-ts/tsconfig.json | 53 - samples/luis-translator-es6/app.js | 103 - samples/luis-translator-es6/package.json | 16 - samples/luis-translator-ts/lib/app.js | 112 - samples/luis-translator-ts/package-lock.json | 1316 - samples/luis-translator-ts/package.json | 19 - samples/luis-translator-ts/src/app.ts | 110 - samples/luis-translator-ts/tsconfig.json | 53 - samples/primitive-prompts-es6/app.js | 60 - .../primitive-prompts-es6/package-lock.json | 600 - samples/primitive-prompts-es6/package.json | 15 - samples/primitive-prompts-ts/lib/app.js | 62 - samples/primitive-prompts-ts/lib/app.js.map | 1 - .../primitive-prompts-ts/package-lock.json | 1292 - samples/primitive-prompts-ts/package.json | 18 - samples/primitive-prompts-ts/src/app.ts | 67 - samples/primitive-prompts-ts/tsconfig.json | 53 - samples/qna-translator-ts/lib/app.js | 103 - samples/qna-translator-ts/package-lock.json | 1316 - samples/qna-translator-ts/package.json | 19 - samples/qna-translator-ts/src/app.ts | 102 - samples/qna-translator-ts/tsconfig.json | 53 - samples/redux-bot-es6/app.js | 104 - samples/redux-bot-es6/conversation.js | 55 - samples/redux-bot-es6/package-lock.json | 1185 - samples/redux-bot-es6/package.json | 14 - samples/translator-es6/app.js | 93 - samples/translator-es6/package.json | 16 - samples/translator-ts/lib/app.js | 53 - samples/translator-ts/package-lock.json | 1316 - samples/translator-ts/package.json | 19 - samples/translator-ts/src/app.ts | 99 - samples/translator-ts/tsconfig.json | 53 - 111 files changed, 76439 deletions(-) delete mode 100644 samples/alarmbot-es6-botframework-webchat/.babelrc delete mode 100644 samples/alarmbot-es6-botframework-webchat/README.md delete mode 100644 samples/alarmbot-es6-botframework-webchat/dist/app.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/dist/app.js.map delete mode 100644 samples/alarmbot-es6-botframework-webchat/dist/index.html delete mode 100644 samples/alarmbot-es6-botframework-webchat/index.html delete mode 100644 samples/alarmbot-es6-botframework-webchat/package.json delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/alarmRenderer.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/alarms/addAlarm.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/alarms/cancel.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/alarms/deleteAlarm.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/alarms/showAlarms.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/alarmsListComponent.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/app.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/css/app.css delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/routes.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/src/webChatAdapter.js delete mode 100644 samples/alarmbot-es6-botframework-webchat/webpack.config.js delete mode 100644 samples/alarmbot-es6-custom-webchat/.babelrc delete mode 100644 samples/alarmbot-es6-custom-webchat/README.md delete mode 100644 samples/alarmbot-es6-custom-webchat/dist/app.js delete mode 100644 samples/alarmbot-es6-custom-webchat/dist/index.html delete mode 100644 samples/alarmbot-es6-custom-webchat/index.html delete mode 100644 samples/alarmbot-es6-custom-webchat/package.json delete mode 100644 samples/alarmbot-es6-custom-webchat/src/alarmRenderer.js delete mode 100644 samples/alarmbot-es6-custom-webchat/src/alarms/addAlarm.js delete mode 100644 samples/alarmbot-es6-custom-webchat/src/alarms/cancel.js delete mode 100644 samples/alarmbot-es6-custom-webchat/src/alarms/deleteAlarm.js delete mode 100644 samples/alarmbot-es6-custom-webchat/src/alarms/showAlarms.js delete mode 100644 samples/alarmbot-es6-custom-webchat/src/app.js delete mode 100644 samples/alarmbot-es6-custom-webchat/src/chatComponent.js delete mode 100644 samples/alarmbot-es6-custom-webchat/src/css/alarmBot.css delete mode 100644 samples/alarmbot-es6-custom-webchat/src/routes.js delete mode 100644 samples/alarmbot-es6-custom-webchat/src/webChatAdapter.js delete mode 100644 samples/alarmbot-es6-custom-webchat/webpack.config.js delete mode 100644 samples/alarmbot-es6/addAlarm.js delete mode 100644 samples/alarmbot-es6/app.js delete mode 100644 samples/alarmbot-es6/botStateManager.js delete mode 100644 samples/alarmbot-es6/cancel.js delete mode 100644 samples/alarmbot-es6/deleteAlarm.js delete mode 100644 samples/alarmbot-es6/package.json delete mode 100644 samples/alarmbot-es6/showAlarms.js delete mode 100644 samples/alarmbot-ts/lib/addAlarm.js delete mode 100644 samples/alarmbot-ts/lib/addAlarm.js.map delete mode 100644 samples/alarmbot-ts/lib/app.js delete mode 100644 samples/alarmbot-ts/lib/app.js.map delete mode 100644 samples/alarmbot-ts/lib/botStateManager.js delete mode 100644 samples/alarmbot-ts/lib/botStateManager.js.map delete mode 100644 samples/alarmbot-ts/lib/cancel.js delete mode 100644 samples/alarmbot-ts/lib/cancel.js.map delete mode 100644 samples/alarmbot-ts/lib/deleteAlarm.js delete mode 100644 samples/alarmbot-ts/lib/deleteAlarm.js.map delete mode 100644 samples/alarmbot-ts/lib/showAlarms.js delete mode 100644 samples/alarmbot-ts/lib/showAlarms.js.map delete mode 100644 samples/alarmbot-ts/package-lock.json delete mode 100644 samples/alarmbot-ts/package.json delete mode 100644 samples/alarmbot-ts/src/addAlarm.ts delete mode 100644 samples/alarmbot-ts/src/app.ts delete mode 100644 samples/alarmbot-ts/src/botStateManager.ts delete mode 100644 samples/alarmbot-ts/src/cancel.ts delete mode 100644 samples/alarmbot-ts/src/deleteAlarm.ts delete mode 100644 samples/alarmbot-ts/src/showAlarms.ts delete mode 100644 samples/alarmbot-ts/tsconfig.json delete mode 100644 samples/bot-handoff-es6/README.md delete mode 100644 samples/bot-handoff-es6/app.js delete mode 100755 samples/bot-handoff-es6/emulate-users.py delete mode 100644 samples/bot-handoff-es6/package.json delete mode 100644 samples/echobot-connector-es6/app.js delete mode 100644 samples/echobot-connector-es6/package.json delete mode 100644 samples/echobot-console-ts/lib/app.js delete mode 100644 samples/echobot-console-ts/package-lock.json delete mode 100644 samples/echobot-console-ts/package.json delete mode 100644 samples/echobot-console-ts/src/app.ts delete mode 100644 samples/echobot-console-ts/tsconfig.json delete mode 100644 samples/echobot-ts/lib/app.js delete mode 100644 samples/echobot-ts/package-lock.json delete mode 100644 samples/echobot-ts/package.json delete mode 100644 samples/echobot-ts/src/app.ts delete mode 100644 samples/echobot-ts/tsconfig.json delete mode 100644 samples/luis-translator-es6/app.js delete mode 100644 samples/luis-translator-es6/package.json delete mode 100644 samples/luis-translator-ts/lib/app.js delete mode 100644 samples/luis-translator-ts/package-lock.json delete mode 100644 samples/luis-translator-ts/package.json delete mode 100644 samples/luis-translator-ts/src/app.ts delete mode 100644 samples/luis-translator-ts/tsconfig.json delete mode 100644 samples/primitive-prompts-es6/app.js delete mode 100644 samples/primitive-prompts-es6/package-lock.json delete mode 100644 samples/primitive-prompts-es6/package.json delete mode 100644 samples/primitive-prompts-ts/lib/app.js delete mode 100644 samples/primitive-prompts-ts/lib/app.js.map delete mode 100644 samples/primitive-prompts-ts/package-lock.json delete mode 100644 samples/primitive-prompts-ts/package.json delete mode 100644 samples/primitive-prompts-ts/src/app.ts delete mode 100644 samples/primitive-prompts-ts/tsconfig.json delete mode 100644 samples/qna-translator-ts/lib/app.js delete mode 100644 samples/qna-translator-ts/package-lock.json delete mode 100644 samples/qna-translator-ts/package.json delete mode 100644 samples/qna-translator-ts/src/app.ts delete mode 100644 samples/qna-translator-ts/tsconfig.json delete mode 100644 samples/redux-bot-es6/app.js delete mode 100644 samples/redux-bot-es6/conversation.js delete mode 100644 samples/redux-bot-es6/package-lock.json delete mode 100644 samples/redux-bot-es6/package.json delete mode 100644 samples/translator-es6/app.js delete mode 100644 samples/translator-es6/package.json delete mode 100644 samples/translator-ts/lib/app.js delete mode 100644 samples/translator-ts/package-lock.json delete mode 100644 samples/translator-ts/package.json delete mode 100644 samples/translator-ts/src/app.ts delete mode 100644 samples/translator-ts/tsconfig.json diff --git a/samples/alarmbot-es6-botframework-webchat/.babelrc b/samples/alarmbot-es6-botframework-webchat/.babelrc deleted file mode 100644 index 7d4ee6afb1..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/.babelrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "presets": [ - ["env", { - "targets": { - "browsers": "current" - }, - "modules": "umd" - }] - ], - "ignore": [ - "node_modules/**/" - ] -} \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/README.md b/samples/alarmbot-es6-botframework-webchat/README.md deleted file mode 100644 index a1a1fdba67..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/README.md +++ /dev/null @@ -1,6 +0,0 @@ -The example shows the use of the botbuilder-js SDK for the browser using the [BotFramework-WebChat](https://github.com/Microsoft/BotFramework-WebChat) - -### To Run: -1. from the root `./botbuilder-js` run `npm install -g lerna && lerna bootstrap --hoist` -2. cd to the alarmbot-es6-botframework-webchat directory and start the dev server: `npm start` -2. navigate to `http://localhost:8080` \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/dist/app.js b/samples/alarmbot-es6-botframework-webchat/dist/app.js deleted file mode 100644 index ed67c4874c..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/dist/app.js +++ /dev/null @@ -1,62612 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ function hotDisposeChunk(chunkId) { -/******/ delete installedChunks[chunkId]; -/******/ } -/******/ var parentHotUpdateCallback = window["webpackHotUpdate"]; -/******/ window["webpackHotUpdate"] = -/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars -/******/ hotAddUpdateChunk(chunkId, moreModules); -/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); -/******/ } ; -/******/ -/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars -/******/ var head = document.getElementsByTagName("head")[0]; -/******/ var script = document.createElement("script"); -/******/ script.type = "text/javascript"; -/******/ script.charset = "utf-8"; -/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js"; -/******/ ; -/******/ head.appendChild(script); -/******/ } -/******/ -/******/ function hotDownloadManifest(requestTimeout) { // eslint-disable-line no-unused-vars -/******/ requestTimeout = requestTimeout || 10000; -/******/ return new Promise(function(resolve, reject) { -/******/ if(typeof XMLHttpRequest === "undefined") -/******/ return reject(new Error("No browser support")); -/******/ try { -/******/ var request = new XMLHttpRequest(); -/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json"; -/******/ request.open("GET", requestPath, true); -/******/ request.timeout = requestTimeout; -/******/ request.send(null); -/******/ } catch(err) { -/******/ return reject(err); -/******/ } -/******/ request.onreadystatechange = function() { -/******/ if(request.readyState !== 4) return; -/******/ if(request.status === 0) { -/******/ // timeout -/******/ reject(new Error("Manifest request to " + requestPath + " timed out.")); -/******/ } else if(request.status === 404) { -/******/ // no update available -/******/ resolve(); -/******/ } else if(request.status !== 200 && request.status !== 304) { -/******/ // other failure -/******/ reject(new Error("Manifest request to " + requestPath + " failed.")); -/******/ } else { -/******/ // success -/******/ try { -/******/ var update = JSON.parse(request.responseText); -/******/ } catch(e) { -/******/ reject(e); -/******/ return; -/******/ } -/******/ resolve(update); -/******/ } -/******/ }; -/******/ }); -/******/ } -/******/ -/******/ -/******/ -/******/ var hotApplyOnUpdate = true; -/******/ var hotCurrentHash = "7cbbf5b4fa6d00323a10"; // eslint-disable-line no-unused-vars -/******/ var hotRequestTimeout = 10000; -/******/ var hotCurrentModuleData = {}; -/******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars -/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars -/******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars -/******/ -/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars -/******/ var me = installedModules[moduleId]; -/******/ if(!me) return __webpack_require__; -/******/ var fn = function(request) { -/******/ if(me.hot.active) { -/******/ if(installedModules[request]) { -/******/ if(installedModules[request].parents.indexOf(moduleId) < 0) -/******/ installedModules[request].parents.push(moduleId); -/******/ } else { -/******/ hotCurrentParents = [moduleId]; -/******/ hotCurrentChildModule = request; -/******/ } -/******/ if(me.children.indexOf(request) < 0) -/******/ me.children.push(request); -/******/ } else { -/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId); -/******/ hotCurrentParents = []; -/******/ } -/******/ return __webpack_require__(request); -/******/ }; -/******/ var ObjectFactory = function ObjectFactory(name) { -/******/ return { -/******/ configurable: true, -/******/ enumerable: true, -/******/ get: function() { -/******/ return __webpack_require__[name]; -/******/ }, -/******/ set: function(value) { -/******/ __webpack_require__[name] = value; -/******/ } -/******/ }; -/******/ }; -/******/ for(var name in __webpack_require__) { -/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== "e") { -/******/ Object.defineProperty(fn, name, ObjectFactory(name)); -/******/ } -/******/ } -/******/ fn.e = function(chunkId) { -/******/ if(hotStatus === "ready") -/******/ hotSetStatus("prepare"); -/******/ hotChunksLoading++; -/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) { -/******/ finishChunkLoading(); -/******/ throw err; -/******/ }); -/******/ -/******/ function finishChunkLoading() { -/******/ hotChunksLoading--; -/******/ if(hotStatus === "prepare") { -/******/ if(!hotWaitingFilesMap[chunkId]) { -/******/ hotEnsureUpdateChunk(chunkId); -/******/ } -/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ } -/******/ } -/******/ }; -/******/ return fn; -/******/ } -/******/ -/******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars -/******/ var hot = { -/******/ // private stuff -/******/ _acceptedDependencies: {}, -/******/ _declinedDependencies: {}, -/******/ _selfAccepted: false, -/******/ _selfDeclined: false, -/******/ _disposeHandlers: [], -/******/ _main: hotCurrentChildModule !== moduleId, -/******/ -/******/ // Module API -/******/ active: true, -/******/ accept: function(dep, callback) { -/******/ if(typeof dep === "undefined") -/******/ hot._selfAccepted = true; -/******/ else if(typeof dep === "function") -/******/ hot._selfAccepted = dep; -/******/ else if(typeof dep === "object") -/******/ for(var i = 0; i < dep.length; i++) -/******/ hot._acceptedDependencies[dep[i]] = callback || function() {}; -/******/ else -/******/ hot._acceptedDependencies[dep] = callback || function() {}; -/******/ }, -/******/ decline: function(dep) { -/******/ if(typeof dep === "undefined") -/******/ hot._selfDeclined = true; -/******/ else if(typeof dep === "object") -/******/ for(var i = 0; i < dep.length; i++) -/******/ hot._declinedDependencies[dep[i]] = true; -/******/ else -/******/ hot._declinedDependencies[dep] = true; -/******/ }, -/******/ dispose: function(callback) { -/******/ hot._disposeHandlers.push(callback); -/******/ }, -/******/ addDisposeHandler: function(callback) { -/******/ hot._disposeHandlers.push(callback); -/******/ }, -/******/ removeDisposeHandler: function(callback) { -/******/ var idx = hot._disposeHandlers.indexOf(callback); -/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1); -/******/ }, -/******/ -/******/ // Management API -/******/ check: hotCheck, -/******/ apply: hotApply, -/******/ status: function(l) { -/******/ if(!l) return hotStatus; -/******/ hotStatusHandlers.push(l); -/******/ }, -/******/ addStatusHandler: function(l) { -/******/ hotStatusHandlers.push(l); -/******/ }, -/******/ removeStatusHandler: function(l) { -/******/ var idx = hotStatusHandlers.indexOf(l); -/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1); -/******/ }, -/******/ -/******/ //inherit from previous dispose call -/******/ data: hotCurrentModuleData[moduleId] -/******/ }; -/******/ hotCurrentChildModule = undefined; -/******/ return hot; -/******/ } -/******/ -/******/ var hotStatusHandlers = []; -/******/ var hotStatus = "idle"; -/******/ -/******/ function hotSetStatus(newStatus) { -/******/ hotStatus = newStatus; -/******/ for(var i = 0; i < hotStatusHandlers.length; i++) -/******/ hotStatusHandlers[i].call(null, newStatus); -/******/ } -/******/ -/******/ // while downloading -/******/ var hotWaitingFiles = 0; -/******/ var hotChunksLoading = 0; -/******/ var hotWaitingFilesMap = {}; -/******/ var hotRequestedFilesMap = {}; -/******/ var hotAvailableFilesMap = {}; -/******/ var hotDeferred; -/******/ -/******/ // The update info -/******/ var hotUpdate, hotUpdateNewHash; -/******/ -/******/ function toModuleId(id) { -/******/ var isNumber = (+id) + "" === id; -/******/ return isNumber ? +id : id; -/******/ } -/******/ -/******/ function hotCheck(apply) { -/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status"); -/******/ hotApplyOnUpdate = apply; -/******/ hotSetStatus("check"); -/******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) { -/******/ if(!update) { -/******/ hotSetStatus("idle"); -/******/ return null; -/******/ } -/******/ hotRequestedFilesMap = {}; -/******/ hotWaitingFilesMap = {}; -/******/ hotAvailableFilesMap = update.c; -/******/ hotUpdateNewHash = update.h; -/******/ -/******/ hotSetStatus("prepare"); -/******/ var promise = new Promise(function(resolve, reject) { -/******/ hotDeferred = { -/******/ resolve: resolve, -/******/ reject: reject -/******/ }; -/******/ }); -/******/ hotUpdate = {}; -/******/ var chunkId = 0; -/******/ { // eslint-disable-line no-lone-blocks -/******/ /*globals chunkId */ -/******/ hotEnsureUpdateChunk(chunkId); -/******/ } -/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ return promise; -/******/ }); -/******/ } -/******/ -/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars -/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId]) -/******/ return; -/******/ hotRequestedFilesMap[chunkId] = false; -/******/ for(var moduleId in moreModules) { -/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ hotUpdate[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ } -/******/ -/******/ function hotEnsureUpdateChunk(chunkId) { -/******/ if(!hotAvailableFilesMap[chunkId]) { -/******/ hotWaitingFilesMap[chunkId] = true; -/******/ } else { -/******/ hotRequestedFilesMap[chunkId] = true; -/******/ hotWaitingFiles++; -/******/ hotDownloadUpdateChunk(chunkId); -/******/ } -/******/ } -/******/ -/******/ function hotUpdateDownloaded() { -/******/ hotSetStatus("ready"); -/******/ var deferred = hotDeferred; -/******/ hotDeferred = null; -/******/ if(!deferred) return; -/******/ if(hotApplyOnUpdate) { -/******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to -/******/ // avoid triggering uncaught exception warning in Chrome. -/******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666 -/******/ Promise.resolve().then(function() { -/******/ return hotApply(hotApplyOnUpdate); -/******/ }).then( -/******/ function(result) { -/******/ deferred.resolve(result); -/******/ }, -/******/ function(err) { -/******/ deferred.reject(err); -/******/ } -/******/ ); -/******/ } else { -/******/ var outdatedModules = []; -/******/ for(var id in hotUpdate) { -/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { -/******/ outdatedModules.push(toModuleId(id)); -/******/ } -/******/ } -/******/ deferred.resolve(outdatedModules); -/******/ } -/******/ } -/******/ -/******/ function hotApply(options) { -/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status"); -/******/ options = options || {}; -/******/ -/******/ var cb; -/******/ var i; -/******/ var j; -/******/ var module; -/******/ var moduleId; -/******/ -/******/ function getAffectedStuff(updateModuleId) { -/******/ var outdatedModules = [updateModuleId]; -/******/ var outdatedDependencies = {}; -/******/ -/******/ var queue = outdatedModules.slice().map(function(id) { -/******/ return { -/******/ chain: [id], -/******/ id: id -/******/ }; -/******/ }); -/******/ while(queue.length > 0) { -/******/ var queueItem = queue.pop(); -/******/ var moduleId = queueItem.id; -/******/ var chain = queueItem.chain; -/******/ module = installedModules[moduleId]; -/******/ if(!module || module.hot._selfAccepted) -/******/ continue; -/******/ if(module.hot._selfDeclined) { -/******/ return { -/******/ type: "self-declined", -/******/ chain: chain, -/******/ moduleId: moduleId -/******/ }; -/******/ } -/******/ if(module.hot._main) { -/******/ return { -/******/ type: "unaccepted", -/******/ chain: chain, -/******/ moduleId: moduleId -/******/ }; -/******/ } -/******/ for(var i = 0; i < module.parents.length; i++) { -/******/ var parentId = module.parents[i]; -/******/ var parent = installedModules[parentId]; -/******/ if(!parent) continue; -/******/ if(parent.hot._declinedDependencies[moduleId]) { -/******/ return { -/******/ type: "declined", -/******/ chain: chain.concat([parentId]), -/******/ moduleId: moduleId, -/******/ parentId: parentId -/******/ }; -/******/ } -/******/ if(outdatedModules.indexOf(parentId) >= 0) continue; -/******/ if(parent.hot._acceptedDependencies[moduleId]) { -/******/ if(!outdatedDependencies[parentId]) -/******/ outdatedDependencies[parentId] = []; -/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]); -/******/ continue; -/******/ } -/******/ delete outdatedDependencies[parentId]; -/******/ outdatedModules.push(parentId); -/******/ queue.push({ -/******/ chain: chain.concat([parentId]), -/******/ id: parentId -/******/ }); -/******/ } -/******/ } -/******/ -/******/ return { -/******/ type: "accepted", -/******/ moduleId: updateModuleId, -/******/ outdatedModules: outdatedModules, -/******/ outdatedDependencies: outdatedDependencies -/******/ }; -/******/ } -/******/ -/******/ function addAllToSet(a, b) { -/******/ for(var i = 0; i < b.length; i++) { -/******/ var item = b[i]; -/******/ if(a.indexOf(item) < 0) -/******/ a.push(item); -/******/ } -/******/ } -/******/ -/******/ // at begin all updates modules are outdated -/******/ // the "outdated" status can propagate to parents if they don't accept the children -/******/ var outdatedDependencies = {}; -/******/ var outdatedModules = []; -/******/ var appliedUpdate = {}; -/******/ -/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() { -/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module"); -/******/ }; -/******/ -/******/ for(var id in hotUpdate) { -/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { -/******/ moduleId = toModuleId(id); -/******/ var result; -/******/ if(hotUpdate[id]) { -/******/ result = getAffectedStuff(moduleId); -/******/ } else { -/******/ result = { -/******/ type: "disposed", -/******/ moduleId: id -/******/ }; -/******/ } -/******/ var abortError = false; -/******/ var doApply = false; -/******/ var doDispose = false; -/******/ var chainInfo = ""; -/******/ if(result.chain) { -/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> "); -/******/ } -/******/ switch(result.type) { -/******/ case "self-declined": -/******/ if(options.onDeclined) -/******/ options.onDeclined(result); -/******/ if(!options.ignoreDeclined) -/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo); -/******/ break; -/******/ case "declined": -/******/ if(options.onDeclined) -/******/ options.onDeclined(result); -/******/ if(!options.ignoreDeclined) -/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo); -/******/ break; -/******/ case "unaccepted": -/******/ if(options.onUnaccepted) -/******/ options.onUnaccepted(result); -/******/ if(!options.ignoreUnaccepted) -/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo); -/******/ break; -/******/ case "accepted": -/******/ if(options.onAccepted) -/******/ options.onAccepted(result); -/******/ doApply = true; -/******/ break; -/******/ case "disposed": -/******/ if(options.onDisposed) -/******/ options.onDisposed(result); -/******/ doDispose = true; -/******/ break; -/******/ default: -/******/ throw new Error("Unexception type " + result.type); -/******/ } -/******/ if(abortError) { -/******/ hotSetStatus("abort"); -/******/ return Promise.reject(abortError); -/******/ } -/******/ if(doApply) { -/******/ appliedUpdate[moduleId] = hotUpdate[moduleId]; -/******/ addAllToSet(outdatedModules, result.outdatedModules); -/******/ for(moduleId in result.outdatedDependencies) { -/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) { -/******/ if(!outdatedDependencies[moduleId]) -/******/ outdatedDependencies[moduleId] = []; -/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]); -/******/ } -/******/ } -/******/ } -/******/ if(doDispose) { -/******/ addAllToSet(outdatedModules, [result.moduleId]); -/******/ appliedUpdate[moduleId] = warnUnexpectedRequire; -/******/ } -/******/ } -/******/ } -/******/ -/******/ // Store self accepted outdated modules to require them later by the module system -/******/ var outdatedSelfAcceptedModules = []; -/******/ for(i = 0; i < outdatedModules.length; i++) { -/******/ moduleId = outdatedModules[i]; -/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted) -/******/ outdatedSelfAcceptedModules.push({ -/******/ module: moduleId, -/******/ errorHandler: installedModules[moduleId].hot._selfAccepted -/******/ }); -/******/ } -/******/ -/******/ // Now in "dispose" phase -/******/ hotSetStatus("dispose"); -/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) { -/******/ if(hotAvailableFilesMap[chunkId] === false) { -/******/ hotDisposeChunk(chunkId); -/******/ } -/******/ }); -/******/ -/******/ var idx; -/******/ var queue = outdatedModules.slice(); -/******/ while(queue.length > 0) { -/******/ moduleId = queue.pop(); -/******/ module = installedModules[moduleId]; -/******/ if(!module) continue; -/******/ -/******/ var data = {}; -/******/ -/******/ // Call dispose handlers -/******/ var disposeHandlers = module.hot._disposeHandlers; -/******/ for(j = 0; j < disposeHandlers.length; j++) { -/******/ cb = disposeHandlers[j]; -/******/ cb(data); -/******/ } -/******/ hotCurrentModuleData[moduleId] = data; -/******/ -/******/ // disable module (this disables requires from this module) -/******/ module.hot.active = false; -/******/ -/******/ // remove module from cache -/******/ delete installedModules[moduleId]; -/******/ -/******/ // when disposing there is no need to call dispose handler -/******/ delete outdatedDependencies[moduleId]; -/******/ -/******/ // remove "parents" references from all children -/******/ for(j = 0; j < module.children.length; j++) { -/******/ var child = installedModules[module.children[j]]; -/******/ if(!child) continue; -/******/ idx = child.parents.indexOf(moduleId); -/******/ if(idx >= 0) { -/******/ child.parents.splice(idx, 1); -/******/ } -/******/ } -/******/ } -/******/ -/******/ // remove outdated dependency from module children -/******/ var dependency; -/******/ var moduleOutdatedDependencies; -/******/ for(moduleId in outdatedDependencies) { -/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { -/******/ module = installedModules[moduleId]; -/******/ if(module) { -/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId]; -/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) { -/******/ dependency = moduleOutdatedDependencies[j]; -/******/ idx = module.children.indexOf(dependency); -/******/ if(idx >= 0) module.children.splice(idx, 1); -/******/ } -/******/ } -/******/ } -/******/ } -/******/ -/******/ // Not in "apply" phase -/******/ hotSetStatus("apply"); -/******/ -/******/ hotCurrentHash = hotUpdateNewHash; -/******/ -/******/ // insert new code -/******/ for(moduleId in appliedUpdate) { -/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) { -/******/ modules[moduleId] = appliedUpdate[moduleId]; -/******/ } -/******/ } -/******/ -/******/ // call accept handlers -/******/ var error = null; -/******/ for(moduleId in outdatedDependencies) { -/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { -/******/ module = installedModules[moduleId]; -/******/ if(module) { -/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId]; -/******/ var callbacks = []; -/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) { -/******/ dependency = moduleOutdatedDependencies[i]; -/******/ cb = module.hot._acceptedDependencies[dependency]; -/******/ if(cb) { -/******/ if(callbacks.indexOf(cb) >= 0) continue; -/******/ callbacks.push(cb); -/******/ } -/******/ } -/******/ for(i = 0; i < callbacks.length; i++) { -/******/ cb = callbacks[i]; -/******/ try { -/******/ cb(moduleOutdatedDependencies); -/******/ } catch(err) { -/******/ if(options.onErrored) { -/******/ options.onErrored({ -/******/ type: "accept-errored", -/******/ moduleId: moduleId, -/******/ dependencyId: moduleOutdatedDependencies[i], -/******/ error: err -/******/ }); -/******/ } -/******/ if(!options.ignoreErrored) { -/******/ if(!error) -/******/ error = err; -/******/ } -/******/ } -/******/ } -/******/ } -/******/ } -/******/ } -/******/ -/******/ // Load self accepted modules -/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) { -/******/ var item = outdatedSelfAcceptedModules[i]; -/******/ moduleId = item.module; -/******/ hotCurrentParents = [moduleId]; -/******/ try { -/******/ __webpack_require__(moduleId); -/******/ } catch(err) { -/******/ if(typeof item.errorHandler === "function") { -/******/ try { -/******/ item.errorHandler(err); -/******/ } catch(err2) { -/******/ if(options.onErrored) { -/******/ options.onErrored({ -/******/ type: "self-accept-error-handler-errored", -/******/ moduleId: moduleId, -/******/ error: err2, -/******/ orginalError: err, // TODO remove in webpack 4 -/******/ originalError: err -/******/ }); -/******/ } -/******/ if(!options.ignoreErrored) { -/******/ if(!error) -/******/ error = err2; -/******/ } -/******/ if(!error) -/******/ error = err; -/******/ } -/******/ } else { -/******/ if(options.onErrored) { -/******/ options.onErrored({ -/******/ type: "self-accept-errored", -/******/ moduleId: moduleId, -/******/ error: err -/******/ }); -/******/ } -/******/ if(!options.ignoreErrored) { -/******/ if(!error) -/******/ error = err; -/******/ } -/******/ } -/******/ } -/******/ } -/******/ -/******/ // handle errors in accept handlers and self accepted module load -/******/ if(error) { -/******/ hotSetStatus("fail"); -/******/ return Promise.reject(error); -/******/ } -/******/ -/******/ hotSetStatus("idle"); -/******/ return new Promise(function(resolve) { -/******/ resolve(outdatedModules); -/******/ }); -/******/ } -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {}, -/******/ hot: hotCreateModule(moduleId), -/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp), -/******/ children: [] -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // __webpack_hash__ -/******/ __webpack_require__.h = function() { return hotCurrentHash; }; -/******/ -/******/ // Load entry module and return exports -/******/ return hotCreateRequire("./src/app.js")(__webpack_require__.s = "./src/app.js"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "../../node_modules/botframework-directlinejs/built/directLine.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// In order to keep file size down, only import the parts of rxjs that we use -var __rest = (this && this.__rest) || function (s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0) - t[p[i]] = s[p[i]]; - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var BehaviorSubject_1 = __webpack_require__("../../node_modules/rxjs/BehaviorSubject.js"); -var Observable_1 = __webpack_require__("../../node_modules/rxjs/Observable.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/catch.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/combineLatest.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/count.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/delay.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/do.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/filter.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/map.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/mergeMap.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/retryWhen.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/share.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/take.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/dom/ajax.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/empty.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/from.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/interval.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/of.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/throw.js"); -// These types are specific to this client library, not to Direct Line 3.0 -var ConnectionStatus; -(function (ConnectionStatus) { - ConnectionStatus[ConnectionStatus["Uninitialized"] = 0] = "Uninitialized"; - ConnectionStatus[ConnectionStatus["Connecting"] = 1] = "Connecting"; - ConnectionStatus[ConnectionStatus["Online"] = 2] = "Online"; - ConnectionStatus[ConnectionStatus["ExpiredToken"] = 3] = "ExpiredToken"; - ConnectionStatus[ConnectionStatus["FailedToConnect"] = 4] = "FailedToConnect"; - ConnectionStatus[ConnectionStatus["Ended"] = 5] = "Ended"; // the bot ended the conversation -})(ConnectionStatus = exports.ConnectionStatus || (exports.ConnectionStatus = {})); -var lifetimeRefreshToken = 30 * 60 * 1000; -var intervalRefreshToken = lifetimeRefreshToken / 2; -var timeout = 20 * 1000; -var retries = (lifetimeRefreshToken - intervalRefreshToken) / timeout; -var errorExpiredToken = new Error("expired token"); -var errorConversationEnded = new Error("conversation ended"); -var errorFailedToConnect = new Error("failed to connect"); -var konsole = { - log: function (message) { - var optionalParams = []; - for (var _i = 1; _i < arguments.length; _i++) { - optionalParams[_i - 1] = arguments[_i]; - } - if (typeof (window) !== 'undefined' && window["botchatDebug"] && message) - console.log.apply(console, [message].concat(optionalParams)); - } -}; -var DirectLine = (function () { - function DirectLine(options) { - this.connectionStatus$ = new BehaviorSubject_1.BehaviorSubject(ConnectionStatus.Uninitialized); - this.domain = "https://directline.botframework.com/v3/directline"; - this.watermark = ''; - this.pollingInterval = 1000; - this.secret = options.secret; - this.token = options.secret || options.token; - this.webSocket = (options.webSocket === undefined ? true : options.webSocket) && typeof WebSocket !== 'undefined' && WebSocket !== undefined; - if (options.domain) - this.domain = options.domain; - if (options.conversationId) { - this.conversationId = options.conversationId; - } - if (options.watermark) { - if (this.webSocket) - console.warn("Watermark was ignored: it is not supported using websockets at the moment"); - else - this.watermark = options.watermark; - } - if (options.streamUrl) { - if (options.token && options.conversationId) - this.streamUrl = options.streamUrl; - else - console.warn("streamUrl was ignored: you need to provide a token and a conversationid"); - } - if (options.pollingInterval !== undefined) - this.pollingInterval = options.pollingInterval; - this.activity$ = (this.webSocket - ? this.webSocketActivity$() - : this.pollingGetActivity$()).share(); - } - // Every time we're about to make a Direct Line REST call, we call this first to see check the current connection status. - // Either throws an error (indicating an error state) or emits a null, indicating a (presumably) healthy connection - DirectLine.prototype.checkConnection = function (once) { - var _this = this; - if (once === void 0) { once = false; } - var obs = this.connectionStatus$ - .flatMap(function (connectionStatus) { - if (connectionStatus === ConnectionStatus.Uninitialized) { - _this.connectionStatus$.next(ConnectionStatus.Connecting); - //if token and streamUrl are defined it means reconnect has already been done. Skipping it. - if (_this.token && _this.streamUrl) { - _this.connectionStatus$.next(ConnectionStatus.Online); - return Observable_1.Observable.of(connectionStatus); - } - else { - return _this.startConversation().do(function (conversation) { - _this.conversationId = conversation.conversationId; - _this.token = _this.secret || conversation.token; - _this.streamUrl = conversation.streamUrl; - _this.referenceGrammarId = conversation.referenceGrammarId; - if (!_this.secret) - _this.refreshTokenLoop(); - _this.connectionStatus$.next(ConnectionStatus.Online); - }, function (error) { - _this.connectionStatus$.next(ConnectionStatus.FailedToConnect); - }) - .map(function (_) { return connectionStatus; }); - } - } - else { - return Observable_1.Observable.of(connectionStatus); - } - }) - .filter(function (connectionStatus) { return connectionStatus != ConnectionStatus.Uninitialized && connectionStatus != ConnectionStatus.Connecting; }) - .flatMap(function (connectionStatus) { - switch (connectionStatus) { - case ConnectionStatus.Ended: - return Observable_1.Observable.throw(errorConversationEnded); - case ConnectionStatus.FailedToConnect: - return Observable_1.Observable.throw(errorFailedToConnect); - case ConnectionStatus.ExpiredToken: - return Observable_1.Observable.throw(errorExpiredToken); - default: - return Observable_1.Observable.of(null); - } - }); - return once ? obs.take(1) : obs; - }; - DirectLine.prototype.expiredToken = function () { - var connectionStatus = this.connectionStatus$.getValue(); - if (connectionStatus != ConnectionStatus.Ended && connectionStatus != ConnectionStatus.FailedToConnect) - this.connectionStatus$.next(ConnectionStatus.ExpiredToken); - }; - DirectLine.prototype.startConversation = function () { - //if conversationid is set here, it means we need to call the reconnect api, else it is a new conversation - var url = this.conversationId - ? this.domain + "/conversations/" + this.conversationId + "?watermark=" + this.watermark - : this.domain + "/conversations"; - var method = this.conversationId ? "GET" : "POST"; - return Observable_1.Observable.ajax({ - method: method, - url: url, - timeout: timeout, - headers: { - "Accept": "application/json", - "Authorization": "Bearer " + this.token - } - }) - .map(function (ajaxResponse) { return ajaxResponse.response; }) - .retryWhen(function (error$) { - // for now we deem 4xx and 5xx errors as unrecoverable - // for everything else (timeouts), retry for a while - return error$.mergeMap(function (error) { return error.status >= 400 && error.status < 600 - ? Observable_1.Observable.throw(error) - : Observable_1.Observable.of(error); }) - .delay(timeout) - .take(retries); - }); - }; - DirectLine.prototype.refreshTokenLoop = function () { - var _this = this; - this.tokenRefreshSubscription = Observable_1.Observable.interval(intervalRefreshToken) - .flatMap(function (_) { return _this.refreshToken(); }) - .subscribe(function (token) { - konsole.log("refreshing token", token, "at", new Date()); - _this.token = token; - }); - }; - DirectLine.prototype.refreshToken = function () { - var _this = this; - return this.checkConnection(true) - .flatMap(function (_) { - return Observable_1.Observable.ajax({ - method: "POST", - url: _this.domain + "/tokens/refresh", - timeout: timeout, - headers: { - "Authorization": "Bearer " + _this.token - } - }) - .map(function (ajaxResponse) { return ajaxResponse.response.token; }) - .retryWhen(function (error$) { return error$ - .mergeMap(function (error) { - if (error.status === 403) { - // if the token is expired there's no reason to keep trying - _this.expiredToken(); - return Observable_1.Observable.throw(error); - } - return Observable_1.Observable.of(error); - }) - .delay(timeout) - .take(retries); }); - }); - }; - DirectLine.prototype.reconnect = function (conversation) { - this.token = conversation.token; - this.streamUrl = conversation.streamUrl; - if (this.connectionStatus$.getValue() === ConnectionStatus.ExpiredToken) - this.connectionStatus$.next(ConnectionStatus.Online); - }; - DirectLine.prototype.end = function () { - if (this.tokenRefreshSubscription) - this.tokenRefreshSubscription.unsubscribe(); - this.connectionStatus$.next(ConnectionStatus.Ended); - }; - DirectLine.prototype.postActivity = function (activity) { - var _this = this; - // Use postMessageWithAttachments for messages with attachments that are local files (e.g. an image to upload) - // Technically we could use it for *all* activities, but postActivity is much lighter weight - // So, since WebChat is partially a reference implementation of Direct Line, we implement both. - if (activity.type === "message" && activity.attachments && activity.attachments.length > 0) - return this.postMessageWithAttachments(activity); - // If we're not connected to the bot, get connected - // Will throw an error if we are not connected - konsole.log("postActivity", activity); - return this.checkConnection(true) - .flatMap(function (_) { - return Observable_1.Observable.ajax({ - method: "POST", - url: _this.domain + "/conversations/" + _this.conversationId + "/activities", - body: activity, - timeout: timeout, - headers: { - "Content-Type": "application/json", - "Authorization": "Bearer " + _this.token - } - }) - .map(function (ajaxResponse) { return ajaxResponse.response.id; }) - .catch(function (error) { return _this.catchPostError(error); }); - }) - .catch(function (error) { return _this.catchExpiredToken(error); }); - }; - DirectLine.prototype.postMessageWithAttachments = function (_a) { - var _this = this; - var attachments = _a.attachments, messageWithoutAttachments = __rest(_a, ["attachments"]); - var formData; - // If we're not connected to the bot, get connected - // Will throw an error if we are not connected - return this.checkConnection(true) - .flatMap(function (_) { - // To send this message to DirectLine we need to deconstruct it into a "template" activity - // and one blob for each attachment. - formData = new FormData(); - formData.append('activity', new Blob([JSON.stringify(messageWithoutAttachments)], { type: 'application/vnd.microsoft.activity' })); - return Observable_1.Observable.from(attachments || []) - .flatMap(function (media) { - return Observable_1.Observable.ajax({ - method: "GET", - url: media.contentUrl, - responseType: 'arraybuffer' - }) - .do(function (ajaxResponse) { - return formData.append('file', new Blob([ajaxResponse.response], { type: media.contentType }), media.name); - }); - }) - .count(); - }) - .flatMap(function (_) { - return Observable_1.Observable.ajax({ - method: "POST", - url: _this.domain + "/conversations/" + _this.conversationId + "/upload?userId=" + messageWithoutAttachments.from.id, - body: formData, - timeout: timeout, - headers: { - "Authorization": "Bearer " + _this.token - } - }) - .map(function (ajaxResponse) { return ajaxResponse.response.id; }) - .catch(function (error) { return _this.catchPostError(error); }); - }) - .catch(function (error) { return _this.catchPostError(error); }); - }; - DirectLine.prototype.catchPostError = function (error) { - if (error.status === 403) - // token has expired (will fall through to return "retry") - this.expiredToken(); - else if (error.status >= 400 && error.status < 500) - // more unrecoverable errors - return Observable_1.Observable.throw(error); - return Observable_1.Observable.of("retry"); - }; - DirectLine.prototype.catchExpiredToken = function (error) { - return error === errorExpiredToken - ? Observable_1.Observable.of("retry") - : Observable_1.Observable.throw(error); - }; - DirectLine.prototype.pollingGetActivity$ = function () { - var _this = this; - return Observable_1.Observable.interval(this.pollingInterval) - .combineLatest(this.checkConnection()) - .flatMap(function (_) { - return Observable_1.Observable.ajax({ - method: "GET", - url: _this.domain + "/conversations/" + _this.conversationId + "/activities?watermark=" + _this.watermark, - timeout: timeout, - headers: { - "Accept": "application/json", - "Authorization": "Bearer " + _this.token - } - }) - .catch(function (error) { - if (error.status === 403) { - // This is slightly ugly. We want to update this.connectionStatus$ to ExpiredToken so that subsequent - // calls to checkConnection will throw an error. But when we do so, it causes this.checkConnection() - // to immediately throw an error, which is caught by the catch() below and transformed into an empty - // object. Then next() returns, and we emit an empty object. Which means one 403 is causing - // two empty objects to be emitted. Which is harmless but, again, slightly ugly. - _this.expiredToken(); - } - return Observable_1.Observable.empty(); - }) - .map(function (ajaxResponse) { return ajaxResponse.response; }) - .flatMap(function (activityGroup) { return _this.observableFromActivityGroup(activityGroup); }); - }) - .catch(function (error) { return Observable_1.Observable.empty(); }); - }; - DirectLine.prototype.observableFromActivityGroup = function (activityGroup) { - if (activityGroup.watermark) - this.watermark = activityGroup.watermark; - return Observable_1.Observable.from(activityGroup.activities); - }; - DirectLine.prototype.webSocketActivity$ = function () { - var _this = this; - return this.checkConnection() - .flatMap(function (_) { - return _this.observableWebSocket() - .retryWhen(function (error$) { return error$.mergeMap(function (error) { return _this.reconnectToConversation(); }); }); - }) - .flatMap(function (activityGroup) { return _this.observableFromActivityGroup(activityGroup); }); - }; - // Originally we used Observable.webSocket, but it's fairly opionated and I ended up writing - // a lot of code to work around their implemention details. Since WebChat is meant to be a reference - // implementation, I decided roll the below, where the logic is more purposeful. - @billba - DirectLine.prototype.observableWebSocket = function () { - var _this = this; - return Observable_1.Observable.create(function (subscriber) { - konsole.log("creating WebSocket", _this.streamUrl); - var ws = new WebSocket(_this.streamUrl); - var sub; - ws.onopen = function (open) { - konsole.log("WebSocket open", open); - // Chrome is pretty bad at noticing when a WebSocket connection is broken. - // If we periodically ping the server with empty messages, it helps Chrome - // realize when connection breaks, and close the socket. We then throw an - // error, and that give us the opportunity to attempt to reconnect. - sub = Observable_1.Observable.interval(timeout).subscribe(function (_) { return ws.send(null); }); - }; - ws.onclose = function (close) { - konsole.log("WebSocket close", close); - if (sub) - sub.unsubscribe(); - subscriber.error(close); - }; - ws.onmessage = function (message) { return message.data && subscriber.next(JSON.parse(message.data)); }; - // This is the 'unsubscribe' method, which is called when this observable is disposed. - // When the WebSocket closes itself, we throw an error, and this function is eventually called. - // When the observable is closed first (e.g. when tearing down a WebChat instance) then - // we need to manually close the WebSocket. - return function () { - if (ws.readyState === 0 || ws.readyState === 1) - ws.close(); - }; - }); - }; - DirectLine.prototype.reconnectToConversation = function () { - var _this = this; - return this.checkConnection(true) - .flatMap(function (_) { - return Observable_1.Observable.ajax({ - method: "GET", - url: _this.domain + "/conversations/" + _this.conversationId + "?watermark=" + _this.watermark, - timeout: timeout, - headers: { - "Accept": "application/json", - "Authorization": "Bearer " + _this.token - } - }) - .do(function (result) { - if (!_this.secret) - _this.token = result.response.token; - _this.streamUrl = result.response.streamUrl; - }) - .map(function (_) { return null; }) - .retryWhen(function (error$) { return error$ - .mergeMap(function (error) { - if (error.status === 403) { - // token has expired. We can't recover from this here, but the embedding - // website might eventually call reconnect() with a new token and streamUrl. - _this.expiredToken(); - } - return Observable_1.Observable.of(error); - }) - .delay(timeout) - .take(retries); }); - }); - }; - return DirectLine; -}()); -exports.DirectLine = DirectLine; -//# sourceMappingURL=directLine.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/adaptivecards-hostconfig.json": -/***/ (function(module, exports) { - -module.exports = {"supportsInteractivity":true,"strongSeparation":{"spacing":40,"lineThickness":1,"lineColor":"#eeeeee"},"fontFamily":"\"Segoe UI\", sans-serif","fontSizes":{"small":12,"normal":13,"medium":15,"large":17,"extraLarge":19},"fontWeights":{"lighter":200,"normal":400,"bolder":700},"colors":{"dark":{"normal":"#000000","subtle":"#808c95"},"light":{"normal":"#ffffff","subtle":"#88ffff"},"accent":{"normal":"#2e89fc","subtle":"#802E8901"},"attention":{"normal":"#ffd800","subtle":"#CCFFD800"},"good":{"normal":"#00ff00","subtle":"#CC00FF00"},"warning":{"normal":"#ff0000","subtle":"#CCFF0000"}},"imageSizes":{"small":40,"medium":64,"large":96},"actions":{"maxActions":100,"separation":{"spacing":8},"buttonSpacing":8,"stretch":false,"showCard":{"actionMode":"inlineEdgeToEdge","inlineTopMargin":16,"backgroundColor":"#00000000","padding":{"top":8,"right":8,"bottom":8,"left":8}},"actionsOrientation":"vertical","actionAlignment":"left"},"adaptiveCard":{"backgroundColor":"#00000000","padding":{"left":8,"top":8,"right":8,"bottom":8}},"container":{"separation":{"spacing":8},"normal":{"backgroundColor":"#00000000"},"emphasis":{"backgroundColor":"#eeeeee","borderColor":"#aaaaaa","borderThickness":{"top":1,"right":1,"bottom":1,"left":1},"padding":{"top":8,"right":8,"bottom":8,"left":8}}},"textBlock":{"color":"dark","separations":{"small":{"spacing":8},"normal":{"spacing":8},"medium":{"spacing":8},"large":{"spacing":8},"extraLarge":{"spacing":8}}},"image":{"size":"medium","separation":{"spacing":8}},"imageSet":{"imageSize":"medium","separation":{"spacing":8}},"factSet":{"separation":{"spacing":8},"title":{"color":"dark","size":"normal","isSubtle":false,"weight":"bolder","wrap":true,"maxWidth":150},"value":{"color":"dark","size":"normal","isSubtle":false,"weight":"normal","wrap":true},"spacing":8},"input":{"separation":{"spacing":8}},"columnSet":{"separation":{"spacing":8}},"column":{"separation":{"spacing":8}}} - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/botchat.css": -/***/ (function(module, exports, __webpack_require__) { - - -var content = __webpack_require__("../../node_modules/css-loader/index.js!../../node_modules/botframework-webchat/botchat.css"); - -if(typeof content === 'string') content = [[module.i, content, '']]; - -var transform; -var insertInto; - - - -var options = {"hmr":true} - -options.transform = transform -options.insertInto = undefined; - -var update = __webpack_require__("../../node_modules/style-loader/lib/addStyles.js")(content, options); - -if(content.locals) module.exports = content.locals; - -if(true) { - module.hot.accept("../../node_modules/css-loader/index.js!../../node_modules/botframework-webchat/botchat.css", function() { - var newContent = __webpack_require__("../../node_modules/css-loader/index.js!../../node_modules/botframework-webchat/botchat.css"); - - if(typeof newContent === 'string') newContent = [[module.i, newContent, '']]; - - var locals = (function(a, b) { - var key, idx = 0; - - for(key in a) { - if(!b || a[key] !== b[key]) return false; - idx++; - } - - for(key in b) idx--; - - return idx === 0; - }(content.locals, newContent.locals)); - - if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.'); - - update(newContent); - }); - - module.hot.dispose(function() { update(); }); -} - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/ActivityView.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var Attachment_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Attachment.js"); -var Carousel_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Carousel.js"); -var FormattedText_1 = __webpack_require__("../../node_modules/botframework-webchat/built/FormattedText.js"); -var Attachments = function (props) { - var attachments = props.attachments, attachmentLayout = props.attachmentLayout, otherProps = tslib_1.__rest(props, ["attachments", "attachmentLayout"]); - if (!attachments || attachments.length === 0) - return null; - return attachmentLayout === 'carousel' ? - React.createElement(Carousel_1.Carousel, tslib_1.__assign({ attachments: attachments }, otherProps)) - : - React.createElement("div", { className: "wc-list" }, attachments.map(function (attachment, index) { - return React.createElement(Attachment_1.AttachmentView, { key: index, attachment: attachment, format: props.format, onCardAction: props.onCardAction, onImageLoad: props.onImageLoad }); - })); -}; -var ActivityView = (function (_super) { - tslib_1.__extends(ActivityView, _super); - function ActivityView(props) { - return _super.call(this, props) || this; - } - ActivityView.prototype.shouldComponentUpdate = function (nextProps) { - // if the activity changed, re-render - return this.props.activity !== nextProps.activity - || this.props.format !== nextProps.format - || (this.props.activity.type === 'message' - && this.props.activity.attachmentLayout === 'carousel' - && this.props.size !== nextProps.size); - }; - ActivityView.prototype.render = function () { - var _a = this.props, activity = _a.activity, props = tslib_1.__rest(_a, ["activity"]); - switch (activity.type) { - case 'message': - return (React.createElement("div", null, - React.createElement(FormattedText_1.FormattedText, { text: activity.text, format: activity.textFormat, onImageLoad: props.onImageLoad }), - React.createElement(Attachments, { attachments: activity.attachments, attachmentLayout: activity.attachmentLayout, format: props.format, onCardAction: props.onCardAction, onImageLoad: props.onImageLoad, size: props.size }))); - case 'typing': - return React.createElement("div", { className: "wc-typing" }); - } - }; - return ActivityView; -}(React.Component)); -exports.ActivityView = ActivityView; -//# sourceMappingURL=ActivityView.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/AdaptiveCardContainer.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var AdaptiveCards = __webpack_require__("../../node_modules/microsoft-adaptivecards/built/adaptive-cards.js"); -var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js"); -var adaptivecardsHostConfig = __webpack_require__("../../node_modules/botframework-webchat/adaptivecards-hostconfig.json"); -var LinkedAdaptiveCard = (function (_super) { - tslib_1.__extends(LinkedAdaptiveCard, _super); - function LinkedAdaptiveCard(adaptiveCardContainer) { - var _this = _super.call(this) || this; - _this.adaptiveCardContainer = adaptiveCardContainer; - return _this; - } - return LinkedAdaptiveCard; -}(AdaptiveCards.AdaptiveCard)); -function getLinkedAdaptiveCard(action) { - var element = action.parent; - while (element && !(element instanceof LinkedAdaptiveCard)) { - element = element.parent; - } - return element; -} -function cardWithoutHttpActions(card) { - if (!card.actions) - return card; - var actions = []; - card.actions.forEach(function (action) { - //filter out http action buttons - if (action.type === 'Action.Http') - return; - if (action.type === 'Action.ShowCard') { - var showCardAction = action; - showCardAction.card = cardWithoutHttpActions(showCardAction.card); - } - actions.push(action); - }); - return tslib_1.__assign({}, card, { actions: actions }); -} -AdaptiveCards.AdaptiveCard.onExecuteAction = function (action) { - if (action instanceof AdaptiveCards.OpenUrlAction) { - window.open(action.url); - } - else if (action instanceof AdaptiveCards.SubmitAction) { - var linkedAdaptiveCard = getLinkedAdaptiveCard(action); - if (linkedAdaptiveCard && action.data !== undefined) { - if (typeof action.data === 'object' && action.data.__isBotFrameworkCardAction) { - var cardAction = action.data; - linkedAdaptiveCard.adaptiveCardContainer.onCardAction(cardAction.type, cardAction.value); - } - else { - linkedAdaptiveCard.adaptiveCardContainer.onCardAction(typeof action.data === 'string' ? 'imBack' : 'postBack', action.data); - } - } - } -}; -var AdaptiveCardContainer = (function (_super) { - tslib_1.__extends(AdaptiveCardContainer, _super); - function AdaptiveCardContainer(props) { - var _this = _super.call(this, props) || this; - _this.onCardAction = function (type, value) { - _this.props.onCardAction(type, value); - }; - return _this; - } - AdaptiveCardContainer.prototype.onClick = function (e) { - if (!this.props.onClick) - return; - //do not allow form elements to trigger a parent click event - switch (e.target.tagName) { - case 'A': - case 'AUDIO': - case 'VIDEO': - case 'BUTTON': - case 'INPUT': - case 'LABEL': - case 'TEXTAREA': - case 'SELECT': - break; - default: - this.props.onClick(e); - } - }; - AdaptiveCardContainer.prototype.componentDidMount = function () { - var _this = this; - var adaptiveCard = new LinkedAdaptiveCard(this); - adaptiveCard.parse(cardWithoutHttpActions(this.props.card)); - var errors = adaptiveCard.validate(); - if (errors.length === 0) { - var renderedCard = void 0; - try { - renderedCard = adaptiveCard.render(); - } - catch (e) { - var ve = { - error: -1, - message: e - }; - errors.push(ve); - if (e.stack) { - ve.message += '\n' + e.stack; - } - } - if (renderedCard) { - if (this.props.onImageLoad) { - var imgs = renderedCard.querySelectorAll('img'); - if (imgs && imgs.length > 0) { - Array.prototype.forEach.call(imgs, function (img) { - img.addEventListener('load', _this.props.onImageLoad); - }); - } - } - this.div.appendChild(renderedCard); - return; - } - } - if (errors.length > 0) { - console.log('Error(s) rendering AdaptiveCard:'); - errors.forEach(function (e) { return console.log(e.message); }); - this.setState({ errors: errors.map(function (e) { return e.message; }) }); - } - }; - AdaptiveCardContainer.prototype.render = function () { - var _this = this; - var wrappedChildren; - var hasErrors = this.state && this.state.errors && this.state.errors.length > 0; - if (hasErrors) { - wrappedChildren = (React.createElement("div", null, - React.createElement("svg", { className: "error-icon", viewBox: "0 0 15 12.01" }, - React.createElement("path", { d: "M7.62 8.63v-.38H.94a.18.18 0 0 1-.19-.19V.94A.18.18 0 0 1 .94.75h10.12a.18.18 0 0 1 .19.19v3.73H12V.94a.91.91 0 0 0-.07-.36 1 1 0 0 0-.5-.5.91.91 0 0 0-.37-.08H.94a.91.91 0 0 0-.37.07 1 1 0 0 0-.5.5.91.91 0 0 0-.07.37v7.12a.91.91 0 0 0 .07.36 1 1 0 0 0 .5.5.91.91 0 0 0 .37.08h6.72c-.01-.12-.04-.24-.04-.37z M11.62 5.26a3.27 3.27 0 0 1 1.31.27 3.39 3.39 0 0 1 1.8 1.8 3.36 3.36 0 0 1 0 2.63 3.39 3.39 0 0 1-1.8 1.8 3.36 3.36 0 0 1-2.62 0 3.39 3.39 0 0 1-1.8-1.8 3.36 3.36 0 0 1 0-2.63 3.39 3.39 0 0 1 1.8-1.8 3.27 3.27 0 0 1 1.31-.27zm0 6a2.53 2.53 0 0 0 1-.21A2.65 2.65 0 0 0 14 9.65a2.62 2.62 0 0 0 0-2 2.65 2.65 0 0 0-1.39-1.39 2.62 2.62 0 0 0-2 0A2.65 2.65 0 0 0 9.2 7.61a2.62 2.62 0 0 0 0 2A2.65 2.65 0 0 0 10.6 11a2.53 2.53 0 0 0 1.02.26zM13 7.77l-.86.86.86.86-.53.53-.86-.86-.86.86-.53-.53.86-.86-.86-.86.53-.53.86.86.86-.86zM1.88 7.13h2.25V4.88H1.88zm.75-1.5h.75v.75h-.75zM5.63 2.63h4.5v.75h-4.5zM1.88 4.13h2.25V1.88H1.88zm.75-1.5h.75v.75h-.75zM9 5.63H5.63v.75h2.64A4 4 0 0 1 9 5.63z" })), - React.createElement("div", { className: "error-text" }, "Can't render card"))); - } - else if (this.props.children) { - wrappedChildren = (React.createElement("div", { className: "non-adaptive-content" }, this.props.children)); - } - else { - wrappedChildren = null; - } - return (React.createElement("div", { className: Chat_1.classList('wc-card', 'wc-adaptive-card', this.props.className, hasErrors && 'error'), ref: function (div) { return _this.div = div; }, onClick: function (e) { return _this.onClick(e); } }, wrappedChildren)); - }; - AdaptiveCardContainer.prototype.componentDidUpdate = function () { - if (this.props.onImageLoad) - this.props.onImageLoad(); - }; - return AdaptiveCardContainer; -}(React.Component)); -exports.AdaptiveCardContainer = AdaptiveCardContainer; -AdaptiveCards.setHostConfig(adaptivecardsHostConfig); -//# sourceMappingURL=AdaptiveCardContainer.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/App.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var ReactDOM = __webpack_require__("../../node_modules/react-dom/index.js"); -var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js"); -var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js"); -exports.App = function (props, container) { - konsole.log("BotChat.App props", props); - ReactDOM.render(React.createElement(AppContainer, props), container); -}; -var AppContainer = function (props) { - return React.createElement("div", { className: "wc-app" }, - React.createElement(Chat_1.Chat, tslib_1.__assign({}, props))); -}; -//# sourceMappingURL=App.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/Attachment.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var CardBuilder = __webpack_require__("../../node_modules/botframework-webchat/built/CardBuilder.js"); -var AdaptiveCardContainer_1 = __webpack_require__("../../node_modules/botframework-webchat/built/AdaptiveCardContainer.js"); -var regExpCard = /\^application\/vnd\.microsoft\.card\./i; -var YOUTUBE_DOMAIN = "youtube.com"; -var YOUTUBE_WWW_DOMAIN = "www.youtube.com"; -var YOUTUBE_SHORT_DOMAIN = "youtu.be"; -var YOUTUBE_WWW_SHORT_DOMAIN = "www.youtu.be"; -var VIMEO_DOMAIN = "vimeo.com"; -var VIMEO_WWW_DOMAIN = "www.vimeo.com"; -exports.queryParams = function (src) { - return src - .substr(1) - .split('&') - .reduce(function (previous, current) { - var keyValue = current.split('='); - previous[decodeURIComponent(keyValue[0])] = decodeURIComponent(keyValue[1]); - return previous; - }, {}); -}; -var queryString = function (query) { - return Object.keys(query) - .map(function (key) { return encodeURIComponent(key) + '=' + encodeURIComponent(query[key].toString()); }) - .join('&'); -}; -var exists = function (value) { return value != null && typeof value != "undefined"; }; -var Youtube = function (props) { - return React.createElement("iframe", { src: "https://" + YOUTUBE_DOMAIN + "/embed/" + props.embedId + "?" + queryString({ - modestbranding: '1', - loop: props.loop ? '1' : '0', - autoplay: props.autoPlay ? '1' : '0' - }) }); -}; -var Vimeo = function (props) { - return React.createElement("iframe", { src: "https://player." + VIMEO_DOMAIN + "/video/" + props.embedId + "?" + queryString({ - title: '0', - byline: '0', - portrait: '0', - badge: '0', - autoplay: props.autoPlay ? '1' : '0', - loop: props.loop ? '1' : '0' - }) }); -}; -var Video = function (props) { - var url = document.createElement('a'); - url.href = props.src; - var urlQueryParams = exports.queryParams(url.search); - var pathSegments = url.pathname.substr(1).split('/'); - switch (url.hostname) { - case YOUTUBE_DOMAIN: - case YOUTUBE_SHORT_DOMAIN: - case YOUTUBE_WWW_DOMAIN: - case YOUTUBE_WWW_SHORT_DOMAIN: - return React.createElement(Youtube, { embedId: url.hostname === YOUTUBE_DOMAIN || url.hostname === YOUTUBE_WWW_DOMAIN ? urlQueryParams['v'] : pathSegments[pathSegments.length - 1], autoPlay: props.autoPlay, loop: props.loop }); - case VIMEO_WWW_DOMAIN: - case VIMEO_DOMAIN: - return React.createElement(Vimeo, { embedId: pathSegments[pathSegments.length - 1], autoPlay: props.autoPlay, loop: props.loop }); - default: - return React.createElement("video", tslib_1.__assign({ controls: true }, props)); - } -}; -var Media = function (props) { - switch (props.type) { - case 'video': - return React.createElement(Video, tslib_1.__assign({}, props)); - case 'audio': - return React.createElement("audio", tslib_1.__assign({ controls: true }, props)); - default: - return React.createElement("img", tslib_1.__assign({}, props)); - } -}; -var Unknown = function (props) { - if (regExpCard.test(props.contentType)) { - return React.createElement("span", null, props.format.strings.unknownCard.replace('%1', props.contentType)); - } - else if (props.contentUrl) { - return React.createElement("div", null, - React.createElement("a", { className: "wc-link-download", href: props.contentUrl, target: "_blank", title: props.contentUrl }, - React.createElement("div", { className: "wc-text-download" }, props.name || props.format.strings.unknownFile.replace('%1', props.contentType)), - React.createElement("div", { className: "wc-icon-download" }))); - } - else { - return React.createElement("span", null, props.format.strings.unknownFile.replace('%1', props.contentType)); - } -}; -var mediaType = function (url) { - return url.slice((url.lastIndexOf(".") - 1 >>> 0) + 2).toLowerCase() == 'gif' ? 'image' : 'video'; -}; -exports.AttachmentView = function (props) { - if (!props.attachment) - return; - var attachment = props.attachment; - var onCardAction = function (cardAction) { return cardAction && - (function (e) { - props.onCardAction(cardAction.type, cardAction.value); - e.stopPropagation(); - }); }; - var attachedImage = function (images) { return images && images.length > 0 && - React.createElement(Media, { src: images[0].url, onLoad: props.onImageLoad, onClick: onCardAction(images[0].tap) }); }; - switch (attachment.contentType) { - case "application/vnd.microsoft.card.hero": - if (!attachment.content) - return null; - var heroCardBuilder_1 = new CardBuilder.AdaptiveCardBuilder(); - if (attachment.content.images) { - attachment.content.images.forEach(function (img) { return heroCardBuilder_1.addImage(img.url); }); - } - heroCardBuilder_1.addCommon(attachment.content); - return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "hero", card: heroCardBuilder_1.card, onImageLoad: props.onImageLoad, onCardAction: props.onCardAction, onClick: onCardAction(attachment.content.tap) })); - case "application/vnd.microsoft.card.thumbnail": - if (!attachment.content) - return null; - var thumbnailCardBuilder = new CardBuilder.AdaptiveCardBuilder(); - if (attachment.content.images && attachment.content.images.length > 0) { - var columns_1 = thumbnailCardBuilder.addColumnSet([75, 25]); - thumbnailCardBuilder.addTextBlock(attachment.content.title, { size: "medium", weight: "bolder" }, columns_1[0]); - thumbnailCardBuilder.addTextBlock(attachment.content.subtitle, { isSubtle: true, wrap: true }, columns_1[0]); - thumbnailCardBuilder.addImage(attachment.content.images[0].url, columns_1[1]); - thumbnailCardBuilder.addTextBlock(attachment.content.text, { wrap: true }); - thumbnailCardBuilder.addButtons(attachment.content.buttons); - } - else { - thumbnailCardBuilder.addCommon(attachment.content); - } - return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "thumbnail", card: thumbnailCardBuilder.card, onImageLoad: props.onImageLoad, onCardAction: props.onCardAction, onClick: onCardAction(attachment.content.tap) })); - case "application/vnd.microsoft.card.video": - if (!attachment.content || !attachment.content.media || attachment.content.media.length === 0) - return null; - return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "video", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction }, - React.createElement(Media, { type: 'video', src: attachment.content.media[0].url, onLoad: props.onImageLoad, poster: attachment.content.image && attachment.content.image.url, autoPlay: attachment.content.autostart, loop: attachment.content.autoloop }))); - case "application/vnd.microsoft.card.animation": - if (!attachment.content || !attachment.content.media || attachment.content.media.length === 0) - return null; - return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "animation", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction }, - React.createElement(Media, { type: mediaType(attachment.content.media[0].url), src: attachment.content.media[0].url, onLoad: props.onImageLoad, poster: attachment.content.image && attachment.content.image.url, autoPlay: attachment.content.autostart, loop: attachment.content.autoloop }))); - case "application/vnd.microsoft.card.audio": - if (!attachment.content || !attachment.content.media || attachment.content.media.length === 0) - return null; - return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "audio", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction }, - React.createElement(Media, { type: 'audio', src: attachment.content.media[0].url, autoPlay: attachment.content.autostart, loop: attachment.content.autoloop }))); - case "application/vnd.microsoft.card.signin": - if (!attachment.content) - return null; - return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "signin", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction })); - case "application/vnd.microsoft.card.receipt": - if (!attachment.content) - return null; - var receiptCardBuilder_1 = new CardBuilder.AdaptiveCardBuilder(); - receiptCardBuilder_1.addTextBlock(attachment.content.title, { size: "medium", weight: "bolder" }); - var columns_2 = receiptCardBuilder_1.addColumnSet([75, 25]); - attachment.content.facts && attachment.content.facts.map(function (fact, i) { - receiptCardBuilder_1.addTextBlock(fact.key, { color: 'default', size: 'medium' }, columns_2[0]); - receiptCardBuilder_1.addTextBlock(fact.value, { color: 'default', size: 'medium', horizontalAlignment: 'right' }, columns_2[1]); - }); - attachment.content.items && attachment.content.items.map(function (item, i) { - if (item.image) { - var columns2 = receiptCardBuilder_1.addColumnSet([15, 75, 10]); - receiptCardBuilder_1.addImage(item.image.url, columns2[0]); - receiptCardBuilder_1.addTextBlock(item.title, { size: "medium", weight: "bolder" }, columns2[1]); - receiptCardBuilder_1.addTextBlock(item.subtitle, { color: 'default', size: 'medium' }, columns2[1]); - receiptCardBuilder_1.addTextBlock(item.price, { horizontalAlignment: 'right' }, columns2[2]); - } - else { - var columns3 = receiptCardBuilder_1.addColumnSet([75, 25]); - receiptCardBuilder_1.addTextBlock(item.title, { size: "medium", weight: "bolder" }, columns3[0]); - receiptCardBuilder_1.addTextBlock(item.subtitle, { color: 'default', size: 'medium' }, columns3[0]); - receiptCardBuilder_1.addTextBlock(item.price, { horizontalAlignment: 'right' }, columns3[1]); - } - }); - if (exists(attachment.content.vat)) { - var vatCol = receiptCardBuilder_1.addColumnSet([75, 25]); - receiptCardBuilder_1.addTextBlock(props.format.strings.receiptVat, { size: "medium", weight: "bolder" }, vatCol[0]); - receiptCardBuilder_1.addTextBlock(attachment.content.vat, { horizontalAlignment: 'right' }, vatCol[1]); - } - if (exists(attachment.content.tax)) { - var taxCol = receiptCardBuilder_1.addColumnSet([75, 25]); - receiptCardBuilder_1.addTextBlock(props.format.strings.receiptTax, { size: "medium", weight: "bolder" }, taxCol[0]); - receiptCardBuilder_1.addTextBlock(attachment.content.tax, { horizontalAlignment: 'right' }, taxCol[1]); - } - if (exists(attachment.content.total)) { - var totalCol = receiptCardBuilder_1.addColumnSet([75, 25]); - receiptCardBuilder_1.addTextBlock(props.format.strings.receiptTotal, { size: "medium", weight: "bolder" }, totalCol[0]); - receiptCardBuilder_1.addTextBlock(attachment.content.total, { horizontalAlignment: 'right', size: "medium", weight: "bolder" }, totalCol[1]); - } - receiptCardBuilder_1.addButtons(attachment.content.buttons); - return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: 'receipt', card: receiptCardBuilder_1.card, onCardAction: props.onCardAction, onClick: onCardAction(attachment.content.tap) })); - case "application/vnd.microsoft.card.adaptive": - if (!attachment.content) - return null; - return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { card: attachment.content, onImageLoad: props.onImageLoad, onCardAction: props.onCardAction })); - // Deprecated format for Skype channels. For testing legacy bots in Emulator only. - case "application/vnd.microsoft.card.flex": - if (!attachment.content) - return null; - return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "flex", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction }, attachedImage(attachment.content.images))); - case "image/svg+xml": - case "image/png": - case "image/jpg": - case "image/jpeg": - case "image/gif": - return React.createElement(Media, { src: attachment.contentUrl, onLoad: props.onImageLoad }); - case "audio/mpeg": - case "audio/mp4": - return React.createElement(Media, { type: 'audio', src: attachment.contentUrl }); - case "video/mp4": - return React.createElement(Media, { type: 'video', poster: attachment.thumbnailUrl, src: attachment.contentUrl, onLoad: props.onImageLoad }); - default: - var unknownAttachment = props.attachment; - return React.createElement(Unknown, { format: props.format, contentType: unknownAttachment.contentType, contentUrl: unknownAttachment.contentUrl, name: unknownAttachment.name }); - } -}; -//# sourceMappingURL=Attachment.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/BotChat.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -var App_1 = __webpack_require__("../../node_modules/botframework-webchat/built/App.js"); -exports.App = App_1.App; -var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js"); -exports.Chat = Chat_1.Chat; -__export(__webpack_require__("../../node_modules/botframework-directlinejs/built/directLine.js")); -var Attachment_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Attachment.js"); -exports.queryParams = Attachment_1.queryParams; -var SpeechOptions_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechOptions.js"); -exports.SpeechOptions = SpeechOptions_1.SpeechOptions; -var SpeechModule_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechModule.js"); -exports.Speech = SpeechModule_1.Speech; -// below are shims for compatibility with old browsers (IE 10 being the main culprit) -__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.string.starts-with.js"); -__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.array.find.js"); -__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.array.find-index.js"); -//# sourceMappingURL=BotChat.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/CardBuilder.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var AdaptiveCardBuilder = (function () { - function AdaptiveCardBuilder() { - this.container = { - type: "Container", - items: [] - }; - this.card = { - type: "AdaptiveCard", - version: "0.5", - body: [this.container] - }; - } - AdaptiveCardBuilder.prototype.addColumnSet = function (sizes, container) { - if (container === void 0) { container = this.container; } - var columnSet = { - type: 'ColumnSet', - columns: sizes.map(function (size) { - return { - type: 'Column', - size: size.toString(), - items: [] - }; - }) - }; - container.items.push(columnSet); - return columnSet.columns; - }; - AdaptiveCardBuilder.prototype.addItems = function (elements, container) { - if (container === void 0) { container = this.container; } - container.items.push.apply(container.items, elements); - }; - AdaptiveCardBuilder.prototype.addTextBlock = function (text, template, container) { - if (container === void 0) { container = this.container; } - if (typeof text !== 'undefined') { - var textblock = tslib_1.__assign({ type: "TextBlock", text: text }, template); - container.items.push(textblock); - } - }; - AdaptiveCardBuilder.prototype.addButtons = function (buttons) { - if (buttons) { - this.card.actions = buttons.map(function (button) { - var cardAction = tslib_1.__assign({ __isBotFrameworkCardAction: true }, button); - return { - title: button.title, - type: "Action.Submit", - data: cardAction - }; - }); - } - }; - AdaptiveCardBuilder.prototype.addCommon = function (content) { - this.addTextBlock(content.title, { size: "medium", weight: "bolder" }); - this.addTextBlock(content.subtitle, { isSubtle: true, wrap: true, separation: "none" }); //TODO remove "as any" because separation is not defined - this.addTextBlock(content.text, { wrap: true }); - this.addButtons(content.buttons); - }; - AdaptiveCardBuilder.prototype.addImage = function (url, container) { - if (container === void 0) { container = this.container; } - var image = { - type: "Image", - url: url, - size: "stretch" - }; - container.items.push(image); - }; - return AdaptiveCardBuilder; -}()); -exports.AdaptiveCardBuilder = AdaptiveCardBuilder; -exports.buildCommonCard = function (content) { - if (!content) - return null; - var cardBuilder = new AdaptiveCardBuilder(); - cardBuilder.addCommon(content); - return cardBuilder.card; -}; -//# sourceMappingURL=CardBuilder.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/Carousel.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var Attachment_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Attachment.js"); -var HScroll_1 = __webpack_require__("../../node_modules/botframework-webchat/built/HScroll.js"); -var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js"); -var Carousel = (function (_super) { - tslib_1.__extends(Carousel, _super); - function Carousel(props) { - return _super.call(this, props) || this; - } - Carousel.prototype.updateContentWidth = function () { - //after the attachments have been rendered, we can now measure their actual width - var width = this.props.size.width - this.props.format.carouselMargin; - //important: remove any hard styling so that we can measure the natural width - this.root.style.width = ''; - //now measure the natural offsetWidth - if (this.root.offsetWidth > width) { - // the content width is bigger than the space allotted, so we'll clip it to force scrolling - this.root.style.width = width.toString() + "px"; - // since we're scrolling, we need to show scroll buttons - this.hscroll.updateScrollButtons(); - } - }; - Carousel.prototype.componentDidMount = function () { - this.updateContentWidth(); - }; - Carousel.prototype.componentDidUpdate = function () { - this.updateContentWidth(); - }; - Carousel.prototype.render = function () { - var _this = this; - return (React.createElement("div", { className: "wc-carousel", ref: function (div) { return _this.root = div; } }, - React.createElement(HScroll_1.HScroll, { ref: function (hscroll) { return _this.hscroll = hscroll; }, prevSvgPathData: "M 16.5 22 L 19 19.5 L 13.5 14 L 19 8.5 L 16.5 6 L 8.5 14 L 16.5 22 Z", nextSvgPathData: "M 12.5 22 L 10 19.5 L 15.5 14 L 10 8.5 L 12.5 6 L 20.5 14 L 12.5 22 Z", scrollUnit: "item" }, - React.createElement(CarouselAttachments, tslib_1.__assign({}, this.props))))); - }; - return Carousel; -}(React.PureComponent)); -exports.Carousel = Carousel; -var CarouselAttachments = (function (_super) { - tslib_1.__extends(CarouselAttachments, _super); - function CarouselAttachments() { - return _super !== null && _super.apply(this, arguments) || this; - } - CarouselAttachments.prototype.render = function () { - konsole.log("rendering CarouselAttachments"); - var _a = this.props, attachments = _a.attachments, props = tslib_1.__rest(_a, ["attachments"]); - return (React.createElement("ul", null, this.props.attachments.map(function (attachment, index) { - return React.createElement("li", { key: index, className: "wc-carousel-item" }, - React.createElement(Attachment_1.AttachmentView, { attachment: attachment, format: props.format, onCardAction: props.onCardAction, onImageLoad: props.onImageLoad })); - }))); - }; - return CarouselAttachments; -}(React.PureComponent)); -//# sourceMappingURL=Carousel.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/Chat.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var react_dom_1 = __webpack_require__("../../node_modules/react-dom/index.js"); -var botframework_directlinejs_1 = __webpack_require__("../../node_modules/botframework-directlinejs/built/directLine.js"); -var Store_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Store.js"); -var react_redux_1 = __webpack_require__("../../node_modules/react-redux/es/index.js"); -var SpeechModule_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechModule.js"); -var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js"); -var getTabIndex_1 = __webpack_require__("../../node_modules/botframework-webchat/built/getTabIndex.js"); -var History_1 = __webpack_require__("../../node_modules/botframework-webchat/built/History.js"); -var MessagePane_1 = __webpack_require__("../../node_modules/botframework-webchat/built/MessagePane.js"); -var Shell_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Shell.js"); -var Chat = (function (_super) { - tslib_1.__extends(Chat, _super); - function Chat(props) { - var _this = _super.call(this, props) || this; - _this.store = Store_1.createStore(); - _this.resizeListener = function () { return _this.setSize(); }; - _this._handleCardAction = _this.handleCardAction.bind(_this); - _this._handleKeyDownCapture = _this.handleKeyDownCapture.bind(_this); - _this._saveChatviewPanelRef = _this.saveChatviewPanelRef.bind(_this); - _this._saveHistoryRef = _this.saveHistoryRef.bind(_this); - _this._saveShellRef = _this.saveShellRef.bind(_this); - konsole.log("BotChat.Chat props", props); - _this.store.dispatch({ - type: 'Set_Locale', - locale: props.locale || window.navigator["userLanguage"] || window.navigator.language || 'en' - }); - if (props.formatOptions) - _this.store.dispatch({ type: 'Set_Format_Options', options: props.formatOptions }); - if (props.sendTyping) - _this.store.dispatch({ type: 'Set_Send_Typing', sendTyping: props.sendTyping }); - if (props.speechOptions) { - SpeechModule_1.Speech.SpeechRecognizer.setSpeechRecognizer(props.speechOptions.speechRecognizer); - SpeechModule_1.Speech.SpeechSynthesizer.setSpeechSynthesizer(props.speechOptions.speechSynthesizer); - } - return _this; - } - Chat.prototype.handleIncomingActivity = function (activity) { - var state = this.store.getState(); - switch (activity.type) { - case "message": - this.store.dispatch({ type: activity.from.id === state.connection.user.id ? 'Receive_Sent_Message' : 'Receive_Message', activity: activity }); - break; - case "typing": - if (activity.from.id !== state.connection.user.id) - this.store.dispatch({ type: 'Show_Typing', activity: activity }); - break; - } - }; - Chat.prototype.setSize = function () { - this.store.dispatch({ - type: 'Set_Size', - width: this.chatviewPanelRef.offsetWidth, - height: this.chatviewPanelRef.offsetHeight - }); - }; - Chat.prototype.handleCardAction = function () { - // After the user click on any card action, we will "blur" the focus, by setting focus on message pane - // This is for after click on card action, the user press "A", it should go into the chat box - var historyDOM = react_dom_1.findDOMNode(this.historyRef); - if (historyDOM) { - historyDOM.focus(); - } - }; - Chat.prototype.handleKeyDownCapture = function (evt) { - var target = evt.target; - var tabIndex = getTabIndex_1.getTabIndex(target); - if (evt.altKey - || evt.ctrlKey - || evt.metaKey - || (!inputtableKey(evt.key) && evt.key !== 'Backspace')) { - // Ignore if one of the utility key (except SHIFT) is pressed - // E.g. CTRL-C on a link in one of the message should not jump to chat box - // E.g. "A" or "Backspace" should jump to chat box - return; - } - if (target === react_dom_1.findDOMNode(this.historyRef) - || typeof tabIndex !== 'number' - || tabIndex < 0) { - evt.stopPropagation(); - var key = void 0; - // Quirks: onKeyDown we re-focus, but the newly focused element does not receive the subsequent onKeyPress event - // It is working in Chrome/Firefox/IE, confirmed not working in Edge/16 - // So we are manually appending the key if they can be inputted in the box - if (/(^|\s)Edge\/16\./.test(navigator.userAgent)) { - key = inputtableKey(evt.key); - } - this.shellRef.focus(key); - } - }; - Chat.prototype.saveChatviewPanelRef = function (chatviewPanelRef) { - this.chatviewPanelRef = chatviewPanelRef; - }; - Chat.prototype.saveHistoryRef = function (historyWrapper) { - this.historyRef = historyWrapper.getWrappedInstance(); - }; - Chat.prototype.saveShellRef = function (shellWrapper) { - this.shellRef = shellWrapper.getWrappedInstance(); - }; - Chat.prototype.componentDidMount = function () { - var _this = this; - // Now that we're mounted, we know our dimensions. Put them in the store (this will force a re-render) - this.setSize(); - var botConnection = this.props.directLine - ? (this.botConnection = new botframework_directlinejs_1.DirectLine(this.props.directLine)) - : this.props.botConnection; - if (this.props.resize === 'window') - window.addEventListener('resize', this.resizeListener); - this.store.dispatch({ type: 'Start_Connection', user: this.props.user, bot: this.props.bot, botConnection: botConnection, selectedActivity: this.props.selectedActivity }); - this.connectionStatusSubscription = botConnection.connectionStatus$.subscribe(function (connectionStatus) { - if (_this.props.speechOptions && _this.props.speechOptions.speechRecognizer) { - var refGrammarId = botConnection.referenceGrammarId; - if (refGrammarId) - _this.props.speechOptions.speechRecognizer.referenceGrammarId = refGrammarId; - } - _this.store.dispatch({ type: 'Connection_Change', connectionStatus: connectionStatus }); - }); - this.activitySubscription = botConnection.activity$.subscribe(function (activity) { return _this.handleIncomingActivity(activity); }, function (error) { return konsole.log("activity$ error", error); }); - if (this.props.selectedActivity) { - this.selectedActivitySubscription = this.props.selectedActivity.subscribe(function (activityOrID) { - _this.store.dispatch({ - type: 'Select_Activity', - selectedActivity: activityOrID.activity || _this.store.getState().history.activities.find(function (activity) { return activity.id === activityOrID.id; }) - }); - }); - } - }; - Chat.prototype.componentWillUnmount = function () { - this.connectionStatusSubscription.unsubscribe(); - this.activitySubscription.unsubscribe(); - if (this.selectedActivitySubscription) - this.selectedActivitySubscription.unsubscribe(); - if (this.botConnection) - this.botConnection.end(); - window.removeEventListener('resize', this.resizeListener); - }; - // At startup we do three render passes: - // 1. To determine the dimensions of the chat panel (nothing needs to actually render here, so we don't) - // 2. To determine the margins of any given carousel (we just render one mock activity so that we can measure it) - // 3. (this is also the normal re-render case) To render without the mock activity - Chat.prototype.render = function () { - var state = this.store.getState(); - konsole.log("BotChat.Chat state", state); - // only render real stuff after we know our dimensions - var header; - if (state.format.options.showHeader) - header = - React.createElement("div", { className: "wc-header" }, - React.createElement("span", null, state.format.strings.title)); - var resize; - if (this.props.resize === 'detect') - resize = - React.createElement(ResizeDetector, { onresize: this.resizeListener }); - return (React.createElement(react_redux_1.Provider, { store: this.store }, - React.createElement("div", { className: "wc-chatview-panel", onKeyDownCapture: this._handleKeyDownCapture, ref: this._saveChatviewPanelRef }, - header, - React.createElement(MessagePane_1.MessagePane, null, - React.createElement(History_1.History, { onCardAction: this._handleCardAction, ref: this._saveHistoryRef })), - React.createElement(Shell_1.Shell, { ref: this._saveShellRef }), - resize))); - }; - return Chat; -}(React.Component)); -exports.Chat = Chat; -exports.doCardAction = function (botConnection, from, locale, sendMessage) { return function (type, actionValue) { - var text = (typeof actionValue === 'string') ? actionValue : undefined; - var value = (typeof actionValue === 'object') ? actionValue : undefined; - switch (type) { - case "imBack": - if (typeof text === 'string') - sendMessage(text, from, locale); - break; - case "postBack": - exports.sendPostBack(botConnection, text, value, from, locale); - break; - case "call": - case "openUrl": - case "playAudio": - case "playVideo": - case "showImage": - case "downloadFile": - case "signin": - window.open(text); - break; - default: - konsole.log("unknown button type", type); - } -}; }; -exports.sendPostBack = function (botConnection, text, value, from, locale) { - botConnection.postActivity({ - type: "message", - text: text, - value: value, - from: from, - locale: locale - }) - .subscribe(function (id) { - konsole.log("success sending postBack", id); - }, function (error) { - konsole.log("failed to send postBack", error); - }); -}; -exports.renderIfNonempty = function (value, renderer) { - if (value !== undefined && value !== null && (typeof value !== 'string' || value.length > 0)) - return renderer(value); -}; -exports.classList = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return args.filter(Boolean).join(' '); -}; -// note: container of this element must have CSS position of either absolute or relative -var ResizeDetector = function (props) { - // adapted to React from https://github.com/developit/simple-element-resize-detector - return React.createElement("iframe", { style: { position: 'absolute', left: '0', top: '-100%', width: '100%', height: '100%', margin: '1px 0 0', border: 'none', opacity: 0, visibility: 'hidden', pointerEvents: 'none' }, ref: function (frame) { - if (frame) - frame.contentWindow.onresize = props.onresize; - } }); -}; -// For auto-focus in some browsers, we synthetically insert keys into the chatbox. -// By default, we insert keys when: -// 1. evt.key.length === 1 (e.g. "1", "A", "=" keys), or -// 2. evt.key is one of the map keys below (e.g. "Add" will insert "+", "Decimal" will insert ".") -var INPUTTABLE_KEY = { - Add: '+', - Decimal: '.', - Divide: '/', - Multiply: '*', - Subtract: '-' // Numpad subtract key -}; -function inputtableKey(key) { - return key.length === 1 ? key : INPUTTABLE_KEY[key]; -} -//# sourceMappingURL=Chat.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/FormattedText.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var MarkdownIt = __webpack_require__("../../node_modules/markdown-it/index.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -exports.FormattedText = function (props) { - if (!props.text || props.text === '') - return null; - switch (props.format) { - case "xml": - case "plain": - return renderPlainText(props.text); - default: - return renderMarkdown(props.text, props.onImageLoad); - } -}; -var renderPlainText = function (text) { - var lines = text.replace('\r', '').split('\n'); - var elements = lines.map(function (line, i) { return React.createElement("span", { key: i }, - line, - React.createElement("br", null)); }); - return React.createElement("span", { className: "format-plain" }, elements); -}; -var markdownIt = new MarkdownIt({ html: false, xhtmlOut: true, breaks: true, linkify: true, typographer: true }); -//configure MarkdownIt to open links in new tab -//from https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer -// Remember old renderer, if overriden, or proxy to default renderer -var defaultRender = markdownIt.renderer.rules.link_open || (function (tokens, idx, options, env, self) { - return self.renderToken(tokens, idx, options); -}); -markdownIt.renderer.rules.link_open = function (tokens, idx, options, env, self) { - // If you are sure other plugins can't add `target` - drop check below - var targetIndex = tokens[idx].attrIndex('target'); - if (targetIndex < 0) { - tokens[idx].attrPush(['target', '_blank']); // add new attribute - } - else { - tokens[idx].attrs[targetIndex][1] = '_blank'; // replace value of existing attr - } - // pass token to default renderer. - return defaultRender(tokens, idx, options, env, self); -}; -var renderMarkdown = function (text, onImageLoad) { - var __html; - if (text.trim()) { - var src = text - .replace(//ig, '\n') - .replace(/\[(.*?)\]\((.*?)( +".*?"){0,1}\)/ig, function (match, text, url, title) { return "[" + text + "](" + markdownIt.normalizeLink(url) + (title === undefined ? '' : title) + ")"; }); - var arr = src.split(/\n *\n|\r\n *\r\n|\r *\r/); - var ma = arr.map(function (a) { return markdownIt.render(a); }); - __html = ma.join('
'); - } - else { - // Replace spaces with non-breaking space Unicode characters - __html = text.replace(/ */, '\u00A0'); - } - return React.createElement("div", { className: "format-markdown", dangerouslySetInnerHTML: { __html: __html } }); -}; -//# sourceMappingURL=FormattedText.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/HScroll.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var Observable_1 = __webpack_require__("../../node_modules/rxjs/Observable.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/fromEvent.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/merge.js"); -var HScroll = (function (_super) { - tslib_1.__extends(HScroll, _super); - function HScroll(props) { - return _super.call(this, props) || this; - } - HScroll.prototype.clearScrollTimers = function () { - clearInterval(this.scrollStartTimer); - clearInterval(this.scrollSyncTimer); - clearTimeout(this.scrollDurationTimer); - document.body.removeChild(this.animateDiv); - this.animateDiv = null; - this.scrollStartTimer = null; - this.scrollSyncTimer = null; - this.scrollDurationTimer = null; - }; - HScroll.prototype.updateScrollButtons = function () { - this.prevButton.disabled = !this.scrollDiv || Math.round(this.scrollDiv.scrollLeft) <= 0; - this.nextButton.disabled = !this.scrollDiv || Math.round(this.scrollDiv.scrollLeft) >= Math.round(this.scrollDiv.scrollWidth - this.scrollDiv.offsetWidth); - }; - HScroll.prototype.componentDidMount = function () { - var _this = this; - this.scrollDiv.style.marginBottom = -(this.scrollDiv.offsetHeight - this.scrollDiv.clientHeight) + 'px'; - this.scrollSubscription = Observable_1.Observable.fromEvent(this.scrollDiv, 'scroll').subscribe(function (_) { - _this.updateScrollButtons(); - }); - this.clickSubscription = Observable_1.Observable.merge(Observable_1.Observable.fromEvent(this.prevButton, 'click').map(function (_) { return -1; }), Observable_1.Observable.fromEvent(this.nextButton, 'click').map(function (_) { return 1; })).subscribe(function (delta) { - _this.scrollBy(delta); - }); - this.updateScrollButtons(); - }; - HScroll.prototype.componentDidUpdate = function () { - this.scrollDiv.scrollLeft = 0; - this.updateScrollButtons(); - }; - HScroll.prototype.componentWillUnmount = function () { - this.scrollSubscription.unsubscribe(); - this.clickSubscription.unsubscribe(); - }; - HScroll.prototype.scrollAmount = function (direction) { - if (this.props.scrollUnit == 'item') { - // TODO: this can be improved by finding the actual item in the viewport, - // instead of the first item, because they may not have the same width. - // the width of the li is measured on demand in case CSS has resized it - var firstItem = this.scrollDiv.querySelector('ul > li'); - return firstItem ? direction * firstItem.offsetWidth : 0; - } - else { - // TODO: use a good page size. This can be improved by finding the next clipped item. - return direction * (this.scrollDiv.offsetWidth - 70); - } - }; - HScroll.prototype.scrollBy = function (direction) { - var _this = this; - var easingClassName = 'wc-animate-scroll'; - //cancel existing animation when clicking fast - if (this.animateDiv) { - easingClassName = 'wc-animate-scroll-rapid'; - this.clearScrollTimers(); - } - var unit = this.scrollAmount(direction); - var scrollLeft = this.scrollDiv.scrollLeft; - var dest = scrollLeft + unit; - //don't exceed boundaries - dest = Math.max(dest, 0); - dest = Math.min(dest, this.scrollDiv.scrollWidth - this.scrollDiv.offsetWidth); - if (scrollLeft == dest) - return; - //use proper easing curve when distance is small - if (Math.abs(dest - scrollLeft) < 60) { - easingClassName = 'wc-animate-scroll-near'; - } - this.animateDiv = document.createElement('div'); - this.animateDiv.className = easingClassName; - this.animateDiv.style.left = scrollLeft + 'px'; - document.body.appendChild(this.animateDiv); - //capture ComputedStyle every millisecond - this.scrollSyncTimer = window.setInterval(function () { - var num = parseFloat(getComputedStyle(_this.animateDiv).left); - _this.scrollDiv.scrollLeft = num; - }, 1); - //don't let the browser optimize the setting of 'this.animateDiv.style.left' - we need this to change values to trigger the CSS animation - //we accomplish this by calling 'this.animateDiv.style.left' off this thread, using setTimeout - this.scrollStartTimer = window.setTimeout(function () { - _this.animateDiv.style.left = dest + 'px'; - var duration = 1000 * parseFloat(getComputedStyle(_this.animateDiv).transitionDuration); - if (duration) { - //slightly longer that the CSS time so we don't cut it off prematurely - duration += 50; - //stop capturing - _this.scrollDurationTimer = window.setTimeout(function () { return _this.clearScrollTimers(); }, duration); - } - else { - _this.clearScrollTimers(); - } - }, 1); - }; - HScroll.prototype.render = function () { - var _this = this; - return (React.createElement("div", null, - React.createElement("button", { ref: function (button) { return _this.prevButton = button; }, className: "scroll previous", disabled: true }, - React.createElement("svg", null, - React.createElement("path", { d: this.props.prevSvgPathData }))), - React.createElement("div", { className: "wc-hscroll-outer" }, - React.createElement("div", { className: "wc-hscroll", ref: function (div) { return _this.scrollDiv = div; } }, this.props.children)), - React.createElement("button", { ref: function (button) { return _this.nextButton = button; }, className: "scroll next", disabled: true }, - React.createElement("svg", null, - React.createElement("path", { d: this.props.nextSvgPathData }))))); - }; - return HScroll; -}(React.Component)); -exports.HScroll = HScroll; -//# sourceMappingURL=HScroll.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/History.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var react_redux_1 = __webpack_require__("../../node_modules/react-redux/es/index.js"); -var ActivityView_1 = __webpack_require__("../../node_modules/botframework-webchat/built/ActivityView.js"); -var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js"); -var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js"); -var Store_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Store.js"); -var HistoryView = (function (_super) { - tslib_1.__extends(HistoryView, _super); - function HistoryView(props) { - var _this = _super.call(this, props) || this; - _this.scrollToBottom = true; - // In order to do their cool horizontal scrolling thing, Carousels need to know how wide they can be. - // So, at startup, we create this mock Carousel activity and measure it. - _this.measurableCarousel = function () { - // find the largest possible message size by forcing a width larger than the chat itself - return React.createElement(WrappedActivity, { ref: function (x) { return _this.carouselActivity = x; }, activity: { - type: 'message', - id: '', - from: { id: '' }, - attachmentLayout: 'carousel' - }, format: null, fromMe: false, onClickActivity: null, onClickRetry: null, selected: false, showTimestamp: false }, - React.createElement("div", { style: { width: _this.largeWidth } }, "\u00A0")); - }; - return _this; - } - HistoryView.prototype.componentWillUpdate = function () { - this.scrollToBottom = (Math.abs(this.scrollMe.scrollHeight - this.scrollMe.scrollTop - this.scrollMe.offsetHeight) <= 1); - }; - HistoryView.prototype.componentDidUpdate = function () { - if (this.props.format.carouselMargin == undefined) { - // After our initial render we need to measure the carousel width - // Measure the message padding by subtracting the known large width - var paddedWidth = measurePaddedWidth(this.carouselActivity.messageDiv) - this.largeWidth; - // Subtract the padding from the offsetParent's width to get the width of the content - var maxContentWidth = this.carouselActivity.messageDiv.offsetParent.offsetWidth - paddedWidth; - // Subtract the content width from the chat width to get the margin. - // Next time we need to get the content width (on a resize) we can use this margin to get the maximum content width - var carouselMargin = this.props.size.width - maxContentWidth; - konsole.log('history measureMessage ' + carouselMargin); - // Finally, save it away in the Store, which will force another re-render - this.props.setMeasurements(carouselMargin); - this.carouselActivity = null; // After the re-render this activity doesn't exist - } - this.autoscroll(); - }; - HistoryView.prototype.autoscroll = function () { - var vAlignBottomPadding = Math.max(0, measurePaddedHeight(this.scrollMe) - this.scrollContent.offsetHeight); - this.scrollContent.style.marginTop = vAlignBottomPadding + 'px'; - var lastActivity = this.props.activities[this.props.activities.length - 1]; - var lastActivityFromMe = lastActivity && this.props.isFromMe && this.props.isFromMe(lastActivity); - // Validating if we are at the bottom of the list or the last activity was triggered by the user. - if (this.scrollToBottom || lastActivityFromMe) { - this.scrollMe.scrollTop = this.scrollMe.scrollHeight - this.scrollMe.offsetHeight; - } - }; - // At startup we do three render passes: - // 1. To determine the dimensions of the chat panel (not much needs to actually render here) - // 2. To determine the margins of any given carousel (we just render one mock activity so that we can measure it) - // 3. (this is also the normal re-render case) To render without the mock activity - HistoryView.prototype.doCardAction = function (type, value) { - this.props.onClickCardAction(); - this.props.onCardAction && this.props.onCardAction(); - return this.props.doCardAction(type, value); - }; - HistoryView.prototype.render = function () { - var _this = this; - konsole.log("History props", this); - var content; - if (this.props.size.width !== undefined) { - if (this.props.format.carouselMargin === undefined) { - // For measuring carousels we need a width known to be larger than the chat itself - this.largeWidth = this.props.size.width * 2; - content = React.createElement(this.measurableCarousel, null); - } - else { - content = this.props.activities.map(function (activity, index) { - return React.createElement(WrappedActivity, { format: _this.props.format, key: 'message' + index, activity: activity, showTimestamp: index === _this.props.activities.length - 1 || (index + 1 < _this.props.activities.length && suitableInterval(activity, _this.props.activities[index + 1])), selected: _this.props.isSelected(activity), fromMe: _this.props.isFromMe(activity), onClickActivity: _this.props.onClickActivity(activity), onClickRetry: function (e) { - // Since this is a click on an anchor, we need to stop it - // from trying to actually follow a (nonexistant) link - e.preventDefault(); - e.stopPropagation(); - _this.props.onClickRetry(activity); - } }, - React.createElement(ActivityView_1.ActivityView, { format: _this.props.format, size: _this.props.size, activity: activity, onCardAction: function (type, value) { return _this.doCardAction(type, value); }, onImageLoad: function () { return _this.autoscroll(); } })); - }); - } - } - var groupsClassName = Chat_1.classList('wc-message-groups', !this.props.format.options.showHeader && 'no-header'); - return (React.createElement("div", { className: groupsClassName, ref: function (div) { return _this.scrollMe = div || _this.scrollMe; }, role: "log", tabIndex: 0 }, - React.createElement("div", { className: "wc-message-group-content", ref: function (div) { if (div) - _this.scrollContent = div; } }, content))); - }; - return HistoryView; -}(React.Component)); -exports.HistoryView = HistoryView; -exports.History = react_redux_1.connect(function (state) { return ({ - // passed down to HistoryView - format: state.format, - size: state.size, - activities: state.history.activities, - // only used to create helper functions below - connectionSelectedActivity: state.connection.selectedActivity, - selectedActivity: state.history.selectedActivity, - botConnection: state.connection.botConnection, - user: state.connection.user -}); }, { - setMeasurements: function (carouselMargin) { return ({ type: 'Set_Measurements', carouselMargin: carouselMargin }); }, - onClickRetry: function (activity) { return ({ type: 'Send_Message_Retry', clientActivityId: activity.channelData.clientActivityId }); }, - onClickCardAction: function () { return ({ type: 'Card_Action_Clicked' }); }, - // only used to create helper functions below - sendMessage: Store_1.sendMessage -}, function (stateProps, dispatchProps, ownProps) { return ({ - // from stateProps - format: stateProps.format, - size: stateProps.size, - activities: stateProps.activities, - // from dispatchProps - setMeasurements: dispatchProps.setMeasurements, - onClickRetry: dispatchProps.onClickRetry, - onClickCardAction: dispatchProps.onClickCardAction, - // helper functions - doCardAction: Chat_1.doCardAction(stateProps.botConnection, stateProps.user, stateProps.format.locale, dispatchProps.sendMessage), - isFromMe: function (activity) { return activity.from.id === stateProps.user.id; }, - isSelected: function (activity) { return activity === stateProps.selectedActivity; }, - onClickActivity: function (activity) { return stateProps.connectionSelectedActivity && (function () { return stateProps.connectionSelectedActivity.next({ activity: activity }); }); }, - onCardAction: ownProps.onCardAction -}); }, { - withRef: true -})(HistoryView); -var getComputedStyleValues = function (el, stylePropertyNames) { - var s = window.getComputedStyle(el); - var result = {}; - stylePropertyNames.forEach(function (name) { return result[name] = parseInt(s.getPropertyValue(name)); }); - return result; -}; -var measurePaddedHeight = function (el) { - var paddingTop = 'padding-top', paddingBottom = 'padding-bottom'; - var values = getComputedStyleValues(el, [paddingTop, paddingBottom]); - return el.offsetHeight - values[paddingTop] - values[paddingBottom]; -}; -var measurePaddedWidth = function (el) { - var paddingLeft = 'padding-left', paddingRight = 'padding-right'; - var values = getComputedStyleValues(el, [paddingLeft, paddingRight]); - return el.offsetWidth + values[paddingLeft] + values[paddingRight]; -}; -var suitableInterval = function (current, next) { - return Date.parse(next.timestamp) - Date.parse(current.timestamp) > 5 * 60 * 1000; -}; -var WrappedActivity = (function (_super) { - tslib_1.__extends(WrappedActivity, _super); - function WrappedActivity(props) { - return _super.call(this, props) || this; - } - WrappedActivity.prototype.render = function () { - var _this = this; - var timeLine; - switch (this.props.activity.id) { - case undefined: - timeLine = React.createElement("span", null, this.props.format.strings.messageSending); - break; - case null: - timeLine = React.createElement("span", null, this.props.format.strings.messageFailed); - break; - case "retry": - timeLine = - React.createElement("span", null, - this.props.format.strings.messageFailed, - ' ', - React.createElement("a", { href: ".", onClick: this.props.onClickRetry }, this.props.format.strings.messageRetry)); - break; - default: - var sent = void 0; - if (this.props.showTimestamp) - sent = this.props.format.strings.timeSent.replace('%1', (new Date(this.props.activity.timestamp)).toLocaleTimeString()); - timeLine = React.createElement("span", null, - this.props.activity.from.name || this.props.activity.from.id, - sent); - break; - } - var who = this.props.fromMe ? 'me' : 'bot'; - var wrapperClassName = Chat_1.classList('wc-message-wrapper', this.props.activity.attachmentLayout || 'list', this.props.onClickActivity && 'clickable'); - var contentClassName = Chat_1.classList('wc-message-content', this.props.selected && 'selected'); - return (React.createElement("div", { "data-activity-id": this.props.activity.id, className: wrapperClassName, onClick: this.props.onClickActivity }, - React.createElement("div", { className: 'wc-message wc-message-from-' + who, ref: function (div) { return _this.messageDiv = div; } }, - React.createElement("div", { className: contentClassName }, - React.createElement("svg", { className: "wc-message-callout" }, - React.createElement("path", { className: "point-left", d: "m0,6 l6 6 v-12 z" }), - React.createElement("path", { className: "point-right", d: "m6,6 l-6 6 v-12 z" })), - this.props.children)), - React.createElement("div", { className: 'wc-message-from wc-message-from-' + who }, timeLine))); - }; - return WrappedActivity; -}(React.Component)); -exports.WrappedActivity = WrappedActivity; -//# sourceMappingURL=History.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/Konsole.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.log = function (message) { - var optionalParams = []; - for (var _i = 1; _i < arguments.length; _i++) { - optionalParams[_i - 1] = arguments[_i]; - } - if (typeof (window) !== 'undefined' && window["botchatDebug"] && message) - console.log.apply(console, [message].concat(optionalParams)); -}; -//# sourceMappingURL=Konsole.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/MessagePane.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var react_redux_1 = __webpack_require__("../../node_modules/react-redux/es/index.js"); -var HScroll_1 = __webpack_require__("../../node_modules/botframework-webchat/built/HScroll.js"); -var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js"); -var Store_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Store.js"); -var MessagePaneView = function (props) { - return React.createElement("div", { className: Chat_1.classList('wc-message-pane', props.activityWithSuggestedActions && 'show-actions') }, - props.children, - React.createElement("div", { className: "wc-suggested-actions" }, - React.createElement(SuggestedActions, tslib_1.__assign({}, props)))); -}; -var SuggestedActions = (function (_super) { - tslib_1.__extends(SuggestedActions, _super); - function SuggestedActions(props) { - return _super.call(this, props) || this; - } - SuggestedActions.prototype.actionClick = function (e, cardAction) { - //"stale" actions may be displayed (see shouldComponentUpdate), do not respond to click events if there aren't actual actions - if (!this.props.activityWithSuggestedActions) - return; - this.props.takeSuggestedAction(this.props.activityWithSuggestedActions); - this.props.doCardAction(cardAction.type, cardAction.value); - e.stopPropagation(); - }; - SuggestedActions.prototype.shouldComponentUpdate = function (nextProps) { - //update only when there are actions. We want the old actions to remain displayed as it animates down. - return !!nextProps.activityWithSuggestedActions; - }; - SuggestedActions.prototype.render = function () { - var _this = this; - if (!this.props.activityWithSuggestedActions) - return null; - return (React.createElement(HScroll_1.HScroll, { prevSvgPathData: "M 16.5 22 L 19 19.5 L 13.5 14 L 19 8.5 L 16.5 6 L 8.5 14 L 16.5 22 Z", nextSvgPathData: "M 12.5 22 L 10 19.5 L 15.5 14 L 10 8.5 L 12.5 6 L 20.5 14 L 12.5 22 Z", scrollUnit: "page" }, - React.createElement("ul", null, this.props.activityWithSuggestedActions.suggestedActions.actions.map(function (action, index) { - return React.createElement("li", { key: index }, - React.createElement("button", { type: "button", onClick: function (e) { return _this.actionClick(e, action); }, title: action.title }, action.title)); - })))); - }; - return SuggestedActions; -}(React.Component)); -function activityWithSuggestedActions(activities) { - if (!activities || activities.length === 0) - return; - var lastActivity = activities[activities.length - 1]; - if (lastActivity.type === 'message' - && lastActivity.suggestedActions - && lastActivity.suggestedActions.actions.length > 0) - return lastActivity; -} -exports.MessagePane = react_redux_1.connect(function (state) { return ({ - // passed down to MessagePaneView - activityWithSuggestedActions: activityWithSuggestedActions(state.history.activities), - // only used to create helper functions below - botConnection: state.connection.botConnection, - user: state.connection.user, - locale: state.format.locale -}); }, { - takeSuggestedAction: function (message) { return ({ type: 'Take_SuggestedAction', message: message }); }, - // only used to create helper functions below - sendMessage: Store_1.sendMessage -}, function (stateProps, dispatchProps, ownProps) { return ({ - // from stateProps - activityWithSuggestedActions: stateProps.activityWithSuggestedActions, - // from dispatchProps - takeSuggestedAction: dispatchProps.takeSuggestedAction, - // from ownProps - children: ownProps.children, - // helper functions - doCardAction: Chat_1.doCardAction(stateProps.botConnection, stateProps.user, stateProps.locale, dispatchProps.sendMessage), -}); })(MessagePaneView); -//# sourceMappingURL=MessagePane.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/Shell.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var React = __webpack_require__("../../node_modules/react/react.js"); -var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js"); -var react_redux_1 = __webpack_require__("../../node_modules/react-redux/es/index.js"); -var SpeechModule_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechModule.js"); -var Store_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Store.js"); -var ShellContainer = (function (_super) { - tslib_1.__extends(ShellContainer, _super); - function ShellContainer() { - return _super !== null && _super.apply(this, arguments) || this; - } - ShellContainer.prototype.sendMessage = function () { - if (this.props.inputText.trim().length > 0) { - this.props.sendMessage(this.props.inputText); - } - }; - ShellContainer.prototype.handleSendButtonKeyPress = function (evt) { - if (evt.key === 'Enter' || evt.key === ' ') { - evt.preventDefault(); - this.sendMessage(); - this.textInput.focus(); - } - }; - ShellContainer.prototype.handleUploadButtonKeyPress = function (evt) { - if (evt.key === 'Enter' || evt.key === ' ') { - evt.preventDefault(); - this.fileInput.click(); - } - }; - ShellContainer.prototype.onKeyPress = function (e) { - if (e.key === 'Enter') { - this.sendMessage(); - } - }; - ShellContainer.prototype.onClickSend = function () { - this.sendMessage(); - }; - ShellContainer.prototype.onChangeFile = function () { - this.props.sendFiles(this.fileInput.files); - this.fileInput.value = null; - this.textInput.focus(); - }; - ShellContainer.prototype.onTextInputFocus = function () { - if (this.props.listening) { - this.props.stopListening(); - } - }; - ShellContainer.prototype.onClickMic = function () { - if (this.props.listening) { - this.props.stopListening(); - } - else { - this.props.startListening(); - } - }; - ShellContainer.prototype.focus = function (appendKey) { - this.textInput.focus(); - if (appendKey) { - this.props.onChangeText(this.props.inputText + appendKey); - } - }; - ShellContainer.prototype.render = function () { - var _this = this; - var className = Chat_1.classList('wc-console', this.props.inputText.length > 0 && 'has-text'); - var showMicButton = this.props.listening || (SpeechModule_1.Speech.SpeechRecognizer.speechIsAvailable() && !this.props.inputText.length); - var sendButtonClassName = Chat_1.classList('wc-send', showMicButton && 'hidden'); - var micButtonClassName = Chat_1.classList('wc-mic', !showMicButton && 'hidden', this.props.listening && 'active', !this.props.listening && 'inactive'); - var placeholder = this.props.listening ? this.props.strings.listeningIndicator : this.props.strings.consolePlaceholder; - return (React.createElement("div", { className: className }, - React.createElement("label", { className: "wc-upload", onKeyPress: function (evt) { return _this.handleUploadButtonKeyPress(evt); }, tabIndex: 0 }, - React.createElement("svg", null, - React.createElement("path", { d: "M19.96 4.79m-2 0a2 2 0 0 1 4 0 2 2 0 0 1-4 0zM8.32 4.19L2.5 15.53 22.45 15.53 17.46 8.56 14.42 11.18 8.32 4.19ZM1.04 1L1.04 17 24.96 17 24.96 1 1.04 1ZM1.03 0L24.96 0C25.54 0 26 0.45 26 0.99L26 17.01C26 17.55 25.53 18 24.96 18L1.03 18C0.46 18 0 17.55 0 17.01L0 0.99C0 0.45 0.47 0 1.03 0Z" })), - React.createElement("input", { id: "wc-upload-input", tabIndex: -1, type: "file", ref: function (input) { return _this.fileInput = input; }, multiple: true, onChange: function () { return _this.onChangeFile(); }, "aria-label": this.props.strings.uploadFile, role: "button" })), - React.createElement("div", { className: "wc-textbox" }, - React.createElement("input", { type: "text", className: "wc-shellinput", ref: function (input) { return _this.textInput = input; }, autoFocus: true, value: this.props.inputText, onChange: function (_) { return _this.props.onChangeText(_this.textInput.value); }, onKeyPress: function (e) { return _this.onKeyPress(e); }, onFocus: function () { return _this.onTextInputFocus(); }, placeholder: placeholder, "aria-label": this.props.inputText ? null : placeholder, "aria-live": "polite" })), - React.createElement("button", { className: sendButtonClassName, onClick: function () { return _this.onClickSend(); }, "aria-label": this.props.strings.send, role: "button", onKeyPress: function (evt) { return _this.handleSendButtonKeyPress(evt); }, tabIndex: 0 }, - React.createElement("svg", null, - React.createElement("path", { d: "M26.79 9.38A0.31 0.31 0 0 0 26.79 8.79L0.41 0.02C0.36 0 0.34 0 0.32 0 0.14 0 0 0.13 0 0.29 0 0.33 0.01 0.37 0.03 0.41L3.44 9.08 0.03 17.76A0.29 0.29 0 0 0 0.01 17.8 0.28 0.28 0 0 0 0.01 17.86C0.01 18.02 0.14 18.16 0.3 18.16A0.3 0.3 0 0 0 0.41 18.14L26.79 9.38ZM0.81 0.79L24.84 8.79 3.98 8.79 0.81 0.79ZM3.98 9.37L24.84 9.37 0.81 17.37 3.98 9.37Z" }))), - React.createElement("button", { className: micButtonClassName, onClick: function () { return _this.onClickMic(); }, "aria-label": this.props.strings.speak, role: "button", tabIndex: 0 }, - React.createElement("svg", { width: "28", height: "22", viewBox: "0 0 58 58" }, - React.createElement("path", { d: "M 44 28 C 43.448 28 43 28.447 43 29 L 43 35 C 43 42.72 36.72 49 29 49 C 21.28 49 15 42.72 15 35 L 15 29 C 15 28.447 14.552 28 14 28 C 13.448 28 13 28.447 13 29 L 13 35 C 13 43.485 19.644 50.429 28 50.949 L 28 56 L 23 56 C 22.448 56 22 56.447 22 57 C 22 57.553 22.448 58 23 58 L 35 58 C 35.552 58 36 57.553 36 57 C 36 56.447 35.552 56 35 56 L 30 56 L 30 50.949 C 38.356 50.429 45 43.484 45 35 L 45 29 C 45 28.447 44.552 28 44 28 Z" }), - React.createElement("path", { id: "micFilling", d: "M 28.97 44.438 L 28.97 44.438 C 23.773 44.438 19.521 40.033 19.521 34.649 L 19.521 11.156 C 19.521 5.772 23.773 1.368 28.97 1.368 L 28.97 1.368 C 34.166 1.368 38.418 5.772 38.418 11.156 L 38.418 34.649 C 38.418 40.033 34.166 44.438 28.97 44.438 Z" }), - React.createElement("path", { d: "M 29 46 C 35.065 46 40 41.065 40 35 L 40 11 C 40 4.935 35.065 0 29 0 C 22.935 0 18 4.935 18 11 L 18 35 C 18 41.065 22.935 46 29 46 Z M 20 11 C 20 6.037 24.038 2 29 2 C 33.962 2 38 6.037 38 11 L 38 35 C 38 39.963 33.962 44 29 44 C 24.038 44 20 39.963 20 35 L 20 11 Z" }))))); - }; - return ShellContainer; -}(React.Component)); -exports.Shell = react_redux_1.connect(function (state) { return ({ - // passed down to ShellContainer - inputText: state.shell.input, - strings: state.format.strings, - // only used to create helper functions below - locale: state.format.locale, - user: state.connection.user, - listening: state.shell.listening -}); }, { - // passed down to ShellContainer - onChangeText: function (input) { return ({ type: 'Update_Input', input: input, source: "text" }); }, - stopListening: function () { return ({ type: 'Listening_Stop' }); }, - startListening: function () { return ({ type: 'Listening_Starting' }); }, - // only used to create helper functions below - sendMessage: Store_1.sendMessage, - sendFiles: Store_1.sendFiles -}, function (stateProps, dispatchProps, ownProps) { return ({ - // from stateProps - inputText: stateProps.inputText, - strings: stateProps.strings, - listening: stateProps.listening, - // from dispatchProps - onChangeText: dispatchProps.onChangeText, - // helper functions - sendMessage: function (text) { return dispatchProps.sendMessage(text, stateProps.user, stateProps.locale); }, - sendFiles: function (files) { return dispatchProps.sendFiles(files, stateProps.user, stateProps.locale); }, - startListening: function () { return dispatchProps.startListening(); }, - stopListening: function () { return dispatchProps.stopListening(); } -}); }, { - withRef: true -})(ShellContainer); -//# sourceMappingURL=Shell.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/SpeechModule.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var Speech; -(function (Speech) { - var SpeechRecognizer = (function () { - function SpeechRecognizer() { - } - SpeechRecognizer.setSpeechRecognizer = function (recognizer) { - SpeechRecognizer.instance = recognizer; - }; - SpeechRecognizer.startRecognizing = function (locale, onIntermediateResult, onFinalResult, onAudioStreamStarted, onRecognitionFailed) { - if (locale === void 0) { locale = 'en-US'; } - if (onIntermediateResult === void 0) { onIntermediateResult = null; } - if (onFinalResult === void 0) { onFinalResult = null; } - if (onAudioStreamStarted === void 0) { onAudioStreamStarted = null; } - if (onRecognitionFailed === void 0) { onRecognitionFailed = null; } - if (!SpeechRecognizer.speechIsAvailable()) - return; - if (locale && SpeechRecognizer.instance.locale !== locale) { - SpeechRecognizer.instance.stopRecognizing(); - SpeechRecognizer.instance.locale = locale; // to do this could invalidate warmup. - } - if (SpeechRecognizer.alreadyRecognizing()) { - SpeechRecognizer.stopRecognizing(); - } - SpeechRecognizer.instance.onIntermediateResult = onIntermediateResult; - SpeechRecognizer.instance.onFinalResult = onFinalResult; - SpeechRecognizer.instance.onAudioStreamingToService = onAudioStreamStarted; - SpeechRecognizer.instance.onRecognitionFailed = onRecognitionFailed; - SpeechRecognizer.instance.startRecognizing(); - }; - SpeechRecognizer.stopRecognizing = function () { - if (!SpeechRecognizer.speechIsAvailable()) - return; - SpeechRecognizer.instance.stopRecognizing(); - }; - SpeechRecognizer.warmup = function () { - if (!SpeechRecognizer.speechIsAvailable()) - return; - SpeechRecognizer.instance.warmup(); - }; - SpeechRecognizer.speechIsAvailable = function () { - return SpeechRecognizer.instance != null && SpeechRecognizer.instance.speechIsAvailable(); - }; - SpeechRecognizer.alreadyRecognizing = function () { - return SpeechRecognizer.instance ? SpeechRecognizer.instance.isStreamingToService : false; - }; - return SpeechRecognizer; - }()); - SpeechRecognizer.instance = null; - Speech.SpeechRecognizer = SpeechRecognizer; - var SpeechSynthesizer = (function () { - function SpeechSynthesizer() { - } - SpeechSynthesizer.setSpeechSynthesizer = function (speechSynthesizer) { - SpeechSynthesizer.instance = speechSynthesizer; - }; - SpeechSynthesizer.speak = function (text, lang, onSpeakingStarted, onSpeakingFinished) { - if (onSpeakingStarted === void 0) { onSpeakingStarted = null; } - if (onSpeakingFinished === void 0) { onSpeakingFinished = null; } - if (SpeechSynthesizer.instance == null) - return; - SpeechSynthesizer.instance.speak(text, lang, onSpeakingStarted, onSpeakingFinished); - }; - SpeechSynthesizer.stopSpeaking = function () { - if (SpeechSynthesizer.instance == null) - return; - SpeechSynthesizer.instance.stopSpeaking(); - }; - return SpeechSynthesizer; - }()); - SpeechSynthesizer.instance = null; - Speech.SpeechSynthesizer = SpeechSynthesizer; - var BrowserSpeechRecognizer = (function () { - function BrowserSpeechRecognizer() { - var _this = this; - this.locale = null; - this.isStreamingToService = false; - this.onIntermediateResult = null; - this.onFinalResult = null; - this.onAudioStreamingToService = null; - this.onRecognitionFailed = null; - this.recognizer = null; - if (!window.webkitSpeechRecognition) { - console.error("This browser does not support speech recognition"); - return; - } - this.recognizer = new window.webkitSpeechRecognition(); - this.recognizer.lang = 'en-US'; - this.recognizer.interimResults = true; - this.recognizer.onaudiostart = function () { - if (_this.onAudioStreamingToService) { - _this.onAudioStreamingToService(); - } - }; - this.recognizer.onresult = function (srevent) { - if (srevent.results == null || srevent.length == 0) { - return; - } - var result = srevent.results[0]; - if (result.isFinal === true && _this.onFinalResult != null) { - _this.onFinalResult(result[0].transcript); - } - else if (result.isFinal === false && _this.onIntermediateResult != null) { - var text = ""; - for (var i = 0; i < srevent.results.length; ++i) { - text += srevent.results[i][0].transcript; - } - _this.onIntermediateResult(text); - } - }; - this.recognizer.onerror = function (err) { - if (_this.onRecognitionFailed) { - _this.onRecognitionFailed(); - } - throw err; - }; - } - BrowserSpeechRecognizer.prototype.speechIsAvailable = function () { - return this.recognizer != null; - }; - BrowserSpeechRecognizer.prototype.warmup = function () { - }; - BrowserSpeechRecognizer.prototype.startRecognizing = function () { - this.recognizer.start(); - }; - BrowserSpeechRecognizer.prototype.stopRecognizing = function () { - this.recognizer.stop(); - }; - return BrowserSpeechRecognizer; - }()); - Speech.BrowserSpeechRecognizer = BrowserSpeechRecognizer; - var BrowserSpeechSynthesizer = (function () { - function BrowserSpeechSynthesizer() { - this.lastOperation = null; - this.audioElement = null; - this.speakRequests = []; - } - BrowserSpeechSynthesizer.prototype.speak = function (text, lang, onSpeakingStarted, onSpeakingFinished) { - var _this = this; - if (onSpeakingStarted === void 0) { onSpeakingStarted = null; } - if (onSpeakingFinished === void 0) { onSpeakingFinished = null; } - if (!('SpeechSynthesisUtterance' in window) || !text) - return; - if (this.audioElement === null) { - var audio = document.createElement('audio'); - audio.id = 'player'; - audio.autoplay = true; - this.audioElement = audio; - } - var chunks = new Array(); - if (text[0] === '<') { - if (text.indexOf('\n'; - var parser = new DOMParser(); - var dom = parser.parseFromString(text, 'text/xml'); - var nodes = dom.documentElement.childNodes; - this.processNodes(nodes, chunks); - } - else { - chunks.push(text); - } - var onSpeakingFinishedWrapper = function () { - if (onSpeakingFinished !== null) - onSpeakingFinished(); - // remove this from the queue since it's done: - if (_this.speakRequests.length) { - _this.speakRequests[0].completed(); - _this.speakRequests.splice(0, 1); - } - // If there are other speak operations in the queue, process them - if (_this.speakRequests.length) { - _this.playNextTTS(_this.speakRequests[0], 0); - } - }; - var request = new SpeakRequest(chunks, lang, function (speakOp) { _this.lastOperation = speakOp; }, onSpeakingStarted, onSpeakingFinishedWrapper); - if (this.speakRequests.length === 0) { - this.speakRequests = [request]; - this.playNextTTS(this.speakRequests[0], 0); - } - else { - this.speakRequests.push(request); - } - }; - BrowserSpeechSynthesizer.prototype.stopSpeaking = function () { - if (('SpeechSynthesisUtterance' in window) === false) - return; - if (this.speakRequests.length) { - if (this.audioElement) - this.audioElement.pause(); - this.speakRequests.forEach(function (req) { - req.abandon(); - }); - this.speakRequests = []; - var ss = window.speechSynthesis; - if (ss.speaking || ss.pending) { - if (this.lastOperation) - this.lastOperation.onend = null; - ss.cancel(); - } - } - }; - ; - BrowserSpeechSynthesizer.prototype.playNextTTS = function (requestContainer, iCurrent) { - // lang : string, onSpeakQueued: Func, onSpeakStarted : Action, onFinishedSpeaking : Action - var _this = this; - var moveToNext = function () { - _this.playNextTTS(requestContainer, iCurrent + 1); - }; - if (iCurrent < requestContainer.speakChunks.length) { - var current = requestContainer.speakChunks[iCurrent]; - if (typeof current === 'number') { - setTimeout(moveToNext, current); - } - else { - if (current.indexOf('http') === 0) { - var audio = this.audioElement; // document.getElementById('player'); - audio.src = current; - audio.onended = moveToNext; - audio.onerror = moveToNext; - audio.play(); - } - else { - var msg = new SpeechSynthesisUtterance(); - // msg.voiceURI = 'native'; - // msg.volume = 1; // 0 to 1 - // msg.rate = 1; // 0.1 to 10 - // msg.pitch = 2; //0 to 2 - msg.text = current; - msg.lang = requestContainer.lang; - msg.onstart = iCurrent === 0 ? requestContainer.onSpeakingStarted : null; - msg.onend = moveToNext; - msg.onerror = moveToNext; - if (requestContainer.onSpeakQueued) - requestContainer.onSpeakQueued(msg); - window.speechSynthesis.speak(msg); - } - } - } - else { - if (requestContainer.onSpeakingFinished) - requestContainer.onSpeakingFinished(); - } - }; - // process SSML markup into an array of either - // * utterenance - // * number which is delay in msg - // * url which is an audio file - BrowserSpeechSynthesizer.prototype.processNodes = function (nodes, output) { - for (var i = 0; i < nodes.length; i++) { - var node = nodes[i]; - switch (node.nodeName) { - case 'p': - this.processNodes(node.childNodes, output); - output.push(250); - break; - case 'break': - if (node.attributes.getNamedItem('strength')) { - var strength = node.attributes.getNamedItem('strength').nodeValue; - if (strength === 'weak') { - // output.push(50); - } - else if (strength === 'medium') { - output.push(50); - } - else if (strength === 'strong') { - output.push(100); - } - else if (strength === 'x-strong') { - output.push(250); - } - } - else if (node.attributes.getNamedItem('time')) { - output.push(JSON.parse(node.attributes.getNamedItem('time').value)); - } - break; - case 'audio': - if (node.attributes.getNamedItem('src')) { - output.push(node.attributes.getNamedItem('src').value); - } - break; - case 'say-as': - case 'prosody': // ToDo: handle via msg.rate - case 'emphasis': // ToDo: can probably emulate via prosody + pitch - case 'w': - case 'phoneme': // - case 'voice': - this.processNodes(node.childNodes, output); - break; - default: - // Todo: coalesce consecutive non numeric / non html entries. - output.push(node.nodeValue); - break; - } - } - }; - return BrowserSpeechSynthesizer; - }()); - Speech.BrowserSpeechSynthesizer = BrowserSpeechSynthesizer; - var SpeakRequest = (function () { - function SpeakRequest(speakChunks, lang, onSpeakQueued, onSpeakingStarted, onSpeakingFinished) { - if (onSpeakQueued === void 0) { onSpeakQueued = null; } - if (onSpeakingStarted === void 0) { onSpeakingStarted = null; } - if (onSpeakingFinished === void 0) { onSpeakingFinished = null; } - this._onSpeakQueued = null; - this._onSpeakingStarted = null; - this._onSpeakingFinished = null; - this._speakChunks = []; - this._lang = null; - this._onSpeakQueued = onSpeakQueued; - this._onSpeakingStarted = onSpeakingStarted; - this._onSpeakingFinished = onSpeakingFinished; - this._speakChunks = speakChunks; - this._lang = lang; - } - SpeakRequest.prototype.abandon = function () { - this._speakChunks = []; - }; - SpeakRequest.prototype.completed = function () { - this._speakChunks = []; - }; - Object.defineProperty(SpeakRequest.prototype, "onSpeakQueued", { - get: function () { return this._onSpeakQueued; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(SpeakRequest.prototype, "onSpeakingStarted", { - get: function () { return this._onSpeakingStarted; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(SpeakRequest.prototype, "onSpeakingFinished", { - get: function () { return this._onSpeakingFinished; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(SpeakRequest.prototype, "speakChunks", { - get: function () { return this._speakChunks; }, - enumerable: true, - configurable: true - }); - Object.defineProperty(SpeakRequest.prototype, "lang", { - get: function () { return this._lang; }, - enumerable: true, - configurable: true - }); - return SpeakRequest; - }()); -})(Speech = exports.Speech || (exports.Speech = {})); -//# sourceMappingURL=SpeechModule.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/SpeechOptions.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var SpeechOptions = (function () { - function SpeechOptions() { - } - return SpeechOptions; -}()); -exports.SpeechOptions = SpeechOptions; -//# sourceMappingURL=SpeechOptions.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/Store.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js"); -var botframework_directlinejs_1 = __webpack_require__("../../node_modules/botframework-directlinejs/built/directLine.js"); -var Strings_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Strings.js"); -var SpeechModule_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechModule.js"); -var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js"); -exports.sendMessage = function (text, from, locale) { return ({ - type: 'Send_Message', - activity: { - type: "message", - text: text, - from: from, - locale: locale, - textFormat: 'plain', - timestamp: (new Date()).toISOString() - } -}); }; -exports.sendFiles = function (files, from, locale) { return ({ - type: 'Send_Message', - activity: { - type: "message", - attachments: attachmentsFromFiles(files), - from: from, - locale: locale - } -}); }; -var attachmentsFromFiles = function (files) { - var attachments = []; - for (var i = 0, numFiles = files.length; i < numFiles; i++) { - var file = files[i]; - attachments.push({ - contentType: file.type, - contentUrl: window.URL.createObjectURL(file), - name: file.name - }); - } - return attachments; -}; -exports.shell = function (state, action) { - if (state === void 0) { state = { - input: '', - sendTyping: false, - listening: false, - lastInputViaSpeech: false - }; } - switch (action.type) { - case 'Update_Input': - return tslib_1.__assign({}, state, { input: action.input, lastInputViaSpeech: action.source == "speech" }); - case 'Listening_Start': - return tslib_1.__assign({}, state, { listening: true }); - case 'Listening_Stop': - return tslib_1.__assign({}, state, { listening: false }); - case 'Send_Message': - return tslib_1.__assign({}, state, { input: '' }); - case 'Set_Send_Typing': - return tslib_1.__assign({}, state, { sendTyping: action.sendTyping }); - case 'Card_Action_Clicked': - return tslib_1.__assign({}, state, { lastInputViaSpeech: false }); - default: - case 'Listening_Starting': - return state; - } -}; -exports.format = function (state, action) { - if (state === void 0) { state = { - locale: 'en-us', - options: { - showHeader: true - }, - strings: Strings_1.defaultStrings, - carouselMargin: undefined - }; } - switch (action.type) { - case 'Set_Format_Options': - return tslib_1.__assign({}, state, { options: tslib_1.__assign({}, state.options, action.options) }); - case 'Set_Locale': - return tslib_1.__assign({}, state, { locale: action.locale, strings: Strings_1.strings(action.locale) }); - case 'Set_Measurements': - return tslib_1.__assign({}, state, { carouselMargin: action.carouselMargin }); - default: - return state; - } -}; -exports.size = function (state, action) { - if (state === void 0) { state = { - width: undefined, - height: undefined - }; } - switch (action.type) { - case 'Set_Size': - return tslib_1.__assign({}, state, { width: action.width, height: action.height }); - default: - return state; - } -}; -exports.connection = function (state, action) { - if (state === void 0) { state = { - connectionStatus: botframework_directlinejs_1.ConnectionStatus.Uninitialized, - botConnection: undefined, - selectedActivity: undefined, - user: undefined, - bot: undefined - }; } - switch (action.type) { - case 'Start_Connection': - return tslib_1.__assign({}, state, { botConnection: action.botConnection, user: action.user, bot: action.bot, selectedActivity: action.selectedActivity }); - case 'Connection_Change': - return tslib_1.__assign({}, state, { connectionStatus: action.connectionStatus }); - default: - return state; - } -}; -var copyArrayWithUpdatedItem = function (array, i, item) { return array.slice(0, i).concat([ - item -], array.slice(i + 1)); }; -exports.history = function (state, action) { - if (state === void 0) { state = { - activities: [], - clientActivityBase: Date.now().toString() + Math.random().toString().substr(1) + '.', - clientActivityCounter: 0, - selectedActivity: null - }; } - konsole.log("history action", action); - switch (action.type) { - case 'Receive_Sent_Message': { - if (!action.activity.channelData || !action.activity.channelData.clientActivityId) { - // only postBack messages don't have clientActivityId, and these shouldn't be added to the history - return state; - } - var i_1 = state.activities.findIndex(function (activity) { - return activity.channelData && activity.channelData.clientActivityId === action.activity.channelData.clientActivityId; - }); - if (i_1 !== -1) { - var activity_1 = state.activities[i_1]; - return tslib_1.__assign({}, state, { activities: copyArrayWithUpdatedItem(state.activities, i_1, activity_1), selectedActivity: state.selectedActivity === activity_1 ? action.activity : state.selectedActivity }); - } - // else fall through and treat this as a new message - } - case 'Receive_Message': - if (state.activities.find(function (a) { return a.id === action.activity.id; })) - return state; // don't allow duplicate messages - return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activity) { return activity.type !== "typing"; }).concat([ - action.activity - ], state.activities.filter(function (activity) { return activity.from.id !== action.activity.from.id && activity.type === "typing"; })) }); - case 'Send_Message': - return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activity) { return activity.type !== "typing"; }).concat([ - tslib_1.__assign({}, action.activity, { timestamp: (new Date()).toISOString(), channelData: { clientActivityId: state.clientActivityBase + state.clientActivityCounter } }) - ], state.activities.filter(function (activity) { return activity.type === "typing"; })), clientActivityCounter: state.clientActivityCounter + 1 }); - case 'Send_Message_Retry': { - var activity_2 = state.activities.find(function (activity) { - return activity.channelData && activity.channelData.clientActivityId === action.clientActivityId; - }); - var newActivity_1 = activity_2.id === undefined ? activity_2 : tslib_1.__assign({}, activity_2, { id: undefined }); - return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activityT) { return activityT.type !== "typing" && activityT !== activity_2; }).concat([ - newActivity_1 - ], state.activities.filter(function (activity) { return activity.type === "typing"; })), selectedActivity: state.selectedActivity === activity_2 ? newActivity_1 : state.selectedActivity }); - } - case 'Send_Message_Succeed': - case 'Send_Message_Fail': { - var i_2 = state.activities.findIndex(function (activity) { - return activity.channelData && activity.channelData.clientActivityId === action.clientActivityId; - }); - if (i_2 === -1) - return state; - var activity_3 = state.activities[i_2]; - if (activity_3.id && activity_3.id != "retry") - return state; - var newActivity_2 = tslib_1.__assign({}, activity_3, { id: action.type === 'Send_Message_Succeed' ? action.id : null }); - return tslib_1.__assign({}, state, { activities: copyArrayWithUpdatedItem(state.activities, i_2, newActivity_2), clientActivityCounter: state.clientActivityCounter + 1, selectedActivity: state.selectedActivity === activity_3 ? newActivity_2 : state.selectedActivity }); - } - case 'Show_Typing': - return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activity) { return activity.type !== "typing"; }).concat(state.activities.filter(function (activity) { return activity.from.id !== action.activity.from.id && activity.type === "typing"; }), [ - action.activity - ]) }); - case 'Clear_Typing': - return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activity) { return activity.id !== action.id; }), selectedActivity: state.selectedActivity && state.selectedActivity.id === action.id ? null : state.selectedActivity }); - case 'Select_Activity': - if (action.selectedActivity === state.selectedActivity) - return state; - return tslib_1.__assign({}, state, { selectedActivity: action.selectedActivity }); - case 'Take_SuggestedAction': - var i = state.activities.findIndex(function (activity) { return activity === action.message; }); - var activity = state.activities[i]; - var newActivity = tslib_1.__assign({}, activity, { suggestedActions: undefined }); - return tslib_1.__assign({}, state, { activities: copyArrayWithUpdatedItem(state.activities, i, newActivity), selectedActivity: state.selectedActivity === activity ? newActivity : state.selectedActivity }); - default: - return state; - } -}; -var nullAction = { type: null }; -var speakFromMsg = function (msg, fallbackLocale) { - var speak = msg.speak; - if (!speak && msg.textFormat == null || msg.textFormat == "plain") - speak = msg.text; - if (!speak && msg.channelData && msg.channelData.speechOutput && msg.channelData.speechOutput.speakText) - speak = msg.channelData.speechOutput.speakText; - if (!speak && msg.attachments && msg.attachments.length > 0) - for (var i = 0; i < msg.attachments.length; i++) { - var anymsg = msg; - if (anymsg.attachments[i]["content"] && anymsg.attachments[i]["content"]["speak"]) { - speak = anymsg.attachments[i]["content"]["speak"]; - break; - } - } - return { - type: 'Speak_SSML', - ssml: speak, - locale: msg.locale || fallbackLocale, - autoListenAfterSpeak: (msg.inputHint == "expectingInput") || (msg.channelData && msg.channelData.botState == "WaitingForAnswerToQuestion"), - }; -}; -// Epics - chain actions together with async operations -var redux_1 = __webpack_require__("../../node_modules/redux/es/index.js"); -var Observable_1 = __webpack_require__("../../node_modules/rxjs/Observable.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/catch.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/delay.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/do.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/filter.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/map.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/merge.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/mergeMap.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/throttleTime.js"); -__webpack_require__("../../node_modules/rxjs/add/operator/takeUntil.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/bindCallback.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/empty.js"); -__webpack_require__("../../node_modules/rxjs/add/observable/of.js"); -var sendMessageEpic = function (action$, store) { - return action$.ofType('Send_Message') - .map(function (action) { - var state = store.getState(); - var clientActivityId = state.history.clientActivityBase + (state.history.clientActivityCounter - 1); - return { type: 'Send_Message_Try', clientActivityId: clientActivityId }; - }); -}; -var trySendMessageEpic = function (action$, store) { - return action$.ofType('Send_Message_Try') - .flatMap(function (action) { - var state = store.getState(); - var clientActivityId = action.clientActivityId; - var activity = state.history.activities.find(function (activity) { return activity.channelData && activity.channelData.clientActivityId === clientActivityId; }); - if (!activity) { - konsole.log("trySendMessage: activity not found"); - return Observable_1.Observable.empty(); - } - if (state.history.clientActivityCounter == 1) { - var capabilities = { - type: 'ClientCapabilities', - requiresBotState: true, - supportsTts: true, - supportsListening: true, - }; - activity.entities = activity.entities == null ? [capabilities] : activity.entities.concat([capabilities]); - } - return state.connection.botConnection.postActivity(activity) - .map(function (id) { return ({ type: 'Send_Message_Succeed', clientActivityId: clientActivityId, id: id }); }) - .catch(function (error) { return Observable_1.Observable.of({ type: 'Send_Message_Fail', clientActivityId: clientActivityId }); }); - }); -}; -var speakObservable = Observable_1.Observable.bindCallback(SpeechModule_1.Speech.SpeechSynthesizer.speak); -var speakSSMLEpic = function (action$, store) { - return action$.ofType('Speak_SSML') - .filter(function (action) { return action.ssml; }) - .mergeMap(function (action) { - var onSpeakingStarted = null; - var onSpeakingFinished = function () { return nullAction; }; - if (action.autoListenAfterSpeak) { - onSpeakingStarted = function () { return SpeechModule_1.Speech.SpeechRecognizer.warmup(); }; - onSpeakingFinished = function () { return ({ type: 'Listening_Starting' }); }; - } - var call$ = speakObservable(action.ssml, action.locale, onSpeakingStarted); - return call$.map(onSpeakingFinished) - .catch(function (error) { return Observable_1.Observable.of(nullAction); }); - }) - .merge(action$.ofType('Speak_SSML').map(function (_) { return ({ type: 'Listening_Stop' }); })); -}; -var speakOnMessageReceivedEpic = function (action$, store) { - return action$.ofType('Receive_Message') - .filter(function (action) { return action.activity && store.getState().shell.lastInputViaSpeech; }) - .map(function (action) { return speakFromMsg(action.activity, store.getState().format.locale); }); -}; -var stopSpeakingEpic = function (action$) { - return action$.ofType('Update_Input', 'Listening_Starting', 'Send_Message', 'Card_Action_Clicked', 'Stop_Speaking') - .do(SpeechModule_1.Speech.SpeechSynthesizer.stopSpeaking) - .map(function (_) { return nullAction; }); -}; -var stopListeningEpic = function (action$) { - return action$.ofType('Listening_Stop', 'Card_Action_Clicked') - .do(SpeechModule_1.Speech.SpeechRecognizer.stopRecognizing) - .map(function (_) { return nullAction; }); -}; -var startListeningEpic = function (action$, store) { - return action$.ofType('Listening_Starting') - .do(function (action) { - var locale = store.getState().format.locale; - var onIntermediateResult = function (srText) { store.dispatch({ type: 'Update_Input', input: srText, source: "speech" }); }; - var onFinalResult = function (srText) { - srText = srText.replace(/^[.\s]+|[.\s]+$/g, ""); - onIntermediateResult(srText); - store.dispatch({ type: 'Listening_Stop' }); - store.dispatch(exports.sendMessage(srText, store.getState().connection.user, locale)); - }; - var onAudioStreamStart = function () { store.dispatch({ type: 'Listening_Start' }); }; - var onRecognitionFailed = function () { store.dispatch({ type: 'Listening_Stop' }); }; - SpeechModule_1.Speech.SpeechRecognizer.startRecognizing(locale, onIntermediateResult, onFinalResult, onAudioStreamStart, onRecognitionFailed); - }) - .map(function (_) { return nullAction; }); -}; -var listeningSilenceTimeoutEpic = function (action$, store) { - var cancelMessages$ = action$.ofType('Update_Input', 'Listening_Stop'); - return action$.ofType('Listening_Start') - .mergeMap(function (action) { - return Observable_1.Observable.of(({ type: 'Listening_Stop' })) - .delay(5000) - .takeUntil(cancelMessages$); - }); -}; -var retrySendMessageEpic = function (action$) { - return action$.ofType('Send_Message_Retry') - .map(function (action) { return ({ type: 'Send_Message_Try', clientActivityId: action.clientActivityId }); }); -}; -var updateSelectedActivityEpic = function (action$, store) { - return action$.ofType('Send_Message_Succeed', 'Send_Message_Fail', 'Show_Typing', 'Clear_Typing') - .map(function (action) { - var state = store.getState(); - if (state.connection.selectedActivity) - state.connection.selectedActivity.next({ activity: state.history.selectedActivity }); - return nullAction; - }); -}; -var showTypingEpic = function (action$) { - return action$.ofType('Show_Typing') - .delay(3000) - .map(function (action) { return ({ type: 'Clear_Typing', id: action.activity.id }); }); -}; -var sendTypingEpic = function (action$, store) { - return action$.ofType('Update_Input') - .map(function (_) { return store.getState(); }) - .filter(function (state) { return state.shell.sendTyping; }) - .throttleTime(3000) - .do(function (_) { return konsole.log("sending typing"); }) - .flatMap(function (state) { - return state.connection.botConnection.postActivity({ - type: 'typing', - from: state.connection.user - }) - .map(function (_) { return nullAction; }) - .catch(function (error) { return Observable_1.Observable.of(nullAction); }); - }); -}; -// Now we put it all together into a store with middleware -var redux_2 = __webpack_require__("../../node_modules/redux/es/index.js"); -var redux_observable_1 = __webpack_require__("../../node_modules/redux-observable/lib/index.js"); -exports.createStore = function () { - return redux_2.createStore(redux_2.combineReducers({ - shell: exports.shell, - format: exports.format, - size: exports.size, - connection: exports.connection, - history: exports.history - }), redux_1.applyMiddleware(redux_observable_1.createEpicMiddleware(redux_observable_1.combineEpics(updateSelectedActivityEpic, sendMessageEpic, trySendMessageEpic, retrySendMessageEpic, showTypingEpic, sendTypingEpic, speakSSMLEpic, speakOnMessageReceivedEpic, startListeningEpic, stopListeningEpic, stopSpeakingEpic, listeningSilenceTimeoutEpic)))); -}; -//# sourceMappingURL=Store.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/Strings.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var localizedStrings = { - 'en-us': { - title: "Chat", - send: "Send", - unknownFile: "[File of type '%1']", - unknownCard: "[Unknown Card '%1']", - receiptVat: "VAT", - receiptTax: "Tax", - receiptTotal: "Total", - messageRetry: "retry", - messageFailed: "couldn't send", - messageSending: "sending", - timeSent: " at %1", - consolePlaceholder: "Type your message...", - listeningIndicator: "Listening...", - uploadFile: "Upload file", - speak: "Speak" - }, - 'ja-jp': { - title: "チャット", - send: "送信", - unknownFile: "[ファイルタイプ '%1']", - unknownCard: "[不明なカード '%1']", - receiptVat: "消費税", - receiptTax: "税", - receiptTotal: "合計", - messageRetry: "再送", - messageFailed: "送信できませんでした。", - messageSending: "送信中", - timeSent: " %1", - consolePlaceholder: "メッセージを入力してください...", - listeningIndicator: "聴いてます...", - uploadFile: "", - speak: "" - }, - 'nb-no': { - title: "Chat", - send: "Send", - unknownFile: "[Fil av typen '%1']", - unknownCard: "[Ukjent Kort '%1']", - receiptVat: "MVA", - receiptTax: "Skatt", - receiptTotal: "Totalt", - messageRetry: "prøv igjen", - messageFailed: "kunne ikke sende", - messageSending: "sender", - timeSent: " %1", - consolePlaceholder: "Skriv inn melding...", - listeningIndicator: "Lytter...", - uploadFile: "", - speak: "" - }, - 'da-dk': { - title: "Chat", - send: "Send", - unknownFile: "[Fil af typen '%1']", - unknownCard: "[Ukendt kort '%1']", - receiptVat: "Moms", - receiptTax: "Skat", - receiptTotal: "Total", - messageRetry: "prøv igen", - messageFailed: "ikke sendt", - messageSending: "sender", - timeSent: " kl %1", - consolePlaceholder: "Skriv din besked...", - listeningIndicator: "Lytter...", - uploadFile: "", - speak: "" - }, - 'de-de': { - title: "Chat", - send: "Senden", - unknownFile: "[Datei vom Typ '%1']", - unknownCard: "[Unbekannte Card '%1']", - receiptVat: "VAT", - receiptTax: "MwSt.", - receiptTotal: "Gesamtbetrag", - messageRetry: "wiederholen", - messageFailed: "konnte nicht senden", - messageSending: "sendet", - timeSent: " am %1", - consolePlaceholder: "Verfasse eine Nachricht...", - listeningIndicator: "Hören...", - uploadFile: "", - speak: "" - }, - 'pl-pl': { - title: "Chat", - send: "Wyślij", - unknownFile: "[Plik typu '%1']", - unknownCard: "[Nieznana karta '%1']", - receiptVat: "VAT", - receiptTax: "Podatek", - receiptTotal: "Razem", - messageRetry: "wyślij ponownie", - messageFailed: "wysłanie nieudane", - messageSending: "wysyłanie", - timeSent: " o %1", - consolePlaceholder: "Wpisz swoją wiadomość...", - listeningIndicator: "Słuchający...", - uploadFile: "", - speak: "" - }, - 'ru-ru': { - title: "Чат", - send: "Отправить", - unknownFile: "[Неизвестный тип '%1']", - unknownCard: "[Неизвестная карта '%1']", - receiptVat: "VAT", - receiptTax: "Налог", - receiptTotal: "Итого", - messageRetry: "повторить", - messageFailed: "не удалось отправить", - messageSending: "отправка", - timeSent: " в %1", - consolePlaceholder: "Введите ваше сообщение...", - listeningIndicator: "прослушивание...", - uploadFile: "", - speak: "" - }, - 'nl-nl': { - title: "Chat", - send: "Verstuur", - unknownFile: "[Bestand van het type '%1']", - unknownCard: "[Onbekende kaart '%1']", - receiptVat: "VAT", - receiptTax: "BTW", - receiptTotal: "Totaal", - messageRetry: "opnieuw", - messageFailed: "versturen mislukt", - messageSending: "versturen", - timeSent: " om %1", - consolePlaceholder: "Typ je bericht...", - listeningIndicator: "het luisteren...", - uploadFile: "", - speak: "" - }, - 'lv-lv': { - title: "Tērzēšana", - send: "Sūtīt", - unknownFile: "[Nezināms tips '%1']", - unknownCard: "[Nezināma kartīte '%1']", - receiptVat: "VAT", - receiptTax: "Nodoklis", - receiptTotal: "Kopsumma", - messageRetry: "Mēģināt vēlreiz", - messageFailed: "Neizdevās nosūtīt", - messageSending: "Nosūtīšana", - timeSent: " %1", - consolePlaceholder: "Ierakstiet savu ziņu...", - listeningIndicator: "Klausoties...", - uploadFile: "", - speak: "" - }, - 'pt-br': { - title: "Bate-papo", - send: "Enviar", - unknownFile: "[Arquivo do tipo '%1']", - unknownCard: "[Cartão desconhecido '%1']", - receiptVat: "VAT", - receiptTax: "Imposto", - receiptTotal: "Total", - messageRetry: "repetir", - messageFailed: "não pude enviar", - messageSending: "enviando", - timeSent: " às %1", - consolePlaceholder: "Digite sua mensagem...", - listeningIndicator: "Ouvindo...", - uploadFile: "", - speak: "" - }, - 'fr-fr': { - title: "Chat", - send: "Envoyer", - unknownFile: "[Fichier de type '%1']", - unknownCard: "[Carte inconnue '%1']", - receiptVat: "TVA", - receiptTax: "Taxe", - receiptTotal: "Total", - messageRetry: "reéssayer", - messageFailed: "envoi impossible", - messageSending: "envoi", - timeSent: " à %1", - consolePlaceholder: "Écrivez votre message...", - listeningIndicator: "Écoute...", - uploadFile: "", - speak: "" - }, - 'es-es': { - title: "Chat", - send: "Enviar", - unknownFile: "[Archivo de tipo '%1']", - unknownCard: "[Tarjeta desconocida '%1']", - receiptVat: "IVA", - receiptTax: "Impuestos", - receiptTotal: "Total", - messageRetry: "reintentar", - messageFailed: "no enviado", - messageSending: "enviando", - timeSent: " a las %1", - consolePlaceholder: "Escribe tu mensaje...", - listeningIndicator: "Escuchando...", - uploadFile: "", - speak: "" - }, - 'el-gr': { - title: "Συνομιλία", - send: "Αποστολή", - unknownFile: "[Αρχείο τύπου '%1']", - unknownCard: "[Αγνωστη Κάρτα '%1']", - receiptVat: "VAT", - receiptTax: "ΦΠΑ", - receiptTotal: "Σύνολο", - messageRetry: "δοκιμή", - messageFailed: "αποτυχία", - messageSending: "αποστολή", - timeSent: " την %1", - consolePlaceholder: "Πληκτρολόγηση μηνύματος...", - listeningIndicator: "Ακούγοντας...", - uploadFile: "", - speak: "" - }, - 'it-it': { - title: "Chat", - send: "Invia", - unknownFile: "[File di tipo '%1']", - unknownCard: "[Card sconosciuta '%1']", - receiptVat: "VAT", - receiptTax: "Tasse", - receiptTotal: "Totale", - messageRetry: "riprova", - messageFailed: "impossibile inviare", - messageSending: "invio", - timeSent: " %1", - consolePlaceholder: "Scrivi il tuo messaggio...", - listeningIndicator: "Ascoltando...", - uploadFile: "", - speak: "" - }, - 'zh-hans': { - title: "聊天", - send: "发送", - unknownFile: "[类型为'%1'的文件]", - unknownCard: "[未知的'%1'卡片]", - receiptVat: "VAT", - receiptTax: "税", - receiptTotal: "共计", - messageRetry: "重试", - messageFailed: "无法发送", - messageSending: "正在发送", - timeSent: " 用时 %1", - consolePlaceholder: "输入你的消息...", - listeningIndicator: "正在倾听...", - uploadFile: "", - speak: "" - }, - 'zh-hant': { - title: "聊天", - send: "發送", - unknownFile: "[類型為'%1'的文件]", - unknownCard: "[未知的'%1'卡片]", - receiptVat: "消費稅", - receiptTax: "税", - receiptTotal: "總共", - messageRetry: "重試", - messageFailed: "無法發送", - messageSending: "正在發送", - timeSent: " 於 %1", - consolePlaceholder: "輸入你的訊息...", - listeningIndicator: "正在聆聽...", - uploadFile: "上載檔案", - speak: "發言" - }, - 'zh-yue': { - title: "傾偈", - send: "傳送", - unknownFile: "[類型係'%1'嘅文件]", - unknownCard: "[唔知'%1'係咩卡片]", - receiptVat: "消費稅", - receiptTax: "税", - receiptTotal: "總共", - messageRetry: "再嚟一次", - messageFailed: "傳送唔倒", - messageSending: "而家傳送緊", - timeSent: " 喺 %1", - consolePlaceholder: "輸入你嘅訊息...", - listeningIndicator: "聽緊你講嘢...", - uploadFile: "上載檔案", - speak: "講嘢" - }, - 'cs-cz': { - title: "Chat", - send: "Odeslat", - unknownFile: "[Soubor typu '%1']", - unknownCard: "[Neznámá karta '%1']", - receiptVat: "DPH", - receiptTax: "Daň z prod.", - receiptTotal: "Celkem", - messageRetry: "opakovat", - messageFailed: "nepodařilo se odeslat", - messageSending: "Odesílání", - timeSent: " v %1", - consolePlaceholder: "Napište svou zprávu...", - listeningIndicator: "Poslouchám...", - uploadFile: "", - speak: "" - }, - 'ko-kr': { - title: "채팅", - send: "전송", - unknownFile: "[파일 형식 '%1']", - unknownCard: "[알수없는 타입의 카드 '%1']", - receiptVat: "부가세", - receiptTax: "세액", - receiptTotal: "합계", - messageRetry: "재전송", - messageFailed: "전송할 수 없습니다", - messageSending: "전송중", - timeSent: " %1", - consolePlaceholder: "메세지를 입력하세요...", - listeningIndicator: "수신중...", - uploadFile: "", - speak: "" - } -}; -exports.defaultStrings = localizedStrings['en-us']; -// Returns strings using the "best match available"" locale -// e.g. if 'en-us' is the only supported English locale, then -// strings('en') should return localizedStrings('en-us') -exports.strings = function (locale) { - if (locale.startsWith('da')) - locale = 'da-dk'; - else if (locale.startsWith('de')) - locale = 'de-de'; - else if (locale.startsWith('no') || locale.startsWith('nb') || locale.startsWith('nn')) - locale = 'nb-no'; - else if (locale.startsWith('pl')) - locale = 'pl-pl'; - else if (locale.startsWith('ru')) - locale = 'ru-ru'; - else if (locale.startsWith('nl')) - locale = 'nl-nl'; - else if (locale.startsWith('lv')) - locale = 'lv-lv'; - else if (locale.startsWith('pt')) - locale = 'pt-br'; - else if (locale.startsWith('fr')) - locale = 'fr-fr'; - else if (locale.startsWith('es')) - locale = 'es-es'; - else if (locale.startsWith('el')) - locale = 'el-gr'; - else if (locale.startsWith('it')) - locale = 'it-it'; - else if (locale === 'zh-hant' || locale === 'zh-hk' || locale === 'zh-mo' || locale === 'zh-tw') - locale = 'zh-hant'; - else if (locale.startsWith('zh')) - locale = 'zh-hans'; - else if (locale.startsWith('cs')) - locale = 'cs-cz'; - else if (locale.startsWith('ko')) - locale = 'ko-kr'; - else if (locale.startsWith('ja')) - locale = 'ja-jp'; - else if (locale in localizedStrings === false) - locale = 'en-us'; - return localizedStrings[locale]; -}; -//# sourceMappingURL=Strings.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/built/getTabIndex.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var IE_FOCUSABLE_LIST = ['a', 'body', 'button', 'frame', 'iframe', 'img', 'input', 'isindex', 'object', 'select', 'textarea']; -var IS_FIREFOX = /Firefox\//i.test(navigator.userAgent); -var IS_IE = /Trident\//i.test(navigator.userAgent); -function getTabIndex(element) { - var tabIndex = element.tabIndex; - if (IS_IE) { - var tabIndexAttribute = element.attributes.getNamedItem('tabindex'); - if (!tabIndexAttribute || !tabIndexAttribute.specified) { - return ~IE_FOCUSABLE_LIST.indexOf(element.nodeName.toLowerCase()) ? 0 : null; - } - } - else if (!~tabIndex) { - var attr = element.getAttribute('tabindex'); - if (attr === null || (attr === '' && !IS_FIREFOX)) { - return null; - } - } - return tabIndex; -} -exports.getTabIndex = getTabIndex; -; -//# sourceMappingURL=getTabIndex.js.map - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_a-function.js": -/***/ (function(module, exports) { - -module.exports = function(it){ - if(typeof it != 'function')throw TypeError(it + ' is not a function!'); - return it; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_add-to-unscopables.js": -/***/ (function(module, exports, __webpack_require__) { - -// 22.1.3.31 Array.prototype[@@unscopables] -var UNSCOPABLES = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js")('unscopables') - , ArrayProto = Array.prototype; -if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_hide.js")(ArrayProto, UNSCOPABLES, {}); -module.exports = function(key){ - ArrayProto[UNSCOPABLES][key] = true; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_an-object.js": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js"); -module.exports = function(it){ - if(!isObject(it))throw TypeError(it + ' is not an object!'); - return it; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-methods.js": -/***/ (function(module, exports, __webpack_require__) { - -// 0 -> Array#forEach -// 1 -> Array#map -// 2 -> Array#filter -// 3 -> Array#some -// 4 -> Array#every -// 5 -> Array#find -// 6 -> Array#findIndex -var ctx = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_ctx.js") - , IObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_iobject.js") - , toObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-object.js") - , toLength = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-length.js") - , asc = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-species-create.js"); -module.exports = function(TYPE, $create){ - var IS_MAP = TYPE == 1 - , IS_FILTER = TYPE == 2 - , IS_SOME = TYPE == 3 - , IS_EVERY = TYPE == 4 - , IS_FIND_INDEX = TYPE == 6 - , NO_HOLES = TYPE == 5 || IS_FIND_INDEX - , create = $create || asc; - return function($this, callbackfn, that){ - var O = toObject($this) - , self = IObject(O) - , f = ctx(callbackfn, that, 3) - , length = toLength(self.length) - , index = 0 - , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined - , val, res; - for(;length > index; index++)if(NO_HOLES || index in self){ - val = self[index]; - res = f(val, index, O); - if(TYPE){ - if(IS_MAP)result[index] = res; // map - else if(res)switch(TYPE){ - case 3: return true; // some - case 5: return val; // find - case 6: return index; // findIndex - case 2: result.push(val); // filter - } else if(IS_EVERY)return false; // every - } - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-species-constructor.js": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js") - , isArray = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-array.js") - , SPECIES = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js")('species'); - -module.exports = function(original){ - var C; - if(isArray(original)){ - C = original.constructor; - // cross-realm fallback - if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; - if(isObject(C)){ - C = C[SPECIES]; - if(C === null)C = undefined; - } - } return C === undefined ? Array : C; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-species-create.js": -/***/ (function(module, exports, __webpack_require__) { - -// 9.4.2.3 ArraySpeciesCreate(originalArray, length) -var speciesConstructor = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-species-constructor.js"); - -module.exports = function(original, length){ - return new (speciesConstructor(original))(length); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_cof.js": -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function(it){ - return toString.call(it).slice(8, -1); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_core.js": -/***/ (function(module, exports) { - -var core = module.exports = {version: '2.4.0'}; -if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_ctx.js": -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_a-function.js"); -module.exports = function(fn, that, length){ - aFunction(fn); - if(that === undefined)return fn; - switch(length){ - case 1: return function(a){ - return fn.call(that, a); - }; - case 2: return function(a, b){ - return fn.call(that, a, b); - }; - case 3: return function(a, b, c){ - return fn.call(that, a, b, c); - }; - } - return function(/* ...args */){ - return fn.apply(that, arguments); - }; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_defined.js": -/***/ (function(module, exports) { - -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function(it){ - if(it == undefined)throw TypeError("Can't call method on " + it); - return it; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_descriptors.js": -/***/ (function(module, exports, __webpack_require__) { - -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails.js")(function(){ - return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; -}); - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_dom-create.js": -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js") - , document = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js").document - // in old IE typeof document.createElement is 'object' - , is = isObject(document) && isObject(document.createElement); -module.exports = function(it){ - return is ? document.createElement(it) : {}; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_export.js": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js") - , core = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_core.js") - , hide = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_hide.js") - , redefine = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_redefine.js") - , ctx = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_ctx.js") - , PROTOTYPE = 'prototype'; - -var $export = function(type, name, source){ - var IS_FORCED = type & $export.F - , IS_GLOBAL = type & $export.G - , IS_STATIC = type & $export.S - , IS_PROTO = type & $export.P - , IS_BIND = type & $export.B - , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] - , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) - , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) - , key, own, out, exp; - if(IS_GLOBAL)source = name; - for(key in source){ - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - // export native or passed - out = (own ? target : source)[key]; - // bind timers to global for call from export context - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // extend global - if(target)redefine(target, key, out, type & $export.U); - // export - if(exports[key] != out)hide(exports, key, exp); - if(IS_PROTO && expProto[key] != out)expProto[key] = out; - } -}; -global.core = core; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails-is-regexp.js": -/***/ (function(module, exports, __webpack_require__) { - -var MATCH = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js")('match'); -module.exports = function(KEY){ - var re = /./; - try { - '/./'[KEY](re); - } catch(e){ - try { - re[MATCH] = false; - return !'/./'[KEY](re); - } catch(f){ /* empty */ } - } return true; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails.js": -/***/ (function(module, exports) { - -module.exports = function(exec){ - try { - return !!exec(); - } catch(e){ - return true; - } -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js": -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); -if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_has.js": -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function(it, key){ - return hasOwnProperty.call(it, key); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_hide.js": -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_object-dp.js") - , createDesc = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_property-desc.js"); -module.exports = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_descriptors.js") ? function(object, key, value){ - return dP.f(object, key, createDesc(1, value)); -} : function(object, key, value){ - object[key] = value; - return object; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_ie8-dom-define.js": -/***/ (function(module, exports, __webpack_require__) { - -module.exports = !__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_descriptors.js") && !__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails.js")(function(){ - return Object.defineProperty(__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_dom-create.js")('div'), 'a', {get: function(){ return 7; }}).a != 7; -}); - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_iobject.js": -/***/ (function(module, exports, __webpack_require__) { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_cof.js"); -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ - return cof(it) == 'String' ? it.split('') : Object(it); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-array.js": -/***/ (function(module, exports, __webpack_require__) { - -// 7.2.2 IsArray(argument) -var cof = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_cof.js"); -module.exports = Array.isArray || function isArray(arg){ - return cof(arg) == 'Array'; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js": -/***/ (function(module, exports) { - -module.exports = function(it){ - return typeof it === 'object' ? it !== null : typeof it === 'function'; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-regexp.js": -/***/ (function(module, exports, __webpack_require__) { - -// 7.2.8 IsRegExp(argument) -var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js") - , cof = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_cof.js") - , MATCH = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js")('match'); -module.exports = function(it){ - var isRegExp; - return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_object-dp.js": -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_an-object.js") - , IE8_DOM_DEFINE = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_ie8-dom-define.js") - , toPrimitive = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-primitive.js") - , dP = Object.defineProperty; - -exports.f = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes){ - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if(IE8_DOM_DEFINE)try { - return dP(O, P, Attributes); - } catch(e){ /* empty */ } - if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); - if('value' in Attributes)O[P] = Attributes.value; - return O; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_property-desc.js": -/***/ (function(module, exports) { - -module.exports = function(bitmap, value){ - return { - enumerable : !(bitmap & 1), - configurable: !(bitmap & 2), - writable : !(bitmap & 4), - value : value - }; -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_redefine.js": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js") - , hide = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_hide.js") - , has = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_has.js") - , SRC = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_uid.js")('src') - , TO_STRING = 'toString' - , $toString = Function[TO_STRING] - , TPL = ('' + $toString).split(TO_STRING); - -__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_core.js").inspectSource = function(it){ - return $toString.call(it); -}; - -(module.exports = function(O, key, val, safe){ - var isFunction = typeof val == 'function'; - if(isFunction)has(val, 'name') || hide(val, 'name', key); - if(O[key] === val)return; - if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if(O === global){ - O[key] = val; - } else { - if(!safe){ - delete O[key]; - hide(O, key, val); - } else { - if(O[key])O[key] = val; - else hide(O, key, val); - } - } -// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative -})(Function.prototype, TO_STRING, function toString(){ - return typeof this == 'function' && this[SRC] || $toString.call(this); -}); - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_shared.js": -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js") - , SHARED = '__core-js_shared__' - , store = global[SHARED] || (global[SHARED] = {}); -module.exports = function(key){ - return store[key] || (store[key] = {}); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_string-context.js": -/***/ (function(module, exports, __webpack_require__) { - -// helper for String#{startsWith, endsWith, includes} -var isRegExp = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-regexp.js") - , defined = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_defined.js"); - -module.exports = function(that, searchString, NAME){ - if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); - return String(defined(that)); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-integer.js": -/***/ (function(module, exports) { - -// 7.1.4 ToInteger -var ceil = Math.ceil - , floor = Math.floor; -module.exports = function(it){ - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-length.js": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-integer.js") - , min = Math.min; -module.exports = function(it){ - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-object.js": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.13 ToObject(argument) -var defined = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_defined.js"); -module.exports = function(it){ - return Object(defined(it)); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-primitive.js": -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js"); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function(it, S){ - if(!isObject(it))return it; - var fn, val; - if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; - if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; - if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; - throw TypeError("Can't convert object to primitive value"); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_uid.js": -/***/ (function(module, exports) { - -var id = 0 - , px = Math.random(); -module.exports = function(key){ - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js": -/***/ (function(module, exports, __webpack_require__) { - -var store = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_shared.js")('wks') - , uid = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_uid.js") - , Symbol = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js").Symbol - , USE_SYMBOL = typeof Symbol == 'function'; - -var $exports = module.exports = function(name){ - return store[name] || (store[name] = - USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); -}; - -$exports.store = store; - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.array.find-index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) -var $export = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_export.js") - , $find = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-methods.js")(6) - , KEY = 'findIndex' - , forced = true; -// Shouldn't skip holes -if(KEY in [])Array(1)[KEY](function(){ forced = false; }); -$export($export.P + $export.F * forced, 'Array', { - findIndex: function findIndex(callbackfn/*, that = undefined */){ - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); -__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_add-to-unscopables.js")(KEY); - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.array.find.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) -var $export = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_export.js") - , $find = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-methods.js")(5) - , KEY = 'find' - , forced = true; -// Shouldn't skip holes -if(KEY in [])Array(1)[KEY](function(){ forced = false; }); -$export($export.P + $export.F * forced, 'Array', { - find: function find(callbackfn/*, that = undefined */){ - return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); - } -}); -__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_add-to-unscopables.js")(KEY); - -/***/ }), - -/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.string.starts-with.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) - -var $export = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_export.js") - , toLength = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-length.js") - , context = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_string-context.js") - , STARTS_WITH = 'startsWith' - , $startsWith = ''[STARTS_WITH]; - -$export($export.P + $export.F * __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails-is-regexp.js")(STARTS_WITH), 'String', { - startsWith: function startsWith(searchString /*, position = 0 */){ - var that = context(this, searchString, STARTS_WITH) - , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) - , search = String(searchString); - return $startsWith - ? $startsWith.call(that, search, index) - : that.slice(index, index + search.length) === search; - } -}); - -/***/ }), - -/***/ "../../node_modules/create-react-class/factory.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - - - -var _assign = __webpack_require__("../../node_modules/object-assign/index.js"); - -var emptyObject = __webpack_require__("../../node_modules/fbjs/lib/emptyObject.js"); -var _invariant = __webpack_require__("../../node_modules/fbjs/lib/invariant.js"); - -if (process.env.NODE_ENV !== 'production') { - var warning = __webpack_require__("../../node_modules/fbjs/lib/warning.js"); -} - -var MIXINS_KEY = 'mixins'; - -// Helper function to allow the creation of anonymous functions which do not -// have .name set to the name of the variable being assigned to. -function identity(fn) { - return fn; -} - -var ReactPropTypeLocationNames; -if (process.env.NODE_ENV !== 'production') { - ReactPropTypeLocationNames = { - prop: 'prop', - context: 'context', - childContext: 'child context' - }; -} else { - ReactPropTypeLocationNames = {}; -} - -function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { - /** - * Policies that describe methods in `ReactClassInterface`. - */ - - var injectedMixins = []; - - /** - * Composite components are higher-level components that compose other composite - * or host components. - * - * To create a new type of `ReactClass`, pass a specification of - * your new class to `React.createClass`. The only requirement of your class - * specification is that you implement a `render` method. - * - * var MyComponent = React.createClass({ - * render: function() { - * return
Hello World
; - * } - * }); - * - * The class specification supports a specific protocol of methods that have - * special meaning (e.g. `render`). See `ReactClassInterface` for - * more the comprehensive protocol. Any other properties and methods in the - * class specification will be available on the prototype. - * - * @interface ReactClassInterface - * @internal - */ - var ReactClassInterface = { - /** - * An array of Mixin objects to include when defining your component. - * - * @type {array} - * @optional - */ - mixins: 'DEFINE_MANY', - - /** - * An object containing properties and methods that should be defined on - * the component's constructor instead of its prototype (static methods). - * - * @type {object} - * @optional - */ - statics: 'DEFINE_MANY', - - /** - * Definition of prop types for this component. - * - * @type {object} - * @optional - */ - propTypes: 'DEFINE_MANY', - - /** - * Definition of context types for this component. - * - * @type {object} - * @optional - */ - contextTypes: 'DEFINE_MANY', - - /** - * Definition of context types this component sets for its children. - * - * @type {object} - * @optional - */ - childContextTypes: 'DEFINE_MANY', - - // ==== Definition methods ==== - - /** - * Invoked when the component is mounted. Values in the mapping will be set on - * `this.props` if that prop is not specified (i.e. using an `in` check). - * - * This method is invoked before `getInitialState` and therefore cannot rely - * on `this.state` or use `this.setState`. - * - * @return {object} - * @optional - */ - getDefaultProps: 'DEFINE_MANY_MERGED', - - /** - * Invoked once before the component is mounted. The return value will be used - * as the initial value of `this.state`. - * - * getInitialState: function() { - * return { - * isOn: false, - * fooBaz: new BazFoo() - * } - * } - * - * @return {object} - * @optional - */ - getInitialState: 'DEFINE_MANY_MERGED', - - /** - * @return {object} - * @optional - */ - getChildContext: 'DEFINE_MANY_MERGED', - - /** - * Uses props from `this.props` and state from `this.state` to render the - * structure of the component. - * - * No guarantees are made about when or how often this method is invoked, so - * it must not have side effects. - * - * render: function() { - * var name = this.props.name; - * return
Hello, {name}!
; - * } - * - * @return {ReactComponent} - * @required - */ - render: 'DEFINE_ONCE', - - // ==== Delegate methods ==== - - /** - * Invoked when the component is initially created and about to be mounted. - * This may have side effects, but any external subscriptions or data created - * by this method must be cleaned up in `componentWillUnmount`. - * - * @optional - */ - componentWillMount: 'DEFINE_MANY', - - /** - * Invoked when the component has been mounted and has a DOM representation. - * However, there is no guarantee that the DOM node is in the document. - * - * Use this as an opportunity to operate on the DOM when the component has - * been mounted (initialized and rendered) for the first time. - * - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidMount: 'DEFINE_MANY', - - /** - * Invoked before the component receives new props. - * - * Use this as an opportunity to react to a prop transition by updating the - * state using `this.setState`. Current props are accessed via `this.props`. - * - * componentWillReceiveProps: function(nextProps, nextContext) { - * this.setState({ - * likesIncreasing: nextProps.likeCount > this.props.likeCount - * }); - * } - * - * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop - * transition may cause a state change, but the opposite is not true. If you - * need it, you are probably looking for `componentWillUpdate`. - * - * @param {object} nextProps - * @optional - */ - componentWillReceiveProps: 'DEFINE_MANY', - - /** - * Invoked while deciding if the component should be updated as a result of - * receiving new props, state and/or context. - * - * Use this as an opportunity to `return false` when you're certain that the - * transition to the new props/state/context will not require a component - * update. - * - * shouldComponentUpdate: function(nextProps, nextState, nextContext) { - * return !equal(nextProps, this.props) || - * !equal(nextState, this.state) || - * !equal(nextContext, this.context); - * } - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @return {boolean} True if the component should update. - * @optional - */ - shouldComponentUpdate: 'DEFINE_ONCE', - - /** - * Invoked when the component is about to update due to a transition from - * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` - * and `nextContext`. - * - * Use this as an opportunity to perform preparation before an update occurs. - * - * NOTE: You **cannot** use `this.setState()` in this method. - * - * @param {object} nextProps - * @param {?object} nextState - * @param {?object} nextContext - * @param {ReactReconcileTransaction} transaction - * @optional - */ - componentWillUpdate: 'DEFINE_MANY', - - /** - * Invoked when the component's DOM representation has been updated. - * - * Use this as an opportunity to operate on the DOM when the component has - * been updated. - * - * @param {object} prevProps - * @param {?object} prevState - * @param {?object} prevContext - * @param {DOMElement} rootNode DOM element representing the component. - * @optional - */ - componentDidUpdate: 'DEFINE_MANY', - - /** - * Invoked when the component is about to be removed from its parent and have - * its DOM representation destroyed. - * - * Use this as an opportunity to deallocate any external resources. - * - * NOTE: There is no `componentDidUnmount` since your component will have been - * destroyed by that point. - * - * @optional - */ - componentWillUnmount: 'DEFINE_MANY', - - /** - * Replacement for (deprecated) `componentWillMount`. - * - * @optional - */ - UNSAFE_componentWillMount: 'DEFINE_MANY', - - /** - * Replacement for (deprecated) `componentWillReceiveProps`. - * - * @optional - */ - UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', - - /** - * Replacement for (deprecated) `componentWillUpdate`. - * - * @optional - */ - UNSAFE_componentWillUpdate: 'DEFINE_MANY', - - // ==== Advanced methods ==== - - /** - * Updates the component's currently mounted DOM representation. - * - * By default, this implements React's rendering and reconciliation algorithm. - * Sophisticated clients may wish to override this. - * - * @param {ReactReconcileTransaction} transaction - * @internal - * @overridable - */ - updateComponent: 'OVERRIDE_BASE' - }; - - /** - * Similar to ReactClassInterface but for static methods. - */ - var ReactClassStaticInterface = { - /** - * This method is invoked after a component is instantiated and when it - * receives new props. Return an object to update state in response to - * prop changes. Return null to indicate no change to state. - * - * If an object is returned, its keys will be merged into the existing state. - * - * @return {object || null} - * @optional - */ - getDerivedStateFromProps: 'DEFINE_MANY_MERGED' - }; - - /** - * Mapping from class specification keys to special processing functions. - * - * Although these are declared like instance properties in the specification - * when defining classes using `React.createClass`, they are actually static - * and are accessible on the constructor instead of the prototype. Despite - * being static, they must be defined outside of the "statics" key under - * which all other static methods are defined. - */ - var RESERVED_SPEC_KEYS = { - displayName: function(Constructor, displayName) { - Constructor.displayName = displayName; - }, - mixins: function(Constructor, mixins) { - if (mixins) { - for (var i = 0; i < mixins.length; i++) { - mixSpecIntoComponent(Constructor, mixins[i]); - } - } - }, - childContextTypes: function(Constructor, childContextTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, childContextTypes, 'childContext'); - } - Constructor.childContextTypes = _assign( - {}, - Constructor.childContextTypes, - childContextTypes - ); - }, - contextTypes: function(Constructor, contextTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, contextTypes, 'context'); - } - Constructor.contextTypes = _assign( - {}, - Constructor.contextTypes, - contextTypes - ); - }, - /** - * Special case getDefaultProps which should move into statics but requires - * automatic merging. - */ - getDefaultProps: function(Constructor, getDefaultProps) { - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps = createMergedResultFunction( - Constructor.getDefaultProps, - getDefaultProps - ); - } else { - Constructor.getDefaultProps = getDefaultProps; - } - }, - propTypes: function(Constructor, propTypes) { - if (process.env.NODE_ENV !== 'production') { - validateTypeDef(Constructor, propTypes, 'prop'); - } - Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); - }, - statics: function(Constructor, statics) { - mixStaticSpecIntoComponent(Constructor, statics); - }, - autobind: function() {} - }; - - function validateTypeDef(Constructor, typeDef, location) { - for (var propName in typeDef) { - if (typeDef.hasOwnProperty(propName)) { - // use a warning instead of an _invariant so components - // don't show up in prod but only in __DEV__ - if (process.env.NODE_ENV !== 'production') { - warning( - typeof typeDef[propName] === 'function', - '%s: %s type `%s` is invalid; it must be a function, usually from ' + - 'React.PropTypes.', - Constructor.displayName || 'ReactClass', - ReactPropTypeLocationNames[location], - propName - ); - } - } - } - } - - function validateMethodOverride(isAlreadyDefined, name) { - var specPolicy = ReactClassInterface.hasOwnProperty(name) - ? ReactClassInterface[name] - : null; - - // Disallow overriding of base class methods unless explicitly allowed. - if (ReactClassMixin.hasOwnProperty(name)) { - _invariant( - specPolicy === 'OVERRIDE_BASE', - 'ReactClassInterface: You are attempting to override ' + - '`%s` from your class specification. Ensure that your method names ' + - 'do not overlap with React methods.', - name - ); - } - - // Disallow defining methods more than once unless explicitly allowed. - if (isAlreadyDefined) { - _invariant( - specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', - 'ReactClassInterface: You are attempting to define ' + - '`%s` on your component more than once. This conflict may be due ' + - 'to a mixin.', - name - ); - } - } - - /** - * Mixin helper which handles policy validation and reserved - * specification keys when building React classes. - */ - function mixSpecIntoComponent(Constructor, spec) { - if (!spec) { - if (process.env.NODE_ENV !== 'production') { - var typeofSpec = typeof spec; - var isMixinValid = typeofSpec === 'object' && spec !== null; - - if (process.env.NODE_ENV !== 'production') { - warning( - isMixinValid, - "%s: You're attempting to include a mixin that is either null " + - 'or not an object. Check the mixins included by the component, ' + - 'as well as any mixins they include themselves. ' + - 'Expected object but got %s.', - Constructor.displayName || 'ReactClass', - spec === null ? null : typeofSpec - ); - } - } - - return; - } - - _invariant( - typeof spec !== 'function', - "ReactClass: You're attempting to " + - 'use a component class or function as a mixin. Instead, just use a ' + - 'regular object.' - ); - _invariant( - !isValidElement(spec), - "ReactClass: You're attempting to " + - 'use a component as a mixin. Instead, just use a regular object.' - ); - - var proto = Constructor.prototype; - var autoBindPairs = proto.__reactAutoBindPairs; - - // By handling mixins before any other properties, we ensure the same - // chaining order is applied to methods with DEFINE_MANY policy, whether - // mixins are listed before or after these methods in the spec. - if (spec.hasOwnProperty(MIXINS_KEY)) { - RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); - } - - for (var name in spec) { - if (!spec.hasOwnProperty(name)) { - continue; - } - - if (name === MIXINS_KEY) { - // We have already handled mixins in a special case above. - continue; - } - - var property = spec[name]; - var isAlreadyDefined = proto.hasOwnProperty(name); - validateMethodOverride(isAlreadyDefined, name); - - if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { - RESERVED_SPEC_KEYS[name](Constructor, property); - } else { - // Setup methods on prototype: - // The following member methods should not be automatically bound: - // 1. Expected ReactClass methods (in the "interface"). - // 2. Overridden methods (that were mixed in). - var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); - var isFunction = typeof property === 'function'; - var shouldAutoBind = - isFunction && - !isReactClassMethod && - !isAlreadyDefined && - spec.autobind !== false; - - if (shouldAutoBind) { - autoBindPairs.push(name, property); - proto[name] = property; - } else { - if (isAlreadyDefined) { - var specPolicy = ReactClassInterface[name]; - - // These cases should already be caught by validateMethodOverride. - _invariant( - isReactClassMethod && - (specPolicy === 'DEFINE_MANY_MERGED' || - specPolicy === 'DEFINE_MANY'), - 'ReactClass: Unexpected spec policy %s for key %s ' + - 'when mixing in component specs.', - specPolicy, - name - ); - - // For methods which are defined more than once, call the existing - // methods before calling the new property, merging if appropriate. - if (specPolicy === 'DEFINE_MANY_MERGED') { - proto[name] = createMergedResultFunction(proto[name], property); - } else if (specPolicy === 'DEFINE_MANY') { - proto[name] = createChainedFunction(proto[name], property); - } - } else { - proto[name] = property; - if (process.env.NODE_ENV !== 'production') { - // Add verbose displayName to the function, which helps when looking - // at profiling tools. - if (typeof property === 'function' && spec.displayName) { - proto[name].displayName = spec.displayName + '_' + name; - } - } - } - } - } - } - } - - function mixStaticSpecIntoComponent(Constructor, statics) { - if (!statics) { - return; - } - - for (var name in statics) { - var property = statics[name]; - if (!statics.hasOwnProperty(name)) { - continue; - } - - var isReserved = name in RESERVED_SPEC_KEYS; - _invariant( - !isReserved, - 'ReactClass: You are attempting to define a reserved ' + - 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + - 'as an instance property instead; it will still be accessible on the ' + - 'constructor.', - name - ); - - var isAlreadyDefined = name in Constructor; - if (isAlreadyDefined) { - var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) - ? ReactClassStaticInterface[name] - : null; - - _invariant( - specPolicy === 'DEFINE_MANY_MERGED', - 'ReactClass: You are attempting to define ' + - '`%s` on your component more than once. This conflict may be ' + - 'due to a mixin.', - name - ); - - Constructor[name] = createMergedResultFunction(Constructor[name], property); - - return; - } - - Constructor[name] = property; - } - } - - /** - * Merge two objects, but throw if both contain the same key. - * - * @param {object} one The first object, which is mutated. - * @param {object} two The second object - * @return {object} one after it has been mutated to contain everything in two. - */ - function mergeIntoWithNoDuplicateKeys(one, two) { - _invariant( - one && two && typeof one === 'object' && typeof two === 'object', - 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' - ); - - for (var key in two) { - if (two.hasOwnProperty(key)) { - _invariant( - one[key] === undefined, - 'mergeIntoWithNoDuplicateKeys(): ' + - 'Tried to merge two objects with the same key: `%s`. This conflict ' + - 'may be due to a mixin; in particular, this may be caused by two ' + - 'getInitialState() or getDefaultProps() methods returning objects ' + - 'with clashing keys.', - key - ); - one[key] = two[key]; - } - } - return one; - } - - /** - * Creates a function that invokes two functions and merges their return values. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ - function createMergedResultFunction(one, two) { - return function mergedResult() { - var a = one.apply(this, arguments); - var b = two.apply(this, arguments); - if (a == null) { - return b; - } else if (b == null) { - return a; - } - var c = {}; - mergeIntoWithNoDuplicateKeys(c, a); - mergeIntoWithNoDuplicateKeys(c, b); - return c; - }; - } - - /** - * Creates a function that invokes two functions and ignores their return vales. - * - * @param {function} one Function to invoke first. - * @param {function} two Function to invoke second. - * @return {function} Function that invokes the two argument functions. - * @private - */ - function createChainedFunction(one, two) { - return function chainedFunction() { - one.apply(this, arguments); - two.apply(this, arguments); - }; - } - - /** - * Binds a method to the component. - * - * @param {object} component Component whose method is going to be bound. - * @param {function} method Method to be bound. - * @return {function} The bound method. - */ - function bindAutoBindMethod(component, method) { - var boundMethod = method.bind(component); - if (process.env.NODE_ENV !== 'production') { - boundMethod.__reactBoundContext = component; - boundMethod.__reactBoundMethod = method; - boundMethod.__reactBoundArguments = null; - var componentName = component.constructor.displayName; - var _bind = boundMethod.bind; - boundMethod.bind = function(newThis) { - for ( - var _len = arguments.length, - args = Array(_len > 1 ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) { - args[_key - 1] = arguments[_key]; - } - - // User is trying to bind() an autobound method; we effectively will - // ignore the value of "this" that the user is trying to use, so - // let's warn. - if (newThis !== component && newThis !== null) { - if (process.env.NODE_ENV !== 'production') { - warning( - false, - 'bind(): React component methods may only be bound to the ' + - 'component instance. See %s', - componentName - ); - } - } else if (!args.length) { - if (process.env.NODE_ENV !== 'production') { - warning( - false, - 'bind(): You are binding a component method to the component. ' + - 'React does this for you automatically in a high-performance ' + - 'way, so you can safely remove this call. See %s', - componentName - ); - } - return boundMethod; - } - var reboundMethod = _bind.apply(boundMethod, arguments); - reboundMethod.__reactBoundContext = component; - reboundMethod.__reactBoundMethod = method; - reboundMethod.__reactBoundArguments = args; - return reboundMethod; - }; - } - return boundMethod; - } - - /** - * Binds all auto-bound methods in a component. - * - * @param {object} component Component whose method is going to be bound. - */ - function bindAutoBindMethods(component) { - var pairs = component.__reactAutoBindPairs; - for (var i = 0; i < pairs.length; i += 2) { - var autoBindKey = pairs[i]; - var method = pairs[i + 1]; - component[autoBindKey] = bindAutoBindMethod(component, method); - } - } - - var IsMountedPreMixin = { - componentDidMount: function() { - this.__isMounted = true; - } - }; - - var IsMountedPostMixin = { - componentWillUnmount: function() { - this.__isMounted = false; - } - }; - - /** - * Add more to the ReactClass base class. These are all legacy features and - * therefore not already part of the modern ReactComponent. - */ - var ReactClassMixin = { - /** - * TODO: This will be deprecated because state should always keep a consistent - * type signature and the only use case for this, is to avoid that. - */ - replaceState: function(newState, callback) { - this.updater.enqueueReplaceState(this, newState, callback); - }, - - /** - * Checks whether or not this composite component is mounted. - * @return {boolean} True if mounted, false otherwise. - * @protected - * @final - */ - isMounted: function() { - if (process.env.NODE_ENV !== 'production') { - warning( - this.__didWarnIsMounted, - '%s: isMounted is deprecated. Instead, make sure to clean up ' + - 'subscriptions and pending requests in componentWillUnmount to ' + - 'prevent memory leaks.', - (this.constructor && this.constructor.displayName) || - this.name || - 'Component' - ); - this.__didWarnIsMounted = true; - } - return !!this.__isMounted; - } - }; - - var ReactClassComponent = function() {}; - _assign( - ReactClassComponent.prototype, - ReactComponent.prototype, - ReactClassMixin - ); - - /** - * Creates a composite component class given a class specification. - * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass - * - * @param {object} spec Class specification (which must define `render`). - * @return {function} Component constructor function. - * @public - */ - function createClass(spec) { - // To keep our warnings more understandable, we'll use a little hack here to - // ensure that Constructor.name !== 'Constructor'. This makes sure we don't - // unnecessarily identify a class without displayName as 'Constructor'. - var Constructor = identity(function(props, context, updater) { - // This constructor gets overridden by mocks. The argument is used - // by mocks to assert on what gets mounted. - - if (process.env.NODE_ENV !== 'production') { - warning( - this instanceof Constructor, - 'Something is calling a React component directly. Use a factory or ' + - 'JSX instead. See: https://fb.me/react-legacyfactory' - ); - } - - // Wire up auto-binding - if (this.__reactAutoBindPairs.length) { - bindAutoBindMethods(this); - } - - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - - this.state = null; - - // ReactClasses doesn't have constructors. Instead, they use the - // getInitialState and componentWillMount methods for initialization. - - var initialState = this.getInitialState ? this.getInitialState() : null; - if (process.env.NODE_ENV !== 'production') { - // We allow auto-mocks to proceed as if they're returning null. - if ( - initialState === undefined && - this.getInitialState._isMockFunction - ) { - // This is probably bad practice. Consider warning here and - // deprecating this convenience. - initialState = null; - } - } - _invariant( - typeof initialState === 'object' && !Array.isArray(initialState), - '%s.getInitialState(): must return an object or null', - Constructor.displayName || 'ReactCompositeComponent' - ); - - this.state = initialState; - }); - Constructor.prototype = new ReactClassComponent(); - Constructor.prototype.constructor = Constructor; - Constructor.prototype.__reactAutoBindPairs = []; - - injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); - - mixSpecIntoComponent(Constructor, IsMountedPreMixin); - mixSpecIntoComponent(Constructor, spec); - mixSpecIntoComponent(Constructor, IsMountedPostMixin); - - // Initialize the defaultProps property after all mixins have been merged. - if (Constructor.getDefaultProps) { - Constructor.defaultProps = Constructor.getDefaultProps(); - } - - if (process.env.NODE_ENV !== 'production') { - // This is a tag to indicate that the use of these method names is ok, - // since it's used with createClass. If it's not, then it's likely a - // mistake so we'll warn you to use the static property, property - // initializer or constructor respectively. - if (Constructor.getDefaultProps) { - Constructor.getDefaultProps.isReactClassApproved = {}; - } - if (Constructor.prototype.getInitialState) { - Constructor.prototype.getInitialState.isReactClassApproved = {}; - } - } - - _invariant( - Constructor.prototype.render, - 'createClass(...): Class specification must implement a `render` method.' - ); - - if (process.env.NODE_ENV !== 'production') { - warning( - !Constructor.prototype.componentShouldUpdate, - '%s has a method called ' + - 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + - 'The name is phrased as a question because the function is ' + - 'expected to return a value.', - spec.displayName || 'A component' - ); - warning( - !Constructor.prototype.componentWillRecieveProps, - '%s has a method called ' + - 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', - spec.displayName || 'A component' - ); - warning( - !Constructor.prototype.UNSAFE_componentWillRecieveProps, - '%s has a method called UNSAFE_componentWillRecieveProps(). ' + - 'Did you mean UNSAFE_componentWillReceiveProps()?', - spec.displayName || 'A component' - ); - } - - // Reduce time spent doing lookups by setting these on the prototype. - for (var methodName in ReactClassInterface) { - if (!Constructor.prototype[methodName]) { - Constructor.prototype[methodName] = null; - } - } - - return Constructor; - } - - return createClass; -} - -module.exports = factory; - -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("../../node_modules/process/browser.js"))) - -/***/ }), - -/***/ "../../node_modules/css-loader/index.js!../../node_modules/botframework-webchat/botchat.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../node_modules/css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "/* reset */\nbody .wc-app, .wc-app button, .wc-app input, .wc-app textarea {\n font-family: \"Segoe UI\", sans-serif;\n font-size: 15px; }\n\n.wc-app button {\n background-color: #0078d7;\n border: 1px solid #cccccc;\n border-radius: 1px;\n color: #ffffff;\n cursor: pointer;\n transition: color .2s ease, background-color .2s ease; }\n\n.wc-app h1, .wc-app h2, .wc-app h3, .wc-app h4, .wc-app p, .wc-app ul, .wc-app ol {\n margin: 0;\n padding: 0; }\n\n.wc-app audio, .wc-app video {\n display: block; }\n\n/* docking */\n.wc-hidden {\n visibility: hidden; }\n\n.wc-header {\n background-color: #0078d7;\n box-shadow: 0 1px rgba(0, 0, 0, 0.2);\n box-sizing: content-box;\n color: #ffffff;\n font-weight: 500;\n height: 30px;\n left: 0;\n letter-spacing: 0.5px;\n padding: 8px 8px 0 8px;\n position: absolute;\n right: 0;\n top: 0;\n z-index: 1; }\n\n.wc-time {\n color: #999999;\n margin-bottom: 10px; }\n\n.wc-message-groups {\n bottom: 50px;\n left: 0;\n transform: translateY(0);\n outline: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n padding: 10px;\n position: absolute;\n right: 0;\n top: 38px;\n transition: transform 0.2s cubic-bezier(0, 0, 0.5, 1); }\n .wc-message-groups.no-header {\n top: 0; }\n\n.wc-message-group-content {\n overflow: hidden; }\n\n.wc-suggested-actions {\n background-color: #f9f9f9;\n bottom: 50px;\n height: 0;\n left: 0;\n overflow: hidden;\n position: absolute;\n right: 0;\n transition: height 0.2s cubic-bezier(0, 0, 0.5, 1); }\n .wc-suggested-actions .wc-hscroll > ul {\n height: 40px;\n padding: 2px 3px; }\n .wc-suggested-actions .wc-hscroll > ul > li {\n display: inline-block;\n margin: 2px;\n max-width: 40%; }\n .wc-suggested-actions .wc-hscroll > ul > li button {\n background-color: #fff;\n color: #0078d7;\n min-height: 32px;\n overflow: hidden;\n padding: 0 16px;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 100%; }\n .wc-suggested-actions .wc-hscroll > ul > li button:focus,\n .wc-suggested-actions .wc-hscroll > ul > li button:hover {\n background-color: #fff;\n border-color: #0078d7;\n color: #0078d7; }\n .wc-suggested-actions .wc-hscroll > ul > li button:active {\n background-color: #0078d7;\n border-color: #0078d7;\n color: #ffffff; }\n .wc-suggested-actions button.scroll {\n background-color: #d2dde5;\n height: 40px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n top: 0;\n width: 28px; }\n .wc-suggested-actions button.scroll:disabled {\n display: none; }\n .wc-suggested-actions button.scroll:focus,\n .wc-suggested-actions button.scroll:hover {\n background-color: #808c95; }\n .wc-suggested-actions button.scroll svg {\n fill: #ffffff; }\n .wc-suggested-actions button.scroll svg path {\n transform: translateY(6px); }\n .wc-suggested-actions button.scroll.previous {\n left: 0; }\n .wc-suggested-actions button.scroll.next {\n right: 0; }\n\n.wc-message-pane.show-actions .wc-message-groups {\n transform: translateY(-40px); }\n\n.wc-message-pane.show-actions .wc-suggested-actions {\n height: 40px; }\n\n/* views */\n.wc-chatview-panel {\n overflow: hidden;\n position: absolute;\n right: 0;\n left: 0;\n top: 0;\n bottom: 0; }\n\n/* messages */\n.wc-message-wrapper {\n animation: animationFrames 2s;\n animation-iteration-count: 1;\n clear: both;\n margin-bottom: 10px;\n overflow: hidden;\n position: relative;\n /*transition: max-height 2s ease-in-out;*/ }\n\n@keyframes animationFrames {\n 0% {\n /*max-height: 0;*/\n opacity: 0; }\n 20% {\n opacity: 1; }\n 100% {\n /*max-height: 2000px;*/ } }\n\n.wc-message {\n position: relative; }\n\n.wc-message-wrapper.carousel .wc-message {\n max-width: none;\n padding-right: 8px; }\n\n.wc-message svg.wc-message-callout {\n height: 22px;\n position: absolute;\n stroke: none;\n top: 12px;\n width: 6px; }\n\n.wc-message-content {\n border-radius: 2px;\n box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);\n padding: 8px;\n word-break: break-word; }\n\n.wc-message-content.clickable {\n cursor: pointer; }\n\n.wc-message-content.selected {\n box-shadow: 0px 1px 1px 0px #ffa333; }\n\n.wc-message-content img {\n max-height: 320px;\n max-width: 100%; }\n\n.wc-message-content .video iframe {\n border: 0; }\n\n.wc-message-content audio, .wc-message-content video {\n max-width: 100%; }\n\n.wc-message-content audio + h1, .wc-message-content video + h1 {\n margin-top: 11px; }\n\n.wc-message-from {\n clear: both;\n color: #767676;\n font-size: 11px;\n margin-top: 5px; }\n\n/* cards */\n.wc-card {\n background-color: #ffffff; }\n .wc-card .non-adaptive-content {\n margin: 8px 8px 0 8px; }\n .wc-card button {\n background-color: transparent;\n color: #0078d7;\n min-height: 32px;\n width: 100%;\n padding: 0 16px; }\n .wc-card button:hover {\n background-color: transparent;\n border-color: #0078d7;\n color: #0078d7; }\n .wc-card button:active {\n background-color: #0078d7;\n border-color: #0078d7;\n color: #ffffff; }\n .wc-card.receipt table {\n border-collapse: collapse;\n width: 100%; }\n .wc-card.receipt th, .wc-card.receipt td {\n text-align: right;\n vertical-align: top; }\n .wc-card.receipt th:first-child, .wc-card.receipt td:first-child {\n text-align: left; }\n .wc-card.receipt th {\n color: #808c95;\n font-size: inherit;\n font-weight: normal;\n line-height: 1.75; }\n .wc-card.receipt thead tr:last-child th {\n padding-bottom: 16px; }\n .wc-card.receipt th[colspan=\"2\"] {\n color: inherit;\n font-size: 15px;\n font-weight: 700; }\n .wc-card.receipt td {\n padding: 4px 8px 0 8px; }\n .wc-card.receipt td img {\n float: left;\n margin: 5px 8px 8px 0;\n max-height: 50px;\n max-width: 50px; }\n .wc-card.receipt div.title {\n font-weight: bolder; }\n .wc-card.receipt div.subtitle {\n font-weight: lighter; }\n .wc-card.receipt tbody tr, .wc-card.receipt tfoot tr {\n border-top: 1px solid #d2dde5; }\n .wc-card.receipt tbody tr:first-child, .wc-card.receipt tfoot tr:first-child {\n border-top-width: 2px; }\n .wc-card.receipt tfoot td {\n line-height: 2.25; }\n .wc-card.receipt tfoot .total {\n font-weight: bold; }\n .wc-card.thumbnail img {\n float: right;\n margin-bottom: 10px;\n margin-left: 10px;\n width: 100px; }\n .wc-card.signin h1 {\n margin: 10px 24px 16px 14px; }\n .wc-card.error {\n text-align: center; }\n .wc-card.error .error-icon {\n fill: #cccccc;\n height: 56px;\n margin-bottom: 2px;\n margin-top: 20px;\n padding-left: 12px; }\n .wc-card.error .error-text {\n color: #cccccc;\n font-weight: 600;\n letter-spacing: 0.5px;\n margin-bottom: 20px;\n text-align: inherit; }\n\n/* alternate chat sizes */\n.wc-message {\n max-width: 91%; }\n\n.wc-card {\n border: 1px solid #d2dde5;\n width: 302px; }\n\n.wc-adaptive-card {\n width: 318px; }\n\n.wc-wide .wc-card {\n border: 1px solid #d2dde5;\n width: 398px; }\n\n.wc-wide .wc-adaptive-card {\n width: 414px; }\n\n.wc-narrow .wc-card {\n border: 1px solid #d2dde5;\n width: 198px; }\n\n.wc-narrow .wc-adaptive-card {\n width: 214px; }\n\n/* adaptive card adjustments from wc-card */\n.wc-adaptive-card p {\n margin-left: 0;\n margin-right: 0; }\n\n/* list */\n.wc-list > .wc-card {\n margin-top: 8px; }\n\n.wc-list > .wc-card:first-child {\n margin-top: 0; }\n\n/* horizontal scroll */\n.wc-hscroll-outer {\n /* allow horizontal scrolling but hide the scrollbar */\n overflow: hidden; }\n\n.wc-hscroll {\n /* allow horizontal scrolling but hide the scrollbar */\n overflow-x: scroll;\n overflow-y: hidden; }\n\n.wc-hscroll > ul {\n white-space: nowrap; }\n\n.wc-hscroll > ul > li {\n display: inline-block;\n vertical-align: top;\n white-space: normal; }\n\n/* carousel */\n.wc-carousel {\n position: relative; }\n .wc-carousel button.scroll {\n background-color: #d2dde5;\n height: 28px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n top: 50%;\n width: 28px; }\n .wc-carousel button.scroll:disabled {\n display: none; }\n .wc-carousel button.scroll:focus,\n .wc-carousel button.scroll:hover {\n background-color: #808c95; }\n .wc-carousel button.scroll svg {\n fill: #ffffff; }\n .wc-carousel button.scroll.previous {\n left: -16px; }\n .wc-carousel button.scroll.next {\n right: -16px; }\n .wc-carousel .wc-hscroll > ul {\n margin-left: -4px; }\n .wc-carousel .wc-hscroll > ul > li {\n padding: 0 4px; }\n .wc-carousel .wc-hscroll > ul > li:last-child {\n padding-right: 0; }\n .wc-carousel li p {\n min-height: 4em;\n white-space: normal; }\n .wc-carousel li .wc-adaptive-card p {\n min-height: initial; }\n\n/* from me */\n.wc-message-from-me {\n float: right;\n margin-right: 6px; }\n\n.wc-message-from-me.wc-message-from {\n text-align: right; }\n\n.wc-message-from-me .wc-message-content {\n background-color: #0078d7;\n color: #ffffff; }\n\n.wc-message-from-me svg.wc-message-callout path {\n fill: #0078d7; }\n\n.wc-message-from-me svg.wc-message-callout path.point-left {\n display: none; }\n\n.wc-message-from-me svg.wc-message-callout {\n right: -6px; }\n\n/* from bot */\n.wc-message-from-bot {\n float: left;\n margin-left: 8px; }\n\n.wc-message-from-bot .wc-message-content {\n background-color: #eceff1;\n color: #000000; }\n\n.wc-message-from-bot svg.wc-message-callout path {\n fill: #eceff1; }\n\n.wc-message-from-bot svg.wc-message-callout path.point-right {\n display: none; }\n\n.wc-message-from-bot svg.wc-message-callout {\n left: -6px; }\n\n/* console */\n.wc-console {\n border: 5px solid #dbdee1;\n bottom: 0;\n box-sizing: border-box;\n height: 50px;\n left: 0;\n position: absolute;\n right: 0; }\n .wc-console > .wc-upload,\n .wc-console > .wc-textbox,\n .wc-console > .wc-send,\n .wc-console > .wc-mic {\n position: absolute;\n top: 0;\n vertical-align: middle; }\n .wc-console label, .wc-console button {\n cursor: pointer;\n display: inline-block;\n height: 40px; }\n .wc-console svg {\n fill: #8a8a8a;\n margin: 11px; }\n .wc-console input[type=text],\n .wc-console textarea {\n border: none;\n height: 100%;\n outline: none;\n padding: 0;\n resize: none;\n width: 100%; }\n .wc-console.has-text .wc-send svg {\n fill: #0078d7; }\n .wc-console .wc-upload {\n cursor: pointer;\n position: relative; }\n .wc-console .wc-upload input[type=\"file\"] {\n font-size: 0;\n height: 0;\n left: 0;\n opacity: 0;\n outline: 0;\n position: absolute;\n top: 0;\n width: 0; }\n .wc-console .wc-upload svg {\n height: 18px;\n width: 26px; }\n .wc-console .wc-send {\n right: 0; }\n .wc-console .wc-send.hidden {\n visibility: hidden; }\n .wc-console .wc-textbox {\n bottom: 0;\n left: 48px;\n right: 49px; }\n .wc-console .wc-textbox input {\n background-color: transparent; }\n .wc-console .wc-mic,\n .wc-console .wc-send {\n background-color: transparent;\n border: 0;\n padding: 0;\n right: 0; }\n .wc-console .wc-mic.hidden,\n .wc-console .wc-send.hidden {\n visibility: hidden; }\n .wc-console .wc-send svg {\n height: 18px;\n width: 27px; }\n .wc-console .wc-mic.active path#micFilling {\n fill: #4e3787; }\n .wc-console .wc-mic.inactive path#micFilling {\n visibility: hidden; }\n\n.wc-console.has-text .wc-send svg {\n fill: #0078d7; }\n\n/* animation */\n.wc-typing {\n background-image: url(\"data:image/gif;base64,R0lGODlhQAAYAPYBAOzv8evu8Ort7+fq7Ons7ujr7eXo6uTn6ebp6+Xn6ebo6uzu8OPm6OTm6OPm5+Tn6N/i4+Ll59/i5N7h4+Hk5uDj5evu7+Hk5d/h49PV18PFx7/BwsfJysXHyMLExdja3Nfa28vNz72/wL7Awc/S08TGyMDCw9TW2NbY2t3g4trd39bZ2szO0M7Q0dnb3djb3Nvd39ve4Nnc3dze4Nrc3t7g4tzf4dXX2d3f4d7h4tnc3tve383P0MrMzs7Q0sjKzNLU1s/R08jKy9DT1NfZ293g4efp68bIyby+v9bZ27q8vdHT1c7R0uvt78nLzM/R0tjb3ens7bO0tbS2t7GztK+xsrW3uK6vsLe4utfa3L/Awtzf4MnLzamqq5WWl66wsbm7vNrd3uXo6a2ur6yurp2en6KjpKusrZ+goKeoqers7urt7peXmIGBgYSEhHx8fJmamqipqnZ2doqLi8XHyY2NjpGSkpOUlJiYmZOTlI+QkJqbm4eIiJucnIuMjP///yH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEY0RUJCMDNENkM4MTFFNkI5RENGRDgzMjAyQjU3QzUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEY0RUJCMDRENkM4MTFFNkI5RENGRDgzMjAyQjU3QzUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRjRFQkIwMUQ2QzgxMUU2QjlEQ0ZEODMyMDJCNTdDNSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRjRFQkIwMkQ2QzgxMUU2QjlEQ0ZEODMyMDJCNTdDNSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUOAAEAIf4YT3B0aW1pemVkIHdpdGggZXpnaWYuY29tACwAAAAAQAAYAAACJoSPqcvtD6OctNqLs968+w+G4kiW5omm6sq27gvH8kzX9o3n+l0AACH5BAUHAAAALD4ACQACAAYAAAIERI5oBQAh+QQFBwAOACwsAAcAFAAJAAAEJRDISZetmJQ9uhcZyClGSY4hYjbHKqYs06ooLLuBPeM6b2u1SgQAIfkEBQcADQAsGAAHACUACQAABlFAgHAYKBqJyKRS+ahMchKnoSBYWq0Mp+rzimEiiUH1SjaCd64VioaTEo5lbA3GvaWjCmpcfnl27TZ4ent8Mmo6KW6EhXSIEGCDi4VZCG+SSUEAIfkEBQcABgAsEQAHABcACQAAB0aAAIKDAoSGh4RELD8sHwkBiJEoIUKVPSAHkJGJQZaWNQSbnJ6VMAOigzI8pDwxp6gCKUOMnhKFsAgvi59GuKkZPhkTBb6BACH5BAUHAAQALA8ABwANAAkAAAYsQICwYAgMj0LWZokSIAedpTSDREmvxaHyyjy2uN2hCqwZVLmqp2DF0bAkzyAAIfkEBRUABQAsDgAHAAoACQAABidAgDBgGAyHH5NoyUAunxuEcANdkqbVJTa7hZ6EkFFVcAx5ShmCMAgAIfkEBQcAAAAsLAAHABAACQAABC0QyClXpZWUwbsOU/AhSWmQGyiOB+Mq3rJ6zosKM22n+d2YqQzvBOOFcMOgJAIAIfkEBQcAAwAsIQAHABsACQAAB0yAAIKDAgGEh4iJKStLGTARBYmShDgoJEyYNBSRk4ouQJiZNQeFnYc5II2hJzMOBKanH6qiDK+wlBlBqxMGhreDE6m0Ub+xjBi9xYKBACH5BAUHAAYALB0ABwAQAAkAAAc+gACCAgoFg4eIGSNKSj0MiIckjJNHB5AAEiaTkzcBkC8im4w8BJ+hoj6lkBqiSC+XAUmnowOwsT8bJSiGl4EAIfkEBQcAAgAsHAAHAAsACQAABy2AAIIGDIOGRVhXijeHVYqPjIIej5QBglKUjweXmYoIkp0ClpyVhghCiRoUhoEAIfkEBRUAAgAsGwAHAAoACQAAByyAAIKCB4ODMlNkijKHY4qPMIJgj49ggpSUAQBXmIqSnRuEVJgMhiWJJQmCgQAh+QQFBwAAACwxAAcADQAJAAAEJRDICQKdgQyktrBS5h0G91WfSXYaWqjrK8rx6LL1cpf8GaY2SQQAIfkEBQcABgAsKwAHABMACQAABzyAAIKDBISGhzwbSB4ZCIeIIouLQI6PgjcmkpI4AZYDJCOak4WWQ1qiJi8Cnh8eqBiel6GbpLEgHIycsYEAIfkEBQcAAgAsKQAHAA0ACQAABzyAAIIBEhQBg4gBXHh1dWUZiQCLjZQriWWUlF2Hghh2mY14A4MVn6B7UYhmoHVSnJ13maiROFdse1YMiYEAIfkEBQcAAwAsDgAHACUACQAAB2OAA4KCBYOGh4iIETBRAI6PIIYNiZSHKWxymVUCkIcmlaAHbpmkcQCVQ6CUUqStKaeJR6qJcK2kdI6zugNltplOjh6IN7uGJr5vB44YngTFgwKYrRuPwR4dAwLPklNzbV4sj4EAIfkEBQcACgAsCwAHACcACQAAB2qAAIKDBAEACoiJiouMiQ4qBYSCLiw/LCsHho2bjF6KhpM9lpY3D4KcnAmMXaGjozECh6izihMFM5Wul5G0vQodBDY8uruyvqhcARVAxDgWxscbjQatrwOnx4mem8EZLUApkdDZClKJPIKBACH5BAUHAAoALAQABwASAAkAAAdCgACCCwEWhoOIiQMRKTQxFQYCioiMMi8fMJAEk5sQKpegjIWTEzqhNhcIo4qlpxSqnBWZroSxpi4zr5KcnTWei5yBACH5BAUHAAYALAAABwAQAAkAAAMRCLrc/rCIEIe9tOKpd/dfqCUAIfkEBRUAAQAsAAAIAAcACAAAAgaEj6nL7VAAIfkEBQcABQAsGwAHAAoACQAABzSAAIICDAODgyxSX1UeDYiLkEoIABJUkJBDADeXkZqci0eUU58ogkBVlxoEgzobVkpLqwCBACH5BAUHAAMALBMABwARAAkAAAdPgACCgwIEhoSIhTJBRx08RBSFiRQvTBoimI8VkoQ4GU4bmKFLMAqTS42iji8RAYgwqCOqQS4Mpz2hmUAxCJMqQ6mrrYmuOShPLSc2Bq6EgQAh+QQFBwAJACwHAAcAGgAJAAAHWIAAgoMBhYaEiImDFTNZRC44FAiHiomMK0A+mTaSlJWCEUVQJySaNzoYDAWfiJIfGUymkBEDrIuusLI1tJ6VDrs3pUMoKhANBLa3W4+lLym8ycqczwer0YEAIfkEBQcACwAsAAAHABYACQAABS4gIAbkaJ5oVF3HIJTpqWJ048bpVKsFjM+7xA03WgV7xOIRmUQ4jKxh0/V0+oghACH5BAUVAAEALAAABwAKAAkAAAIIhI+py+0PYQEAIfkEBQcABQAsJgAHAAwACQAAB0qAAIIEYhQGAYODN1R1bnpXN4iCGV98bZd+ZxmIFx54l6B4SodhYI2gbXZUOQAwSnqoqVMYrSV9sWUbA5NYp7IwiRgaZndmHhWDgQAh+QQFBwAHACwZAAcAGAAJAAAHboAAgoMEhYYBhImJMUMcGyNII0JANQWKimEkHUpVaWlUSkdLOFGXgxIoIY9dZWZnWCYsRBGmgikZPyJSnmhdU1pOJxKIpkW4kLy+kjfDtRWpHlhnvWOwPB8NxMXHVGevyxBqtacgQSFcTsFQtOOBACH5BAUHAAMALAkABwAgAAkAAAdtgACCgwKFhoSIiYoFFWEZPi1PJDczEQSLmIONQCElGyYckZUFmZg2KEwcHkqsPUsfEwYBpYkRMDc8R59gHkJBKzgNh7SCtriqvL2/KQzDxGIpK0FOq0jKsLLPiConLLrXNs3atS6UqDQS2eMAgQAh+QQFBwALACwAAAcAGQAJAAAHUIAAAYNNhIKHiImIDDk6ICoSCQSKlIg1MjcnmRAHk5WKFTErmqQURoafghA0KKStoQKplpCuMRUKsbKqW0S1EQOoshispQa5urtFMxO/x8iBACH5BAUHAAIALAAABwALAAkAAAIJhI+py+3xolwFACH5BAUHAAEALAAACQABAAUAAAIChF0AOw==\");\n background-repeat: no-repeat;\n height: 20px;\n width: 64px; }\n\n.wc-animate-scroll {\n left: 0;\n position: absolute;\n transition: left .8s ease; }\n\n.wc-animate-scroll-rapid {\n left: 0;\n position: absolute;\n transition: left .4s ease; }\n\n.wc-animate-scroll-near {\n left: 0;\n position: absolute;\n transition: left .3s ease-in-out; }\n\n/* text formats */\n.format-markdown > p {\n margin-bottom: 0px; }\n\n.format-markdown code {\n white-space: pre-wrap; }\n\n.format-markdown + div {\n margin-top: 8px; }\n\n.format-markdown ol {\n padding-left: 30px;\n /* numbers are right-aligned to the period */ }\n\n.format-markdown ul {\n padding-left: 33px; }\n\n/* browser scrollbar customization */\n.wc-app ::-webkit-scrollbar {\n width: 8px; }\n\n.wc-app ::-webkit-scrollbar * {\n background-color: transparent; }\n\n.wc-app ::-webkit-scrollbar-thumb {\n background-color: #dbdee1; }\n\n/* download button for Unknown media */\n.wc-icon-download {\n display: inline-block;\n height: 20px;\n margin-left: 8px;\n vertical-align: top;\n width: 12px; }\n\n.wc-text-download {\n display: inline-block;\n font-weight: 500;\n text-decoration: none; }\n\n.wc-message-from-bot a.wc-link-download:link, .wc-message-from-bot a.wc-link-download:visited {\n color: #000000;\n opacity: 1; }\n .wc-message-from-bot a.wc-link-download:link .wc-icon-download, .wc-message-from-bot a.wc-link-download:visited .wc-icon-download {\n background-image: url('data:image/svg+xml;utf8,');\n background-repeat: no-repeat; }\n\n.wc-message-from-bot a.wc-link-download:hover {\n color: #0078d7;\n opacity: 1; }\n .wc-message-from-bot a.wc-link-download:hover .wc-icon-download {\n background-image: url('data:image/svg+xml;utf8,');\n background-repeat: no-repeat; }\n\n.wc-message-from-bot a.wc-link-download:active {\n color: #0078d7;\n opacity: 0.8; }\n .wc-message-from-bot a.wc-link-download:active .wc-icon-download {\n background-image: url('data:image/svg+xml;utf8,');\n background-repeat: no-repeat; }\n\n.wc-message-from-me a.wc-link-download:link, .wc-message-from-me a.wc-link-download:visited {\n color: #ffffff;\n opacity: 1; }\n .wc-message-from-me a.wc-link-download:link .wc-icon-download, .wc-message-from-me a.wc-link-download:visited .wc-icon-download {\n background-image: url('data:image/svg+xml;utf8,');\n background-repeat: no-repeat; }\n\n.wc-message-from-me a.wc-link-download:hover {\n color: #ffffff;\n opacity: 0.8; }\n .wc-message-from-me a.wc-link-download:hover .wc-icon-download {\n background-image: url('data:image/svg+xml;utf8,');\n background-repeat: no-repeat; }\n\n.wc-message-from-me a.wc-link-download:active {\n color: #ffffff;\n opacity: 0.6; }\n .wc-message-from-me a.wc-link-download:active .wc-icon-download {\n background-image: url('data:image/svg+xml;utf8,');\n background-repeat: no-repeat; }\n", ""]); - -// exports - - -/***/ }), - -/***/ "../../node_modules/css-loader/index.js!./src/css/app.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../node_modules/css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "body {\r\n font-family: \"Segoe UI\", sans-serif;\r\n font-size: 15px;\r\n box-sizing: content-box;\r\n}\r\n\r\nsection {\r\n position: absolute;\r\n top: 0;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n margin: 10px;\r\n padding: 10px;\r\n border: 1px solid #d1d1d1;\r\n display: flex;\r\n overflow: hidden;\r\n}\r\n\r\nsection > div:first-child {\r\n width: 100%;\r\n}\r\n\r\nsection > div:last-child {\r\n min-width: 200px;\r\n}\r\n\r\ninput[type=\"text\"] {\r\n height: 39px;\r\n width: calc(100% - 105px);\r\n margin: 0;\r\n}\r\n\r\nbutton.button-primary {\r\n margin: 0;\r\n}\r\n\r\n.border-left {\r\n border-left: 1px solid #D1D1D1;\r\n}\r\n\r\n.alarms-header {\r\n margin: 0;\r\n background-color: #0078d7;\r\n box-shadow: 0 1px rgba(0, 0, 0, 0.2);\r\n box-sizing: content-box;\r\n color: #ffffff;\r\n font-weight: 500;\r\n height: 30px;\r\n letter-spacing: 0.5px;\r\n padding: 8px 8px 0 8px;\r\n text-align: center;\r\n}\r\n\r\n#bot {\r\n position: relative;\r\n}\r\n\r\nul.alarms-list {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0 5px;\r\n height: calc(100% - 30px);\r\n}\r\n\r\nul.alarms-list li {\r\n margin-top: 5px;\r\n border-radius: 5px;\r\n border: 1px solid #d5d5d7;\r\n min-height: 120px;\r\n}\r\n\r\nul.alarms-list li h5 {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n text-transform: uppercase;\r\n font-size: 12px;\r\n border-top-left-radius: 5px;\r\n border-top-right-radius: 5px;\r\n background: #f7f7f9;\r\n border-bottom: 1px solid #d5d5d7;\r\n margin: 0;\r\n padding: 10px;\r\n}\r\n\r\nul.alarms-list li p {\r\n margin: 5px 0 0 0;\r\n font-size: 11px;\r\n padding: 5px;\r\n}", ""]); - -// exports - - -/***/ }), - -/***/ "../../node_modules/css-loader/lib/css-base.js": -/***/ (function(module, exports) { - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -module.exports = function(useSourceMap) { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item, useSourceMap); - if(item[2]) { - return "@media " + item[2] + "{" + content + "}"; - } else { - return content; - } - }).join(""); - }; - - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; - } - list.push(item); - } - } - }; - return list; -}; - -function cssWithMappingToString(item, useSourceMap) { - var content = item[1] || ''; - var cssMapping = item[3]; - if (!cssMapping) { - return content; - } - - if (useSourceMap && typeof btoa === 'function') { - var sourceMapping = toComment(cssMapping); - var sourceURLs = cssMapping.sources.map(function (source) { - return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' - }); - - return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); - } - - return [content].join('\n'); -} - -// Adapted from convert-source-map (MIT) -function toComment(sourceMap) { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); - var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; - - return '/*# ' + data + ' */'; -} - - -/***/ }), - -/***/ "../../node_modules/entities/maps/entities.json": -/***/ (function(module, exports) { - -module.exports = {"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\"","QUOT":"\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"} - -/***/ }), - -/***/ "../../node_modules/fbjs/lib/EventListener.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @typechecks - */ - -var emptyFunction = __webpack_require__("../../node_modules/fbjs/lib/emptyFunction.js"); - -/** - * Upstream version of event listener. Does not take into account specific - * nature of platform. - */ -var EventListener = { - /** - * Listen to DOM events during the bubble phase. - * - * @param {DOMEventTarget} target DOM element to register listener on. - * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. - * @param {function} callback Callback function. - * @return {object} Object with a `remove` method. - */ - listen: function listen(target, eventType, callback) { - if (target.addEventListener) { - target.addEventListener(eventType, callback, false); - return { - remove: function remove() { - target.removeEventListener(eventType, callback, false); - } - }; - } else if (target.attachEvent) { - target.attachEvent('on' + eventType, callback); - return { - remove: function remove() { - target.detachEvent('on' + eventType, callback); - } - }; - } - }, - - /** - * Listen to DOM events during the capture phase. - * - * @param {DOMEventTarget} target DOM element to register listener on. - * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. - * @param {function} callback Callback function. - * @return {object} Object with a `remove` method. - */ - capture: function capture(target, eventType, callback) { - if (target.addEventListener) { - target.addEventListener(eventType, callback, true); - return { - remove: function remove() { - target.removeEventListener(eventType, callback, true); - } - }; - } else { - if (process.env.NODE_ENV !== 'production') { - console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.'); - } - return { - remove: emptyFunction - }; - } - }, - - registerDefault: function registerDefault() {} -}; - -module.exports = EventListener; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("../../node_modules/process/browser.js"))) - -/***/ }), - -/***/ "../../node_modules/fbjs/lib/ExecutionEnvironment.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - */ - - - -var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); - -/** - * Simple, lightweight module assisting with the detection and context of - * Worker. Helps avoid circular dependencies and allows code to reason about - * whether or not they are in a Worker, even if they never include the main - * `ReactWorker` dependency. - */ -var ExecutionEnvironment = { - - canUseDOM: canUseDOM, - - canUseWorkers: typeof Worker !== 'undefined', - - canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent), - - canUseViewport: canUseDOM && !!window.screen, - - isInWorker: !canUseDOM // For now, this is true - might change in the future. - -}; - -module.exports = ExecutionEnvironment; - -/***/ }), - -/***/ "../../node_modules/fbjs/lib/camelize.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @typechecks - */ - -var _hyphenPattern = /-(.)/g; - -/** - * Camelcases a hyphenated string, for example: - * - * > camelize('background-color') - * < "backgroundColor" - * - * @param {string} string - * @return {string} - */ -function camelize(string) { - return string.replace(_hyphenPattern, function (_, character) { - return character.toUpperCase(); - }); -} - -module.exports = camelize; - -/***/ }), - -/***/ "../../node_modules/fbjs/lib/camelizeStyleName.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @typechecks - */ - - - -var camelize = __webpack_require__("../../node_modules/fbjs/lib/camelize.js"); - -var msPattern = /^-ms-/; - -/** - * Camelcases a hyphenated CSS property name, for example: - * - * > camelizeStyleName('background-color') - * < "backgroundColor" - * > camelizeStyleName('-moz-transition') - * < "MozTransition" - * > camelizeStyleName('-ms-transition') - * < "msTransition" - * - * As Andi Smith suggests - * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix - * is converted to lowercase `ms`. - * - * @param {string} string - * @return {string} - */ -function camelizeStyleName(string) { - return camelize(string.replace(msPattern, 'ms-')); -} - -module.exports = camelizeStyleName; - -/***/ }), - -/***/ "../../node_modules/fbjs/lib/containsNode.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * - */ - -var isTextNode = __webpack_require__("../../node_modules/fbjs/lib/isTextNode.js"); - -/*eslint-disable no-bitwise */ - -/** - * Checks if a given DOM node contains or is another DOM node. - */ -function containsNode(outerNode, innerNode) { - if (!outerNode || !innerNode) { - return false; - } else if (outerNode === innerNode) { - return true; - } else if (isTextNode(outerNode)) { - return false; - } else if (isTextNode(innerNode)) { - return containsNode(outerNode, innerNode.parentNode); - } else if ('contains' in outerNode) { - return outerNode.contains(innerNode); - } else if (outerNode.compareDocumentPosition) { - return !!(outerNode.compareDocumentPosition(innerNode) & 16); - } else { - return false; - } -} - -module.exports = containsNode; - -/***/ }), - -/***/ "../../node_modules/fbjs/lib/createArrayFromMixed.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @typechecks - */ - -var invariant = __webpack_require__("../../node_modules/fbjs/lib/invariant.js"); - -/** - * Convert array-like objects to arrays. - * - * This API assumes the caller knows the contents of the data type. For less - * well defined inputs use createArrayFromMixed. - * - * @param {object|function|filelist} obj - * @return {array} - */ -function toArray(obj) { - var length = obj.length; - - // Some browsers builtin objects can report typeof 'function' (e.g. NodeList - // in old versions of Safari). - !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0; - - !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0; - - !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0; - - !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0; - - // Old IE doesn't give collections access to hasOwnProperty. Assume inputs - // without method will throw during the slice call and skip straight to the - // fallback. - if (obj.hasOwnProperty) { - try { - return Array.prototype.slice.call(obj); - } catch (e) { - // IE < 9 does not support Array#slice on collections objects - } - } - - // Fall back to copying key by key. This assumes all keys have a value, - // so will not preserve sparsely populated inputs. - var ret = Array(length); - for (var ii = 0; ii < length; ii++) { - ret[ii] = obj[ii]; - } - return ret; -} - -/** - * Perform a heuristic test to determine if an object is "array-like". - * - * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" - * Joshu replied: "Mu." - * - * This function determines if its argument has "array nature": it returns - * true if the argument is an actual array, an `arguments' object, or an - * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). - * - * It will return false for other array-like objects like Filelist. - * - * @param {*} obj - * @return {boolean} - */ -function hasArrayNature(obj) { - return ( - // not null/false - !!obj && ( - // arrays are objects, NodeLists are functions in Safari - typeof obj == 'object' || typeof obj == 'function') && - // quacks like an array - 'length' in obj && - // not window - !('setInterval' in obj) && - // no DOM node should be considered an array-like - // a 'select' element has 'length' and 'item' properties on IE8 - typeof obj.nodeType != 'number' && ( - // a real array - Array.isArray(obj) || - // arguments - 'callee' in obj || - // HTMLCollection/NodeList - 'item' in obj) - ); -} - -/** - * Ensure that the argument is an array by wrapping it in an array if it is not. - * Creates a copy of the argument if it is already an array. - * - * This is mostly useful idiomatically: - * - * var createArrayFromMixed = require('createArrayFromMixed'); - * - * function takesOneOrMoreThings(things) { - * things = createArrayFromMixed(things); - * ... - * } - * - * This allows you to treat `things' as an array, but accept scalars in the API. - * - * If you need to convert an array-like object, like `arguments`, into an array - * use toArray instead. - * - * @param {*} obj - * @return {array} - */ -function createArrayFromMixed(obj) { - if (!hasArrayNature(obj)) { - return [obj]; - } else if (Array.isArray(obj)) { - return obj.slice(); - } else { - return toArray(obj); - } -} - -module.exports = createArrayFromMixed; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("../../node_modules/process/browser.js"))) - -/***/ }), - -/***/ "../../node_modules/fbjs/lib/createNodesFromMarkup.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) { - -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @typechecks - */ - -/*eslint-disable fb-www/unsafe-html*/ - -var ExecutionEnvironment = __webpack_require__("../../node_modules/fbjs/lib/ExecutionEnvironment.js"); - -var createArrayFromMixed = __webpack_require__("../../node_modules/fbjs/lib/createArrayFromMixed.js"); -var getMarkupWrap = __webpack_require__("../../node_modules/fbjs/lib/getMarkupWrap.js"); -var invariant = __webpack_require__("../../node_modules/fbjs/lib/invariant.js"); - -/** - * Dummy container used to render all markup. - */ -var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; - -/** - * Pattern used by `getNodeName`. - */ -var nodeNamePattern = /^\s*<(\w+)/; - -/** - * Extracts the `nodeName` of the first element in a string of markup. - * - * @param {string} markup String of markup. - * @return {?string} Node name of the supplied markup. - */ -function getNodeName(markup) { - var nodeNameMatch = markup.match(nodeNamePattern); - return nodeNameMatch && nodeNameMatch[1].toLowerCase(); -} - -/** - * Creates an array containing the nodes rendered from the supplied markup. The - * optionally supplied `handleScript` function will be invoked once for each - * - - \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/index.html b/samples/alarmbot-es6-botframework-webchat/index.html deleted file mode 100644 index 329ce4dca5..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Example alarm bot using the botframework-webchat - - - -
-
-
-

Alarms

-
    -
    -
    - - - \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/package.json b/samples/alarmbot-es6-botframework-webchat/package.json deleted file mode 100644 index c97babd5be..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "alarmbot-botframework-webchat", - "version": "1.0.0", - "description": "Example alarm bot using the botframework-webchat", - "main": "app.js", - "scripts": { - "start": "webpack-dev-server", - "build-sample": "webpack" - }, - "author": "Microsoft", - "license": "MIT", - "dependencies": { - "botbuilder-core": "^4.0.0-m3.0", - "botbuilder-core-extensions": "^4.0.0-m3.0", - "botframework-webchat": "^0.11.4" - }, - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-preset-env": "^1.6.1", - "clean-webpack-plugin": "^0.1.18", - "copy-webpack-plugin": "^4.3.1", - "css-loader": "^0.28.9", - "style-loader": "^0.20.1", - "webpack": "^3.10.0", - "webpack-dev-server": "^2.11.1" - } -} diff --git a/samples/alarmbot-es6-botframework-webchat/src/alarmRenderer.js b/samples/alarmbot-es6-botframework-webchat/src/alarmRenderer.js deleted file mode 100644 index 9e3a0368ae..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/alarmRenderer.js +++ /dev/null @@ -1,11 +0,0 @@ -export class AlarmRenderer { - - contextCreated(context, next) { - context.templateManager.register(this); - return next(); - } - - renderTemplate(context, language, templateId, value) { - return {type: 'event', id: templateId, value}; - } -} \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/src/alarms/addAlarm.js b/samples/alarmbot-es6-botframework-webchat/src/alarms/addAlarm.js deleted file mode 100644 index b5ad41b3c6..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/alarms/addAlarm.js +++ /dev/null @@ -1,54 +0,0 @@ -export function begin(context) { - // Set topic and initialize empty alarm - context.state.conversation.topic = 'addAlarm'; - context.state.conversation.alarm = {}; - return nextField(context); -} - -export function routeReply(context) { - // Handle users reply to prompt - const utterance = context.activity.text.trim(); - switch (context.state.conversation.prompt) { - case 'title': - // Validate reply and save to alarm - if (utterance.length > 2) { - context.state.conversation.alarm.title = utterance; - } else { - context.reply(`I'm sorry. Your alarm should have a title at least 3 characters long.`); - } - break; - case 'time': - // TODO: validate time user replied with - context.state.conversation.alarm.time = utterance; - break; - } - return nextField(context); -} - - -function nextField(context) { - // Prompt user for next missing field - const alarm = context.state.conversation.alarm; - if (alarm.title === undefined) { - context.reply(`What would you like to call your alarm?`); - context.state.conversation.prompt = 'title'; - } else if (alarm.time === undefined) { - context.reply(`What time would you like to set the "${alarm.title}" alarm for?`); - context.state.conversation.prompt = 'time'; - } else { - // Alarm completed so set alarm. - const list = context.state.user.alarms || []; - list.push(alarm); - context.state.user.alarms = list; - - // TODO: set alarm - - // Notify user and cleanup topic state - context.reply(`Your alarm named "${alarm.title}" is set for "${alarm.time}".`); - context.replyWith('newAlarm', alarm); - context.state.conversation.topic = undefined; - context.state.conversation.alarm = undefined; - context.state.conversation.prompt = undefined; - } - return Promise.resolve(); -} \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/src/alarms/cancel.js b/samples/alarmbot-es6-botframework-webchat/src/alarms/cancel.js deleted file mode 100644 index a306b8cf89..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/alarms/cancel.js +++ /dev/null @@ -1,10 +0,0 @@ -export function begin(context) { - // Cancel the current topic - if (context.state.conversation.topic) { - context.state.conversation.topic = undefined; - context.reply(`Ok... Canceled.`); - } else { - context.reply(`Nothing to cancel.`); - } - return Promise.resolve(); -} diff --git a/samples/alarmbot-es6-botframework-webchat/src/alarms/deleteAlarm.js b/samples/alarmbot-es6-botframework-webchat/src/alarms/deleteAlarm.js deleted file mode 100644 index a743322a9d..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/alarms/deleteAlarm.js +++ /dev/null @@ -1,39 +0,0 @@ -import {renderAlarms} from './showAlarms'; - -export function begin(context) { - // Delete any existing topic - context.state.conversation.topic = undefined; - - // Render list of topics to user - const count = renderAlarms(context); - if (count > 0) { - // Set topic and prompt user for alarm to delete. - context.state.conversation.topic = 'deleteAlarm'; - context.reply(`Which alarm would you like to delete?`); - } - return Promise.resolve(); -} - -export function routeReply(context) { - // Validate users reply and delete alarm - let deleted = false; - const title = context.activity.text.trim(); - const list = context.state.user.alarms || []; - for (let i = 0; i < list.length; i++) { - if (list[i].title.toLowerCase() === title.toLowerCase()) { - context.replyWith('deleteAlarm', list.splice(i, 1)[0]); - deleted = true; - break; - } - } - - // Notify user of deletion or re-prompt - if (deleted) { - context.reply(`Deleted the "${title}" alarm.`); - context.state.conversation.topic = undefined; - } else { - context.reply(`An alarm named "${title}" doesn't exist. Which alarm would you like to delete? Say "cancel" to quit.`) - } - - return Promise.resolve(); -} diff --git a/samples/alarmbot-es6-botframework-webchat/src/alarms/showAlarms.js b/samples/alarmbot-es6-botframework-webchat/src/alarms/showAlarms.js deleted file mode 100644 index 48624224e2..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/alarms/showAlarms.js +++ /dev/null @@ -1,25 +0,0 @@ -export function begin(context) { - // Delete any existing topic - context.state.conversation.topic = undefined; - - // Render alarms to user. - // - No reply is expected so we don't set a new topic. - this.renderAlarms(context); - return Promise.resolve(); -} - -export function renderAlarms(context) { - const list = context.state.user.alarms || []; - if (list.length > 0) { - let msg = `**Current Alarms**\n\n`; - let connector = ''; - list.forEach((alarm) => { - msg += connector + `- ${alarm.title} (${alarm.time})`; - connector = '\n'; - }); - context.reply(msg); - } else { - context.reply(`No alarms found.`); - } - return list.length; -} diff --git a/samples/alarmbot-es6-botframework-webchat/src/alarmsListComponent.js b/samples/alarmbot-es6-botframework-webchat/src/alarmsListComponent.js deleted file mode 100644 index f210318ea5..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/alarmsListComponent.js +++ /dev/null @@ -1,61 +0,0 @@ -export class AlarmsListComponent { - - /** - * @property {Observable} activityPipeline - */ - - /** - * @property {Element} domContext - */ - - /** - * @property {Activity} lastActivity - */ - - /** - * - * @param {Observable} activityPipeline - * @param {Element} domContext - */ - constructor(activityPipeline, domContext) { - Object.assign(this, {activityPipeline, domContext}); - activityPipeline.subscribe(this.activityReceived.bind(this)); - } - - activityReceived(activity) { - if (activity.type !== 'event') { - return; - } - - if (activity.text === 'newAlarm') { - return this.addAlarm(activity); - } - if (activity.text === 'deleteAlarm') { - this.removeAlarm(activity); - } - } - - addAlarm(alarm) { - const alarmTemplate = document.getElementById('alarm-template'); - const fields = alarmTemplate.content.querySelectorAll('[data-field]'); - const alarms = this.domContext.querySelector('ul'); - - fields[0].textContent = alarm.value.title; - fields[1].textContent = `Set for: ${alarm.value.time}`; - alarmTemplate.content.firstElementChild.setAttribute('data-alarm', alarm.value.title.toLowerCase()); - - alarms.appendChild(document.importNode(alarmTemplate.content, true)); - } - - removeAlarm(alarm) { - const li = this.domContext.querySelector(`ul > li[data-alarm="${alarm.value.title.toLowerCase()}"`); - if (li) { - li.parentElement.removeChild(li); - } - } -} - -let instance; -AlarmsListComponent.bootstrap = function (activityPipeline, domContext) { - return instance || (instance = new AlarmsListComponent(activityPipeline, domContext)); -}; \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/src/app.js b/samples/alarmbot-es6-botframework-webchat/src/app.js deleted file mode 100644 index 22b56d3a89..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/app.js +++ /dev/null @@ -1,30 +0,0 @@ -import './css/app.css'; - -import {Bot, BotStateManager, MemoryStorage} from "botbuilder"; -import 'botframework-webchat/botchat.css'; -import {App} from 'botframework-webchat/built/App'; -import {WebChatAdapter} from './webChatAdapter'; -import {AlarmRenderer} from "./alarmRenderer"; -import {routes} from './routes'; -import {AlarmsListComponent} from "./alarmsListComponent"; - -const webChatAdapter = new WebChatAdapter(); - -const bot = new Bot(webChatAdapter) - .use(new MemoryStorage(), - new BotStateManager(), - new AlarmRenderer()); -App({ - user: {id: "Me!"}, - bot: {id: "bot"}, - botConnection: webChatAdapter.botConnection, -}, document.getElementById('bot')); - -AlarmsListComponent.bootstrap(webChatAdapter.botConnection.activity$, document.querySelector('.alarms-container')); -// handle activities -bot.onReceive((context) => routes(context)); - -// FOUC -document.addEventListener('DOMContentLoaded', function () { - requestAnimationFrame(() => document.body.style.visibility = 'visible'); -}); \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/src/css/app.css b/samples/alarmbot-es6-botframework-webchat/src/css/app.css deleted file mode 100644 index 3c6944b35b..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/css/app.css +++ /dev/null @@ -1,91 +0,0 @@ -body { - font-family: "Segoe UI", sans-serif; - font-size: 15px; - box-sizing: content-box; -} - -section { - position: absolute; - top: 0; - bottom: 0; - left: 0; - right: 0; - margin: 10px; - padding: 10px; - border: 1px solid #d1d1d1; - display: flex; - overflow: hidden; -} - -section > div:first-child { - width: 100%; -} - -section > div:last-child { - min-width: 200px; -} - -input[type="text"] { - height: 39px; - width: calc(100% - 105px); - margin: 0; -} - -button.button-primary { - margin: 0; -} - -.border-left { - border-left: 1px solid #D1D1D1; -} - -.alarms-header { - margin: 0; - background-color: #0078d7; - box-shadow: 0 1px rgba(0, 0, 0, 0.2); - box-sizing: content-box; - color: #ffffff; - font-weight: 500; - height: 30px; - letter-spacing: 0.5px; - padding: 8px 8px 0 8px; - text-align: center; -} - -#bot { - position: relative; -} - -ul.alarms-list { - list-style: none; - margin: 0; - padding: 0 5px; - height: calc(100% - 30px); -} - -ul.alarms-list li { - margin-top: 5px; - border-radius: 5px; - border: 1px solid #d5d5d7; - min-height: 120px; -} - -ul.alarms-list li h5 { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - text-transform: uppercase; - font-size: 12px; - border-top-left-radius: 5px; - border-top-right-radius: 5px; - background: #f7f7f9; - border-bottom: 1px solid #d5d5d7; - margin: 0; - padding: 10px; -} - -ul.alarms-list li p { - margin: 5px 0 0 0; - font-size: 11px; - padding: 5px; -} \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/src/routes.js b/samples/alarmbot-es6-botframework-webchat/src/routes.js deleted file mode 100644 index 90fe2be89b..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/routes.js +++ /dev/null @@ -1,32 +0,0 @@ -// configure bots routing table -import * as addAlarm from './alarms/addAlarm'; -import * as showAlarms from './alarms/showAlarms'; -import * as deleteAlarm from './alarms/deleteAlarm'; -import * as cancel from './alarms/cancel'; - -export function routes(context) { - if (context.activity.type === 'message') { - // Check for the triggering of a new topic - const utterance = (context.activity.text || '').trim().toLowerCase(); - if (utterance.includes('add alarm')) { - return addAlarm.begin(context); - } else if (utterance.includes('delete alarm')) { - return deleteAlarm.begin(context); - } else if (utterance.includes('show alarms')) { - return showAlarms.begin(context); - } else if (utterance === 'cancel') { - return cancel.begin(context); - } else { - // Continue the current topic - switch (context.state.conversation.topic) { - case 'addAlarm': - return addAlarm.routeReply(context); - case 'deleteAlarm': - return deleteAlarm.routeReply(context); - default: - context.reply(`Hi! I'm a simple alarm bot. Say "add alarm", "delete alarm", or "show alarms".`); - return Promise.resolve(); - } - } - } -} \ No newline at end of file diff --git a/samples/alarmbot-es6-botframework-webchat/src/webChatAdapter.js b/samples/alarmbot-es6-botframework-webchat/src/webChatAdapter.js deleted file mode 100644 index 1fe6274a1f..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/src/webChatAdapter.js +++ /dev/null @@ -1,46 +0,0 @@ -import { ConnectionStatus } from 'botframework-webchat'; -import { Subject, Observable, BehaviorSubject } from 'rxjs'; - -export class WebChatAdapter { - constructor() { - this.activity$ = new Subject(); - this.botConnection = { - connectionStatus$: new BehaviorSubject(ConnectionStatus.Online), - activity$: this.activity$.share(), - end() { - debugger - }, - postActivity: activity => { - const id = Date.now().toString(); - return Observable.fromPromise(this - .onReceive(Object.assign({}, activity, { - id, - conversation: { id: "bot" }, - channelId: 'WebChat' - })) - .then(() => id) - ) - } - } - } - - post(activities) { - const sentActivities = activities.map(activity => Object.assign({}, activity, { - id: Date.now().toString(), - channelId: 'WebChat', - conversation: { id: 'bot' }, - from: { id: 'bot' } - })); - - sentActivities.forEach(activity => this.activity$.next(activity)); - - return Promise.resolve(sentActivities.map(activity => { - id: activity.id - })); - } - - onReceive(activity) { - // overwritten by bot - return Promise.resolve(); - } -} diff --git a/samples/alarmbot-es6-botframework-webchat/webpack.config.js b/samples/alarmbot-es6-botframework-webchat/webpack.config.js deleted file mode 100644 index 61de896922..0000000000 --- a/samples/alarmbot-es6-botframework-webchat/webpack.config.js +++ /dev/null @@ -1,33 +0,0 @@ -const path = require('path'); -const CleanWebpackPlugin = require('clean-webpack-plugin'); -const CopyWebpackPlugin = require('copy-webpack-plugin'); -const webpack = require('webpack'); - -module.exports = { - entry: './src/app.js', - devtool: 'source-map', - devServer: { - contentBase: './dist', - hot: true - }, - module: { - rules: [ - { - test: /\.css$/, - use: [ 'style-loader', 'css-loader' ] - } - ] - }, - plugins: [ - new CleanWebpackPlugin(['dist']), - new webpack.NamedModulesPlugin(), - new webpack.HotModuleReplacementPlugin(), - new CopyWebpackPlugin([ - {from: path.resolve(__dirname, 'index.html'), to: ''}, - ]) - ], - output: { - filename: 'app.js', - path: path.resolve(__dirname, 'dist') - } -}; \ No newline at end of file diff --git a/samples/alarmbot-es6-custom-webchat/.babelrc b/samples/alarmbot-es6-custom-webchat/.babelrc deleted file mode 100644 index 7d4ee6afb1..0000000000 --- a/samples/alarmbot-es6-custom-webchat/.babelrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "presets": [ - ["env", { - "targets": { - "browsers": "current" - }, - "modules": "umd" - }] - ], - "ignore": [ - "node_modules/**/" - ] -} \ No newline at end of file diff --git a/samples/alarmbot-es6-custom-webchat/README.md b/samples/alarmbot-es6-custom-webchat/README.md deleted file mode 100644 index 2fc321bbe4..0000000000 --- a/samples/alarmbot-es6-custom-webchat/README.md +++ /dev/null @@ -1,6 +0,0 @@ -The example shows the use of the botbuilder-js SDK for the browser in a custom web chat - -### To Run: -1. from the root `./botbuilder-js` run `npm install -g lerna && lerna bootstrap --hoist` -2. cd to the alarmbot-es6-custom-webchat directory then start the dev server: `npm start` -2. navigate to `http://localhost:8080` \ No newline at end of file diff --git a/samples/alarmbot-es6-custom-webchat/dist/app.js b/samples/alarmbot-es6-custom-webchat/dist/app.js deleted file mode 100644 index 43d804ed2d..0000000000 --- a/samples/alarmbot-es6-custom-webchat/dist/app.js +++ /dev/null @@ -1,2617 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ function hotDisposeChunk(chunkId) { -/******/ delete installedChunks[chunkId]; -/******/ } -/******/ var parentHotUpdateCallback = window["webpackHotUpdate"]; -/******/ window["webpackHotUpdate"] = -/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars -/******/ hotAddUpdateChunk(chunkId, moreModules); -/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); -/******/ } ; -/******/ -/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars -/******/ var head = document.getElementsByTagName("head")[0]; -/******/ var script = document.createElement("script"); -/******/ script.type = "text/javascript"; -/******/ script.charset = "utf-8"; -/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js"; -/******/ ; -/******/ head.appendChild(script); -/******/ } -/******/ -/******/ function hotDownloadManifest(requestTimeout) { // eslint-disable-line no-unused-vars -/******/ requestTimeout = requestTimeout || 10000; -/******/ return new Promise(function(resolve, reject) { -/******/ if(typeof XMLHttpRequest === "undefined") -/******/ return reject(new Error("No browser support")); -/******/ try { -/******/ var request = new XMLHttpRequest(); -/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json"; -/******/ request.open("GET", requestPath, true); -/******/ request.timeout = requestTimeout; -/******/ request.send(null); -/******/ } catch(err) { -/******/ return reject(err); -/******/ } -/******/ request.onreadystatechange = function() { -/******/ if(request.readyState !== 4) return; -/******/ if(request.status === 0) { -/******/ // timeout -/******/ reject(new Error("Manifest request to " + requestPath + " timed out.")); -/******/ } else if(request.status === 404) { -/******/ // no update available -/******/ resolve(); -/******/ } else if(request.status !== 200 && request.status !== 304) { -/******/ // other failure -/******/ reject(new Error("Manifest request to " + requestPath + " failed.")); -/******/ } else { -/******/ // success -/******/ try { -/******/ var update = JSON.parse(request.responseText); -/******/ } catch(e) { -/******/ reject(e); -/******/ return; -/******/ } -/******/ resolve(update); -/******/ } -/******/ }; -/******/ }); -/******/ } -/******/ -/******/ -/******/ -/******/ var hotApplyOnUpdate = true; -/******/ var hotCurrentHash = "cbe574d9f3d36dd70150"; // eslint-disable-line no-unused-vars -/******/ var hotRequestTimeout = 10000; -/******/ var hotCurrentModuleData = {}; -/******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars -/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars -/******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars -/******/ -/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars -/******/ var me = installedModules[moduleId]; -/******/ if(!me) return __webpack_require__; -/******/ var fn = function(request) { -/******/ if(me.hot.active) { -/******/ if(installedModules[request]) { -/******/ if(installedModules[request].parents.indexOf(moduleId) < 0) -/******/ installedModules[request].parents.push(moduleId); -/******/ } else { -/******/ hotCurrentParents = [moduleId]; -/******/ hotCurrentChildModule = request; -/******/ } -/******/ if(me.children.indexOf(request) < 0) -/******/ me.children.push(request); -/******/ } else { -/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId); -/******/ hotCurrentParents = []; -/******/ } -/******/ return __webpack_require__(request); -/******/ }; -/******/ var ObjectFactory = function ObjectFactory(name) { -/******/ return { -/******/ configurable: true, -/******/ enumerable: true, -/******/ get: function() { -/******/ return __webpack_require__[name]; -/******/ }, -/******/ set: function(value) { -/******/ __webpack_require__[name] = value; -/******/ } -/******/ }; -/******/ }; -/******/ for(var name in __webpack_require__) { -/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== "e") { -/******/ Object.defineProperty(fn, name, ObjectFactory(name)); -/******/ } -/******/ } -/******/ fn.e = function(chunkId) { -/******/ if(hotStatus === "ready") -/******/ hotSetStatus("prepare"); -/******/ hotChunksLoading++; -/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) { -/******/ finishChunkLoading(); -/******/ throw err; -/******/ }); -/******/ -/******/ function finishChunkLoading() { -/******/ hotChunksLoading--; -/******/ if(hotStatus === "prepare") { -/******/ if(!hotWaitingFilesMap[chunkId]) { -/******/ hotEnsureUpdateChunk(chunkId); -/******/ } -/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ } -/******/ } -/******/ }; -/******/ return fn; -/******/ } -/******/ -/******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars -/******/ var hot = { -/******/ // private stuff -/******/ _acceptedDependencies: {}, -/******/ _declinedDependencies: {}, -/******/ _selfAccepted: false, -/******/ _selfDeclined: false, -/******/ _disposeHandlers: [], -/******/ _main: hotCurrentChildModule !== moduleId, -/******/ -/******/ // Module API -/******/ active: true, -/******/ accept: function(dep, callback) { -/******/ if(typeof dep === "undefined") -/******/ hot._selfAccepted = true; -/******/ else if(typeof dep === "function") -/******/ hot._selfAccepted = dep; -/******/ else if(typeof dep === "object") -/******/ for(var i = 0; i < dep.length; i++) -/******/ hot._acceptedDependencies[dep[i]] = callback || function() {}; -/******/ else -/******/ hot._acceptedDependencies[dep] = callback || function() {}; -/******/ }, -/******/ decline: function(dep) { -/******/ if(typeof dep === "undefined") -/******/ hot._selfDeclined = true; -/******/ else if(typeof dep === "object") -/******/ for(var i = 0; i < dep.length; i++) -/******/ hot._declinedDependencies[dep[i]] = true; -/******/ else -/******/ hot._declinedDependencies[dep] = true; -/******/ }, -/******/ dispose: function(callback) { -/******/ hot._disposeHandlers.push(callback); -/******/ }, -/******/ addDisposeHandler: function(callback) { -/******/ hot._disposeHandlers.push(callback); -/******/ }, -/******/ removeDisposeHandler: function(callback) { -/******/ var idx = hot._disposeHandlers.indexOf(callback); -/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1); -/******/ }, -/******/ -/******/ // Management API -/******/ check: hotCheck, -/******/ apply: hotApply, -/******/ status: function(l) { -/******/ if(!l) return hotStatus; -/******/ hotStatusHandlers.push(l); -/******/ }, -/******/ addStatusHandler: function(l) { -/******/ hotStatusHandlers.push(l); -/******/ }, -/******/ removeStatusHandler: function(l) { -/******/ var idx = hotStatusHandlers.indexOf(l); -/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1); -/******/ }, -/******/ -/******/ //inherit from previous dispose call -/******/ data: hotCurrentModuleData[moduleId] -/******/ }; -/******/ hotCurrentChildModule = undefined; -/******/ return hot; -/******/ } -/******/ -/******/ var hotStatusHandlers = []; -/******/ var hotStatus = "idle"; -/******/ -/******/ function hotSetStatus(newStatus) { -/******/ hotStatus = newStatus; -/******/ for(var i = 0; i < hotStatusHandlers.length; i++) -/******/ hotStatusHandlers[i].call(null, newStatus); -/******/ } -/******/ -/******/ // while downloading -/******/ var hotWaitingFiles = 0; -/******/ var hotChunksLoading = 0; -/******/ var hotWaitingFilesMap = {}; -/******/ var hotRequestedFilesMap = {}; -/******/ var hotAvailableFilesMap = {}; -/******/ var hotDeferred; -/******/ -/******/ // The update info -/******/ var hotUpdate, hotUpdateNewHash; -/******/ -/******/ function toModuleId(id) { -/******/ var isNumber = (+id) + "" === id; -/******/ return isNumber ? +id : id; -/******/ } -/******/ -/******/ function hotCheck(apply) { -/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status"); -/******/ hotApplyOnUpdate = apply; -/******/ hotSetStatus("check"); -/******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) { -/******/ if(!update) { -/******/ hotSetStatus("idle"); -/******/ return null; -/******/ } -/******/ hotRequestedFilesMap = {}; -/******/ hotWaitingFilesMap = {}; -/******/ hotAvailableFilesMap = update.c; -/******/ hotUpdateNewHash = update.h; -/******/ -/******/ hotSetStatus("prepare"); -/******/ var promise = new Promise(function(resolve, reject) { -/******/ hotDeferred = { -/******/ resolve: resolve, -/******/ reject: reject -/******/ }; -/******/ }); -/******/ hotUpdate = {}; -/******/ var chunkId = 0; -/******/ { // eslint-disable-line no-lone-blocks -/******/ /*globals chunkId */ -/******/ hotEnsureUpdateChunk(chunkId); -/******/ } -/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ return promise; -/******/ }); -/******/ } -/******/ -/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars -/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId]) -/******/ return; -/******/ hotRequestedFilesMap[chunkId] = false; -/******/ for(var moduleId in moreModules) { -/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ hotUpdate[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ } -/******/ -/******/ function hotEnsureUpdateChunk(chunkId) { -/******/ if(!hotAvailableFilesMap[chunkId]) { -/******/ hotWaitingFilesMap[chunkId] = true; -/******/ } else { -/******/ hotRequestedFilesMap[chunkId] = true; -/******/ hotWaitingFiles++; -/******/ hotDownloadUpdateChunk(chunkId); -/******/ } -/******/ } -/******/ -/******/ function hotUpdateDownloaded() { -/******/ hotSetStatus("ready"); -/******/ var deferred = hotDeferred; -/******/ hotDeferred = null; -/******/ if(!deferred) return; -/******/ if(hotApplyOnUpdate) { -/******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to -/******/ // avoid triggering uncaught exception warning in Chrome. -/******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666 -/******/ Promise.resolve().then(function() { -/******/ return hotApply(hotApplyOnUpdate); -/******/ }).then( -/******/ function(result) { -/******/ deferred.resolve(result); -/******/ }, -/******/ function(err) { -/******/ deferred.reject(err); -/******/ } -/******/ ); -/******/ } else { -/******/ var outdatedModules = []; -/******/ for(var id in hotUpdate) { -/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { -/******/ outdatedModules.push(toModuleId(id)); -/******/ } -/******/ } -/******/ deferred.resolve(outdatedModules); -/******/ } -/******/ } -/******/ -/******/ function hotApply(options) { -/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status"); -/******/ options = options || {}; -/******/ -/******/ var cb; -/******/ var i; -/******/ var j; -/******/ var module; -/******/ var moduleId; -/******/ -/******/ function getAffectedStuff(updateModuleId) { -/******/ var outdatedModules = [updateModuleId]; -/******/ var outdatedDependencies = {}; -/******/ -/******/ var queue = outdatedModules.slice().map(function(id) { -/******/ return { -/******/ chain: [id], -/******/ id: id -/******/ }; -/******/ }); -/******/ while(queue.length > 0) { -/******/ var queueItem = queue.pop(); -/******/ var moduleId = queueItem.id; -/******/ var chain = queueItem.chain; -/******/ module = installedModules[moduleId]; -/******/ if(!module || module.hot._selfAccepted) -/******/ continue; -/******/ if(module.hot._selfDeclined) { -/******/ return { -/******/ type: "self-declined", -/******/ chain: chain, -/******/ moduleId: moduleId -/******/ }; -/******/ } -/******/ if(module.hot._main) { -/******/ return { -/******/ type: "unaccepted", -/******/ chain: chain, -/******/ moduleId: moduleId -/******/ }; -/******/ } -/******/ for(var i = 0; i < module.parents.length; i++) { -/******/ var parentId = module.parents[i]; -/******/ var parent = installedModules[parentId]; -/******/ if(!parent) continue; -/******/ if(parent.hot._declinedDependencies[moduleId]) { -/******/ return { -/******/ type: "declined", -/******/ chain: chain.concat([parentId]), -/******/ moduleId: moduleId, -/******/ parentId: parentId -/******/ }; -/******/ } -/******/ if(outdatedModules.indexOf(parentId) >= 0) continue; -/******/ if(parent.hot._acceptedDependencies[moduleId]) { -/******/ if(!outdatedDependencies[parentId]) -/******/ outdatedDependencies[parentId] = []; -/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]); -/******/ continue; -/******/ } -/******/ delete outdatedDependencies[parentId]; -/******/ outdatedModules.push(parentId); -/******/ queue.push({ -/******/ chain: chain.concat([parentId]), -/******/ id: parentId -/******/ }); -/******/ } -/******/ } -/******/ -/******/ return { -/******/ type: "accepted", -/******/ moduleId: updateModuleId, -/******/ outdatedModules: outdatedModules, -/******/ outdatedDependencies: outdatedDependencies -/******/ }; -/******/ } -/******/ -/******/ function addAllToSet(a, b) { -/******/ for(var i = 0; i < b.length; i++) { -/******/ var item = b[i]; -/******/ if(a.indexOf(item) < 0) -/******/ a.push(item); -/******/ } -/******/ } -/******/ -/******/ // at begin all updates modules are outdated -/******/ // the "outdated" status can propagate to parents if they don't accept the children -/******/ var outdatedDependencies = {}; -/******/ var outdatedModules = []; -/******/ var appliedUpdate = {}; -/******/ -/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() { -/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module"); -/******/ }; -/******/ -/******/ for(var id in hotUpdate) { -/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) { -/******/ moduleId = toModuleId(id); -/******/ var result; -/******/ if(hotUpdate[id]) { -/******/ result = getAffectedStuff(moduleId); -/******/ } else { -/******/ result = { -/******/ type: "disposed", -/******/ moduleId: id -/******/ }; -/******/ } -/******/ var abortError = false; -/******/ var doApply = false; -/******/ var doDispose = false; -/******/ var chainInfo = ""; -/******/ if(result.chain) { -/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> "); -/******/ } -/******/ switch(result.type) { -/******/ case "self-declined": -/******/ if(options.onDeclined) -/******/ options.onDeclined(result); -/******/ if(!options.ignoreDeclined) -/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo); -/******/ break; -/******/ case "declined": -/******/ if(options.onDeclined) -/******/ options.onDeclined(result); -/******/ if(!options.ignoreDeclined) -/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo); -/******/ break; -/******/ case "unaccepted": -/******/ if(options.onUnaccepted) -/******/ options.onUnaccepted(result); -/******/ if(!options.ignoreUnaccepted) -/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo); -/******/ break; -/******/ case "accepted": -/******/ if(options.onAccepted) -/******/ options.onAccepted(result); -/******/ doApply = true; -/******/ break; -/******/ case "disposed": -/******/ if(options.onDisposed) -/******/ options.onDisposed(result); -/******/ doDispose = true; -/******/ break; -/******/ default: -/******/ throw new Error("Unexception type " + result.type); -/******/ } -/******/ if(abortError) { -/******/ hotSetStatus("abort"); -/******/ return Promise.reject(abortError); -/******/ } -/******/ if(doApply) { -/******/ appliedUpdate[moduleId] = hotUpdate[moduleId]; -/******/ addAllToSet(outdatedModules, result.outdatedModules); -/******/ for(moduleId in result.outdatedDependencies) { -/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) { -/******/ if(!outdatedDependencies[moduleId]) -/******/ outdatedDependencies[moduleId] = []; -/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]); -/******/ } -/******/ } -/******/ } -/******/ if(doDispose) { -/******/ addAllToSet(outdatedModules, [result.moduleId]); -/******/ appliedUpdate[moduleId] = warnUnexpectedRequire; -/******/ } -/******/ } -/******/ } -/******/ -/******/ // Store self accepted outdated modules to require them later by the module system -/******/ var outdatedSelfAcceptedModules = []; -/******/ for(i = 0; i < outdatedModules.length; i++) { -/******/ moduleId = outdatedModules[i]; -/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted) -/******/ outdatedSelfAcceptedModules.push({ -/******/ module: moduleId, -/******/ errorHandler: installedModules[moduleId].hot._selfAccepted -/******/ }); -/******/ } -/******/ -/******/ // Now in "dispose" phase -/******/ hotSetStatus("dispose"); -/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) { -/******/ if(hotAvailableFilesMap[chunkId] === false) { -/******/ hotDisposeChunk(chunkId); -/******/ } -/******/ }); -/******/ -/******/ var idx; -/******/ var queue = outdatedModules.slice(); -/******/ while(queue.length > 0) { -/******/ moduleId = queue.pop(); -/******/ module = installedModules[moduleId]; -/******/ if(!module) continue; -/******/ -/******/ var data = {}; -/******/ -/******/ // Call dispose handlers -/******/ var disposeHandlers = module.hot._disposeHandlers; -/******/ for(j = 0; j < disposeHandlers.length; j++) { -/******/ cb = disposeHandlers[j]; -/******/ cb(data); -/******/ } -/******/ hotCurrentModuleData[moduleId] = data; -/******/ -/******/ // disable module (this disables requires from this module) -/******/ module.hot.active = false; -/******/ -/******/ // remove module from cache -/******/ delete installedModules[moduleId]; -/******/ -/******/ // when disposing there is no need to call dispose handler -/******/ delete outdatedDependencies[moduleId]; -/******/ -/******/ // remove "parents" references from all children -/******/ for(j = 0; j < module.children.length; j++) { -/******/ var child = installedModules[module.children[j]]; -/******/ if(!child) continue; -/******/ idx = child.parents.indexOf(moduleId); -/******/ if(idx >= 0) { -/******/ child.parents.splice(idx, 1); -/******/ } -/******/ } -/******/ } -/******/ -/******/ // remove outdated dependency from module children -/******/ var dependency; -/******/ var moduleOutdatedDependencies; -/******/ for(moduleId in outdatedDependencies) { -/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { -/******/ module = installedModules[moduleId]; -/******/ if(module) { -/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId]; -/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) { -/******/ dependency = moduleOutdatedDependencies[j]; -/******/ idx = module.children.indexOf(dependency); -/******/ if(idx >= 0) module.children.splice(idx, 1); -/******/ } -/******/ } -/******/ } -/******/ } -/******/ -/******/ // Not in "apply" phase -/******/ hotSetStatus("apply"); -/******/ -/******/ hotCurrentHash = hotUpdateNewHash; -/******/ -/******/ // insert new code -/******/ for(moduleId in appliedUpdate) { -/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) { -/******/ modules[moduleId] = appliedUpdate[moduleId]; -/******/ } -/******/ } -/******/ -/******/ // call accept handlers -/******/ var error = null; -/******/ for(moduleId in outdatedDependencies) { -/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) { -/******/ module = installedModules[moduleId]; -/******/ if(module) { -/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId]; -/******/ var callbacks = []; -/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) { -/******/ dependency = moduleOutdatedDependencies[i]; -/******/ cb = module.hot._acceptedDependencies[dependency]; -/******/ if(cb) { -/******/ if(callbacks.indexOf(cb) >= 0) continue; -/******/ callbacks.push(cb); -/******/ } -/******/ } -/******/ for(i = 0; i < callbacks.length; i++) { -/******/ cb = callbacks[i]; -/******/ try { -/******/ cb(moduleOutdatedDependencies); -/******/ } catch(err) { -/******/ if(options.onErrored) { -/******/ options.onErrored({ -/******/ type: "accept-errored", -/******/ moduleId: moduleId, -/******/ dependencyId: moduleOutdatedDependencies[i], -/******/ error: err -/******/ }); -/******/ } -/******/ if(!options.ignoreErrored) { -/******/ if(!error) -/******/ error = err; -/******/ } -/******/ } -/******/ } -/******/ } -/******/ } -/******/ } -/******/ -/******/ // Load self accepted modules -/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) { -/******/ var item = outdatedSelfAcceptedModules[i]; -/******/ moduleId = item.module; -/******/ hotCurrentParents = [moduleId]; -/******/ try { -/******/ __webpack_require__(moduleId); -/******/ } catch(err) { -/******/ if(typeof item.errorHandler === "function") { -/******/ try { -/******/ item.errorHandler(err); -/******/ } catch(err2) { -/******/ if(options.onErrored) { -/******/ options.onErrored({ -/******/ type: "self-accept-error-handler-errored", -/******/ moduleId: moduleId, -/******/ error: err2, -/******/ orginalError: err, // TODO remove in webpack 4 -/******/ originalError: err -/******/ }); -/******/ } -/******/ if(!options.ignoreErrored) { -/******/ if(!error) -/******/ error = err2; -/******/ } -/******/ if(!error) -/******/ error = err; -/******/ } -/******/ } else { -/******/ if(options.onErrored) { -/******/ options.onErrored({ -/******/ type: "self-accept-errored", -/******/ moduleId: moduleId, -/******/ error: err -/******/ }); -/******/ } -/******/ if(!options.ignoreErrored) { -/******/ if(!error) -/******/ error = err; -/******/ } -/******/ } -/******/ } -/******/ } -/******/ -/******/ // handle errors in accept handlers and self accepted module load -/******/ if(error) { -/******/ hotSetStatus("fail"); -/******/ return Promise.reject(error); -/******/ } -/******/ -/******/ hotSetStatus("idle"); -/******/ return new Promise(function(resolve) { -/******/ resolve(outdatedModules); -/******/ }); -/******/ } -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {}, -/******/ hot: hotCreateModule(moduleId), -/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp), -/******/ children: [] -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // __webpack_hash__ -/******/ __webpack_require__.h = function() { return hotCurrentHash; }; -/******/ -/******/ // Load entry module and return exports -/******/ return hotCreateRequire("./src/app.js")(__webpack_require__.s = "./src/app.js"); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "../../libraries/botbuilder-core/lib/botAdapter.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * @module botbuilder - */ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const middlewareSet_1 = __webpack_require__("../../libraries/botbuilder-core/lib/middlewareSet.js"); -const internal_1 = __webpack_require__("../../libraries/botbuilder-core/lib/internal.js"); -/** - * :package: **botbuilder-core** - * - * Abstract base class for all adapter plugins. Adapters manage the communication between the bot - * and a user over a specific channel, or set of channels. - * - * **Usage Example** - * - * ```JavaScript - * ``` - */ -class BotAdapter { - constructor() { - this.middleware = new middlewareSet_1.MiddlewareSet(); - } - /** - * Registers middleware handlers(s) with the adapter. - * @param middleware One or more middleware handlers(s) to register. - */ - use(...middleware) { - middlewareSet_1.MiddlewareSet.prototype.use.apply(this.middleware, middleware); - return this; - } - /** - * Called by the parent class to run the adapters middleware set and calls the passed in - * `next()` handler at the end of the chain. While the context object is passed in from the - * caller is created by the caller, what gets passed to the `next()` is a wrapped version of - * the context which will automatically be revoked upon completion of the turn. This causes - * the bots logic to throw an error if it tries to use the context after the turn completes. - * @param context Context for the current turn of conversation with the user. - * @param next Function to call at the end of the middleware chain. - * @param next.callback A revocable version of the context object. - */ - runMiddleware(context, next) { - // Wrap context with revocable proxy - const pContext = internal_1.makeRevocable(context); - return this.middleware.run(pContext.proxy, () => { - // Call next with revocable context - return next(pContext.proxy); - }).then(() => { - // Revoke use of context - pContext.revoke(); - }); - } -} -exports.BotAdapter = BotAdapter; -//# sourceMappingURL=botAdapter.js.map - -/***/ }), - -/***/ "../../libraries/botbuilder-core/lib/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/** - * @module botbuilder - */ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__("../../libraries/botbuilder-core/lib/botAdapter.js")); -__export(__webpack_require__("../../libraries/botbuilder-core/lib/middlewareSet.js")); -__export(__webpack_require__("../../libraries/botbuilder-core/lib/turnContext.js")); -__export(__webpack_require__("../../libraries/botframework-schema/lib/index.js")); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../libraries/botbuilder-core/lib/internal.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -function shallowCopy(value) { - if (Array.isArray(value)) { - return value.slice(0); - } - if (typeof value === 'object') { - return Object.assign({}, value); - } - return value; -} -exports.shallowCopy = shallowCopy; -function makeRevocable(target, handler) { - // Ensure proxy supported (some browsers don't) - if (Proxy && Proxy.revocable) { - return Proxy.revocable(target, handler || {}); - } - else { - return { proxy: target, revoke: () => { } }; - } -} -exports.makeRevocable = makeRevocable; -//# sourceMappingURL=internal.js.map - -/***/ }), - -/***/ "../../libraries/botbuilder-core/lib/middlewareSet.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * :package: **botbuilder-core** - * - * A set of `Middleware` plugins. The set itself is middleware so you can easily package up a set - * of middleware that can be composed into a bot with a single `bot.use(mySet)` call or even into - * another middleware set using `set.use(mySet)`. - */ -class MiddlewareSet { - /** - * Creates a new instance of a MiddlewareSet. - * @param middleware Zero or more middleware handlers(s) to register. - */ - constructor(...middleware) { - this.middleware = []; - MiddlewareSet.prototype.use.apply(this, middleware); - } - onTurn(context, next) { - return this.run(context, next); - } - /** - * Registers middleware handlers(s) with the set. - * @param middleware One or more middleware handlers(s) to register. - */ - use(...middleware) { - middleware.forEach((plugin) => { - if (typeof plugin === 'function') { - this.middleware.push(plugin); - } - else if (typeof plugin === 'object' && plugin.onTurn) { - this.middleware.push((context, next) => plugin.onTurn(context, next)); - } - else { - throw new Error(`MiddlewareSet.use(): invalid plugin type being added.`); - } - }); - return this; - } - /** - * Executes a set of middleware in series. - * @param context Context for the current turn of conversation with the user. - * @param next Function to invoke at the end of the middleware chain. - */ - run(context, next) { - const handlers = this.middleware.slice(); - function runNext(i) { - try { - if (i < handlers.length) { - return Promise.resolve(handlers[i](context, () => runNext(i + 1))); - } - else { - return Promise.resolve(next()); - } - } - catch (err) { - return Promise.reject(err); - } - } - return runNext(0); - } -} -exports.MiddlewareSet = MiddlewareSet; -//# sourceMappingURL=middlewareSet.js.map - -/***/ }), - -/***/ "../../libraries/botbuilder-core/lib/turnContext.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * @module botbuilder - */ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -const botframework_schema_1 = __webpack_require__("../../libraries/botframework-schema/lib/index.js"); -const internal_1 = __webpack_require__("../../libraries/botbuilder-core/lib/internal.js"); -/** - * :package: **botbuilder-core** - * - * Context object containing information cached for a single turn of conversation with a user. This - * will typically be created by the adapter you're using and then passed to middleware and your - * bots logic. - * - * For TypeScript developers the `BotContext` is also exposed as an interface which you can derive - * from to better describe the actual shape of the context object being passed around. Middleware - * can potentially extend the context object with additional members so in order to get intellisense - * for those added members you'll need to define them on an interface that extends BotContext: - * - * ```JavaScript - * interface MyContext extends BotContext { - * // Added by UserState middleware. - * readonly userState: MyUserState; - * - * // Added by ConversationState middleware. - * readonly conversationState: MyConversationState; - * } - * - * adapter.processRequest(req, res, (context: MyContext) => { - * const state = context.conversationState; - * }); - * ``` - */ -class TurnContext { - constructor(adapterOrContext, request) { - this._adapter = undefined; - this._activity = undefined; - this._respondedRef = { responded: false }; - this._services = new Map(); - this._onSendActivities = []; - this._onUpdateActivity = []; - this._onDeleteActivity = []; - if (adapterOrContext instanceof TurnContext) { - adapterOrContext.copyTo(this); - } - else { - this._adapter = adapterOrContext; - this._activity = request; - } - } - /** - * Called when this BotContext instance is passed into the constructor of a new BotContext - * instance. - * @param context The context object to copy private members to. Everything should be copied by reference. - */ - copyTo(context) { - // Copy private member to other instance. - ['_adapter', '_activity', '_respondedRef', '_services', - '_onSendActivities', '_onUpdateActivity', '_onDeleteActivity'].forEach((prop) => context[prop] = this[prop]); - } - /** The adapter for this context. */ - get adapter() { - return this._adapter; - } - /** The received activity. */ - get activity() { - return this._activity; - } - /** If `true` at least one response has been sent for the current turn of conversation. */ - get responded() { - return this._respondedRef.responded; - } - set responded(value) { - if (!value) { - throw new Error(`TurnContext: cannot set 'responded' to a value of 'false'.`); - } - this._respondedRef.responded = true; - } - /** Map of services and other values cached for the lifetime of the turn. */ - get services() { - return this._services; - } - /** - * Sends a single activity or message to the user. - * @param activityOrText Activity or text of a message to send the user. - * @param speak (Optional) SSML that should be spoken to the user for the message. - * @param inputHint (Optional) `InputHint` for the message sent to the user. - */ - sendActivity(activityOrText, speak, inputHint) { - let a; - if (typeof activityOrText === 'string') { - a = { text: activityOrText }; - if (speak) { - a.speak = speak; - } - if (inputHint) { - a.inputHint = inputHint; - } - } - else { - a = activityOrText; - } - return this.sendActivities([a]).then((responses) => responses && responses.length > 0 ? responses[0] : undefined); - } - /** - * Sends a set of activities to the user. An array of responses form the server will be returned. - * - * Prior to delivery, the activities will be updated with information from the `ConversationReference` - * for the contexts [activity](#activity) and if an activities `type` field hasn't been set it will be - * set to a type of `message`. The array of activities will then be routed through any [onSendActivities()](#onsendactivities) - * handlers and then passed to `adapter.sendActivities()`. - * @param activities One or more activities to send to the user. - */ - sendActivities(activities) { - const ref = TurnContext.getConversationReference(this.activity); - const output = activities.map((a) => { - const o = TurnContext.applyConversationReference(Object.assign({}, a), ref); - if (!o.type) { - o.type = botframework_schema_1.ActivityTypes.Message; - } - return o; - }); - return this.emit(this._onSendActivities, output, () => { - return this.adapter.sendActivities(this, output) - .then((responses) => { - // Set responded flag - this.responded = true; - return responses; - }); - }); - } - /** - * Replaces an existing activity. - * - * The activity will be routed through any registered [onUpdateActivity](#onupdateactivity) handlers - * before being passed to `adapter.updateActivity()`. - * @param activity New replacement activity. The activity should already have it's ID information populated. - */ - updateActivity(activity) { - return this.emit(this._onUpdateActivity, activity, () => this.adapter.updateActivity(this, activity)); - } - /** - * Deletes an existing activity. - * - * The `ConversationReference` for the activity being deleted will be routed through any registered - * [onDeleteActivity](#ondeleteactivity) handlers before being passed to `adapter.deleteActivity()`. - * @param idOrReference ID or conversation of the activity being deleted. If an ID is specified the conversation reference information from the current request will be used to delete the activity. - */ - deleteActivity(idOrReference) { - let reference; - if (typeof idOrReference === 'string') { - reference = TurnContext.getConversationReference(this.activity); - reference.activityId = idOrReference; - } - else { - reference = idOrReference; - } - return this.emit(this._onDeleteActivity, reference, () => this.adapter.deleteActivity(this, reference)); - } - /** - * Registers a handler to be notified of and potentially intercept the sending of activities. - * @param handler A function that will be called anytime [sendActivity()](#sendactivity) is called. The handler should call `next()` to continue sending of the activities. - */ - onSendActivities(handler) { - this._onSendActivities.push(handler); - return this; - } - /** - * Registers a handler to be notified of and potentially intercept an activity being updated. - * @param handler A function that will be called anytime [updateActivity()](#updateactivity) is called. The handler should call `next()` to continue sending of the replacement activity. - */ - onUpdateActivity(handler) { - this._onUpdateActivity.push(handler); - return this; - } - /** - * Registers a handler to be notified of and potentially intercept an activity being deleted. - * @param handler A function that will be called anytime [deleteActivity()](#deleteactivity) is called. The handler should call `next()` to continue deletion of the activity. - */ - onDeleteActivity(handler) { - this._onDeleteActivity.push(handler); - return this; - } - emit(handlers, arg, next) { - const list = handlers.slice(); - const context = this; - function emitNext(i) { - try { - if (i < list.length) { - return Promise.resolve(list[i](context, arg, () => emitNext(i + 1))); - } - return Promise.resolve(next()); - } - catch (err) { - return Promise.reject(err); - } - } - return emitNext(0); - } - /** - * Returns the conversation reference for an activity. This can be saved as a plain old JSON - * object and then later used to message the user proactively. - * - * **Usage Example** - * - * ```JavaScript - * const reference = TurnContext.getConversationReference(context.request); - * ``` - * @param activity The activity to copy the conversation reference from - */ - static getConversationReference(activity) { - return { - activityId: activity.id, - user: internal_1.shallowCopy(activity.from), - bot: internal_1.shallowCopy(activity.recipient), - conversation: internal_1.shallowCopy(activity.conversation), - channelId: activity.channelId, - serviceUrl: activity.serviceUrl - }; - } - /** - * Updates an activity with the delivery information from a conversation reference. Calling - * this after [getConversationReference()](#getconversationreference) on an incoming activity - * will properly address the reply to a received activity. - * - * **Usage Example** - * - * ```JavaScript - * // Send a typing indicator without calling any handlers - * const reference = TurnContext.getConversationReference(context.request); - * const activity = TurnContext.applyConversationReference({ type: 'typing' }, reference); - * return context.adapter.sendActivity(activity); - * ``` - * @param activity Activity to copy delivery information to. - * @param reference Conversation reference containing delivery information. - * @param isIncoming (Optional) flag indicating whether the activity is an incoming or outgoing activity. Defaults to `false` indicating the activity is outgoing. - */ - static applyConversationReference(activity, reference, isIncoming = false) { - activity.channelId = reference.channelId; - activity.serviceUrl = reference.serviceUrl; - activity.conversation = reference.conversation; - if (isIncoming) { - activity.from = reference.user; - activity.recipient = reference.bot; - if (reference.activityId) { - activity.id = reference.activityId; - } - } - else { - activity.from = reference.bot; - activity.recipient = reference.user; - if (reference.activityId) { - activity.replyToId = reference.activityId; - } - } - return activity; - } -} -exports.TurnContext = TurnContext; -//# sourceMappingURL=turnContext.js.map - -/***/ }), - -/***/ "../../libraries/botframework-schema/lib/index.js": -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/** - * @module botbuilder - */ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Defines values for ActivityTypes. - * Possible values include: 'message', 'contactRelationUpdate', - * 'conversationUpdate', 'typing', 'ping', 'endOfConversation', 'event', - * 'invoke', 'deleteUserData', 'messageUpdate', 'messageDelete', - * 'installationUpdate', 'messageReaction', 'suggestion' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: ActivityTypes = - * "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var ActivityTypes; -(function (ActivityTypes) { - ActivityTypes["Message"] = "message"; - ActivityTypes["ContactRelationUpdate"] = "contactRelationUpdate"; - ActivityTypes["ConversationUpdate"] = "conversationUpdate"; - ActivityTypes["Typing"] = "typing"; - ActivityTypes["Ping"] = "ping"; - ActivityTypes["EndOfConversation"] = "endOfConversation"; - ActivityTypes["Event"] = "event"; - ActivityTypes["Invoke"] = "invoke"; - ActivityTypes["DeleteUserData"] = "deleteUserData"; - ActivityTypes["MessageUpdate"] = "messageUpdate"; - ActivityTypes["MessageDelete"] = "messageDelete"; - ActivityTypes["InstallationUpdate"] = "installationUpdate"; - ActivityTypes["MessageReaction"] = "messageReaction"; - ActivityTypes["Suggestion"] = "suggestion"; -})(ActivityTypes = exports.ActivityTypes || (exports.ActivityTypes = {})); -/** - * Defines values for TextFormatTypes. - * Possible values include: 'markdown', 'plain', 'xml' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: TextFormatTypes = - * "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var TextFormatTypes; -(function (TextFormatTypes) { - TextFormatTypes["Markdown"] = "markdown"; - TextFormatTypes["Plain"] = "plain"; - TextFormatTypes["Xml"] = "xml"; -})(TextFormatTypes = exports.TextFormatTypes || (exports.TextFormatTypes = {})); -/** - * Defines values for AttachmentLayoutTypes. - * Possible values include: 'list', 'carousel' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: AttachmentLayoutTypes = - * "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var AttachmentLayoutTypes; -(function (AttachmentLayoutTypes) { - AttachmentLayoutTypes["List"] = "list"; - AttachmentLayoutTypes["Carousel"] = "carousel"; -})(AttachmentLayoutTypes = exports.AttachmentLayoutTypes || (exports.AttachmentLayoutTypes = {})); -/** - * Defines values for MessageReactionTypes. - * Possible values include: 'like', 'plusOne' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: MessageReactionTypes = - * "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var MessageReactionTypes; -(function (MessageReactionTypes) { - MessageReactionTypes["Like"] = "like"; - MessageReactionTypes["PlusOne"] = "plusOne"; -})(MessageReactionTypes = exports.MessageReactionTypes || (exports.MessageReactionTypes = {})); -/** - * Defines values for InputHints. - * Possible values include: 'acceptingInput', 'ignoringInput', 'expectingInput' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: InputHints = "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var InputHints; -(function (InputHints) { - InputHints["AcceptingInput"] = "acceptingInput"; - InputHints["IgnoringInput"] = "ignoringInput"; - InputHints["ExpectingInput"] = "expectingInput"; -})(InputHints = exports.InputHints || (exports.InputHints = {})); -/** - * Defines values for ActionTypes. - * Possible values include: 'openUrl', 'imBack', 'postBack', 'playAudio', - * 'playVideo', 'showImage', 'downloadFile', 'signin', 'call', 'payment', - * 'messageBack' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: ActionTypes = - * "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var ActionTypes; -(function (ActionTypes) { - ActionTypes["OpenUrl"] = "openUrl"; - ActionTypes["ImBack"] = "imBack"; - ActionTypes["PostBack"] = "postBack"; - ActionTypes["PlayAudio"] = "playAudio"; - ActionTypes["PlayVideo"] = "playVideo"; - ActionTypes["ShowImage"] = "showImage"; - ActionTypes["DownloadFile"] = "downloadFile"; - ActionTypes["Signin"] = "signin"; - ActionTypes["Call"] = "call"; - ActionTypes["Payment"] = "payment"; - ActionTypes["MessageBack"] = "messageBack"; -})(ActionTypes = exports.ActionTypes || (exports.ActionTypes = {})); -/** - * Defines values for EndOfConversationCodes. - * Possible values include: 'unknown', 'completedSuccessfully', - * 'userCancelled', 'botTimedOut', 'botIssuedInvalidMessage', 'channelFailed' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: EndOfConversationCodes = - * "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var EndOfConversationCodes; -(function (EndOfConversationCodes) { - EndOfConversationCodes["Unknown"] = "unknown"; - EndOfConversationCodes["CompletedSuccessfully"] = "completedSuccessfully"; - EndOfConversationCodes["UserCancelled"] = "userCancelled"; - EndOfConversationCodes["BotTimedOut"] = "botTimedOut"; - EndOfConversationCodes["BotIssuedInvalidMessage"] = "botIssuedInvalidMessage"; - EndOfConversationCodes["ChannelFailed"] = "channelFailed"; -})(EndOfConversationCodes = exports.EndOfConversationCodes || (exports.EndOfConversationCodes = {})); -/** - * Defines values for ContactRelationUpdateActionTypes. - * Possible values include: 'add', 'remove' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: ContactRelationUpdateActionTypes = - * "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var ContactRelationUpdateActionTypes; -(function (ContactRelationUpdateActionTypes) { - ContactRelationUpdateActionTypes["Add"] = "add"; - ContactRelationUpdateActionTypes["Remove"] = "remove"; -})(ContactRelationUpdateActionTypes = exports.ContactRelationUpdateActionTypes || (exports.ContactRelationUpdateActionTypes = {})); -/** - * Defines values for InstallationUpdateActionTypes. - * Possible values include: 'add', 'remove' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: InstallationUpdateActionTypes = - * "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var InstallationUpdateActionTypes; -(function (InstallationUpdateActionTypes) { - InstallationUpdateActionTypes["Add"] = "add"; - InstallationUpdateActionTypes["Remove"] = "remove"; -})(InstallationUpdateActionTypes = exports.InstallationUpdateActionTypes || (exports.InstallationUpdateActionTypes = {})); -/** - * Defines values for ActivityImportance. - * Possible values include: 'low', 'normal', 'high' - * There could be more values for this enum apart from the ones defined here.If - * you want to set a value that is not from the known values then you can do - * the following: - * let param: ActivityImportance = - * "someUnknownValueThatWillStillBeValid"; - * @readonly - * @enum {string} - */ -var ActivityImportance; -(function (ActivityImportance) { - ActivityImportance["Low"] = "low"; - ActivityImportance["Normal"] = "normal"; - ActivityImportance["High"] = "high"; -})(ActivityImportance = exports.ActivityImportance || (exports.ActivityImportance = {})); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "../../node_modules/css-loader/index.js!../../node_modules/skeleton-css/css/normalize.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../node_modules/css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS text size adjust after orientation change, without disabling\n * user zoom.\n */\n\nhtml {\n font-family: sans-serif; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove default margin.\n */\n\nbody {\n margin: 0;\n}\n\n/* HTML5 display definitions\n ========================================================================== */\n\n/**\n * Correct `block` display not defined for any HTML5 element in IE 8/9.\n * Correct `block` display not defined for `details` or `summary` in IE 10/11\n * and Firefox.\n * Correct `block` display not defined for `main` in IE 11.\n */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n/**\n * 1. Correct `inline-block` display not defined in IE 8/9.\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n */\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Address `[hidden]` styling not present in IE 8/9/10.\n * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.\n */\n\n[hidden],\ntemplate {\n display: none;\n}\n\n/* Links\n ========================================================================== */\n\n/**\n * Remove the gray background color from active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * Improve readability when focused and also mouse hovered in all browsers.\n */\n\na:active,\na:hover {\n outline: 0;\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n */\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n/**\n * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n */\n\nb,\nstrong {\n font-weight: bold;\n}\n\n/**\n * Address styling not present in Safari and Chrome.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Address variable `h1` font-size and margin within `section` and `article`\n * contexts in Firefox 4+, Safari, and Chrome.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/**\n * Address styling not present in IE 8/9.\n */\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove border when inside `a` element in IE 8/9/10.\n */\n\nimg {\n border: 0;\n}\n\n/**\n * Correct overflow not hidden in IE 9/10/11.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Address margin not present in IE 8/9 and Safari.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * Address differences between Firefox and other browsers.\n */\n\nhr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n}\n\n/**\n * Contain overflow in all browsers.\n */\n\npre {\n overflow: auto;\n}\n\n/**\n * Address odd `em`-unit font size rendering in all browsers.\n */\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\n * styling of `select`, unless a `border` property is set.\n */\n\n/**\n * 1. Correct color not being inherited.\n * Known issue: affects color of disabled elements.\n * 2. Correct font properties not being inherited.\n * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; /* 1 */\n font: inherit; /* 2 */\n margin: 0; /* 3 */\n}\n\n/**\n * Address `overflow` set to `hidden` in IE 8/9/10/11.\n */\n\nbutton {\n overflow: visible;\n}\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n * Correct `select` style inheritance in Firefox.\n */\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n * and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n * `input` and others.\n */\n\nbutton,\nhtml input[type=\"button\"], /* 1 */\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; /* 2 */\n cursor: pointer; /* 3 */\n}\n\n/**\n * Re-set default cursor for disabled elements.\n */\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\n * the UA stylesheet.\n */\n\ninput {\n line-height: normal;\n}\n\n/**\n * It's recommended that you don't attempt to style these elements.\n * Firefox's implementation doesn't respect box-sizing, padding, or width.\n *\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\n * 2. Remove excess padding in IE 8/9/10.\n */\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Fix the cursor style for Chrome's increment/decrement buttons. For certain\n * `font-size` values of the `input`, it causes the cursor style of the\n * decrement button to change from `default` to `text`.\n */\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari and Chrome\n * (include `-moz` to future-proof).\n */\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n -moz-box-sizing: content-box;\n -webkit-box-sizing: content-box; /* 2 */\n box-sizing: content-box;\n}\n\n/**\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\n * Safari (but not Chrome) clips the cancel button when the search input has\n * padding (and `textfield` appearance).\n */\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * Define consistent border, margin, and padding.\n */\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9/10/11.\n * 2. Remove padding so people aren't caught out if they zero out fieldsets.\n */\n\nlegend {\n border: 0; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Remove default vertical scrollbar in IE 8/9/10/11.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * Don't inherit the `font-weight` (applied by a rule above).\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n */\n\noptgroup {\n font-weight: bold;\n}\n\n/* Tables\n ========================================================================== */\n\n/**\n * Remove most spacing between table cells.\n */\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}", ""]); - -// exports - - -/***/ }), - -/***/ "../../node_modules/css-loader/index.js!../../node_modules/skeleton-css/css/skeleton.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../node_modules/css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "/*\n* Skeleton V2.0.4\n* Copyright 2014, Dave Gamache\n* www.getskeleton.com\n* Free to use under the MIT license.\n* http://www.opensource.org/licenses/mit-license.php\n* 12/29/2014\n*/\n\n\n/* Table of contents\n––––––––––––––––––––––––––––––––––––––––––––––––––\n- Grid\n- Base Styles\n- Typography\n- Links\n- Buttons\n- Forms\n- Lists\n- Code\n- Tables\n- Spacing\n- Utilities\n- Clearing\n- Media Queries\n*/\n\n\n/* Grid\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\n.container {\n position: relative;\n width: 100%;\n max-width: 960px;\n margin: 0 auto;\n padding: 0 20px;\n box-sizing: border-box; }\n.column,\n.columns {\n width: 100%;\n float: left;\n box-sizing: border-box; }\n\n/* For devices larger than 400px */\n@media (min-width: 400px) {\n .container {\n width: 85%;\n padding: 0; }\n}\n\n/* For devices larger than 550px */\n@media (min-width: 550px) {\n .container {\n width: 80%; }\n .column,\n .columns {\n margin-left: 4%; }\n .column:first-child,\n .columns:first-child {\n margin-left: 0; }\n\n .one.column,\n .one.columns { width: 4.66666666667%; }\n .two.columns { width: 13.3333333333%; }\n .three.columns { width: 22%; }\n .four.columns { width: 30.6666666667%; }\n .five.columns { width: 39.3333333333%; }\n .six.columns { width: 48%; }\n .seven.columns { width: 56.6666666667%; }\n .eight.columns { width: 65.3333333333%; }\n .nine.columns { width: 74.0%; }\n .ten.columns { width: 82.6666666667%; }\n .eleven.columns { width: 91.3333333333%; }\n .twelve.columns { width: 100%; margin-left: 0; }\n\n .one-third.column { width: 30.6666666667%; }\n .two-thirds.column { width: 65.3333333333%; }\n\n .one-half.column { width: 48%; }\n\n /* Offsets */\n .offset-by-one.column,\n .offset-by-one.columns { margin-left: 8.66666666667%; }\n .offset-by-two.column,\n .offset-by-two.columns { margin-left: 17.3333333333%; }\n .offset-by-three.column,\n .offset-by-three.columns { margin-left: 26%; }\n .offset-by-four.column,\n .offset-by-four.columns { margin-left: 34.6666666667%; }\n .offset-by-five.column,\n .offset-by-five.columns { margin-left: 43.3333333333%; }\n .offset-by-six.column,\n .offset-by-six.columns { margin-left: 52%; }\n .offset-by-seven.column,\n .offset-by-seven.columns { margin-left: 60.6666666667%; }\n .offset-by-eight.column,\n .offset-by-eight.columns { margin-left: 69.3333333333%; }\n .offset-by-nine.column,\n .offset-by-nine.columns { margin-left: 78.0%; }\n .offset-by-ten.column,\n .offset-by-ten.columns { margin-left: 86.6666666667%; }\n .offset-by-eleven.column,\n .offset-by-eleven.columns { margin-left: 95.3333333333%; }\n\n .offset-by-one-third.column,\n .offset-by-one-third.columns { margin-left: 34.6666666667%; }\n .offset-by-two-thirds.column,\n .offset-by-two-thirds.columns { margin-left: 69.3333333333%; }\n\n .offset-by-one-half.column,\n .offset-by-one-half.columns { margin-left: 52%; }\n\n}\n\n\n/* Base Styles\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\n/* NOTE\nhtml is set to 62.5% so that all the REM measurements throughout Skeleton\nare based on 10px sizing. So basically 1.5rem = 15px :) */\nhtml {\n font-size: 62.5%; }\nbody {\n font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */\n line-height: 1.6;\n font-weight: 400;\n font-family: \"Raleway\", \"HelveticaNeue\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n color: #222; }\n\n\n/* Typography\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\nh1, h2, h3, h4, h5, h6 {\n margin-top: 0;\n margin-bottom: 2rem;\n font-weight: 300; }\nh1 { font-size: 4.0rem; line-height: 1.2; letter-spacing: -.1rem;}\nh2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; }\nh3 { font-size: 3.0rem; line-height: 1.3; letter-spacing: -.1rem; }\nh4 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; }\nh5 { font-size: 1.8rem; line-height: 1.5; letter-spacing: -.05rem; }\nh6 { font-size: 1.5rem; line-height: 1.6; letter-spacing: 0; }\n\n/* Larger than phablet */\n@media (min-width: 550px) {\n h1 { font-size: 5.0rem; }\n h2 { font-size: 4.2rem; }\n h3 { font-size: 3.6rem; }\n h4 { font-size: 3.0rem; }\n h5 { font-size: 2.4rem; }\n h6 { font-size: 1.5rem; }\n}\n\np {\n margin-top: 0; }\n\n\n/* Links\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\na {\n color: #1EAEDB; }\na:hover {\n color: #0FA0CE; }\n\n\n/* Buttons\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\n.button,\nbutton,\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n display: inline-block;\n height: 38px;\n padding: 0 30px;\n color: #555;\n text-align: center;\n font-size: 11px;\n font-weight: 600;\n line-height: 38px;\n letter-spacing: .1rem;\n text-transform: uppercase;\n text-decoration: none;\n white-space: nowrap;\n background-color: transparent;\n border-radius: 4px;\n border: 1px solid #bbb;\n cursor: pointer;\n box-sizing: border-box; }\n.button:hover,\nbutton:hover,\ninput[type=\"submit\"]:hover,\ninput[type=\"reset\"]:hover,\ninput[type=\"button\"]:hover,\n.button:focus,\nbutton:focus,\ninput[type=\"submit\"]:focus,\ninput[type=\"reset\"]:focus,\ninput[type=\"button\"]:focus {\n color: #333;\n border-color: #888;\n outline: 0; }\n.button.button-primary,\nbutton.button-primary,\ninput[type=\"submit\"].button-primary,\ninput[type=\"reset\"].button-primary,\ninput[type=\"button\"].button-primary {\n color: #FFF;\n background-color: #33C3F0;\n border-color: #33C3F0; }\n.button.button-primary:hover,\nbutton.button-primary:hover,\ninput[type=\"submit\"].button-primary:hover,\ninput[type=\"reset\"].button-primary:hover,\ninput[type=\"button\"].button-primary:hover,\n.button.button-primary:focus,\nbutton.button-primary:focus,\ninput[type=\"submit\"].button-primary:focus,\ninput[type=\"reset\"].button-primary:focus,\ninput[type=\"button\"].button-primary:focus {\n color: #FFF;\n background-color: #1EAEDB;\n border-color: #1EAEDB; }\n\n\n/* Forms\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\ninput[type=\"email\"],\ninput[type=\"number\"],\ninput[type=\"search\"],\ninput[type=\"text\"],\ninput[type=\"tel\"],\ninput[type=\"url\"],\ninput[type=\"password\"],\ntextarea,\nselect {\n height: 38px;\n padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */\n background-color: #fff;\n border: 1px solid #D1D1D1;\n border-radius: 4px;\n box-shadow: none;\n box-sizing: border-box; }\n/* Removes awkward default styles on some inputs for iOS */\ninput[type=\"email\"],\ninput[type=\"number\"],\ninput[type=\"search\"],\ninput[type=\"text\"],\ninput[type=\"tel\"],\ninput[type=\"url\"],\ninput[type=\"password\"],\ntextarea {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none; }\ntextarea {\n min-height: 65px;\n padding-top: 6px;\n padding-bottom: 6px; }\ninput[type=\"email\"]:focus,\ninput[type=\"number\"]:focus,\ninput[type=\"search\"]:focus,\ninput[type=\"text\"]:focus,\ninput[type=\"tel\"]:focus,\ninput[type=\"url\"]:focus,\ninput[type=\"password\"]:focus,\ntextarea:focus,\nselect:focus {\n border: 1px solid #33C3F0;\n outline: 0; }\nlabel,\nlegend {\n display: block;\n margin-bottom: .5rem;\n font-weight: 600; }\nfieldset {\n padding: 0;\n border-width: 0; }\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n display: inline; }\nlabel > .label-body {\n display: inline-block;\n margin-left: .5rem;\n font-weight: normal; }\n\n\n/* Lists\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\nul {\n list-style: circle inside; }\nol {\n list-style: decimal inside; }\nol, ul {\n padding-left: 0;\n margin-top: 0; }\nul ul,\nul ol,\nol ol,\nol ul {\n margin: 1.5rem 0 1.5rem 3rem;\n font-size: 90%; }\nli {\n margin-bottom: 1rem; }\n\n\n/* Code\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\ncode {\n padding: .2rem .5rem;\n margin: 0 .2rem;\n font-size: 90%;\n white-space: nowrap;\n background: #F1F1F1;\n border: 1px solid #E1E1E1;\n border-radius: 4px; }\npre > code {\n display: block;\n padding: 1rem 1.5rem;\n white-space: pre; }\n\n\n/* Tables\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\nth,\ntd {\n padding: 12px 15px;\n text-align: left;\n border-bottom: 1px solid #E1E1E1; }\nth:first-child,\ntd:first-child {\n padding-left: 0; }\nth:last-child,\ntd:last-child {\n padding-right: 0; }\n\n\n/* Spacing\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\nbutton,\n.button {\n margin-bottom: 1rem; }\ninput,\ntextarea,\nselect,\nfieldset {\n margin-bottom: 1.5rem; }\npre,\nblockquote,\ndl,\nfigure,\ntable,\np,\nul,\nol,\nform {\n margin-bottom: 2.5rem; }\n\n\n/* Utilities\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\n.u-full-width {\n width: 100%;\n box-sizing: border-box; }\n.u-max-full-width {\n max-width: 100%;\n box-sizing: border-box; }\n.u-pull-right {\n float: right; }\n.u-pull-left {\n float: left; }\n\n\n/* Misc\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\nhr {\n margin-top: 3rem;\n margin-bottom: 3.5rem;\n border-width: 0;\n border-top: 1px solid #E1E1E1; }\n\n\n/* Clearing\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\n\n/* Self Clearing Goodness */\n.container:after,\n.row:after,\n.u-cf {\n content: \"\";\n display: table;\n clear: both; }\n\n\n/* Media Queries\n–––––––––––––––––––––––––––––––––––––––––––––––––– */\n/*\nNote: The best way to structure the use of media queries is to create the queries\nnear the relevant code. For example, if you wanted to change the styles for buttons\non small devices, paste the mobile query code up in the buttons section and style it\nthere.\n*/\n\n\n/* Larger than mobile */\n@media (min-width: 400px) {}\n\n/* Larger than phablet (also point when grid becomes active) */\n@media (min-width: 550px) {}\n\n/* Larger than tablet */\n@media (min-width: 750px) {}\n\n/* Larger than desktop */\n@media (min-width: 1000px) {}\n\n/* Larger than Desktop HD */\n@media (min-width: 1200px) {}\n", ""]); - -// exports - - -/***/ }), - -/***/ "../../node_modules/css-loader/index.js!./src/css/alarmBot.css": -/***/ (function(module, exports, __webpack_require__) { - -exports = module.exports = __webpack_require__("../../node_modules/css-loader/lib/css-base.js")(false); -// imports - - -// module -exports.push([module.i, "section {\r\n margin: 10px;\r\n padding: 10px;\r\n border: 1px solid #d1d1d1;\r\n}\r\n\r\nsection > div:first-child {\r\n display: flex;\r\n height: 500px;\r\n overflow: hidden;\r\n}\r\n\r\nsection > div > div:first-child {\r\n width: 100%;\r\n}\r\n\r\nsection > div > div:last-child {\r\n width: 200px;\r\n}\r\n\r\nsection > form {\r\n padding: 10px 10px 5px 10px;\r\n margin: 0;\r\n}\r\n\r\nh5 {\r\n text-align: center;\r\n}\r\n\r\ninput[type=\"text\"] {\r\n height: 39px;\r\n width: calc(100% - 105px);\r\n margin: 0;\r\n}\r\n\r\nbutton.button-primary {\r\n margin: 0;\r\n}\r\n\r\n.col {\r\n display: flex;\r\n flex-direction: column;\r\n}\r\n\r\n.border-left {\r\n border-left: 1px solid #D1D1D1;\r\n}\r\n\r\n.user-message, .bot-message {\r\n position: relative;\r\n margin-left: 10px;\r\n margin-right: 10px;\r\n}\r\n\r\n.user-message p {\r\n border-radius: 3px;\r\n border: 1px solid #15afc0;\r\n position: relative;\r\n background: #16cbda;\r\n color: white;\r\n display: inline-block;\r\n transform: translateX(-100%);\r\n right: calc(-100% + 10px);\r\n}\r\n\r\n.user-message p:after {\r\n content: '';\r\n background: #16cbda;\r\n width: 10px;\r\n height: 10px;\r\n position: absolute;\r\n right: -2px;\r\n transform: rotate(45deg) translateY(-50%);\r\n z-index: -1;\r\n top: 50%;\r\n}\r\n\r\n.bot-message p {\r\n border-radius: 3px;\r\n border: 1px solid #0078d7;\r\n position: relative;\r\n background: #0092ff;\r\n color: white;\r\n display: inline-block;\r\n}\r\n\r\n.bot-message p:after {\r\n content: '';\r\n background: #0092ff;\r\n width: 10px;\r\n height: 10px;\r\n position: absolute;\r\n left: -9px;\r\n transform: rotate(45deg) translateY(-50%);\r\n z-index: -1;\r\n top: 50%;\r\n}\r\n\r\n.bot-message p, .user-message p {\r\n padding: 5px;\r\n}\r\n\r\n.user-message + .bot-message {\r\n margin-top: 5px;\r\n}\r\n\r\n.content-mask {\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n.messages-container {\r\n transform: translateY(0);\r\n transition: transform .5s ease-out;\r\n}\r\n\r\nh5 {\r\n margin: 0;\r\n padding: 10px;\r\n font-size: 18px;\r\n text-transform: uppercase;\r\n}\r\n\r\nul.alarms-list {\r\n height: 100%;\r\n margin: 0;\r\n}\r\n\r\nul.alarms-list {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0 5px;\r\n height: calc(100% - 30px);\r\n}\r\n\r\nul.alarms-list li {\r\n margin-top: 5px;\r\n border-radius: 5px;\r\n border: 1px solid #d5d5d7;\r\n min-height: 120px;\r\n}\r\n\r\nul.alarms-list li h5 {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n text-transform: uppercase;\r\n font-size: 12px;\r\n border-top-left-radius: 5px;\r\n border-top-right-radius: 5px;\r\n background: #f7f7f9;\r\n border-bottom: 1px solid #d5d5d7;\r\n margin: 0;\r\n padding: 10px;\r\n}\r\n\r\nul.alarms-list li p {\r\n margin: 5px 0 0 0;\r\n font-size: 11px;\r\n padding: 5px;\r\n}", ""]); - -// exports - - -/***/ }), - -/***/ "../../node_modules/css-loader/lib/css-base.js": -/***/ (function(module, exports) { - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -module.exports = function(useSourceMap) { - var list = []; - - // return the list of modules as css string - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item, useSourceMap); - if(item[2]) { - return "@media " + item[2] + "{" + content + "}"; - } else { - return content; - } - }).join(""); - }; - - // import a list of modules into the list - list.i = function(modules, mediaQuery) { - if(typeof modules === "string") - modules = [[null, modules, ""]]; - var alreadyImportedModules = {}; - for(var i = 0; i < this.length; i++) { - var id = this[i][0]; - if(typeof id === "number") - alreadyImportedModules[id] = true; - } - for(i = 0; i < modules.length; i++) { - var item = modules[i]; - // skip already imported module - // this implementation is not 100% perfect for weird media query combinations - // when a module is imported multiple times with different media queries. - // I hope this will never occur (Hey this way we have smaller bundles) - if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { - if(mediaQuery && !item[2]) { - item[2] = mediaQuery; - } else if(mediaQuery) { - item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; - } - list.push(item); - } - } - }; - return list; -}; - -function cssWithMappingToString(item, useSourceMap) { - var content = item[1] || ''; - var cssMapping = item[3]; - if (!cssMapping) { - return content; - } - - if (useSourceMap && typeof btoa === 'function') { - var sourceMapping = toComment(cssMapping); - var sourceURLs = cssMapping.sources.map(function (source) { - return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' - }); - - return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); - } - - return [content].join('\n'); -} - -// Adapted from convert-source-map (MIT) -function toComment(sourceMap) { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); - var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; - - return '/*# ' + data + ' */'; -} - - -/***/ }), - -/***/ "../../node_modules/skeleton-css/css/normalize.css": -/***/ (function(module, exports, __webpack_require__) { - - -var content = __webpack_require__("../../node_modules/css-loader/index.js!../../node_modules/skeleton-css/css/normalize.css"); - -if(typeof content === 'string') content = [[module.i, content, '']]; - -var transform; -var insertInto; - - - -var options = {"hmr":true} - -options.transform = transform -options.insertInto = undefined; - -var update = __webpack_require__("../../node_modules/style-loader/lib/addStyles.js")(content, options); - -if(content.locals) module.exports = content.locals; - -if(true) { - module.hot.accept("../../node_modules/css-loader/index.js!../../node_modules/skeleton-css/css/normalize.css", function() { - var newContent = __webpack_require__("../../node_modules/css-loader/index.js!../../node_modules/skeleton-css/css/normalize.css"); - - if(typeof newContent === 'string') newContent = [[module.i, newContent, '']]; - - var locals = (function(a, b) { - var key, idx = 0; - - for(key in a) { - if(!b || a[key] !== b[key]) return false; - idx++; - } - - for(key in b) idx--; - - return idx === 0; - }(content.locals, newContent.locals)); - - if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.'); - - update(newContent); - }); - - module.hot.dispose(function() { update(); }); -} - -/***/ }), - -/***/ "../../node_modules/skeleton-css/css/skeleton.css": -/***/ (function(module, exports, __webpack_require__) { - - -var content = __webpack_require__("../../node_modules/css-loader/index.js!../../node_modules/skeleton-css/css/skeleton.css"); - -if(typeof content === 'string') content = [[module.i, content, '']]; - -var transform; -var insertInto; - - - -var options = {"hmr":true} - -options.transform = transform -options.insertInto = undefined; - -var update = __webpack_require__("../../node_modules/style-loader/lib/addStyles.js")(content, options); - -if(content.locals) module.exports = content.locals; - -if(true) { - module.hot.accept("../../node_modules/css-loader/index.js!../../node_modules/skeleton-css/css/skeleton.css", function() { - var newContent = __webpack_require__("../../node_modules/css-loader/index.js!../../node_modules/skeleton-css/css/skeleton.css"); - - if(typeof newContent === 'string') newContent = [[module.i, newContent, '']]; - - var locals = (function(a, b) { - var key, idx = 0; - - for(key in a) { - if(!b || a[key] !== b[key]) return false; - idx++; - } - - for(key in b) idx--; - - return idx === 0; - }(content.locals, newContent.locals)); - - if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.'); - - update(newContent); - }); - - module.hot.dispose(function() { update(); }); -} - -/***/ }), - -/***/ "../../node_modules/style-loader/lib/addStyles.js": -/***/ (function(module, exports, __webpack_require__) { - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ - -var stylesInDom = {}; - -var memoize = function (fn) { - var memo; - - return function () { - if (typeof memo === "undefined") memo = fn.apply(this, arguments); - return memo; - }; -}; - -var isOldIE = memoize(function () { - // Test for IE <= 9 as proposed by Browserhacks - // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 - // Tests for existence of standard globals is to allow style-loader - // to operate correctly into non-standard environments - // @see https://github.com/webpack-contrib/style-loader/issues/177 - return window && document && document.all && !window.atob; -}); - -var getTarget = function (target) { - return document.querySelector(target); -}; - -var getElement = (function (fn) { - var memo = {}; - - return function(target) { - // If passing function in options, then use it for resolve "head" element. - // Useful for Shadow Root style i.e - // { - // insertInto: function () { return document.querySelector("#foo").shadowRoot } - // } - if (typeof target === 'function') { - return target(); - } - if (typeof memo[target] === "undefined") { - var styleTarget = getTarget.call(this, target); - // Special case to return head of iframe instead of iframe itself - if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { - try { - // This will throw an exception if access to iframe is blocked - // due to cross-origin restrictions - styleTarget = styleTarget.contentDocument.head; - } catch(e) { - styleTarget = null; - } - } - memo[target] = styleTarget; - } - return memo[target] - }; -})(); - -var singleton = null; -var singletonCounter = 0; -var stylesInsertedAtTop = []; - -var fixUrls = __webpack_require__("../../node_modules/style-loader/lib/urls.js"); - -module.exports = function(list, options) { - if (typeof DEBUG !== "undefined" && DEBUG) { - if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); - } - - options = options || {}; - - options.attrs = typeof options.attrs === "object" ? options.attrs : {}; - - // Force single-tag solution on IE6-9, which has a hard limit on the # of